/* ===== HappiJourneys.com - Enhanced Styles ===== */
/* ===== Version 3.0 ===== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header with Language Switcher ===== */
header {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.8rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: 8px;
}
nav { display: flex; align-items: center; gap: 4px; }
nav a {
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
nav a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }
nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* ===== Language Switcher ===== */
.lang-switcher {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 4px;
}
.header-lang { display: flex; }
nav .lang-switcher { display: none; }
.lang-switcher button {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-500);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 500;
}
.lang-switcher button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.lang-switcher button.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary) 40%, var(--secondary) 100%);
  color: var(--white);
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(248,250,252,0.5));
  z-index: 0;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0 0;
  max-width: 800px;
  margin: 0 auto;
}
.stat-item {
  text-align: center;
  padding: 20px 12px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.2s, background 0.2s;
}
.stat-item:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.18);
}
.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
  display: block;
  margin-top: 4px;
}

/* ===== Featured Tool Section ===== */
.featured-section {
  background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}
.featured-inner {
  max-width: 700px;
  margin: 0 auto;
}
.featured-inner h2 { font-size: 1.5rem; margin-bottom: 12px; }
.featured-inner p { opacity: 0.9; margin-bottom: 20px; }
.featured-inner .btn {
  background: var(--white);
  color: var(--accent);
}
.featured-inner .btn:hover { background: var(--gray-100); }

/* ===== Travel Tips Section ===== */
.tips-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 32px 20px;
}
.tips-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.tips-icon { font-size: 2.5rem; flex-shrink: 0; }
.tips-content h3 { font-size: 1rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.tips-content p { font-size: 1.1rem; color: var(--gray-700); line-height: 1.7; }

/* ===== Category Sections ===== */
.section { padding: 40px 0; }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .emoji { font-size: 1.6rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tool-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-card:hover::after { transform: scaleX(1); }
.tool-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
  text-decoration: none;
  border-color: var(--primary-light);
}
.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.tool-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  flex: 1;
  line-height: 1.5;
}

/* ===== Tool Page Layout ===== */
.tool-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}
.tool-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.tool-header p { opacity: 0.9; font-size: 1rem; max-width: 600px; margin: 0 auto; }

.tool-main {
  padding: 40px 20px;
  flex: 1;
}
.tool-container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group .hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--gray-800);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #059669; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #d97706; }

/* ===== Result Box ===== */
.result-box {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  display: none;
  animation: fadeInUp 0.3s ease;
}
.result-box.show { display: block; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-700);
}
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.result-item:last-child { border-bottom: none; }
.result-label { font-size: 0.9rem; color: var(--gray-500); }
.result-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.result-value.big { font-size: 2rem; }
.result-value.green { color: var(--green); }
.result-value.red { color: var(--red); }

/* ===== Checkbox Group ===== */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.checkbox-item:hover { border-color: var(--primary); background: var(--primary-light); }
.checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ===== List Output ===== */
.list-output { padding: 0; margin: 8px 0 0 20px; }
.list-output li { padding: 6px 0; font-size: 0.9rem; color: var(--gray-700); }

