/* ========================================
   Linvexar.org — Plant Care Guide
   Documentation Style with Green Palette
   ======================================== */

:root {
  --color-bg:         #f5f4ef;
  --color-surface:    #ffffff;
  --color-border:     #dde8d4;
  --color-text:       #2a2a2a;
  --color-text-muted: #5a6b5e;
  --color-primary:    #2e6e3e;
  --color-primary-dk: #1a4a2a;
  --color-accent:     #5a9e6b;
  --color-accent-lt:  #eaf4ec;
  --color-warm:       #8b6e2a;
  --color-warm-lt:    #fdf6e3;
  --font-sans:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif:       Georgia, 'Times New Roman', serif;
  --radius:           6px;
  --radius-lg:        12px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.1);
  --max-w:            1100px;
  --sidebar-w:        240px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ---- Layout Shell ---- */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Header ---- */
.site-header {
  background: var(--color-primary-dk);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
}
.brand-icon { font-size: 1.5rem; }
.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-tagline {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  margin-top: 1px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ---- Nav ---- */
.main-nav {
  background: var(--color-primary);
}
.nav-list {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.nav-list li a {
  display: block;
  color: rgba(255,255,255,0.9);
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-list li a:hover,
.nav-list li.active a {
  color: #fff;
  border-bottom-color: #a8d8b2;
  text-decoration: none;
}

/* ---- Content layout ---- */
.content-area {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 2rem;
  align-items: start;
}
.content-area.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 820px;
}

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: 120px;
}
.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-widget h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}
.sidebar-nav li {
  border-bottom: 1px solid var(--color-border);
}
.sidebar-nav li:last-child { border-bottom: none; }
.sidebar-nav li a {
  display: block;
  padding: 0.5rem 0.25rem;
  font-size: 0.88rem;
  color: var(--color-text);
  transition: color 0.15s, padding-left 0.15s;
}
.sidebar-nav li a:hover { color: var(--color-primary); padding-left: 0.5rem; text-decoration: none; }
.sidebar-nav li.active a { color: var(--color-primary); font-weight: 600; }

.toc-list { padding-left: 0; }
.toc-list li { margin-bottom: 0.3rem; }
.toc-list li a {
  font-size: 0.83rem;
  color: var(--color-text-muted);
}
.toc-list li a:hover { color: var(--color-primary); text-decoration: none; }
.toc-list li::before { content: '›  '; color: var(--color-accent); }

/* ---- Main Content ---- */
.main-content { min-width: 0; }

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.5rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.breadcrumb ol li a { color: var(--color-text-muted); }
.breadcrumb ol li a:hover { color: var(--color-primary); }
.breadcrumb ol li[aria-current="page"] span { color: var(--color-text); font-weight: 500; }

/* Article */
article.page-article h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-primary-dk);
  margin-bottom: 0.5rem;
}
.article-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.article-meta span { display: flex; align-items: center; gap: 0.3rem; }

.lead-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dk);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-border);
}
section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
}
p { margin-bottom: 1rem; }
strong { font-weight: 600; }

/* ---- Info box ---- */
.info-box {
  background: var(--color-accent-lt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.93rem;
}
.info-box.warm {
  background: var(--color-warm-lt);
  border-left-color: var(--color-warm);
}
.info-box .info-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-primary-dk);
}
.info-box.warm .info-title { color: var(--color-warm); }

/* ---- Feature image ---- */
.feature-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/7;
  background: var(--color-border);
}
.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-image figcaption {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0.75rem;
  background: rgba(0,0,0,0.03);
  text-align: center;
}

/* ---- Content image ---- */
.content-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}
.content-img img { width: 100%; }
.content-img figcaption {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  padding: 0.35rem 0.5rem;
  background: rgba(0,0,0,0.04);
}

