@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --green-dark:   #1a5c35;
  --green-mid:    #267a48;
  --green-light:  #3aaa6a;
  --green-pale:   #e8f5ee;
  --gold:         #d4a017;
  --gold-light:   #f5e9c8;
  --text-dark:    #1a1a2e;
  --text-mid:     #444460;
  --text-muted:   #7a7a9a;
  --bg:           #f7f8fc;
  --white:        #ffffff;
  --border:       #dde3ed;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --radius:       10px;
  --radius-lg:    16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

/* ── HEADER ── */
.site-header {
  background: var(--green-dark);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo svg { flex-shrink: 0; }

.site-logo .logo-sub {
  font-weight: 400;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  display: block;
  line-height: 1;
}

.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  color: var(--white);
  font-size: .875rem;
  outline: none;
  transition: background .2s;
}

.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search input:focus { background: rgba(255,255,255,.25); }

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .7;
  pointer-events: none;
}

.header-nav { display: flex; gap: 4px; }

.header-nav a {
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active { background: rgba(255,255,255,.15); color: var(--white); }

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px 0;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green-mid); }
.breadcrumb .sep { opacity: .5; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 64px 24px 56px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 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%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; position: relative; }
.hero p  { font-size: 1.05rem; opacity: .85; margin-bottom: 32px; position: relative; }

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 16px 56px 16px 20px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  color: var(--text-dark);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--green-mid);
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: background .2s;
}

.hero-search button:hover { background: var(--green-dark); }

/* ── SEARCH RESULTS ── */
.search-results-box {
  max-width: 560px;
  margin: 8px auto 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  display: none;
}

.search-results-box.active { display: block; }

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--green-pale); }
.search-result-item .res-title { font-weight: 600; color: var(--text-dark); font-size: .9rem; }
.search-result-item .res-excerpt { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.search-result-item .res-cat { font-size: .7rem; color: var(--green-mid); font-weight: 500; margin-top: 2px; }
.search-no-results { padding: 16px; text-align: center; color: var(--text-muted); font-size: .875rem; }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 48px 0; }
.section-sm { padding: 32px 0; }

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ── CATEGORY CARDS ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
  text-decoration: none;
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 1.4rem;
}

.category-card h3 { font-size: 1rem; font-weight: 600; color: var(--text-dark); }
.category-card p  { font-size: .85rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.category-card .article-count {
  font-size: .75rem;
  color: var(--green-mid);
  font-weight: 500;
}

/* ── ARTICLE LIST ── */
.article-list { display: flex; flex-direction: column; gap: 12px; }

.article-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
}

.article-item:hover {
  border-color: var(--green-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.article-item-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
}

.article-item h4 { font-size: .95rem; font-weight: 600; color: var(--text-dark); }
.article-item p  { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.article-item-arrow { margin-left: auto; color: var(--text-muted); flex-shrink: 0; align-self: center; }

/* ── ARTICLE CONTENT ── */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 80px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar h3 {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 4px; }

.sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .875rem;
  color: var(--text-mid);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--green-pale);
  color: var(--green-dark);
}

.article-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.article-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }

.article-tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.article-body h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.article-body .article-lead { font-size: 1.05rem; color: var(--text-mid); }

.article-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-pale);
}

.article-body h3 { font-size: 1rem; font-weight: 600; margin: 20px 0 8px; color: var(--text-dark); }

.article-body p { margin-bottom: 14px; color: var(--text-mid); }

.article-body ul, .article-body ol {
  margin: 0 0 14px 20px;
  color: var(--text-mid);
}

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

.article-body .tip-box {
  background: var(--green-pale);
  border-left: 4px solid var(--green-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: .9rem;
  color: var(--text-mid);
}

.article-body .tip-box strong { color: var(--green-dark); }

/* ── FAQ ACCORDION ── */
.faq-category { margin-bottom: 40px; }

.faq-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-category-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--green-pale);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--white);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 20px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background .15s;
  font-family: inherit;
}

.faq-question:hover { background: var(--green-pale); }

.faq-question.open { background: var(--green-pale); color: var(--green-dark); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform .25s;
  color: var(--text-muted);
}

.faq-question.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s;
  padding: 0 20px;
  color: var(--text-mid);
  font-size: .9rem;
  line-height: 1.7;
}

.faq-answer.open {
  max-height: 600px;
  padding: 4px 20px 18px;
}

.faq-answer a { color: var(--green-mid); }

/* ── POPULAR ARTICLES ── */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.popular-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.popular-card:hover {
  border-color: var(--green-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.popular-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  flex-shrink: 0;
}

/* ── CONTACT BANNER ── */
.contact-banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-banner h3 { font-size: 1.2rem; font-weight: 700; }
.contact-banner p  { font-size: .9rem; opacity: .85; margin-top: 4px; }

.btn-outline-white {
  border: 2px solid rgba(255,255,255,.7);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,.15);
  border-color: white;
  color: white;
  text-decoration: none;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.7);
  padding: 40px 24px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-brand .logo { color: white; font-weight: 700; font-size: 1.1rem; }
.footer-brand p { font-size: .82rem; margin-top: 8px; max-width: 220px; line-height: 1.6; }

.footer-links h4 {
  color: white;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .85rem; text-decoration: none; }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .78rem;
}

.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: white; }

/* ── DATA TABLES ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .875rem;
}

.data-table th {
  background: var(--green-dark);
  color: white;
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .03em;
}

.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--green-pale); }

.data-table td:first-child { font-weight: 500; color: var(--text-dark); }

.formula-box {
  background: var(--green-pale);
  border-left: 4px solid var(--green-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
  font-size: .9rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.formula-box strong { color: var(--green-dark); font-family: inherit; }

.example-box {
  background: #fff8e1;
  border: 1px solid #f5e9c8;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 12px 0 20px;
  font-size: .875rem;
  color: var(--text-mid);
}

.example-box strong { color: var(--text-dark); }

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

/* ── STEP CARDS ── */
.steps { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-dark);
  color: white;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body h4 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.step-body p  { font-size: .875rem; color: var(--text-mid); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hero h1 { font-size: 1.6rem; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .article-body { padding: 24px; }
  .contact-banner { flex-direction: column; text-align: center; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .header-search { display: none; }
  .hero { padding: 40px 20px 36px; }
}
