/* Basic Reset and Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    height: 100%;
    scroll-behavior: smooth;
}

/* Hero Section Container */
.hero-section {
    height: 100vh; /* Full viewport height */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

/* Background Video */
#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
}

/* Dark Overlay for Readability */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: -1;
}

/* Navigation Bar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 10;
}

.logo img {
    height: 80px; /* Adjust height as needed */
}

.nav-links ul {
    list-style: none;
    display: flex;
}

.nav-links ul li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #cccccc;
}

.phone-button {
    background-color: #87CEEB; /* A calm, hopeful sky blue */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.phone-button:hover {
    background-color: #76b6d4;
}

/* Hero Text Content */
.hero-text {
    z-index: 5;
    max-width: 800px;
}

/* Replace with this updated "fluid" version */
.hero-text h1 {
    /* UPDATED: Increased all values to make the font bigger */
    font-size: clamp(2.5rem, 1.5rem + 5.5vw, 4.5rem);
    margin-bottom: 1rem;
    /* UPDATED: Changed from 300 (light) to 700 (bold) */
    font-weight: 500;
    letter-spacing: 0px;
}

.hero-text p {
    font-size: clamp(1rem, 0.8rem + 1vw, 1.25rem);
    font-weight: 300;
}

.hero-buttons {
    margin-top: 2rem; /* Spacing above the buttons */
    display: flex;
    justify-content: center;
    gap: 1rem; /* Space between the buttons */
}

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

/* "Schedule a Visit" Button Style */
.btn-primary {
    background-color: #87CEEB;
    color: #2c3e50; /* UPDATED: Dark text for high contrast */
    border-color: #87CEEB;
    font-weight: bold; /* Make the text slightly bolder */
    transition: all 0.3s ease; /* Add for smooth hover animation */
}

.btn-primary:hover {
    background-color: #98d8f4; /* A slightly brighter blue on hover */
    border-color: #98d8f4;
    color: #2c3e50; /* Keep text color dark */
    transform: translateY(-2px); /* Add a subtle lift effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Add a soft shadow */
}

/* This is for outline buttons on DARK backgrounds (like the hero section) */
.btn-secondary {
    background-color: transparent;
    color: white;   
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: #333; 
}

/* NEW STYLE: For outline buttons on LIGHT backgrounds (like the gallery preview) */
.btn-outline-dark {
    background-color: transparent;
    color: #444; /* Dark grey text */
    border-color: #ccc; /* Light grey border */
    font-weight: 600;
}

.btn-outline-dark:hover {
    background-color: #444; /* Dark grey background on hover */
    color: white; /* White text on hover */
    border-color: #444; /* Matching dark grey border */
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px; /* Adjust space between nav links and phone button */
}

/* --- About Section Styling --- */

.about-section {
    padding: 60px 20px;
    text-align: center;
    background-color: #ffffff;
}

.about-section .container {
    max-width: 960px;
    margin: 0 auto;
}

.about-section .sub-heading {
    color: #87CEEB; /* Use brand blue for the motto */
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.about-section h2 {
    font-size: 2.5rem;
    color: #333333;
    margin-bottom: 1.5rem;
}

.about-section p {
    font-size: 1.1rem;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.living-options-section {
    position: relative; /* Needed for the overlay */
    padding: 80px 20px;
    color: white; /* Change default text color for the section */
    overflow: hidden;
}

.living-options-section .container {
    max-width: 1200px;
    margin: 0 auto;

    /* Add these lines to center the content inside */
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Add a new rule for the background image and overlay */
.living-options-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.95), rgba(44, 62, 80, 0.95)), url('images/testimonial-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.living-options-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #ffffff; /* UPDATED: Changed to white */
    margin-bottom: 50px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Creates a 4-column grid */
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.option-card {
    text-align: center;
    cursor: pointer;
    
    /* NEW: Glass background and panel styling */
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 20px;
    
    transition: background-color 0.3s ease;
}

.option-card:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly brighter on hover */
}

/* --- Circular Image with Hover Effect --- */

.image-container {
    position: relative;
    width: 100%;             /* NEW: Allows the container to shrink with the grid cell */
    max-width: 250px;        /* NEW: Prevents it from getting too big on large screens */
    aspect-ratio: 1 / 1;     /* NEW: Keeps the container perfectly square (to make a circle) */
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    cursor: pointer;
    background-color: #333;
    border: 3px solid #87CEEB;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the circle without distortion */
    transition: transform 0.4s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    /* Start positioned above the circle */
    transform: translateY(-100%); 
    transition: transform 0.8s ease; /* Animate the position change */
}

/* The hover effect logic */
.image-container:hover .image-overlay {
    transform: translateY(0); /* Move to original position on hover */
}

.image-container:hover img {
    transform: scale(1.1); /* Zoom the image slightly on hover */
}

.option-card h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #ffffff;
}