/* ===== Blog with Cover Images ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 100%;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.blog-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
  border-color: var(--primary-light);
}
.blog-card-cover {
  height: 210px;
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
}
.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.blog-card:hover .blog-card-cover img {
  transform: scale(1.07);
}
.blog-card-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(0,0,0,0.38));
  z-index: 1;
  pointer-events: none;
}
.blog-card-cover .cover-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.52);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cover-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.cover-gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.cover-gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.cover-gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.cover-gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.cover-gradient-6 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.cover-gradient-7 { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%); }
.cover-gradient-8 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
.cover-gradient-9 { background: linear-gradient(135deg, #f5576c 0%, #667eea 100%); }
.cover-gradient-10 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.cover-gradient-11 { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.cover-gradient-12 { background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%); }
.cover-gradient-13 { background: linear-gradient(135deg, #e84393 0%, #fd79a8 100%); }
.cover-gradient-14 { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); }
.cover-gradient-15 { background: linear-gradient(135deg, #00b894 0%, #00cec9 100%); }
.cover-gradient-16 { background: linear-gradient(135deg, #e17055 0%, #fab1a0 100%); }
.cover-gradient-17 { background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%); }
.cover-gradient-18 { background: linear-gradient(135deg, #d63031 0%, #e17055 100%); }
.cover-gradient-19 { background: linear-gradient(135deg, #2d3436 0%, #636e72 100%); }
.cover-gradient-20 { background: linear-gradient(135deg, #6ab04c 0%, #badc58 100%); }

.blog-card-body { 
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card h3 { 
  font-size: 1.05rem; 
  font-weight: 600; 
  margin-bottom: 10px;
  line-height: 1.4;
}
.blog-card h3 a { color: var(--gray-900); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { 
  font-size: 0.85rem; 
  color: var(--gray-500); 
  line-height: 1.6;
  flex: 1;
}
.blog-meta { 
  font-size: 0.8rem; 
  color: var(--gray-400); 
  margin-bottom: 10px;
}

/* ===== Blog Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0;
  flex-wrap: wrap;
  max-width: 100%;
}
.pagination button,
.pagination a {
  padding: 8px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-600);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  min-width: 36px;
  text-align: center;
}
.pagination button:hover,
.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.pagination button.active,
.pagination a.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination .page-info {
  padding: 0 8px;
  color: var(--gray-500);
  font-size: 0.8rem;
  white-space: nowrap;
}
.pagination .page-ellipsis {
  padding: 0 4px;
  color: var(--gray-400);
  font-size: 0.85rem;
  user-select: none;
}
.pagination .page-prev,
.pagination .page-next {
  font-weight: 600;
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
    padding: 24px 8px;
  }
  .pagination button,
  .pagination a {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 32px;
  }
  .pagination .page-info {
    font-size: 0.75rem;
    width: 100%;
    text-align: center;
    order: 10;
    margin-top: 8px;
  }
  .pagination .page-prev,
  .pagination .page-next {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* ===== Blog Article ===== */
.blog-article {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.blog-article .article-cover {
  width: 100%;
  max-width: 100%;
  height: 380px;
  border-radius: var(--radius-lg);
  display: block;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--gray-100);
}
.blog-article .article-cover img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.blog-article img {
  max-width: 100%;
  height: auto;
}
.blog-article h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.blog-article .meta { 
  color: var(--gray-400); 
  font-size: 0.9rem; 
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.blog-article h2 { 
  font-size: 1.5rem; 
  margin: 36px 0 16px; 
  color: var(--gray-900);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.blog-article h3 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--gray-800); }
.blog-article p { margin-bottom: 16px; color: var(--gray-600); line-height: 1.8; }
.blog-article ul, .blog-article ol { margin: 12px 0 20px 24px; }
.blog-article li { margin-bottom: 8px; color: var(--gray-600); }
.blog-article .back-link { margin-bottom: 24px; display: inline-block; font-weight: 500; }
.blog-article table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
  table-layout: fixed;
}
.blog-article th, .blog-article td {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}
.blog-article th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}

/* ===== Comments Section ===== */
.comment-section {
  max-width: 720px;
  margin: 40px auto;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}
.comment-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-list { margin-bottom: 32px; }
.comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
}
.comment-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin: 2px 0 8px;
}
.comment-text {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.comment-form-section { 
  border-top: 1px solid var(--gray-200); 
  padding-top: 24px; 
}
.comment-form-section h4 { 
  font-size: 1rem; 
  margin-bottom: 16px; 
  color: var(--gray-700); 
}
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-input, .comment-textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  transition: border 0.2s;
}
.comment-input:focus, .comment-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.comment-textarea {
  resize: vertical;
  margin-bottom: 12px;
}

/* ===== Legal Pages ===== */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}
.legal-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 24px; }
.legal-page h2 { font-size: 1.3rem; margin: 28px 0 12px; color: var(--gray-900); }
.legal-page p { margin-bottom: 14px; color: var(--gray-600); line-height: 1.8; }
.legal-page ul { margin: 10px 0 18px 24px; }
.legal-page li { margin-bottom: 6px; color: var(--gray-600); }
.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ===== Footer ===== */
footer {
  margin-top: auto;
  background: linear-gradient(180deg, var(--gray-900) 0%, #0c1524 100%);
  color: var(--gray-400);
  padding: 56px 20px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col a {
  display: block;
  color: var(--gray-400);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--gray-700);
  text-align: center;
  font-size: 0.8rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--gray-600); }
