/* General Body Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: white;
    color: #707070; /* Darker grey */
    line-height: 1.6;
    font-size: 16px;
}

/* General Container for page content */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

/* Header and Navigation Styles */
header {
    background-color: rgba(112, 112, 112, 0.85); /* Semi-opaque darker grey background */
    padding: 4px 0;
    border-bottom: 1px solid white; /* White border */
    box-shadow: 0 3px 8px rgba(112, 112, 112, 0.15); /* Shadow based on darker grey */
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}

header h1.logo {
    margin: 0;
    font-size: 1.8em;
    color: white; /* White text on darker grey */
}

/* START: Styles for the main logo link to act like a button */
header h1.logo a {
    color: white;
    text-decoration: none;
    padding: 5px 10px; /* Matches the padding of the nav buttons */
    border-radius: 5px; /* Matches the rounded corners of the nav buttons */
    transition: background-color 0.3s ease, color 0.3s ease; /* Matches the smooth hover animation */
    display: inline-block; /* Allows padding and other styles to apply correctly */
}

/* This creates the hover effect for the logo link */
header h1.logo a:hover {
    background-color: white; /* The background becomes white on hover */
    color: #707070; /* The text becomes dark grey on hover */
}
/* END: Styles for the main logo link */


/* Main Navigation Container */
nav.main-nav {
    /* position: relative; */ /* Ensure this is not active for dropdown positioning */
}

nav.main-nav ul { /* For DESKTOP view */
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav.main-nav ul li {
    margin-left: 20px;
}

nav.main-nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: block;
}

nav.main-nav ul li a:hover,
nav.main-nav ul li a.active {
    background-color: white;
    color: #707070; /* Darker grey text on hover/active */
}


/* =================================================================== */
/* START: Corrected Hamburger Menu CSS (Replaces the original rules) */
/* =================================================================== */

/* 1. The main button that contains the label and icon */
/* This is hidden on large screens and appears on mobile */
.hamburger-menu {
    display: none; /* Hidden by default */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px; /* Add some padding for easier clicking */
    z-index: 1005;
    margin-left: auto;
    
    /* Use flexbox to align the "Menu" label and the icon next to each other */
    flex-direction: row;
    align-items: center;
    gap: 8px; /* The space between "Menu" and the icon */
}

/* 2. The text label "Menu" */
.menu-label {
    color: white;
    font-weight: bold;
    font-size: 1em;
}

/* 3. The container that holds the three bars of the icon */
/* This gives the icon its size */
.hamburger-icon-container {
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* 4. The individual bars of the hamburger icon */
.hamburger-menu .hamburger-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* 5. The animation for the icon when the menu is open */
.hamburger-menu.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ================================================================= */
/* END: Corrected Hamburger Menu CSS                               */
/* ================================================================= */


/* Main Content Area */
main {
    padding: 20px 0;
}

/* Content Box Styling */
.content-box {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(112, 112, 112, 0.3); /* More pronounced shadow */
    padding: 25px;
    margin-bottom: 30px;
    overflow: hidden;
    border: 2px solid #707070; /* Darker grey border */
}

.content-box h2 { margin-top: 0; color: #707070; font-size: 1.8em; } /* Darker grey text */
.content-box h3 { color: #707070; font-size: 1.5em; } /* Darker grey text */

/* Hero Image Container */
.hero-image-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(112, 112, 112, 0.3); /* More pronounced shadow */
    margin-bottom: 30px;
    overflow: hidden;
    padding: 0;
    border: 2px solid #707070; /* Darker grey border */
    position: relative;
}
.hero-image-container img { display: block; width: 100%; height: auto; max-height: 450px; object-fit: cover; }

/* Default styling for all hero text overlays */
.hero-text-overlay {
    position: absolute;
    top: 50%; /* Default vertical position (centered) */
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    padding: 20px;
    width: 80%;
    max-width: 700px;
    box-sizing: border-box;
}

/* Specific override for the main hero image text overlay to lower it */
.main-hero-overlay-lowered {
    top: 85%; /* Adjust this value (e.g., 55%, 65%) to lower it as desired */
}

.hero-text-overlay .hero-text-line1 { font-size: 2.5em; font-weight: bold; margin-top: 0; margin-bottom: 15px; line-height: 1.2; text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); }
.hero-text-overlay .hero-text-line2 { font-size: 1.5em; font-weight: normal; margin-top: 0; margin-bottom: 0; line-height: 1.4; text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); }

