/* ---------- GLOBAL/VARIABLES ---------- */
:root {
  /* BACKGROUND COLORS (Cool Grays/Off-White - Main Page Theme) */
  --bg-main: #e9eff6; /* Light gray/Off-white for main background */
  --bg-accent: #f8f8f8; /* Slightly darker gray for subtle accents (Header/Nav background) */
  --bg-primary: #335070; /* Deep, professional blue for buttons/footer/accents */
  --bg-primary-dark: #223c52; /* Darker blue for hover states */
  --bg-white: #fff; /* Standard white background for cards/sections */

  /* TEXT & CONTRAST COLORS (Main Page Theme) */
  --text-main: #1f2937; /* Very dark gray/near-black for high contrast text */
  --text-secondary: #3b5998; /* Deep professional blue for secondary headings (from Services) */
  --text-primary: var(--bg-primary); /* Primary blue for main titles/focus */
  --text-light: var(--bg-main); /* Light text on dark backgrounds */

  /* LAYOUT PROPERTIES (Main Page Theme) */
  --radius: 8px;
  --shadow: 0 4px 15px rgba(0, 0, 0, .08); /* Lighter shadow */
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, .15);

  /* TYPOGRAPHY & SPACING (Services/Main Page Blend) */
  --font-heading: sans-serif;
  --font-body: sans-serif;
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 30px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* FIX: Reduced horizontal padding on mobile via media query */
.section {
  padding: 60px 10%;
  scroll-margin-top: 80px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section h2 {
  margin-bottom: 75px;
  font-size: 30px;
}

/* ---------------------------------------------------- */
/* ---------- HEADER (UNIFIED) ---------- */
/* ---------------------------------------------------- */

header {
  background: var(--bg-accent);
  color: var(--text-main);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.nav-links a {
  position: relative;
  padding: 6px 10px;
  margin-left: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-main);
  transition: background-color 0.3s ease;
}

.nav-links a:hover {
  background-color: var(--bg-accent);
  border-radius: var(--radius);
}

/* underline animation */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--bg-primary);
  transition: .3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--bg-primary);
  outline-offset: 4px;
  border-radius: var(--radius);
}


/* ---------------------------------------------------- */
/* ---------- HERO (Main Page) & INTRO (Services) ---------- */
/* ---------------------------------------------------- */

/* Main Page Hero */
.hero {
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-shadow: 0 0 10px rgba(0, 0, 0, .75);
  background: center/cover no-repeat url("/images/hero.jpg");
  font-family: var(--font-body);
}

.hero h2 {
  font-size: 45px;
}

/* Services Intro - Styled to fit the theme */
.hero-intro {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  background-color: var(--bg-accent);
}

.hero-intro h1 {
  font-family: var(--font-heading);
  font-size: 3em;
  margin-bottom: var(--spacing-sm);
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-main);
}

.hero-intro h4 {
  font-size: 1.35em;
  max-width: 750px;
  margin: 0 auto;
  opacity: 0.9;
  font-style: italic;
  color: var(--text-main);
}

/* ---------------------------------------------------- */
/* ---------- GALLERY (Main Page) ---------- */
/* ---------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery img {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

/* ---------------------------------------------------- */
/* ---------- ABOUT (Main Page) ---------- */
/* ---------------------------------------------------- */
.about p {
  line-height: 1.6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

/* About Section Layout & Styling */
.about .container {
  padding-top: 10px;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 0.5fr;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.about-text {
  position: relative;
  font-style: italic;
  font-size: 1.5em;
  line-height: 1.5;
  color: var(--text-main);
}

.about-image {
  display: grid;
  justify-content: center;
  align-items: center;
}

/* --- Media Queries for About Section (Moved to unified block) --- */


/* ---------------------------------------------------- */
/* 📐 Services Container Layout (IMPROVED for mobile) */
/* ---------------------------------------------------- */
.services-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.services-container h2 {
  font-family: var(--font-heading);
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: var(--spacing-sm);
  color: var(--color-dark);
  font-size: 2.5em;
  padding-top: var(--spacing-sm);
}

/* IMPROVED: Use percentage widths for pseudo-elements to avoid mobile overflow */
.services-container h2::before {
  content: "";
  background-color: var(--bg-primary);
  display: block;
  width: 50%; /* Adjusted for mobile */
  max-width: 500px;
  height: 2px;
  margin: var(--spacing-sm) auto 0;
}

.services-container h2::after {
  content: "";
  background-color: var(--bg-primary);
  display: block;
  width: 30%; /* Adjusted for mobile */
  max-width: 250px;
  height: 2px;
  margin: var(--spacing-sm) auto 0;
}

/* ---------------------------------------------------- */
/* --- Service Card Styling (Polished - from Services CSS) --- */
/* ---------------------------------------------------- */
.service-card {
  display: grid;
  padding: var(--spacing-sm);
  border-radius: 12px;
  background-color: var(--bg-white);
  box-shadow: var(--shadow);
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-card h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 0;
  font-size: 1.8em;
  border-bottom: 3px solid var(--text-secondary);
  padding-bottom: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.service-card h3:nth-of-type(2) {
  color: var(--text-secondary);
  font-size: 1em;
  font-weight: 500;
  margin-top: -10px;
  border-bottom: none;
  padding-bottom: 0;
}

.service-card ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: var(--spacing-sm);
}

.service-card ul li {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--bg-accent);
  display: flex;
  align-items: flex-start;
  /* IMPROVED: Ensure text flows correctly with checkmark */
  line-height: 1.4; 
}

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

/* Custom Checkmark Icon for List Items */
.service-card ul li::before {
  content: '✓';
  color: #2ecc71;
  font-weight: bold;
  margin-right: 12px;
  font-size: 1.1em;
  line-height: 1.4;
  flex-shrink: 0; /* Prevents checkmark from shrinking */
}

/* Alternating Image Cards (retained from Services CSS) */
#wedding,
#babyshower,
#weaning {
  grid-template-columns: 35% 1fr;
  gap: var(--spacing-md);
  align-items: stretch;
}

