/* Base Styles and Variables */
:root {
  --color-primary: #1F3A60;    /* Navy Blue */
  --color-secondary: #F3F5F7; /* Light Slate Gray */
  --color-accent: #4EC3B1;    /* Teal */
  --color-white: #FFFFFF;
  --color-dark: #0D1B2A;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Reset some default margins */
body, h1, h2, h3, h4, p, ul, li, figure {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  color: var(--color-dark);
  line-height: 1.6;
  background: var(--color-white);
}

/* Container for consistent padding */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header and Navigation */
header#top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(31, 58, 96, 0.8); /* semi-transparent navy */
  color: var(--color-white);
  z-index: 1000;
  transition: background 0.3s;
}
header.scrolled {
  background: var(--color-primary); /* solid navy when scrolled */
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}
nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links li a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 500;
}
.nav-links li a:hover {
  text-decoration: underline;
}
.btn-nav-cta {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}
.btn-nav-cta:hover {
  background: #3AA594; /* slightly darker teal */
}
.menu-toggle {
  display: none; /* hidden by default (shown on mobile via media query) */
  cursor: pointer;
}
.menu-toggle i {
  font-size: 1.5rem;
  color: var(--color-white);
}

/* Hero Section */
#hero {
  background: url('') center center/cover no-repeat;
  /* (placeholder: actual image via CSS or inline <img> above) */
  color: var(--color-white);
  text-align: center;
  padding: 6rem 1rem;
  /* Ensure hero covers viewport height minus header */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-image {
  background-image: url("/sleepleanhero.png");
  background-color: #cccccc;
  height: 1000px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}
#hero:before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(31, 58, 96, 0.6); /* overlay with navy tint */
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
#hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
#hero .tagline {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
#hero .tagline strong {
  color: var(--color-accent);
}
#hero .hero-btn {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
#hero .hero-btn:hover {
  background: #3AA594;
}

/* Section Headings */
section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--color-primary);
}

/* Why Choose Us (Trust Factors) */
#why-choose {
  background: var(--color-secondary);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.trust-card {
  background: var(--color-white);
  padding: 1.5rem;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.trust-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.trust-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}
.trust-card p {
  font-size: 0.95rem;
  color: #333;
}

/* Product Overview */
#overview {
  background: #FFFFFF;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.overview-text h2 {
  text-align: left;
}
.overview-text p {
  margin-bottom: 1rem;
}
.overview-text .problem-copy {
  font-style: italic;
}
.overview-text .solution-copy {
  font-weight: 500;
}
.overview-image img {
  width: 100%;
  border-radius: 8px;
  /* If actual image present, maybe a shadow or border */
}

/* How It Works (Accordion) */
#how-it-works {
  background: var(--color-secondary);
}
.accordion {
  margin-top: 1rem;
}
.accordion-item {
  border-bottom: 1px solid #ccc;
}
.accordion-header {
  background: var(--color-primary);
  color: var(--color-white);
  width: 100%;
  text-align: left;
  padding: 1rem;
  font: 1rem var(--font-heading);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-header i {
  transition: transform 0.3s;
}
.accordion-item.open .accordion-header i {
  transform: rotate(180deg);
}
.accordion-body {
  background: #e8ecf0; /* slightly different light bg for content */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-body p {
  padding: 0 1rem 1rem 1rem;
  font-size: 0.95rem;
  color: #333;
}

/* Ingredients */
#ingredients {
  background: #FFFFFF;
}
.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.ingredient-item {
  text-align: center;
  padding: 1rem;
}
.ingredient-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.ingredient-item h3 {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}
.ingredient-item p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

/* Benefits */
#benefits {
  background: var(--color-secondary);
}
.benefits-list {
  list-style: none;
  padding-left: 0;
  max-width: 800px;
  margin: 0 auto;
}
.benefits-list li {
  font-size: 1rem;
  margin: 0.5rem 0;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
}
.benefits-list i {
  color: var(--color-accent);
  margin-right: 0.5rem;
  margin-top: 0.2rem;
}
.benefits-list strong {
  color: var(--color-primary);
}