/* Hours of Operation Styles */
.hours-of-operation h2 { text-align: center; margin-bottom: 25px; font-size: 1.7em; color: #707070; } /* Darker grey text */
.hours-list { list-style-type: none; padding: 0 10px; margin: 0 auto; max-width: 400px; }
.hours-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #707070;
    font-size: 1em;
}
.hours-list li:last-child { border-bottom: none; }
.hours-list .day {
    font-weight: 600;
    color: #707070;
    padding-right: 15px; /* Adds space between day and time */
    flex-shrink: 0;
}
.hours-list .time {
    color: #707070;
    text-align: right;
}
.hours-note { text-align: center; margin-top: 25px; font-size: 0.9em; color: #707070; padding: 0 15px; } /* Darker grey text */

/* Stylists Page, Services Page, Location Page */
.stylists-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-bottom: 20px; } /* Added margin-bottom for spacing if two grids */
.stylists-grid:last-of-type { margin-bottom: 0; } /* Remove margin from last grid if multiple */

.stylist-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(112, 112, 112, 0.25); /* More pronounced shadow */
    padding: 20px;
    text-align: center;
    border: 2px solid #707070; /* Darker grey border */
    /* .content-box class is also on stylist-card so it inherits margin-bottom: 30px; */
}
.stylist-card img.stylist-card-image { /* Be more specific for the main stylist image */
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid #707070; /* Darker grey border */
}
.services-list .service-item { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #707070; } /* Darker grey border */
.services-list .service-item:last-child { border-bottom: none; }
.map-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(112, 112, 112, 0.3); /* More pronounced shadow */
    padding: 15px;
    /* margin-top: 20px; */ /* This will be overridden by wrapper styles when inside .business-booking-wrapper */
    border: 2px solid #707070; /* Darker grey border */
}
.map-container iframe { border-radius: 10px; width: 100%; height: 450px; border: 0; }


/* STYLES for Business Hours and Booking Box Layout on Index Page */
.business-booking-wrapper {
    display: flex;
    flex-direction: column; /* Mobile first: stacked */
    gap: 20px; /* Space between items in both column and row directions */
    margin-bottom: 30px; /* Consistent bottom margin for the wrapper */
}

.business-booking-wrapper > .hours-of-operation {
    margin-bottom: 0; /* Original .content-box has margin-bottom: 30px, overridden by gap */
}

.business-booking-wrapper > .map-container {
    margin-top: 0; /* Original .map-container has margin-top: 20px, overridden by gap */
}
/* END OF STYLES for Business Hours and Booking Box Layout */


/* STYLES for Stylist Page Modal Functionality */
.stylist-card p.stylist-bio-full {
    display: none; /* Hides the full bio text initially */
}

/* Container for buttons on stylist card */
.stylist-card-buttons {
    display: flex;
    flex-direction: column; /* Stack buttons vertically by default */
    gap: 10px; /* Space between buttons */
    margin-top: 15px; /* Space above the buttons */
    align-items: center; /* Center buttons */
}

.stylist-card-buttons .read-more-btn,
.stylist-card-buttons .view-work-btn {
    width: 80%; /* Make buttons take a good portion of card width */
    max-width: 200px; /* Max width for larger cards */
    box-sizing: border-box;
}

.read-more-btn {
    background-color: #707070; /* Matches your theme's dark grey */
    color: white;
    border: none;
    padding: 10px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    /* margin-top: 15px; /* Handled by flex-gap in .stylist-card-buttons */
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #505050; /* A darker shade for hover */
}

/* View Work Button Styling */
.view-work-btn {
    background-color: #8A6689; /* A slightly different theme color */
    color: white;
    border: none;
    padding: 10px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.view-work-btn:hover {
    background-color: #6d4f6c; /* Darker shade for hover */
}


.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top of other content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if modal content is long */
    background-color: rgba(0, 0, 0, 0.6); /* Dim overlay */
    padding-top: 50px; /* Give some space from top */
}

