/* ============================================
   Practice Naturals — End User Site
   Design system matched to providers.practicenaturals.com
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  --color-primary: #57b058;
  --color-primary-dark: #489a49;
  --color-primary-light: #e8f5e9;
  --color-heading: #1a1a1a;
  --color-body: #333333;
  --color-muted: #666666;
  --color-light-bg: #f5f7f5;
  --color-white: #ffffff;
  --color-dark-bg: #1a1a1a;
  --color-border: #e0e0e0;
  --color-link: #2b7bb9;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;
  --font-size-4xl: 42px;

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  --spacing-2xl: 80px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 6px 6px 9px rgba(0,0,0,0.2);

  --max-width: 1200px;
  --header-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--color-body);
  line-height: 1.7;
  background: var(--color-white);
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-white { color: var(--color-white); }
.text-primary { color: var(--color-primary); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--color-dark-bg);
  color: var(--color-white);
}

.btn-dark:hover {
  background: #333;
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: var(--font-size-lg);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo:hover { opacity: 0.85; }

.logo img {
  height: 38px;
  width: auto;
  margin-right: 8px;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav-links a {
  color: var(--color-heading);
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease;
}

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

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta .btn {
  padding: 10px 24px;
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.header-phone {
  color: var(--color-heading);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.header-phone:hover { color: var(--color-primary); }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Section Styles --- */
.section {
  padding: var(--spacing-2xl) 0;
}

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

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

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-muted);
  margin-top: var(--spacing-sm);
}

.section-dark .section-header p {
  color: #aaa;
}

/* Decorative divider between sections (matching provider site SVG shapes) */
.section-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.section-divider svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
}

/* --- Hero --- */
.hero {
  padding-top: calc(var(--header-height) + var(--spacing-2xl));
  padding-bottom: var(--spacing-2xl);
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-content h1 {
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-4xl);
  line-height: 1.15;
}

.hero-content .subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-muted);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 500px;
  width: 100%;
  border-radius: var(--radius-md);
}

/* Trust badges row */
.trust-badges {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

.trust-badge svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.step-card {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.step-card h4 {
  margin-bottom: var(--spacing-xs);
}

.step-card p {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

/* Connector line between steps */
.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -20px;
  width: 40px;
  height: 2px;
  background: var(--color-primary);
  opacity: 0.3;
}

/* --- Program Overview / Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.feature-card {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.feature-card h4 {
  margin-bottom: 8px;
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

/* --- Products --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
}

.product-card {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.product-card .product-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.product-card h4 {
  font-size: var(--font-size-base);
}

.product-group {
  margin-bottom: var(--spacing-xl);
}

.product-group-header {
  margin-bottom: var(--spacing-lg);
}

.product-group-header h3 {
  margin-bottom: 4px;
}

.product-group-header p {
  color: var(--color-muted);
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.testimonial-card {
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.testimonial-card .quote-icon {
  color: var(--color-primary);
  opacity: 0.3;
  margin-bottom: var(--spacing-sm);
}

.testimonial-card blockquote {
  font-size: var(--font-size-lg);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
  color: var(--color-heading);
}

.testimonial-card .attribution {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.testimonials-disclaimer {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  margin-top: var(--spacing-lg);
  font-style: italic;
}

/* --- Find a Provider CTA Banner --- */
.cta-banner {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
}

.cta-banner p {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  margin-bottom: var(--spacing-lg);
}

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

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--spacing-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-heading);
  font-family: inherit;
  line-height: 1.4;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-left: var(--spacing-sm);
  transition: transform 0.3s ease;
  color: var(--color-primary);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: var(--spacing-md);
}

.faq-answer p {
  color: var(--color-muted);
  line-height: 1.7;
}

/* --- Eating Plan highlight --- */
.eating-plan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.eating-plan-content h3 {
  margin-bottom: var(--spacing-sm);
}

.eating-plan-content p {
  color: var(--color-muted);
  margin-bottom: var(--spacing-md);
}

.eating-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.eating-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--font-size-sm);
}

.eating-plan-features li svg {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.eating-plan-image {
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-dark-bg);
  color: #ccc;
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-col h4 {
  color: var(--color-white);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-md);
}

.footer-col p,
.footer-col a {
  font-size: var(--font-size-sm);
  color: #aaa;
  line-height: 1.8;
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: #aaa;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #ccc;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #888;
}

.footer-bottom a {
  color: #888;
}

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

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-ctas { justify-content: center; }

  .hero-image { order: -1; }
  .hero-image img { max-width: 400px; }

  .trust-badges { justify-content: center; flex-wrap: wrap; }

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

  .step-card:not(:last-child)::after { display: none; }

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

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

  .eating-plan {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  :root {
    --spacing-2xl: 48px;
    --spacing-xl: 40px;
  }

  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }

  /* Mobile Nav */
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: var(--spacing-lg);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }

  .nav-links a {
    font-size: var(--font-size-lg);
    padding: var(--spacing-sm) 0;
    display: block;
  }

  .header-cta {
    flex-direction: column;
    width: 100%;
  }

  .header-cta .btn { width: 100%; }

  .steps-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

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