/* ============================================================
   MyLushGarden — Site-Wide Styles
   Based on SleepReview design system, adapted for gardening brand
   ============================================================ */

/* ── Variables ── */
:root {
  --primary: #2f855a;
  --primary-light: #c6f6d5;
  --primary-dark: #1c4532;
  --accent: #d69e2e;
  --bg: #ffffff;
  --bg-secondary: #f7fafc;
  --text: #1a202c;
  --text-secondary: #718096;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --header-bg: rgba(255,255,255,0.95);
  --footer-bg: #1c4532;
  --footer-text: #c6f6d5;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: #334155;
  --card-bg: #1e293b;
  --header-bg: rgba(15,23,42,0.95);
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Container ── */
.header-inner, .hero, .section, .footer-inner, .footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.4rem; }
.nav-desktop { display: flex; gap: 1.5rem; }
.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.nav-desktop a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); padding: 0.25rem; }
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: background 0.15s;
}
.theme-toggle:hover { background: var(--bg-secondary); }

/* ── Mobile Nav ── */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  gap: 0.6rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 0.95rem; color: var(--text); padding: 0.3rem 0; }

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.hero-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.hero-search input:focus { border-color: var(--primary); }
.hero-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── Sections ── */
.section { padding: 2rem 1.5rem; }
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* ── Article Grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── Article Card ── */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}
.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.article-image-link {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.article-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-card:hover .article-image-img {
  transform: scale(1.05);
}
.article-content {
  padding: 1rem 1.1rem 1.1rem;
}
.article-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.article-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--primary); text-decoration: none; }
.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ── Footer ── */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 3rem;
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #fff;
}
.footer-col p { font-size: 0.85rem; line-height: 1.5; }
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--footer-text);
  margin-bottom: 0.35rem;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ── Cookie Consent ── */
.cookie-consent {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}
.cookie-consent.show { display: block; }
.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-content p { font-size: 0.85rem; color: var(--text-secondary); }
.cookie-buttons { display: flex; gap: 0.5rem; }
.btn { padding: 0.5rem 1.25rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; transition: opacity 0.15s; }
.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }

/* ── Utility ── */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .article-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.1rem; }
}

/* ── Dark mode overrides for images ── */
[data-theme="dark"] .article-card { border-color: var(--border); }
