:root {
  --brand-primary: #2b6e5e;
  --brand-primary-deep: #1f5446;
  --brand-secondary: #e9b44c;
  --brand-secondary-soft: #f6d99a;
  --brand-dark: #1a2e2a;
  --brand-light: #f4f9f7;
  --text-main: #1e2b28;
  --text-secondary: #4a5e58;
  --text-muted: #7a8f88;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --border-color: #dce8e4;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(20, 50, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(20, 50, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 50, 42, 0.12);
  --gradient-hero: linear-gradient(135deg, #e8f5f0 0%, #f7fbf9 42%, #fdf6e6 100%);
  --gradient-brand: linear-gradient(120deg, #2b6e5e 0%, #3d9c88 55%, #e9b44c 130%);
  --gradient-accent: linear-gradient(120deg, #e9b44c 0%, #f6d99a 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --brand-primary: #3d9c88;
  --brand-primary-deep: #2b6e5e;
  --brand-secondary: #f0c674;
  --brand-secondary-soft: #6b5527;
  --brand-dark: #e0f2ed;
  --brand-light: #16241f;
  --text-main: #e6f0ec;
  --text-secondary: #b0c5be;
  --text-muted: #7f9a92;
  --bg-body: #0f1a17;
  --bg-card: #172722;
  --bg-elevated: #1c2f29;
  --border-color: #29423a;
  --glass-bg: rgba(23, 39, 34, 0.72);
  --glass-border: rgba(80, 130, 116, 0.28);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --gradient-hero: linear-gradient(135deg, #12211c 0%, #0f1a17 55%, #1a2620 100%);
  --gradient-brand: linear-gradient(120deg, #3d9c88 0%, #2b6e5e 60%, #b8892f 130%);
  --gradient-accent: linear-gradient(120deg, #f0c674 0%, #8a6a2a 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
  overflow-x: hidden;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.22s ease, opacity 0.22s ease;
}

a:hover {
  color: var(--brand-secondary);
}

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

ul,
ol {
  list-style-position: inside;
}

::selection {
  background: var(--brand-secondary);
  color: var(--brand-dark);
}

:focus-visible {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.section:last-of-type {
  border-bottom: none;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: var(--gradient-accent);
}

.section-header p {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* ============================================================
   Grids
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.32s var(--ease-out), transform 0.32s var(--ease-out), border-color 0.32s var(--ease-out);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(43, 110, 94, 0.06) 0%, transparent 42%);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
  pointer-events: none;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
  border-color: rgba(43, 110, 94, 0.32);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.18rem;
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.card p + p {
  margin-top: 8px;
}

.card ul,
.card ol {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 2;
}

.card strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ============================================================
   Badge
   ============================================================ */
.badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-brand);
  background-size: 140% 140%;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(43, 110, 94, 0.28);
}

.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(43, 110, 94, 0.36);
  background-position: 100% 50%;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-outline:hover {
  background: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 110, 94, 0.24);
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: opacity 0.22s ease;
}

.logo:hover {
  opacity: 0.85;
  color: var(--brand-dark);
}

.logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out);
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-primary a {
  position: relative;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 6px 0;
}

.nav-primary a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out);
}

.nav-primary a:hover {
  color: var(--brand-primary);
}

.nav-primary a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.theme-toggle,
.mobile-menu-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-out), color 0.22s ease;
}

.theme-toggle:hover,
.mobile-menu-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.theme-toggle svg {
  transition: transform 0.5s var(--ease-out);
}

.theme-toggle:hover svg {
  transform: rotate(24deg);
}

.mobile-menu-btn {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  background: var(--bg-card);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.search-box:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(43, 110, 94, 0.14);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  width: 132px;
  color: var(--text-main);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box button {
  background: var(--gradient-brand);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}

.search-box button:hover {
  transform: scale(1.08);
  opacity: 0.92;
}

.mobile-nav {
  display: none;
}

.mobile-nav.open {
  display: block;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-color);
  padding: 18px 24px 24px;
  z-index: 999;
  box-shadow: var(--shadow-md);
  animation: mobileNavIn 0.3s var(--ease-out);
}

.mobile-nav.open ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav.open a {
  display: block;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav.open a:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}

@keyframes mobileNavIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 18px 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.breadcrumb span {
  margin: 0 8px;
}

.breadcrumb span[aria-current="page"] {
  color: var(--brand-primary);
  font-weight: 600;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 56px 0 76px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 180, 76, 0.24) 0%, transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -180px;
  left: -140px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 110, 94, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.22;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 22px;
  letter-spacing: -0.03em;
}

.hero h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  font-size: 1.06rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 540px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.hero-visual:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(43, 110, 94, 0.18);
}

.hero-visual svg {
  width: 100%;
  border-radius: var(--radius-lg);
}

