 /* style.css (Add this at the very top) */

html {
    overflow-y: scroll;
}
/* --- Hero Section Styling (Matches Image) --- */
.hero-split-layout {
    display: grid;
    grid-template-columns: 1fr; /* Stacked by default for mobile */
    min-height: 70vh;
    background-color: #f8fafc;
    
    /* --- NEW CODE TO FIX SPREADING --- */
    width: 100%;
    max-width: 1536px; /* Limits width to 2XL size (Standard for large screens) */
    margin-left: auto; /* Centers the section on the left */
    margin-right: auto; /* Centers the section on the right */
    /* --------------------------------- */
}

@media (min-width: 1024px) {
    .hero-split-layout {
        grid-template-columns: 3fr 2fr; 
    }
}

        .hero-split-image-side {
            background-image: url('../images/Medical_counsulting.webp'); /* Ensure this path is correct */
            background-size: cover;
            background-position: center;
            min-height: 400px; /* Ensures image side has height on mobile */
        }

        .hero-split-content-side {
            display: flex;
            align-items: center;
            padding: 2.5rem;
        }

        .highlight-text {
            color: #3b7a99; /* 360Five Blue */
        }

        /* --- Secondary Info Blocks below Hero (Optional, based on image) --- */
        .secondary-info-block {
            display: flex;
            align-items: center;
            gap: 0.75rem; /* gap-3 */
            color: #676b6c; /* brand-grey */
            font-size: 0.95rem;
        }
        .secondary-info-block i {
            color: #3b7a99; /* five-blue for icons */
            font-size: 1.5rem;
        }
        .secondary-info-block h3 {
            font-weight: 700;
            color: #3b7a99; /* five-blue for sub-headlines */
        }

        /* --- NEW: Feature Card Bar Styling (Matches Image) --- */
        .feature-card-bar-container {
            position: relative; /* Essential for z-index if you want elements to overlap later */
            z-index: 5;
            /* Use your five-blue as the background for the entire bar */
            background-color: #3b7a99; /* five-blue */
        }

        .feature-card-bar-item {
            padding: 2rem 1.5rem;
            color: white; /* Text color for cards */
            text-decoration: none; /* Remove underline from link */
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 100%; /* Ensure all cards are same height */
            transition: background-color 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s ease-out;
            border-right: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
        }

        /* Remove right border from last item on larger screens */
        @media (min-width: 1024px) {
            .feature-card-bar-item:last-child {
                border-right: none;
            }
        }
        /* Remove bottom border from all items on larger screens, and ensure no border on last one on small screens */
        @media (max-width: 1023px) {
            .feature-card-bar-item {
                 border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                 border-right: none;
            }
            .feature-card-bar-item:last-child {
                border-bottom: none;
            }
        }


        .feature-card-bar-item:hover {
            background-color: #2c5a71; /* A slightly darker shade of five-blue on hover */
            transform: translateY(-5px); /* Subtle lift effect */
            box-shadow: 0 10px 20px rgba(0,0,0,0.2); /* Soft shadow on hover */
        }

        .feature-card-bar-item h3 {
            font-weight: 700;
            font-size: 1.25rem; /* text-xl */
        }
        .feature-card-bar-item p {
            margin-top: 0.5rem;
            opacity: 0.9; /* Slightly transparent for better contrast */
            line-height: 1.5;
        }

        .feature-card-bar-link {
            display: inline-block;
            margin-top: 1.5rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid #87ced4; /* medicare-cyan for underline */
            padding-bottom: 4px;
            transition: color 0.3s ease, border-color 0.3s ease;
        }

        .feature-card-bar-link:hover {
            color: #a6e0e6; /* Lighter medicare-cyan */
            border-color: #a6e0e6;
        }

        /* --- Animation Preparation Classes (Existing) --- */
        .animate-on-scroll {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.8s ease-out, transform 0.8s ease-out;
        }
        .is-visible {
            opacity: 1;
            transform: translateY(0);
        }
        