/* --- New Dark Button Style --- */
.btn-dark {
    background-color: #333;
    color: white;
    border: 2px solid #333; /* Ensure border is explicitly set */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle starting shadow */
    
    /* Add a smooth transition for all changes */
    transition: all 0.3s ease-in-out;
}

.btn-dark:hover {
    /* Invert the colors for a clean look */
    background-color: #fff;
    color: #333;

    /* Add a "lift" effect and a more pronounced shadow */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.testimonial-section {
    position: relative; /* Required for the background image */
    padding: 100px 20px;
    color: white;
    overflow: hidden;
}

/* This positions the new image tag as a background */
.testimonial-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This is the <img> equivalent of background-size: cover */
    z-index: -2;
}

/* This adds the dark overlay directly to the section itself */
.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.testimonial-slider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.testimonial-content {
    text-align: center;
    flex-grow: 1;
    padding: 0 40px; /* Space between text and arrows */
}

#testimonial-text {
    font-size: 1.7rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 300;
}

#testimonial-author {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.slider-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.slider-btn:hover {
    background-color: white;
    color: #333;
}

/* ============================================= */
/* UPDATED: Community Gallery Section Styles */
/* ============================================= */

.gallery-section {
    padding: 80px 20px;
    background-color: #f8f9fa; /* A warmer, softer off-white background */
}

/* Style for the main "Explore Our Community" title */
.gallery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 400; /* Slightly bolder */
    color: #333333;
    margin-bottom: 50px;
}

#multi-gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.gallery-row {
    margin-bottom: 60px;
}

/* Redesigned titles for each location */
.gallery-title {
    font-size: 1.8rem;
    font-weight: 400; /* Bolder */
    color: #444;
    text-align: center; /* Centered */
    margin-bottom: 30px;
    border-bottom: none; /* Removed the line */
    padding-bottom: 0;
}

/* This is the DEFAULT rule for all gallery titles */
.gallery-title::before {
    content: '';
    display: inline-block;
    width: 35px;
    height: 35px;
    margin-right: 15px;
    vertical-align: -7px;
    background-color: #555;
    /* The default icon is the location pin */
    -webkit-mask-image: url('../images/location.svg');
    mask-image: url('../images/location.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* This NEW rule ONLY applies to the title with the 'meals-icon' class */
.gallery-title.meals-icon::before {
    /* It overrides just the image, leaving all other styles the same */
    -webkit-mask-image: url('../images/handMeal.svg');
    mask-image: url('../images/handMeal.svg');
}

.gallery-container {
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.gallery-viewport {
    width: 100%;
    overflow: hidden;
}

.gallery-filmstrip {
    display: flex;
    gap: 20px; /* Use gap for consistent spacing */
    transition: transform 0.5s ease-in-out;
}

.gallery-filmstrip img {
    height: 350px;
    width: auto;
    /* margin is no longer needed because of gap */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease; /* Add transition for hover effect */
}

/* NEW: Interactive hover effect for images */
.gallery-filmstrip img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* Redesigned navigation arrows */
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #87CEEB; /* Use your brand's sky blue */
    color: white;
    border: none; /* Removed border */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background-color: #76b6d4; /* Darker blue on hover */
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.gallery-prev-btn {
    left: -25px;
}

.gallery-next-btn {
    right: -25px;
}

/* ============================================= */
/* New Styles to Add Below             */
/* ============================================= */

/* --- Footer Section --- */

.site-footer {
    background-color: #2c3e50; /* A dark, elegant blue-grey */
    color: #bdc3c7; /* A soft, light grey for text */
    padding: 60px 0 0;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Three columns: info is twice as wide */
    gap: 40px;
}

.footer-column h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #87CEEB; /* Your brand's sky blue */
}

#footer-info p {
    margin: 15px 0;
    line-height: 1.8;
}

.footer-logo {
    height: 80px; /* Smaller logo for the footer */
    opacity: 0.9;
}

/* --- Social Media Icons --- */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: block;
    width: 40px;
    height: 40px;
    background-color: #34495e;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: #87CEEB; /* Your brand's sky blue */
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: #ffffff; /* White icon color */
}