/* Testimonials */
#testimonials {
  background: #FFFFFF;
  text-align: center;
}
#testimonials h2 {
  margin-bottom: 2rem;
}
.testimonial-slider {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  margin-bottom: 2rem;
}
.testimonial-slide {
  display: none; /* hide all slides by default */
  max-width: 700px;
  margin: 0 auto;
}
.testimonial-slide.active {
  display: block;
}
.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: #333;
}
.testimonial-author {
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
}
.verified {
  color: var(--color-accent);
}
.carousel-control {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 1.5rem;
  cursor: pointer;
}
.carousel-control:focus {
  outline: none;
}
.prev {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.next {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Pricing */
#pricing {
  background: #FFFFFF;
}
#pricing h2 {
  margin-bottom: 1.5rem;
}
.pricing-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.pricing-card {
  background: var(--color-secondary);
  border: 2px solid #d0d7dd;
  border-radius: 8px;
  width: 300px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pricing-card.popular {
  border-color: var(--color-accent);
  transform: scale(1.02);
}
.pricing-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1rem;
  position: relative;
}
.pricing-header h3 {
  font-size: 1.2rem;
  font-family: var(--font-heading);
}
.pricing-header .highlight {
  font-size: 0.9rem;
  background: var(--color-accent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.label.save {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f44336;
  color: var(--color-white);
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.pricing-body {
  padding: 1rem;
}
.price {
  font-size: 2rem;
  font-family: var(--font-heading);
  margin: 0.5rem 0;
}
.price .unit {
  font-size: 1rem;
  font-weight: 400;
}
.old-price {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}
.description {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 1rem;
}
.pricing-card .btn {
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Buttons (generic) */
.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
}
.btn-primary:hover {
  background: #3AA594;
}

/* Bonus & Guarantee Section */
#bonus-guarantee {
  background: var(--color-secondary);
}
.bonus-guarantee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.bonuses h2,
.guarantee h2 {
  text-align: left;
}
.bonus-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}
.bonus-list li {
  margin-bottom: 1rem;
}
.bonus-list h3 {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  margin-bottom: 0.2rem;
}
.bonus-list p {
  font-size: 0.95rem;
  color: #333;
}
.bonus-note {
  font-size: 0.85rem;
  fontStyle: italic;
  color: #555;
}
.guarantee-content {
  background: #e1f5f2; /* light teal-ish background for guarantee block */
  padding: 1rem;
  border-radius: 5px;
  position: relative;
}
.guarantee-text {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.guarantee-text em {
  color: var(--color-accent);
  font-style: normal;
}
.guarantee-text strong {
  font-weight: 700;
}
.guarantee-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem;
  border-radius: 50%;
  font-size: 0.8rem;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.guarantee-badge i {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
.guarantee-badge span {
  font-size: 0.7rem;
}

/* FAQ Section */
#faq {
  background: var(--color-secondary);
}
#faq h2 {
  margin-bottom: 1rem;
}
.faq-accordion .accordion-item {
  border-bottom: 1px solid #bbb;
}
.faq-accordion .accordion-header {
  background: var(--color-primary);
  color: var(--color-white);
  font: 1rem var(--font-heading);
  padding: 0.8rem 1rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-accordion .accordion-header span {
  max-width: 90%;
}
.faq-accordion .accordion-body {
  background: #e8ecf0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-accordion .accordion-body p {
  padding: 0.5rem 1rem 1rem 1rem;
  font-size: 0.95rem;
  color: #333;
}

/* Footer */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 2rem 0;
  font-size: 0.9rem;
}
.footer-container {
  text-align: center;
}
.footer-links a {
  color: var(--color-white);
  margin: 0 0.3rem;
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-disclaimer p {
  font-size: 0.8rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}
.footer-contact p {
  margin: 0.5rem 0;
}

/* Scroll Animation (sections hidden then fade in) */
section.hidden {
  opacity: 0;
  transform: translateY(20px);
}
section.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

/* Responsive Breakpoints */
@media(max-width: 768px) {
  /* Mobile nav: show hamburger, hide links */
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    width: 200px;
    display: none;
  }
  .nav-links li {
    margin: 0.5rem 0;
    text-align: right;
    padding: 0 1rem;
  }
  .btn-nav-cta {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  /* Show mobile menu when active class added via JS */
  .nav-links.mobile-active {
    display: flex;
    z-index: 999;
  }
  /* Overview grid stacks */
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-image {
    display: none; /* hide image on mobile if necessary or could move above text via reordering */
  }
  /* Pricing cards stack */
  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }
  /* Bonus & guarantee stack */
  .bonus-guarantee-grid {
    grid-template-columns: 1fr;
  }
}