/* ---- Checklist ---- */
.checklist { padding-left: 0; margin: 1rem 0; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.93rem;
  border-bottom: 1px solid var(--color-border);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ---- Detail expand ---- */
details.expand-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 0.75rem 0;
  overflow: hidden;
}
details.expand-block > summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--color-primary-dk);
  background: var(--color-accent-lt);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
details.expand-block > summary::-webkit-details-marker { display: none; }
details.expand-block > summary::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--color-accent);
  transition: transform 0.2s;
}
details.expand-block[open] > summary::after { content: '−'; }
details.expand-block .expand-body {
  padding: 1rem 1.25rem;
  font-size: 0.93rem;
}

/* ---- Cards grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.plant-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.plant-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.plant-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-border);
}
.plant-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.plant-card:hover .plant-card-img img { transform: scale(1.04); }
.plant-card-body { padding: 0.9rem 1rem; }
.plant-card-body h3 {
  font-size: 0.98rem;
  margin: 0 0 0.3rem;
  color: var(--color-primary-dk);
}
.plant-card-body p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.plant-card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ---- Related content ---- */
.related-section {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-border);
}
.related-section h2 {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  border: none;
}
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.related-link {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.related-link:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.related-link .rl-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}
.related-link .rl-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ---- Hero (homepage) ---- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dk) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 3.5rem 1rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-cta-group { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn-primary { background: #fff; color: var(--color-primary-dk); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }

/* ---- Section heading ---- */
.section-heading {
  max-width: var(--max-w);
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}
.section-heading h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dk);
  margin-bottom: 0.25rem;
}
.section-heading p { font-size: 0.9rem; color: var(--color-text-muted); }

/* ---- Home intro grid ---- */
.home-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.guide-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.guide-card-header {
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.guide-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.guide-icon.green { background: var(--color-accent-lt); }
.guide-icon.warm  { background: var(--color-warm-lt);  }
.guide-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dk);
}
.guide-card-body {
  padding: 0.75rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.guide-card-body p {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.55;
}
.guide-card .read-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  align-self: flex-start;
}

/* ---- Featured plants strip ---- */
.featured-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5rem 1rem;
}
.featured-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.featured-strip h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dk);
  margin-bottom: 1.5rem;
}

/* ---- FAQ blocks ---- */
.faq-list { margin: 1.5rem 0; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary-dk);
  background: var(--color-surface);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '▾';
  font-size: 0.85rem;
  color: var(--color-accent);
}
.faq-item[open] summary {
  background: var(--color-accent-lt);
}
.faq-item[open] summary::after { content: '▴'; }
.faq-item .faq-answer {
  padding: 1rem 1.25rem;
  font-size: 0.93rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* ---- Steps ---- */
.steps-list { counter-reset: steps; padding: 0; margin: 1rem 0; }
.steps-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
  counter-increment: steps;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.steps-list li .step-content strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}
.steps-list li .step-content p { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); }

/* ---- Table ---- */
.data-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.88rem; }
.data-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
}
.data-table td { padding: 0.55rem 1rem; border-bottom: 1px solid var(--color-border); }
.data-table tr:nth-child(even) td { background: var(--color-accent-lt); }
.data-table tr:hover td { background: rgba(90,158,107,0.12); }

/* ---- Season grid ---- */
.season-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.season-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.season-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.season-card ul { padding-left: 0; }
.season-card ul li {
  font-size: 0.86rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.season-card ul li:last-child { border-bottom: none; }
.season-card ul li::before { content: '•'; color: var(--color-accent); flex-shrink: 0; }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-primary-dk);
  color: rgba(255,255,255,0.85);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem 1.5rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-col p { font-size: 0.83rem; line-height: 1.6; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; padding: 0; }
  .nav-list li a { padding: 0.75rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }

  .content-area {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
  }
  .sidebar {
    position: static;
    order: -1;
  }
  .season-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .hero { padding: 2.5rem 1rem; }
  .steps-list li::before { min-width: 24px; height: 24px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .related-links { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr; }
  .season-grid { grid-template-columns: 1fr; }
}