/* --- Bottom Footer Bar --- */
.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #34495e; /* Subtle separator line */
}

.footer-bottom p {
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* --- Responsive Design for Footer --- */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr; /* Stack columns on top of each other */
        text-align: center;
    }

    #footer-info p {
        margin-left: auto;
        margin-right: auto;
    }

    .social-icons {
        justify-content: center; /* Center the icons when stacked */
    }
}

/* ============================================= */
/* NEW: Responsive Navigation Styles       */
/* ============================================= */

.hamburger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

.hamburger-menu .line {
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: all 0.4s ease-in-out;
}

/* --- Media Query for Tablet & Mobile --- */
@media (max-width: 1030px) {
    .navbar {
        padding: 20px 30px; /* Adjust padding for smaller screens */
    }

    /* Hide the desktop navigation wrapper */
    .nav-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;

        /* === EDITS START HERE for Glass Effect === */
        /* 1. Use a semi-transparent background color */
        background-color: rgba(44, 62, 80, 0.4); /* 50% opaque dark blue. Adjust 0.5 to your liking */

        /* 2. Apply the blur effect to the content behind the menu */
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(12px); /* For broader browser support */
        /* === EDITS END HERE === */

        padding-top: 100px;
        z-index: 100;
        transition: right 0.5s ease-in-out;
    }

    .logo img {
        height: 60px; /* Reduced from 80px */
    }

    /* The class that JS will toggle */
    .nav-wrapper.nav-active {
        right: 0; /* Slide into view */
    }

    .nav-links ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .nav-links ul li {
        margin: 20px 0;
    }

    .nav-links a:hover {
        color: #87CEEB; /* Your brand blue */
    }

    /* Move the contact button into the mobile menu */
    .header-contact {
        margin-top: 30px;
    }

    /* Show the hamburger menu */
    .hamburger-menu {
        display: block;
        z-index: 101; /* Make sure it's on top of the nav menu */
    }

    /* Animate hamburger to an 'X' when active */
    .hamburger-menu.toggle .line1 {
        transform: rotate(-45deg) translate(-7px, 7px);
    }
    .hamburger-menu.toggle .line2 {
        opacity: 0;
    }
    .hamburger-menu.toggle .line3 {
        transform: rotate(45deg) translate(-7px, -7px);
    }

    .options-grid {
        /* Switch from 4 columns to 2 columns */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================= */
/* NEW: Responsive Living Options Section    */
/* ============================================= */

/* --- For Mobile Phones (e.g., screen widths below 600px) --- */
@media (max-width: 600px) {
    .options-grid {
        /* Stack the cards in a single column */
        grid-template-columns: 1fr;
    }

    .living-options-section h2 {
        /* Optional: slightly reduce heading size on mobile */
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) { /* Triggers on phone-sized screens */
    .hero-buttons {
        /* Change flex direction from row to column */
        flex-direction: column;

        /* Center the buttons within the column */
        align-items: center;

        /* The 'gap' property will now add vertical space */
        gap: 1rem;
    }

    /* Optional: Make buttons wider for a better look on mobile */
    .hero-buttons .btn {
        width: 80%;
        max-width: 280px;
    }
}

/* ============================================= */
/* NEW: Modal (Pop-Up) Styles                */
/* ============================================= */

/* Prevents the main page from scrolling when the modal is open */
body.modal-open {
    overflow: hidden;
}

/* The dark background overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

    /* Animation for showing/hiding */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* The class JS will add to show the modal */
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* The modal pop-up box itself */
.modal-content {
    position: relative;
    /* Apply the glass background effect */
    background-color: rgba(44, 62, 80, 0.8); /* Using the color you asked for, but slightly more opaque for readability */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* A subtle border to define the edge */

    padding: 30px 40px;
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
     transform: translateY(-20px) scale(0.95);
    /* UPDATED: Add opacity to the transition for a fade-in effect */
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #e0e0e0; /* Changed to a light color */
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff; /* Brighter on hover */
}


.modal-content h2 {
    font-size: 1.8rem;
    color: #fff; /* Changed to white */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #f0f0f0; /* Changed to a light color */
}

.modal-cta-container {
    text-align: right;
    margin-top: 25px; /* Moves the margin from the button to the container */
}

.modal-cta {
    display: inline-block;
}

/* ============================================= */
/* NEW: Gallery Lightbox Styles              */
/* ============================================= */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

#lightbox-image { 
    max-width: 90vw;   /* Match the content's max-width */ 
    max-height: 85vh;  /* Match the content's max-height */ 
    width: auto;       /* Allow the width to adjust based on height */ 
    height: auto;      /* Allow the height to adjust based on width */ 
    border-radius: 5px; box-shadow: 0 0 30px rgba(0,0,0,0.5); 
    object-fit: contain; /* Ensures the image fits within the bounds without cropping */ 
}

.lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.lightbox-close-btn:hover {
    opacity: 1;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 2001;
    transition: background-color 0.2s ease;
}
.lightbox-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev-btn {
    left: 20px;
}

.lightbox-next-btn {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 1rem;
}

/* ============================================= */
/* NEW: Navigation Dropdown Styles           */
/* ============================================= */

/* Main dropdown container */
header.navbar .nav-links .dropdown {
    position: relative;
}

/* The little arrow next to "Contact Us" */
header.navbar .dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* UPDATED: Using a more specific selector to ensure it's hidden */
header.navbar .nav-links .dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 100;
}

