/* Clover Page - Phong cách Tạp chí Gia đình & Trẻ nhỏ */
:root {
  --primary: #2d6a4f;
  --primary-dark: #1b4332;
  --primary-light: #40916c;
  --primary-soft: #e8f5e9;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --bg-page: #fbfdfb;
  --bg-card: #ffffff;
  --bg-alt: #f1f8f2;
  --text-main: #212529;
  --text-muted: #526056;
  --text-light: #718076;
  --border-color: #dbe7dd;
  --border-soft: #eef4ef;
  --shadow-sm: 0 2px 6px rgba(27, 67, 50, 0.05);
  --shadow-md: 0 6px 18px rgba(27, 67, 50, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-display: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 1140px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--text-main);
  background-color: var(--bg-page);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--primary-dark);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.top-bar {
  background: var(--primary-dark);
  color: #d8f3dc;
  font-size: 0.86rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a {
  color: #95d5b2;
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Navigation */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--primary-dark);
  height: 3px;
  width: 24px;
  position: relative;
  transition: all 0.2s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}

.nav-toggle-label span::before {
  bottom: 7px;
}

.nav-toggle-label span::after {
  top: 7px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 6px 4px;
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--primary);
}

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.btn-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.btn-nav:hover {
  background: var(--primary-dark) !important;
}

/* Hero Section */
.hero-magazine {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #ffffff;
  padding: 44px 0 50px;
  margin-bottom: 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: #d8f3dc;
  margin-bottom: 24px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(4px);
}

.hero-box h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fef08a;
  margin-bottom: 12px;
}

.hero-box p {
  font-size: 0.95rem;
  color: #e2f0d9;
  margin-bottom: 16px;
}

.hero-box ul {
  list-style: none;
}

.hero-box li {
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
  color: #ffffff;
}

.hero-box li strong {
  color: #fef08a;
}

/* Page Header (Internal pages) */
.page-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
  padding: 34px 0;
  margin-bottom: 36px;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
}

.page-meta {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Card Grid */
.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-dark);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e5ece6;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .card-img-wrap img {
  transform: scale(1.03);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--primary);
}

.card-excerpt {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
}

.card-link {
  color: var(--primary);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Article Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-bottom: 60px;
}

.article-main {
  background: #ffffff;
  padding: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.article-hero-fig {
  margin: -34px -34px 28px -34px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: #eef3ee;
}

.article-hero-fig img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.article-hero-fig figcaption {
  padding: 10px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
  line-height: 1.45;
}

.article-hero-fig figcaption a {
  color: var(--primary);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 34px 0 14px;
  line-height: 1.3;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 10px;
  line-height: 1.35;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--primary-dark);
}

/* Callout Box */
.tip-box {
  background: #fdf8eb;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin: 24px 0;
}

.tip-box h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #b45309;
  margin-bottom: 6px;
}

.tip-box p:last-child {
  margin-bottom: 0;
}

.note-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin: 24px 0;
}

.note-box h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.note-box p:last-child {
  margin-bottom: 0;
}

/* Author & Editorial note */
.author-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 36px;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.author-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-soft);
}

.widget-list {
  list-style: none;
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.widget-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-list a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.45;
  display: block;
}

.widget-list a:hover {
  color: var(--primary);
}

.widget-cta {
  background: linear-gradient(135deg, var(--bg-alt) 0%, #e2efe4 100%);
  border: 1px solid #c9decb;
}

.widget-cta p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* Static page content (About, Contact, Write for us) */
.static-page-content {
  background: #ffffff;
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}

.static-page-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.static-page-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 22px 0 10px;
}

.static-page-content p {
  margin-bottom: 18px;
}

.static-page-content ul, .static-page-content ol {
  margin: 0 0 20px 24px;
}

.static-page-content li {
  margin-bottom: 8px;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.card-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.card-box h3 {
  margin-top: 0;
}

/* Contact form mockup / details */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  margin-top: 24px;
}

.contact-info-box {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fafbfa;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 70px 20px;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.error-page p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 28px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--primary-dark);
  color: #d8f3dc;
  padding: 50px 0 24px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-col p {
  line-height: 1.6;
  color: #b7e4c7;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #d8f3dc;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #95d5b2;
}

/* Responsive */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-main {
    padding: 22px;
  }
  .article-hero-fig {
    margin: -22px -22px 20px -22px;
  }
  .static-page-content {
    padding: 24px;
  }
  .nav-toggle-label {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 18px 24px;
  }
  .nav-toggle:checked ~ .main-nav {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .main-nav a {
    display: block;
    width: 100%;
  }
  .btn-nav {
    text-align: center;
    margin-top: 6px;
  }
  .hero-content h1 {
    font-size: 1.85rem;
  }
  .page-title {
    font-size: 1.7rem;
  }
}