.breadcrumb .sep { margin: 0 8px; }

/* ===== 404 ===== */
.page-404 {
  text-align: center;
  padding: 80px 20px;
  flex: 1;
}
.page-404 h1 { font-size: 6rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.page-404 h2 { font-size: 1.5rem; margin-bottom: 16px; }
.page-404 p { color: var(--gray-500); margin-bottom: 32px; }

/* ===== Latest Posts on Homepage ===== */
.latest-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-mini-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s;
}
.post-mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-mini-card .mini-cover {
  height: 120px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.post-mini-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.post-mini-card h4 a { color: var(--gray-800); }
.post-mini-card .mini-date { font-size: 0.75rem; color: var(--gray-400); }
.view-all-link {
  text-align: center;
  margin-top: 24px;
}

/* ===== Newsletter (new) ===== */
.newsletter-section {
  background: var(--primary-light);
  padding: 40px 20px;
  text-align: center;
}
.newsletter-inner {
  max-width: 500px;
  margin: 0 auto;
}
.newsletter-inner h3 { font-size: 1.2rem; margin-bottom: 12px; color: var(--gray-800); }
.newsletter-inner p { color: var(--gray-500); margin-bottom: 20px; font-size: 0.9rem; }
.newsletter-form {
  display: flex;
  gap: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* ===== Facebook Share Button ===== */
.fb-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1877F2;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}
.fb-share-btn:hover {
  background: #166FE5;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.fb-share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  padding: 16px 0;
  border-top: 1px solid var(--gray-200);
}
.share-bar span {
  font-size: 0.9rem;
  color: var(--gray-500);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .latest-posts { grid-template-columns: repeat(2, 1fr); }
  .blog-card-cover { height: 160px; }
  .blog-card-body { padding: 14px; }
  .blog-card h3 { font-size: 0.95rem; }
  .blog-card p { font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .lang-switcher { display: none; }
  nav .lang-switcher { display: flex; position: static; margin: 8px 16px 0; padding-top: 12px; border-top: 1px solid var(--gray-200); }
  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  nav.open { display: flex; }
  nav a { width: 100%; padding: 12px 16px; }

  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .tool-container { padding: 20px; }
  .checkbox-group { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .latest-posts { grid-template-columns: 1fr; }
  .blog-article .article-cover { height: 220px; }
  .blog-article {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    overflow-x: hidden;
  }
  .blog-article h1 { font-size: 1.5rem; }
  .blog-article h2 { font-size: 1.3rem; }
  .blog-article table {
    width: 100%;
    max-width: 100%;
    font-size: 0.82rem;
    display: block;
    overflow: visible;
    white-space: normal;
    table-layout: auto;
    border: 0;
  }
  .blog-article table tbody,
  .blog-article table thead,
  .blog-article table tr,
  .blog-article table th,
  .blog-article table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .blog-article table tr {
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
  }
  .blog-article th, .blog-article td {
    padding: 8px 10px;
    min-width: 0;
    max-width: 100%;
    border: 0;
    border-bottom: 1px solid var(--gray-100);
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }
  .blog-article tr > *:last-child { border-bottom: 0; }
  .comment-section {
    width: 100%;
    max-width: 100%;
    margin: 28px 0;
    padding: 22px 16px;
    overflow-x: hidden;
  }
  .comment-form-row { grid-template-columns: 1fr; }
  .tips-inner { flex-direction: column; text-align: center; }
  .newsletter-form { flex-direction: column; }
  .lang-switcher button { padding: 3px 6px; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-cover { height: 140px; }
  .header-inner { gap: 4px; padding: 0 12px; }
  .logo { font-size: 1.2rem; }
  .logo-icon { font-size: 1.4rem; }
  .blog-article { padding: 18px 12px; }
  .blog-article .article-cover { height: 200px; border-radius: var(--radius); }
  .blog-article h1 { font-size: 1.35rem; line-height: 1.25; }
  .blog-article h2 { font-size: 1.15rem; }
  .comment-section { padding: 18px 12px; }
}