/* ============================================================
   Stats
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 30px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 180, 76, 0.5);
}

.stat-item .stat-number {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

/* ============================================================
   Carousel
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.carousel-track {
  display: flex;
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  padding: 44px 56px;
  display: flex;
  align-items: center;
  gap: 36px;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--bg-card) 100%);
}

.carousel-slide svg {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  transition: transform 0.4s var(--ease-out);
}

.carousel-slide:hover svg {
  transform: scale(1.05) rotate(-2deg);
}

.carousel-slide h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-weight: 700;
}

.carousel-slide p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.8;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  font-size: 0.9rem;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s var(--ease-out), box-shadow 0.22s ease;
}

.carousel-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(43, 110, 94, 0.3);
}

.carousel-btn.prev {
  left: 14px;
}

.carousel-btn.next {
  right: 14px;
}

.carousel-btn.prev:hover {
  transform: translateY(-50%) translateX(-2px);
}

.carousel-btn.next:hover {
  transform: translateY(-50%) translateX(2px);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  background: var(--bg-card);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, width 0.3s var(--ease-out);
}

.carousel-dot:hover {
  background: var(--brand-secondary);
}

.carousel-dot.active {
  width: 26px;
  background: var(--gradient-brand);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.25s ease;
}

.faq-item:first-child {
  border-top: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 4px;
  font-size: 1.04rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
  transition: color 0.22s ease, padding 0.25s var(--ease-out);
}

.faq-question:hover {
  color: var(--brand-primary);
  padding-left: 8px;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--brand-primary);
  transition: transform 0.35s var(--ease-out);
}

.faq-item.active .faq-question {
  color: var(--brand-primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 640px;
  padding-bottom: 22px;
  opacity: 1;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
  padding-right: 28px;
}

/* ============================================================
   Articles
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.article-card .meta span {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.76rem;
}

.article-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
  transition: color 0.22s ease;
}

.article-card:hover h3 {
  color: var(--brand-primary);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
  color: var(--text-secondary);
}

.article-card .read-more {
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.25s var(--ease-out), color 0.22s ease;
}

.article-card .read-more:hover {
  gap: 10px;
  color: var(--brand-secondary);
}

/* ============================================================
   Back to top
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out), visibility 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(43, 110, 94, 0.4);
}

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--brand-dark);
  color: #d0e0da;
  padding: 60px 0 32px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 180, 76, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="dark"] .site-footer {
  background: #0a1310;
}

.site-footer .logo {
  color: #ffffff;
}

.site-footer .logo:hover {
  color: #ffffff;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 44px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #a0b8b0;
  margin-top: 14px;
  max-width: 300px;
  line-height: 1.85;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

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

.footer-col li {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #a0b8b0;
  line-height: 1.7;
}

.footer-col a {
  color: #a0b8b0;
  font-size: 0.9rem;
  transition: color 0.22s ease, padding-left 0.22s var(--ease-out);
  display: inline-block;
}

.footer-col a:hover {
  color: var(--brand-secondary);
  padding-left: 4px;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #7a9a90;
}

.footer-bottom a {
  color: #7a9a90;
}

.footer-bottom a:hover {
  color: var(--brand-secondary);
}

/* ============================================================
   Responsive — 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-visual {
    max-width: 620px;
    margin: 0 auto;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .nav-primary {
    gap: 18px;
  }

  .nav-primary a {
    font-size: 0.88rem;
  }

  .search-box input {
    width: 110px;
  }
}

/* ============================================================
   Responsive — 860px (nav collapse)
   ============================================================ */
@media (max-width: 860px) {
  .nav-primary,
  .search-box {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .carousel-slide {
    padding: 32px 28px;
    gap: 24px;
  }

  .carousel-slide svg {
    width: 110px;
    height: 110px;
  }
}

/* ============================================================
   Responsive — 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding: 0 18px;
  }

  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-header p {
    font-size: 0.96rem;
  }

  .hero {
    padding: 36px 0 52px;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 6.4vw, 2rem);
    margin-bottom: 18px;
  }

  .hero p {
    font-size: 0.98rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    padding: 12px 20px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    padding: 24px;
    border-radius: var(--radius-md);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .stat-item {
    padding: 22px 12px;
  }

  .carousel-slide {
    flex-direction: column;
    text-align: center;
    padding: 28px 22px;
  }

  .carousel-slide h3 {
    font-size: 1.18rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-btn.prev {
    left: 8px;
  }

  .carousel-btn.next {
    right: 8px;
  }

  .faq-question {
    font-size: 0.98rem;
    padding: 18px 2px;
    gap: 12px;
  }

  .faq-answer p {
    padding-right: 0;
    font-size: 0.92rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 32px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .logo {
    font-size: 1.02rem;
  }

  .logo svg {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    gap: 8px;
  }

  .theme-toggle,
  .mobile-menu-btn {
    width: 38px;
    height: 38px;
  }
}

/* ============================================================
   Responsive — 480px
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.55rem;
    line-height: 1.3;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 1.35rem;
  }

  .card {
    padding: 20px;
  }

  .badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .site-header,
  .back-to-top,
  .carousel-btn,
  .carousel-dots,
  .hero-visual,
  .theme-toggle,
  .mobile-menu-btn {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #cccccc;
    break-inside: avoid;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}