header.navbar .nav-links .dropdown.open .dropdown-menu {
    display: block;
}

header.navbar .nav-links .dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Style for links inside the dropdown */
header.navbar .dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
    color: #fff; /* Dark text on white background */
    text-transform: none;
    font-size: 17px;
    font-weight: normal;
    transition: background-color 0.2s ease;
}

header.navbar .dropdown-menu li a:hover {
    background-color: #f0f0f0;
    color: #333; /* Ensure hover text color is correct */
}

/* --- Dropdown styles for Mobile View --- */
@media (max-width: 1030px) {
    /* The updated rule for the mobile dropdown */
   header.navbar .nav-links .dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Revert the dropdown menu to a simple container */
    header.navbar .nav-links .dropdown .dropdown-menu {
        background: none;
        box-shadow: none;
        margin-top: 3px; /* Add some space */
        border-radius: 0;
        width: 100%;
        text-align: center;
    }
    
    header.navbar .dropdown-menu li a {
        color: #eee;
        padding: 8px 0;
    }

    header.navbar .dropdown-menu li a:hover {
        background-color: transparent;
        color: #87CEEB;
    }

    header.navbar .nav-links .dropdown.open .dropdown-menu {
        display: block;
    }
}

/* ============================================= */
/* Parallax Call-to-Action Section Styles        */
/* ============================================= */