#wedding { grid-template-areas: "image content"; }
#wedding .service-image { grid-area: image; }
#wedding .service-content { grid-area: content; }

#babyshower { grid-template-areas: "content image"; }
#babyshower .service-image { grid-area: image; }
#babyshower .service-content { grid-area: content; }

#weaning { grid-template-areas: "image content"; }
#weaning .service-image { grid-area: image; }
#weaning .service-content { grid-area: content; }

.service-image {
  max-width: none;
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.service-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.service-content {
  min-width: 0;
}

/* ---------------------------------------------------- */
/* ---------- FORM (Main Page) ---------- */
/* ---------------------------------------------------- */
form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
}

input,
textarea {
  padding: 12px;
  margin-bottom: 15px;
  font-size: 16px;
  border: 1px solid var(--bg-accent);
  border-radius: var(--radius);
  transition: border-color .2s;
}

input:focus,
textarea:focus {
  border-color: var(--bg-primary);
  outline: none;
}

button,
.button {
  padding: 12px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-light);
  transition: background .2s, transform .2s, box-shadow .2s;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover {
  background: var(--bg-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--bg-primary-dark);
  outline-offset: 2px;
}

/* ---------------------------------------------------- */
/* --- Call to Action (CTA) Footer (Improved - from Services) --- */
/* ---------------------------------------------------- */
.cta {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  margin-top: var(--spacing-lg);
  background: var(--bg-primary-dark);
  border-top: 5px solid var(--bg-primary);
  color: var(--text-light);
}

.cta p {
  font-size: 1.6em;
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
  font-weight: 500;
}

.cta .button {
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background-color: var(--bg-white);
  color: var(--text-main);
  box-shadow: var(--shadow);
}

.cta .button:hover {
  background-color: var(--bg-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}


/* ---------------------------------------------------- */
/* ---------- SOCIAL (Main Page) ---------- */
/* ---------------------------------------------------- */
.social-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.social-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  border-radius: 50%;
  background: var(--bg-primary);
}

.social-btn img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: invert(100%);
  transition: .3s;
}

.social-btn:hover img {
  filter: invert(0%);
}

/* Social hover colors - Kept as-is for brand identity */
.instagram:hover { background: #E1306C; }
.facebook:hover { background: #1877F2; }
.tiktok:hover { background: var(--bg-white); }
.youtube:hover { background: #FF0000; }

/* ---------------------------------------------------- */
/* ---------- FOOTER (Main Page) ---------- */
/* ---------------------------------------------------- */
footer {
  margin-top: 40px;
  padding: 30px;
  text-align: center;
  background: var(--bg-primary);
  color: var(--text-light);
}

/* ---------------------------------------------------- */
/* ---------- MEDIA QUERIES (Unified & IMPROVED for Mobile) ---------- */
/* ---------------------------------------------------- */
@media (max-width: 950px) {
    /* --- General Layout FIXES --- */
    .section {
        /* CRITICAL FIX: Reduce side padding on smaller screens */
        padding: 40px 5%; 
    }
    
    .section h2 {
        margin-bottom: 40px; /* Less space needed on mobile */
        font-size: 26px; /* Slightly smaller headings */
    }

    /* --- Nav adjustments (from services) --- */
    header {
      padding: 15px 0;
    }

    .nav-flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .nav-logo {
        margin-bottom: var(--spacing-xs);
    }

    .nav-links a {
        margin: 0 5px; /* Tighter links */
        padding: 5px;
        font-size: 0.9em;
    }
    
    /* --- Hero Intro adjustments (from services) --- */
    .hero-intro h1 {
        font-size: clamp(2em, 8vw, 2.5em);
    }
    .hero-intro h4 {
        font-size: 1.1em;
    }
    
    /* --- About Section Stacking (Corrected existing) --- */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-image {
        order: -1;
    }

    .about-text {
        font-size: 1.2em;
        padding: var(--spacing-md);
    }
    
    /* --- Services Container (Corrected existing stack) --- */
    #wedding,
    #babyshower,
    #weaning {
        grid-template-columns: 1fr;
        grid-template-areas: "image" "content";
    }

    .service-image {
        /* FIXED: Give the image a fixed height when stacked */
        height: 250px; 
        width: 100%;
        grid-area: image;
    }

    /* --- CTA adjustments (from services) --- */
    .cta p {
        font-size: 1.2em;
    }

    .cta .button {
        padding: 12px 25px;
        font-size: 0.9em;
    }
}

/* NEW BREAKPOINT: For very small screens (e.g., narrow phones) */
@media (max-width: 480px) {
    .section {
        /* Even tighter side padding for very narrow screens */
        padding: 30px var(--spacing-md); 
    }
    .gallery {
        gap: 10px; /* Smaller gap */
    }
    
    .nav-links {
        /* Allow navigation links to wrap if there are too many */
        display: flex;
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .nav-links a {
        font-size: 0.8em;
    }
    
    .hero {
      height: 60vh; /* Shorter hero on tiny screens */
    }

    .hero h2 {
      font-size: 35px;
    }
}