.modal-content {
    background-color: #ffffff; /* White background for the modal box */
    color: #333333; /* Dark text for readability */
    margin: 5% auto;
    padding: 25px 30px;
    border: 1px solid #cccccc;
    width: 90%;
    max-width: 650px; /* Max width of the modal */
    border-radius: 10px; /* Softer corners */
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    text-align: left; /* Ensure text is not centered if inherited */
}

.modal-content img#modalStylistImage {
    display: block;
    width: 150px; /* Size of the image in modal */
    height: 150px;
    object-fit: cover;
    border-radius: 50%; /* Circular image */
    margin: 0 auto 20px auto; /* Centered image */
    border: 3px solid #707070; /* Theme-colored border */
}

.modal-content h3#modalStylistName {
    color: #707070; /* Theme heading color */
    text-align: center;
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 5px;
}

.modal-content p#modalStylistTitle em { /* Targeting the <em> inside the <p> */
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #555555;
    font-style: italic;
    font-size: 1.1em;
}

#modalStylistBio {
    font-size: 1em;
    line-height: 1.7;
    color: #444444;
}

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

/* START: Added styles for Instagram link in Stylist Modal */
.modal-stylist-socials {
    margin-top: 25px; /* Space above the social link */
    padding-top: 20px; /* Space between bio and link */
    border-top: 1px solid #eeeeee; /* Separator line */
    text-align: center; /* Center the link/icon */
}

a.social-icon-modal.instagram {
    display: inline-flex; /* Align icon and text, initially hidden by JS if no URL */
    align-items: center;
    text-decoration: none;
    color: #707070; /* Theme color */
    font-size: 1em;
    padding: 10px 18px;
    border-radius: 5px;
    border: 1px solid #707070;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-weight: 500;
}

a.social-icon-modal.instagram i.fab.fa-instagram {
    font-size: 1.5em; /* Icon size */
    margin-right: 10px; /* Space between icon and text */
}

a.social-icon-modal.instagram span {
    line-height: 1; /* Ensure text aligns well with icon */
}

a.social-icon-modal.instagram:hover {
    background-color: #707070;
    color: white;
    border-color: #707070;
}
/* END: Added styles for Instagram link in Stylist Modal */


.close-button { /* General close button, used by both modals */
    color: #888888;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 2010; /* Ensure it's above content */
}

.close-button:hover,
.close-button:focus {
    color: #333333;
    text-decoration: none;
}
/* END OF STYLES for Stylist Page Modal Functionality */


/* GALLERY MODAL Styles */
.gallery-modal {
    /* Inherits base .modal styles */
    padding-top: 2%; /* Less top padding for gallery */
}

.gallery-modal-content {
    /* Inherits .modal-content styles initially */
    max-width: 90%;
    width: auto; /* Adjust based on image size */
    display: inline-block; /* Allows modal to shrink-wrap image */
    padding: 15px;
    background-color: #222; /* Darker background for gallery focus */
    text-align: center; /* Center image and controls */
    margin: 2% auto;
}

#galleryModalImage {
    display: block;
    max-width: 100%;
    max-height: 80vh; /* Max height relative to viewport */
    height: auto;
    margin: 0 auto 15px auto;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(255,255,255,0.1);
    border: 2px solid #444;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 28px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease;
    z-index: 2015; /* Above image */
    line-height: 1;
}

.gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.close-gallery-button { /* Specific styles for gallery close if needed, else inherits .close-button */
    color: #fff; /* White X for dark background */
    top: 15px;
    right: 15px;
    background-color: rgba(0,0,0,0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 35px; /* Center the X */
}
.close-gallery-button:hover {
    background-color: rgba(0,0,0,0.6);
    color: #ccc;
}

.gallery-counter {
    text-align: center;
    color: #ccc; /* Light grey text for dark background */
    font-size: 0.9em;
    margin-top: 10px;
}
/* END OF GALLERY MODAL STYLES */


/* Footer Styles */
footer { background-color: #707070; color: white; padding: 25px 0; margin-top: 30px; } /* Darker grey background */
footer .container { margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
.footer-layout { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
p.copyright { margin: 0; font-size: 0.9em; line-height: 1.5; }
.social-media-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px; }
.social-media-links a.social-icon { color: white; font-size: 1.3em; text-decoration: none; border-radius: 50%; width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease; border: 1px solid white; }
.social-media-links a.social-icon:hover { color: #707070; background-color: white; border-color: white; transform: translateY(-3px) scale(1.05); } /* Darker grey text on hover */

/* Responsive Footer Layout */
@media (min-width: 768px) {
    .footer-layout { flex-direction: row; justify-content: space-between; text-align: left; }
    p.copyright { text-align: left; }
    .social-media-links { justify-content: flex-end; }
}

/* ------------------------- */
/* Responsive Adjustments    */
/* ------------------------- */

/* Desktop layout for business-booking-wrapper */
@media (min-width: 769px) {
    .business-booking-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    .business-booking-wrapper > .hours-of-operation { flex: 2; }
    .business-booking-wrapper > .map-container { flex: 3; }

    /* Stylist card buttons side-by-side on larger screens */
    .stylist-card-buttons {
        flex-direction: row;
        justify-content: space-around;
    }
    .stylist-card-buttons .read-more-btn,
    .stylist-card-buttons .view-work-btn {
        width: 48%; /* Adjust width for side-by-side */
    }
}


@media (max-width: 992px) {
    header h1.logo { font-size: 1.6em; }
    .container { width: 92%; }
    nav.main-nav ul li { margin-left: 15px; }
    .content-box h2 { font-size: 1.6em; }
    .content-box h3 { font-size: 1.3em; }
    .hero-text-overlay .hero-text-line1 { font-size: 2em; }
    .hero-text-overlay .hero-text-line2 { font-size: 1.2em; }
    .hero-text-overlay { width: 90%; padding: 15px; }
}

/* Mobile Navigation Collapse */
@media (max-width: 768px) {
    header h1.logo { font-size: 1.5em; }
    .container {
        width: 95%;
        padding: 15px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    /* Show the hamburger menu button */
    .hamburger-menu { 
        display: flex; 
    }

    /* Hide the regular nav and show the mobile dropdown */
    nav.main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(112, 112, 112, 0.85); /* Semi-opaque darker grey background */
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
        border-top: 1px solid white;
        padding-top: 10px;
        padding-bottom: 10px;
        margin: 0;
        z-index: 999;
    }
    
    /* This class is toggled by JavaScript to show/hide the menu */
    nav.main-nav ul.nav-active { 
        display: flex; 
    }
    
    nav.main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
    nav.main-nav ul li:last-child { border-bottom: none; }
    nav.main-nav ul li a {
        padding: 15px 10px;
        width: 100%;
        border-radius: 0;
        box-sizing: border-box;
    }

    .content-box { padding: 20px; margin-bottom: 20px; }
    .content-box h2 { font-size: 1.5em; }
    .content-box h3 { font-size: 1.2em; }
    .hero-image-container img { max-height: 300px; }
    .stylists-grid { grid-template-columns: 1fr; gap: 20px; }
    .stylist-card img.stylist-card-image { width: 180px; height: 180px; }
    .map-container iframe { height: 350px; }
    .hours-of-operation h2 { font-size: 1.6em; }
    .hours-list { max-width: 100%; padding: 0 5px; }

    /* Gallery nav buttons smaller on mobile */
    .gallery-nav { padding: 8px 12px; font-size: 20px; }
    .gallery-nav.prev { left: 5px; }
    .gallery-nav.next { right: 5px; }
    .close-gallery-button { top: 5px; right: 5px; width: 30px; height: 30px; font-size: 18px; line-height: 30px; }

}

@media (max-width: 480px) {
    header h1.logo { font-size: 1.4em; }
    body { font-size: 15px; }
    .container { padding: 10px; }
    .content-box h2 { font-size: 1.3em; }
    .content-box h3 { font-size: 1.1em; }
    .hero-image-container img { max-height: 250px; }
    .map-container iframe { height: 300px; }
    .hero-text-overlay .hero-text-line1 { font-size: 1.6em; }
    .hero-text-overlay .hero-text-line2 { font-size: 1em; }
    .hero-text-overlay { padding: 10px; }

    .hours-of-operation h2 { font-size: 1.5em; margin-bottom: 20px; }
    .hours-note { font-size: 0.85em; margin-top: 20px; }

    /* Stylist card buttons remain stacked on small screens */
    .stylist-card-buttons {
        flex-direction: column;
    }
    .stylist-card-buttons .read-more-btn,
    .stylist-card-buttons .view-work-btn {
        width: 90%; /* Fuller width on small screens */
    }
}