.parallax-cta-section {
    /* This sets the background image and adds a dark overlay for text readability */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/carehomeBackgroundImage.png');

    /* Set a specific height for the section */
    min-height: 450px;

    /* These four properties are the key to the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    /* These properties center the content inside the section */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.parallax-cta-section .parallax-content {
    text-align: center;
    color: white;
}

.parallax-cta-section .parallax-content h2 {
    font-size: clamp(2rem, 1.5rem + 4vw, 3.5rem); /* Responsive font size */
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Adds a shadow to make the text pop */
}

/* Optional: Make the button slightly larger in this section */
.parallax-cta-section .btn {
    padding: 15px 35px;
    font-size: 1rem;
}

/* ============================================= */
/* Gallery Preview Section Styles                */
/* ============================================= */

#gallery-preview-section {
    padding: 80px 20px;
    background-color: #ffffff; /* A clean white background */
    text-align: center;
}

#gallery-preview-section h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 0.5rem;
}

.preview-subtext {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.preview-grid {
    display: grid;
    /* This creates a responsive grid that shows 3 columns on desktop, 2 on tablet, and 1 on mobile */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-item {
    display: block;
    overflow: hidden; /* This contains the image zoom effect */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

.grid-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.grid-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    /* This transition is slightly longer and smoother for a more elegant feel */
    transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.grid-item:hover img {
    transform: scale(1.05); /* A subtle zoom effect on hover */
}

.preview-button-container {
    margin-top: 50px;
}

/* ============================================= */
/* ---         Services Page Styles          --- */
/* ============================================= */

.navbar-inner {
    position: relative; 
    background-color: #2c3e50; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
}

.services-page-content {
    background-color: #f8f9fa; /* Soft off-white background */
}

.services-intro {
    padding: 100px 20px 60px; 
    text-align: center;
    background-color: #ffffff;
}

.services-intro .container {
    max-width: 900px;
    margin: 0 auto;
}

.services-intro h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 1rem;
}

.services-intro p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.core-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.service-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-item svg {
    width: 50px;
    height: 50px;
    color: #87CEEB; /* Brand sky blue */
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

.service-detail-container {
    background-color: #ffffff; /* Change background to white */
    padding-top: 80px;
    padding-bottom: 80px;
}

.service-detail {
    background-color: #f8f9fa; /* A very light grey for the card */
    border: none; /* Remove previous border if any */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Soften the shadow */
    border-left: 5px solid #87CEEB; /* Add a colored accent border */
    margin-bottom: 25px;
    padding: 30px 35px;
}

.service-detail h3 {
    font-size: 1.8rem;
    color: #2c3e50; /* Dark blue from footer */
    margin-bottom: 15px;
    font-weight: 500;
}

.service-detail p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* ============================================= */
/* ---      NEW: Quick Question Widget       --- */
/* ============================================= */

.quick-question-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
}

.widget-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #87CEEB; /* Your brand's sky blue */
    color: #2c3e50; /* Dark text for contrast */
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.widget-button:hover {
    background-color: #76b6d4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.widget-button svg {
    fill: #2c3e50;
    width: 24px;
    height: 24px;
}

.widget-form-container {
    position: absolute;
    bottom: calc(100% + 10px); /* Position it 10px above the button */
    right: 0;
    width: 320px;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    
    /* Animation: start hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

/* --- Active State (when JS opens the widget) --- */

.quick-question-widget.active .widget-form-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-question-widget.active .widget-button {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

/* --- Form Styling --- */

.widget-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.widget-close-btn:hover {
    color: #333;
}

.widget-form-container h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 5px;
}

.widget-form-container p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.widget-form-container .form-group {
    margin-bottom: 15px;
}

.widget-form-container input,
.widget-form-container textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
}

.widget-form-container textarea {
    resize: vertical;
}

.widget-form-container .btn {
    width: 100%;
    padding: 12px;
}

#widget-thank-you {
    text-align: center;
    color: #2c3e50;
    font-weight: 500;
}


/* --- Mobile Responsiveness for Widget --- */
@media (max-width: 480px) {
    .quick-question-widget {
        bottom: 15px;
        right: 15px;
        width: calc(100% - 30px); /* Make it almost full width */
    }

    .widget-form-container {
        width: 100%;
    }
}