/* ============================================ */
/* MARQUEE ANIMATION                  */
/* ============================================ */
@keyframes marquee {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  /* Adjust duration (40s) to change speed */
  animation: marquee 40s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ======================================================== */
/* PERFORMANCE OPTIMIZATIONS (ADD THIS AT THE TOP)          */
/* ======================================================== */
#treatments {
    /* dramatically improves rendering speed for off-screen content */
    content-visibility: auto; 
    contain-intrinsic-size: 1000px; /* rough height of section */
    /* specific GPU layering */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* ======================================================== */
/* MODERN TREATMENT CARD STYLES (OPTIMIZED)                 */
/* ======================================================== */

.treatment-card-modern {
    position: relative;
    display: block;
    text-decoration: none;
    height: 450px;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: #fff; /* Fallback color */
    
    /* Optimization: rendering hint for browser */
    will-change: transform, box-shadow; 
    transform: translateZ(0); 
    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Lighter shadow for default state */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.treatment-card-modern:hover {
    transform: translateY(-8px); /* Reduced movement slightly for smoothness */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease-out;
    will-change: transform; /* Optimization */
    backface-visibility: hidden; /* Prevents flickering */
}

.treatment-card-modern:hover .card-bg-image {
    transform: scale(1.05); /* Reduced scale slightly for performance */
}

.card-content-glass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    
    /* Fallback background (faster) */
    background-color: rgba(255, 255, 255, 0.95); 
    
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    padding-top: 3.5rem;
    height: 220px;
    transition: height 0.3s ease-out;
    will-change: height;
}

/* ONLY apply the heavy blur effect on devices that can handle it */
@supports (backdrop-filter: blur(12px)) {
    @media (min-width: 1024px) {
        .card-content-glass {
            background-color: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(10px); /* Reduced blur radius from 12px to 10px */
            -webkit-backdrop-filter: blur(10px);
        }
    }
}

.treatment-card-modern:hover .card-content-glass {
    height: 260px;
}

/* Icon Wrapper */
.card-icon-wrapper {
    position: absolute;
    top: -30px;
    left: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #3b7a99;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(59, 122, 153, 0.3);
    transition: transform 0.3s ease-out; /* Removed box-shadow transition for performance */
}

.treatment-card-modern:hover .card-icon-wrapper {
    transform: scale(1.1) rotate(-10deg);
}

/* Text Styles */
.card-description {
    display: -webkit-box;

    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-learn-more {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: #3b7a99;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.treatment-card-modern:hover .card-learn-more {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================ */
/* BACKGROUND OPTIMIZATION                      */
/* ============================================ */
#treatments {
    position: relative;
    isolation: isolate;
    background-color: #f8fafc; /* Solid fallback color is critical */
    overflow: hidden; /* Ensures no overflow triggers scrollbars */
}

/* Optimized Background: Use simple gradients instead of masks if possible */
#treatments::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0%, rgba(59,122,153,0.1) 0%, transparent 50%),
                radial-gradient(circle at 90% 100%, rgba(59,122,153,0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Simplified Dot Grid (Removed mask-image which is very heavy) */
#treatments::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#3b7a99 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}
/* ============================================ */
/* CTA BOX DESIGN (View All Specialties)        */
/* ============================================ */

.treatment-cta-box {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* gap-5 */
    padding: 1.5rem; /* p-6 */
    border-radius: 0.75rem; /* rounded-xl */
    
    /* Design & Colors */
    border: 2px solid #87ced4; /* medicare-cyan */
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(135, 206, 212, 0.1); /* Subtle shadow */
    
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform; /* Performance optimization */
}

.treatment-cta-box:hover {
    border-color: #3b7a99; /* five-blue */
    box-shadow: 0 10px 15px rgba(59, 122, 153, 0.15);
    transform: translateY(-3px); /* Slight lift */
}

/* The Icon Box on the left */
.cta-icon-bg {
    flex-shrink: 0;
    width: 3.5rem; /* w-14 */
    height: 3.5rem; /* h-14 */
    border-radius: 0.5rem; /* rounded-lg */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Colors */
    background-color: #e0f2fe; /* Light blue bg */
    color: #3b7a99; /* five-blue text */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.treatment-cta-box:hover .cta-icon-bg {
    background-color: #3b7a99; /* Darker blue on hover */
    color: #ffffff; /* White icon */
}

/* Text Styles */
.cta-title {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.125rem; /* text-lg */
    color: #1e293b; /* slate-800 */
    line-height: 1.2;
}

.cta-subtitle {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem; /* text-sm */
    color: #64748b; /* slate-500 */
    margin-top: 0.25rem;
}

/* The Arrow on the right */
.cta-arrow {
    font-size: 1.25rem;
    color: #87ced4; /* medicare-cyan */
    transition: transform 0.3s ease, color 0.3s ease;
}

.treatment-cta-box:hover .cta-arrow {
    color: #3b7a99; /* five-blue */
    transform: translateX(5px); /* Slide right animation */
}
/* ============================================ */
/* PROFESSIONAL TESTIMONIALS (Responsive)       */
/* ============================================ */

.testimonial-card-pro {
    position: relative;
    background-color: #ffffff;
    height: 100%; /* Full height for alignment */
    border-radius: 1.5rem; 
    
    /* Initial State: Clean White with subtle border */
    border: 1px solid rgba(226, 232, 240, 0.8);
    
    /* Shadow: Light and subtle like treatments */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease;
    transform: translateZ(0); /* GPU Optimization */
    
    /* Margin top is CRITICAL to accomodate the floating icon */
    margin-top: 2rem; 
}

/* --- Hover Effects: Only on devices that support hover (Desktop/Laptop) --- */
@media (hover: hover) {
    .testimonial-card-pro:hover {
        transform: translateY(-8px); 
        box-shadow: 0 20px 25px -5px rgba(59, 122, 153, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border-color: #87ced4; 
    }
    
    .testimonial-card-pro:hover .testimonial-icon-wrapper {
        transform: scale(1.1) rotate(10deg);
    }
    
    .nav-btn-pro:hover {
        background-color: #3b7a99;
        color: white;
        border-color: #3b7a99;
        box-shadow: 0 10px 15px -3px rgba(59, 122, 153, 0.3);
        transform: translateY(-2px);
    }
}

/* --- Active States for Mobile Touch --- */
.testimonial-card-pro:active {
    border-color: #87ced4;
}

.nav-btn-pro:active {
    background-color: #3b7a99;
    color: white;
}

/* --- Floating Icon Wrapper --- */
.testimonial-icon-wrapper {
    position: absolute;
    top: -30px; /* Pull up exactly like Treatments */
    right: 1.5rem; /* Slightly adjusted for mobile safety */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    
    /* Five Blue Background */
    background-color: #3b7a99;
    color: #ffffff;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    box-shadow: 0 4px 6px rgba(59, 122, 153, 0.3);
    transition: transform 0.3s ease-out;
    z-index: 10;
}

/* Responsive adjustment for the icon on desktop */
@media (min-width: 1024px) {
    .testimonial-icon-wrapper {
        right: 2rem;
    }
}

/* --- Navigation Buttons --- */
.nav-btn-pro {
    width: 3rem;  /* Slightly smaller on mobile */
    height: 3rem;
    border-radius: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #3b7a99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
}

@media (min-width: 768px) {
    .nav-btn-pro {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.1rem;
    }
}