/* ---------------------------
   Global & Variables
---------------------------- */
:root {
  /* MAD GUSTO PALETTE */
  --primary:        #FF6A3D; /* Fire Orange */
  --primary-hover:  #C44A2B; /* Warm Rust Shadow */
  --secondary:      #3FB7FF; /* Electric Sky Blue */
  --accent:         #FFD95C; /* Sunburst Yellow */
  
  --dark-navy:      #0F1E47; /* Midnight Surreal Navy */
  --bg-dream:       #FFF6E6; /* Dream Sand */
  --green:          #4E8F6F; /* Calm Pasture Green */

  /* NEUTRALS */
  --text-body:      #111111; 
  --text-light:     #555555;
  --bg-white:       #FFFFFF;
  --border:         #D6D6D6; 
}

html {
  height: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dream);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

section {
  flex: 1;
  padding: 80px 0;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------
   Header
---------------------------- */

/* 1. The Wrapper: Handles the positioning */
#header {
  position: sticky;
  top: 0;
  z-index: 999; /* Stays on top of content, but below the Modal (1000) */
}

/* 2. The Content: Handles the look and layout */
header {
  padding: 15px 20px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(15, 30, 71, 0.05);
}

.header-left img { height: 32px; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  text-decoration: none;
  color: var(--dark-navy);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* Mobile Nav */
.hamburger { display: none; border: none; background: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 24px; height: 2px; background: var(--dark-navy); transition: 0.3s; }

/* Note: Mobile nav needs to be fixed position relative to viewport now */
.mobile-nav {
  display: flex; 
  flex-direction: column; 
  background: var(--bg-white); 
  border-bottom: 1px solid var(--border);
  padding: 0 40px; 
  max-height: 0; 
  overflow: hidden; 
  transition: 0.3s ease;
  
  /* Ensure mobile menu drops down correctly from the sticky header */
  width: 100%;
}

.mobile-nav.open { max-height: 300px; padding: 20px 40px; }
.mobile-nav a { padding: 10px 0; text-decoration: none; color: var(--dark-navy); border-bottom: 1px solid var(--border); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ---------------------------
   Sections & Typography
---------------------------- */
section { padding: 80px 0; }
section.bg-white { background-color: var(--bg-white); }
section.bg-dream { background-color: var(--bg-dream); }

h1, h2, h3 { margin-top: 0; color: var(--dark-navy); letter-spacing: -0.02em; }
h1 { font-size: 48px; line-height: 1.1; font-weight: 800; }
h2 { font-size: 32px; font-weight: 700; margin-bottom: 40px; text-align: center; }
p { font-size: 18px; margin-bottom: 24px; color: var(--text-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 0px var(--primary-hover);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(2px);
  box-shadow: 0 2px 0px #9e3a21;
}

/* ---------------------------
   Hero
---------------------------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin-bottom: 25px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub { font-size: 20px; margin-bottom: 30px; }
.hero-badges {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: var(--dark-navy);
  font-weight: 500;
}
.tag {
  background: var(--accent);
  color: var(--dark-navy);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-right: 5px;
}

/* ---------------------------
   Carousel / Slideshow
---------------------------- */
.carousel-container {
  position: relative;
  max-width: 900px; /* Limits width on big screens */
  margin: 0 auto;
  padding: 0 0 30px 0;
}

/* The Slide Area */
.carousel-slide {
  display: none; /* Hidden by default */
  text-align: center;
}

.carousel-slide.active {
  display: block; /* Show only the active one */
  animation: fadeEffect 0.4s ease-in-out;
}

/* Image styling */
.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(15, 30, 71, 0.1);
  /* Optional: clickable cursor if you still want modal, 
     otherwise default */
  cursor: default; 
}

/* Caption styling */
.carousel-caption {
  margin-top: 15px;
  font-size: 16px;
  color: var(--dark-navy);
  font-weight: 500;
}

/* Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 45%; /* Center vertically relative to image */
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--dark-navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  z-index: 10;
}

.carousel-btn:hover {
  background-color: var(--primary); /* Fire Orange on hover */
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: -25px; }
.carousel-btn.next { right: -25px; }

/* Dots Indicator (Optional but pro) */
.carousel-dots {
  text-align: center;
  margin-top: 20px;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: var(--border);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
  background-color: var(--primary);
}

/* Fade Animation */
@keyframes fadeEffect {
  from { opacity: 0.6; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .carousel-btn {
    width: 40px; 
    height: 40px;
    font-size: 18px;
    background-color: rgba(15, 30, 71, 0.8); /* Semi-transparent on mobile */
  }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
}

/* ---------------------------
   Cards & Grid
---------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px -1px rgba(15, 30, 71, 0.05);
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; font-weight: 700; color: var(--primary); }

/* ---------------------------
   Modal
---------------------------- */
.modal {
  display: none; position: fixed; z-index: 1000; left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(15, 30, 71, 0.95);
  justify-content: center; align-items: center; flex-direction: column;
}
.modal.active { display: flex; animation: fadeIn 0.2s; }
.modal-img { max-width: 95%; max-height: 80vh; border-radius: 4px; border: 2px solid white; object-fit: contain; }
.modal-caption { color: var(--accent); margin-top: 15px; font-weight: 500; text-align: center; padding: 0 20px; }
.close-modal {
  position: absolute; top: 20px; right: 20px;
  color: white; font-size: 35px; cursor: pointer; padding: 10px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------
   Footer
---------------------------- */
footer {
  margin-top: auto;
  background: var(--dark-navy);
  border-top: 1px solid #1a2e63;
  padding: 50px 0;
  text-align: center;
  color: #aebfd6;
  font-size: 14px;
}

.footer-logo-wrapper {
  margin-bottom: 25px; /* Space between logo and text */
}

.footer-logo-wrapper img {
  height: 40px;
  width: auto;
  display: block;
  margin: 0 auto; /* Ensures centering */
}

footer a { 
  color: #ffffff;
  text-decoration: underline; 
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s;
  display: inline-block; /* Helps with clickable area */
  margin-top: 8px; /* separates email from copyright slightly */
}

footer a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ---------------------------
   RESPONSIVE (Mobile/Tablet)
---------------------------- */
@media (max-width: 768px) {
  /* Navigation */
  .nav-links { display: none; }
  .hamburger { display: flex; }
  
  /* Layout */
  section { padding: 50px 0; } /* Reduce padding */
  .container { padding: 0 15px; }

  /* Typography */
  h1 { font-size: 32px; margin-bottom: 15px; }
  h2 { font-size: 26px; margin-bottom: 30px; }
  .hero-sub { font-size: 18px; }

  /* Gallery Mobile Logic */
  .gallery-scroll {
    gap: 15px;
    padding: 10px 15px 30px 15px;
  }
  .gallery-item {
    /* Show 85% of image so user sees the next one peeking out */
    flex: 0 0 85%; 
    max-width: 85%;
  }

  /* How it works grid */
  .how-it-works-grid {
    flex-direction: column;
    gap: 30px;
  }
}

/* ---------------------------
   Pricing Page
---------------------------- */
.pricing-header {
  text-align: center;
  margin-bottom: 60px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  align-items: center; /* Aligns cards vertically if heights differ */
}

.pricing-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  transition: transform 0.2s;
  position: relative;
}

/* The "Best Value" Highlight Card */
.pricing-card.highlight {
  border: 2px solid var(--primary);
  box-shadow: 0 10px 30px rgba(255, 106, 61, 0.15);
  transform: scale(1.02); /* Make it slightly bigger */
  z-index: 2;
}

.badge-best-value {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-tag {
  font-size: 42px;
  font-weight: 800;
  color: var(--dark-navy);
  margin: 20px 0 5px 0;
}

.price-period {
  color: #777;
  font-size: 16px;
  margin-bottom: 30px;
  display: block;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  text-align: left;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-body);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: "✓";
  color: var(--green); /* Using your palette green */
  font-weight: bold;
  margin-right: 10px;
}

/* FAQ Section on Pricing Page */
.faq-list {
  max-width: 800px;
  margin: 60px auto 0;
}
.faq-item {
  margin-bottom: 25px;
}
.faq-question {
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 18px;
  margin-bottom: 8px;
}

/* ---------------------------
   Documentation / Legal Pages
---------------------------- */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.doc-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 50px;
  max-width: 800px;
  margin: 0 auto; /* Center the card */
  box-shadow: 0 4px 20px rgba(15, 30, 71, 0.05);
}

/* For legal lists */
.doc-card h2 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  text-align: left; /* Override global center for h2 if needed */
}

.doc-card p, .doc-card li {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.7;
}

/* Help Page Specifics */
.help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.help-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
  border-left: 5px solid var(--primary); /* Orange accent on left */
}

.help-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 10px;
  display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .doc-card { padding: 25px; }
}