/* ===============================
    Global Variables
================================= */
:root {
    --color-primary: #4CAF93;
    --color-secondary: #FF914D;
    --color-accent: #2D5D50;
    --color-text-default: #484848;
    --color-white: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    /* Example: Darker Teal overlay on a background image */
    background: 
        linear-gradient(rgba(45, 93, 80, 0.6), rgba(45, 93, 80, 0.6)),
        url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--color-text-default);
    line-height: 1.6;
}

/* ===============================
    Typography
================================= */
h1 {
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-weight: 700;
    margin-bottom: 20px;
}

.page-title {
    color: #ffffff;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    margin-bottom: 30px;
}

/* ================================================================================
    Header & Navigation (NEW THREE-PART FLEX LAYOUT: Button | Logo | Links)
================================================================================
*/
header {
    /* Base header container */
    background: var(--color-white); /* Changed background to white for contrast */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 40px; 
}

.nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 1200px; 
    margin: 0 auto;
    position: relative; 
}

.logo {
    /* 🔑 CRITICAL: Force horizontal centering using auto margins */
    margin-left: auto;
    margin-right: auto;
    
    /* Ensure the logo is rendered *after* the left button but *before* the right nav */
    order: 0; 
    
    /* Ensure it doesn't shrink or grow */
    flex-shrink: 0;
    
    /* ... your other logo styles ... */
    color: var(--color-accent); 
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

/* Style for the new Contact Us button on the left of the nav */
.nav-contact-btn {
    /* Uses the existing orange CTA style, but smaller for the nav */
    padding: 8px 15px; 
    font-size: 0.9em;
    font-weight: 600;
    z-index: 10; 
    flex-shrink: 0; 
    /* NEW: Ensure the phone number link text is white for contrast */
    color: var(--color-white); 
}

/* Ensures the main nav part (Home, About, etc.) does not shrink */
.nav-container nav {
    transform-origin: top;
    transition: transform 0.3s ease-out;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a,
nav ul li a:link { /* FIX: Added :link for stronger color specificity on all links */
    text-decoration: none;
    color: var(--color-text-default); /* Dark gray links on white header */
    padding: 5px 0;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--color-secondary); /* Orange highlight */
    background-color: transparent; /* No background needed now */
}

/* ===============================
    Hero Section
================================= */
.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(45, 93, 80, 0.5); 
    padding: 100px 20px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: var(--color-white);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: var(--color-white);
}

/* ===============================
    CTA Buttons & Links (Generic styles remain)
================================= */
.cta-button {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background: #e67e3a; /* Slightly darker orange */
    transform: translateY(-2px);
}

/* New Hero Book Button style to override generic cta-button for the main hero */
.hero-book-btn {
    font-size: 1.2em;
    padding: 15px 40px;
    background-color: var(--color-secondary); 
    color: var(--color-white);
    border-radius: 5px;
}

.cta-link {
    color: var(--color-accent); 
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.cta-link:hover {
    color: var(--color-secondary);
}

/* ===============================
    Content Sections (Readability Wrapper)
================================= */

.content-section {
    padding: 60px 20px;
    margin: 40px auto;
    max-width: 1200px;
}

/* Base style: Text must be white to be visible on the dark body background/overlay. */
.content-section p {
    color: var(--color-white); 
}

.content-section h2 {
    color: var(--color-white);
    text-align: center;
}

/* Contact Details Grid */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: center;
}
.contact-details h3 {
    color: #484848;
}
.info-block {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    text-decoration: none; 
    color: #2E2E2E;
}

.info-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}
.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25); 
}

.info-block .icon {
    font-size: 3em;
    color: var(--color-secondary);
    margin-bottom: 10px;
    display: block;
}

.info-block h3 {
    font-size: 1.4em;
    margin-bottom: 5px;
}

