/* ========================================
   SmartFoodZone.com - Redesigned
   Fresh Green, Modern, Content-First
   ======================================== */

:root {
  --color-bg: #ffffff;
  --color-surface: #fafafa;
  --color-primary: #16a34a;
  --color-accent: #22c55e;
  --color-accent-light: #4ade80;
  --color-accent-hover: #15803d;
  --color-secondary: #fbbf24;
  --color-text: #1a1a1a;
  --color-text-light: #525252;
  --color-text-muted: #a3a3a3;
  --color-border: #e5e5e5;
  --color-dark-bg: #0a1f0a;
  --color-dark-text: #d4e8d4;
  --color-warm: #fef3c7;
  --color-warm-light: #fffbeb;
  --color-warm-dark: #f59e0b;
  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --content-width: 720px;
  --nav-height: 72px;
}

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ---- Skip Link ---- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  z-index: 10000;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-xs);
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

h4 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

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

.nav-logo span {
  color: var(--color-accent);
}

.nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav ul a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition);
}

.nav ul a:hover,
.nav ul a.active {
  color: var(--color-primary);
}

.nav ul a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav ul a:hover::after,
.nav ul a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, rgba(10, 31, 10, 0.88), rgba(22, 163, 74, 0.75)), url('/images/hero-bg-new.webp') center/cover no-repeat;
  color: #fff;
}

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

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: var(--space-sm);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
}

.hero-cta {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.875rem 2rem;
  background: var(--color-secondary);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
  background: #f59e0b;
  color: var(--color-text);
  transform: translateY(-2px);
}

/* ---- Page Header (subpages) ---- */

.page-header {
  background: var(--color-primary, #16a34a);
  color: #fff;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  text-align: center;
  position: relative;
}

.page-header h1 {
  color: #fff;
  max-width: var(--content-width);
  margin: 0 auto var(--space-sm);
}

.page-header .lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ---- Main Content ---- */

.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.content-wrap h2 {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-xs);
}

.content-wrap ul,
.content-wrap ol {
  margin-bottom: var(--space-sm);
  padding-left: 1.5rem;
}

.content-wrap ul {
  list-style-type: disc;
}

.content-wrap ol {
  list-style-type: decimal;
}

.content-wrap li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.content-wrap li ul {
  margin-top: 0.3rem;
}

/* ---- Topic Grid (Home) ---- */

.section {
  padding: var(--space-xl) var(--space-md);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title h2 {
  margin-top: 0;
  border: none;
  padding-bottom: 0;
}

.section-title p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: var(--space-xs) auto 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.topic-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(22, 163, 74, 0.1);
  color: inherit;
}

.topic-card h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.topic-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.topic-card .card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

/* ---- Callout Box ---- */

.callout {
  background: var(--color-warm-light);
  border-left: 4px solid var(--color-warm-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.callout h4 {
  margin-top: 0;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
}

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

.callout-green {
  background: #f0fdf4;
  border-left-color: var(--color-accent);
}

/* ---- Key Stats Section ---- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--color-accent);
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

/* ---- Dark Section ---- */

.section-dark {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark a {
  color: var(--color-accent-light);
}

/* ---- FAQ Section ---- */

.faq-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--color-border);
}

.faq-section h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-xs);
  background: var(--color-bg);
  overflow: hidden;
}

.faq-item summary {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 48px;
  transition: background var(--transition);
}

.faq-item summary:hover {
  background: var(--color-surface);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-item .faq-answer {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-light);
  line-height: 1.7;
}

.faq-item .faq-answer p {
  margin-bottom: 0.75rem;
}

.faq-item .faq-answer p:last-child {
  margin-bottom: 0;
}

/* ---- Help Section ---- */

.help-section {
  background: linear-gradient(135deg, var(--color-dark-bg), var(--color-primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}

.help-section h2 {
  color: #fff;
  margin-top: 0;
  border: none;
  padding-bottom: 0;
}

.help-section p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.help-section a {
  color: var(--color-warm);
}

.help-section a:hover {
  color: #fff;
}

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-sm);
}

.help-links a {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition);
}

.help-links a:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ---- Trust Row (Home) ---- */

.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.trust-item {
  text-align: center;
  padding: var(--space-md);
}

.trust-item h4 {
  margin-top: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
}

.trust-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ---- Disclaimer ---- */

.disclaimer {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.disclaimer strong {
  color: var(--color-text);
}

/* ---- Footer ---- */

.footer {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
}

.footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.footer p {
  font-size: 0.9rem;
  color: var(--color-dark-text);
  line-height: 1.6;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.4rem;
}

.footer ul a {
  color: var(--color-dark-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer ul a:hover {
  color: var(--color-accent-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

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

.footer-bottom a:hover {
  color: var(--color-accent-light);
}

.footer-disclaimer {
  max-width: var(--max-width);
  margin: var(--space-md) auto 0;
  padding: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  line-height: 1.6;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav ul {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    gap: 0;
  }

  .nav ul.open {
    display: flex;
  }

  .nav ul li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav ul li:last-child {
    border-bottom: none;
  }

  .nav ul a {
    display: flex;
    padding: 0.875rem 0;
    min-height: 48px;
    align-items: center;
  }

  .hero {
    min-height: 50vh;
    padding-top: calc(var(--nav-height) + var(--space-md));
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

  .help-section {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

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