.info-block p.description {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* ===============================
    NEW: Newspaper-Style Feature Layout (FIXED ALTERNATION)
================================= */

/* Container for the alternating blocks */
.feature-layout {
    display: flex;
    flex-direction: column;
    gap: 80px; 
    padding: 60px 20px;
    max-width: 1200px;
    margin: 40px auto;
}

/* Individual Feature Card (The Alternating Block) */
.feature-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 40px;
    align-items: center;
    background: rgba(255, 255, 255, 0.95); 
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-image img {
    width: 100%;
    height: 280px; 
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-content h2 {
    color: #484848;
    margin-top: 0;
    font-size: 1.8em;
}

.feature-content p {
    color: #444; 
    line-height: 1.8;
}

/* --- ALTERNATING LAYOUT LOGIC (FIXED WITH ORDER PROPERTY) --- */

/* Default (Odd) Cards: Image Left / Content Right */
.feature-card .feature-image {
    order: 1; /* Left Column */
}
.feature-card .feature-content {
    order: 2; /* Right Column */
    text-align: left; /* Ensure content is always left-aligned */
}

/* Alternating (Even) Cards: Swap Order */
.feature-card:nth-child(even) .feature-image {
    order: 2; /* Move Image to the right side of the grid */
}

.feature-card:nth-child(even) .feature-content {
    order: 1; /* Move Content to the left side of the grid */
    text-align: left; /* Critical: Override any center/right alignment */
}


/* ===============================
    Home Page Service Grid
================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

.service-card {
    text-decoration: none;
}
.service-card .icon {
    opacity: 1; 
    transition: color 0.3s ease, transform 0.3s ease;
}
/* Ensure the titles inside the service cards are correctly colored */
.service-card h3 {
    color: #484848;
}

/* Mobile Responsiveness for the Service Grid */
@media (max-width: 768px) {
    .service-grid {
        /* Forces a single column stack on very small screens */
        grid-template-columns: 1fr;
    }
}
/* ===============================
    Team Grid and Cards
================================= */
.team-grid {
    display: grid;
    /* Create 3 columns for a professional layout, responsive down to 1 column */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    margin: 40px auto 60px;
    text-align: center;
}

.team-card {
    /* Inherits card styling from .info-block (background, shadow, hover effect) */
    padding: 20px;
    display: flex; /* Use flex to arrange photo and details vertically */
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-photo {
    width: 150px; /* Define size for a clean circular image */
    height: 150px;
    overflow: hidden;
    border-radius: 50%; /* Makes the image circular */
    margin-bottom: 15px;
    border: 3px solid var(--color-primary); /* Small border for emphasis */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container without distortion */
}

.team-details h3 {
    color: var(--color-accent); /* Deep teal for the name */
    font-size: 1.4em;
    margin-bottom: 5px;
}

.team-details p {
    color: #444; /* Darker text for the role */
    font-weight: 500;
    margin-bottom: 0;
}

.team-details .role-description {
    font-size: 0.9em;
    color: #666; /* Lighter text for the description */
    margin-top: 8px;
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* 1. Initially hide the navigation menu on mobile */
    .nav-container nav {
        max-height: 0; /* Hides the menu */
        overflow: hidden;
        transition: max-height 0.3s ease-out; /* Allows for a smooth opening animation */
        /* You might also need to set width: 100% and position it correctly */
        position: absolute;
        top: 100%; /* Positions the menu right below the header bar */
        left: 0;
        width: 100%;
        background-color: #fff; /* Ensure a background color so text is visible */
        z-index: 10;
        border-top: 1px solid #eee;
    }

    /* 2. Style to SHOW the navigation when the button is clicked */
    .nav-container.menu-open nav {
        max-height: 300px;
        transform: scaleY(1);
    }
}
/* ===============================
    Footer Styles
================================= */
footer {
    background: rgba(45, 93, 80, 0.5); 
    color: var(--color-white);
    padding: 40px 20px 20px;
    text-align: center;
}

.footer-top-contact {
    padding-bottom: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top-contact .contact-details {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.footer-top-contact .info-block {
    padding: 20px;
}

.footer-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 30px auto;
    width: 90%;
}

.footer-form-wrap {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 15px; 
}

.footer-form h3 {
    text-align: center;
    color: var(--color-white);
    margin-bottom: 20px;
}

.footer-form label {
    color: var(--color-white);
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.footer-form input,
.footer-form textarea {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    margin-bottom: 15px;
    color: #2D5D50; 
}

.footer-form .checkbox-group {
    display: block;
    text-align: left; 
    margin-bottom: 20px;
}

.footer-form .checkbox-group label {
    display: inline-block !important; 
    font-weight: 400; 
    font-size: 0.9em; 
    margin-left: 8px;
    vertical-align: top; 
    width: calc(100% - 30px); 
}

.footer-form .checkbox-group input[type="checkbox"] {
    vertical-align: middle;
    width: auto; 
    margin: 0;
}

/* ===============================
    Footer Quick Links Formatting
================================= */
.footer-links-container {
    max-width: 200px; /* Adjust width as needed */
    margin: 0 auto 30px;
    text-align: center;
}

.footer-links-container h3 {
    color: var(--color-secondary); /* Use orange accent for the title */
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-links-container ul {
    list-style: none;
    padding: 0;
}

.footer-links-container ul li {
    margin-bottom: 8px;
}

.footer-links-container ul li a {
    color: var(--color-white); /* White text for contrast */
    text-decoration: none;
    font-size: 1em;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-links-container ul li a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; 
    gap: 15px;
}

.footer-bottom p {
    font-size: 0.9em;
}

.footer-social a {
    color: var(--color-white);
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--color-secondary);
}

/* NEW Footer Legal Links */
.footer-legal {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    margin: 0 20px;
}

.footer-legal a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-legal a:hover {
    color: var(--color-secondary);
}

/* ===============================
    Scroll Animation (Fade-Up Effect)
================================= */

.hidden {
    opacity: 0;
    /* Sets the duration (0.6s) and timing (ease-out) for the transition */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: translateY(20px); /* Start 20px below final position */
}

.show {
    opacity: 1; /* Fully visible */
    transform: translateY(0); /* Move back to its original position */
}

.service-card,
.team-card {
    transition-delay: var(--delay, 0s); /* Use a CSS variable for unique delays */
}

/* ===============================
    NEW: Hamburger Menu Styles
================================= */
.menu-toggle {
    /* Base Button Styling */
    display: none; /* Hide by default on desktop */
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    color: var(--color-accent); /* Deep teal color */
    z-index: 1010; /* Above the header */
    flex-shrink: 0;
}

.menu-toggle .close-icon {
    display: none; /* Hide the 'X' icon by default */
}


/* --- BOOKING PAGE STYLES (Kept for schedule.html) --- */
.booking-page {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
}

.booking-widget-container {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    min-height: 500px;
    margin-top: 20px;
    text-align: center;
}

.emergency-contact {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: #ffcccc;
    border-radius: 8px;
}

.emergency-btn {
    font-size: 1.5em;
    font-weight: bold;
    color: #cc0000;
    text-decoration: none;
    display: block;
    margin-top: 10px;
}

.emergency-btn:hover {
    text-decoration: underline;
}

/* ===============================
    Scroll-to-Top Button Styles
================================= */
#scroll-to-top {
    /* Fixed Position & Styling */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Hidden by Default (using opacity/visibility for smooth fade) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: scale(0.9); /* Slight shrinking effect when hidden */
}

/* Show state triggered by JavaScript */
#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Optional: Make it slightly smaller/less intrusive on mobile */
@media (max-width: 480px) {
    #scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2em;
    }
}
/* ===============================
    Mobile Responsiveness
================================= */
@media (max-width: 768px) {
    /* Header (UPDATED for three-part structure) */
    header {
        padding: 15px 20px;
    }
    
    /* NEW: Horizontal Mobile Header - Logo, Button, and Toggle Icon on one line */
    .nav-container {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap; /* Prevents wrapping */
    }

    /* 1. Hamburger Toggle Button */
    .menu-toggle {
        display: block; /* Show on mobile */
        order: 3; /* Place it last/right */
        position: static;
        margin-right: -10px; /* Pull it to the very edge for padding correction */
    }

    /* 2. Hideable Navigation Menu */
    .nav-container nav {
        order: 4; 
        position: absolute;
        top: 60px; /* Position right below the header row */
        left: 0;
        width: 100%;
        /* The CSS that controls the open/close state: */
        max-height: 0; /* Hide by default */ 
        background: var(--color-white); 
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.65, 0.05, 0.36, 1); /* FIX: Faster, snappier animation */
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-container nav ul {
        flex-direction: column;
        padding: 10px 0 20px 0; 
        width: 100%;
        margin-top: 0;
        gap: 0; /* Remove gap */
    }
    
    nav ul li a {
        padding: 10px 15px; /* Increase tap area */
        display: block;
        text-align: center;
        color: var(--color-text-default) !important; /* FIX: Force dark color here */
    }
    
    .nav-container.menu-open nav {
        /* Set a height large enough to show all menu items */
        max-height: 300px; 
        transform: none; /* Reset any conflicting transforms */
    }

    /* 4. Icon Swapping when Menu is OPEN */
    .nav-container.menu-open .menu-icon {
        display: none;
    }
    .nav-container.menu-open .close-icon {
        display: block;
    }

    /* 5. Header Component Ordering */
    .nav-contact-btn {
        width: auto;
        order: 1; /* Leftmost */
        padding: 8px 15px;
    }
    .logo {
        order: 2; /* Middle */
        margin: 0 auto;
        text-align: center;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    /* Content */
    .content-section, .feature-layout {
        padding: 30px 15px;
        /* CRITICAL FIX 1: Stops any child content from causing horizontal scrolling */
        overflow-x: hidden; 
    }
    
    .page-title {
        /* Mobile adjustment to make it visible on white/light sections if any */
        font-size: 1.8em;
    }

    /* Cards */
    /* Ensures all primary card containers switch to a single column */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 25px; 
        width: 100%; 
        max-width: 100%; 
    }

    /* CRITICAL GRID FIX: Forces single column layout and constrains container */
    .service-grid {
        grid-template-columns: 1fr !important; 
        gap: 25px; 
        width: 100%; 
        max-width: 100%; 
        /* Enforce zero margins on the container */
        margin: 0; 
        padding: 0;
    }

    /* CRITICAL FIX 2: Force the card elements themselves to stay within bounds */
    .service-grid .service-card,
    .card-grid .info-block { 
        width: 100% !important;
        max-width: 100% !important; 
        min-width: unset !important;
        box-sizing: border-box; 
        /* Enforce zero horizontal margins on the card itself */
        margin-left: 0 !important;
        margin-right: 0 !important;
        /* Re-apply side padding if needed for internal card spacing */
        padding-left: 20px; 
        padding-right: 20px; 
    }

    /* CRITICAL FIX 3: Failsafe for any large content (images, etc.) inside the card */
    .service-grid .service-card > *,
    .card-grid .info-block > * { 
        max-width: 100% !important;
    }

    /* Team Grid (also needs a single column on mobile) */
    .team-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .footer-bottom p, .footer-legal {
        margin: 5px 0;
    }
    
    .footer-legal {
        justify-content: center;
    }

    .footer-social {
        margin-top: 10px;
    }

    /* Alternating Feature Cards (Stack on mobile) */
    .feature-card {
        grid-template-columns: 1fr; 
        gap: 20px;
        padding: 30px;
    }
    
    .feature-card, 
    .feature-card:nth-child(even) {
        grid-template-areas: none; 
    }
    
    /* 🔑 CRITICAL FIX: Reset all custom ordering for mobile stacking */
    .feature-card .feature-image,
    .feature-card .feature-content,
    .feature-card:nth-child(even) .feature-image,
    .feature-card:nth-child(even) .feature-content {
        order: initial;
        text-align: left !important; 
    }
}
