:root {
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--body-font);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--heading-font);
    font-weight: 400;
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition-smooth);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 74, 94, 0.3);
}

/* Navbar Styling */
.navbar {
    transition: var(--transition-smooth);
}
.nav-link {
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    color: rgba(255,255,255,0.8) !important;
}
.nav-link:hover, .nav-link.active {
    color: #fff !important;
    opacity: 1;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: #000;
}

/* Cards & Components */
.service-item-overlay {
    transition: var(--transition-smooth);
}
.service-item-overlay:hover {
    transform: scale(1.03);
}
.service-item-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--home-services-overlay);
    pointer-events: none;
    z-index: 1;
}

/* Features */
.feature-row {
    transition: var(--transition-smooth);
    cursor: pointer;
    border-color: rgba(0,0,0,0.05) !important;
}
.feature-row:hover {
    background-color: var(--white-color) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    padding-left: 30px !important;
    padding-right: 30px !important;
    border-color: var(--primary-color) !important;
}

/* Form Styling */
.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
    background-color: transparent;
}

/* Custom Utilities */
.rounded-4 { border-radius: 2rem !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; }

.mobile-call-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: var(--primary-dark) !important;
    color: #fff !important;
    border: none !important;
    font-size: 22px !important;
}


/* Doctors swap carousel */
.doctors-swap { touch-action: manipulation; }
.doctors-swap__dots { align-items: center; }
.doctors-swap__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.75);
    background: transparent;
    padding: 0;
    display: inline-block;
}
.doctors-swap__dot.is-active {
    background: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.95);
}

/* Tablet View */
@media (min-width: 768px) and (max-width: 991.98px) {
    html { font-size: 70%; }

    body {
        overflow-x: hidden;
    }

    .container,
    .container-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }
    .navbar {
        background-color: var(--primary-color) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1rem 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    .navbar-collapse {
        background: var(--primary-color);
        padding: 1.5rem;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .hero-section {
        height: 70vh !important;
        padding-bottom: 56px !important;
    }

    section[style*="height: 60vh"] { height: 42vh !important; min-height: 260px; }
    section[style*="height: 50vh"] { height: 35vh !important; min-height: 220px; }

    h1, .display-3, .display-4, .display-5 {
        font-size: clamp(2.5rem, 6vw, 3.5rem) !important;
        line-height: 1.2 !important;
    }

    .p-5 { padding: 2.5rem !important; }
    .mb-5 { margin-bottom: 1.5rem !important; }

    .services-slider-container {
        overflow: hidden !important;
        width: 100% !important;
        padding: 10px 0;
    }
    .service-slide { width: 147px !important; }
    .testimonial-slide { width: 282px !important; }
    .blog-slide { width: 280px !important; }

    .service-item-overlay { min-height: 196px !important; }
    .service-card-detailed { min-height: 350px !important; }
    .portfolio-card { height: 280px !important; }
    .blog-image,
    .blog-card > div:first-child { height: 175px !important; }

    .features-scroll-container { height: 350px !important; }
    .features-vertical-track {
        animation: none !important;
        transform: none !important;
    }

    .g-5, .gy-5, .gx-5 {
        --bs-gutter-x: 1.5rem !important;
        --bs-gutter-y: 1.5rem !important;
    }
    .row {
        --bs-gutter-x: 1rem;
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }
    .row > * {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .mission-images img { height: 180px !important; }

    [data-aos] {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        overflow-x: hidden !important;
    }
    .line-reveal span { transform: none !important; }

    [style*="width: 50px; height: 50px"] { width: 35px !important; height: 35px !important; }
    [style*="width: 70px; height: 70px"] { width: 49px !important; height: 49px !important; }
    [style*="height: 300px"] { height: 210px !important; }
    [style*="height: 270px"] { height: 189px !important; }
    [style*="height: 250px"] { height: 175px !important; }
    [style*="height: 200px"] { height: 140px !important; }
    [style*="height: 400px"] { height: 280px !important; }
    [style*="height: 490px"] { height: 343px !important; }
    [style*="min-height: 400px"] { min-height: 280px !important; }
    [style*="min-height: 500px"] { min-height: 350px !important; }
    [style*="padding-bottom: 80px"] { padding-bottom: 56px !important; }
}

/* Mobile View */
@media (max-width: 767.98px) {
    html { font-size: 70%; }

    body {
        overflow-x: hidden;
    }

    .container,
    .container-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }
    .navbar {
        background-color: var(--primary-color) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 0.8rem 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    .navbar-brand { font-size: 1.2rem !important; }
    .navbar-brand small { font-size: 0.7rem !important; }
    .navbar-collapse {
        background: var(--primary-color);
        padding: 1.5rem;
        border-radius: 0 0 20px 20px;
        margin-top: 0.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .hero-section {
        height: 70vh !important;
        padding-bottom: 56px !important;
    }

    section[style*="height: 60vh"] { height: 42vh !important; min-height: 260px; }
    section[style*="height: 50vh"] { height: 35vh !important; min-height: 220px; }

    h1, .display-3, .display-4, .display-5 {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }
    .hero-content h1 {
        font-size: clamp(2.2rem, 10vw, 3rem) !important;
    }

    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    .p-5 { padding: 1.2rem !important; }
    .mb-5 { margin-bottom: 1.5rem !important; }

    .services-slider-container {
        overflow: hidden !important;
        width: 100% !important;
        padding: 10px 0;
    }
    .service-slide { width: 147px !important; }
    .testimonial-slide { width: 282px !important; }
    .blog-slide { width: 280px !important; }

    .service-item-overlay { min-height: 196px !important; }
    .service-card-detailed { min-height: 350px !important; }
    .portfolio-card { height: 280px !important; }
    .blog-image,
    .blog-card > div:first-child { height: 175px !important; }

    .features-scroll-container {
        height: auto !important;
        overflow: visible !important;
    }
    .features-vertical-track {
        animation: none !important;
        transform: none !important;
    }

    .g-5, .gy-5, .gx-5 {
        --bs-gutter-x: 1.5rem !important;
        --bs-gutter-y: 1.5rem !important;
    }
    .row {
        --bs-gutter-x: 1rem;
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }
    .row > * {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .mission-images img { height: 180px !important; }

    [data-aos] {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        overflow-x: hidden !important;
    }
    .line-reveal span { transform: none !important; }

    [style*="width: 50px; height: 50px"] { width: 35px !important; height: 35px !important; }
    [style*="width: 70px; height: 70px"] { width: 49px !important; height: 49px !important; }
    [style*="height: 300px"] { height: 210px !important; }
    [style*="height: 270px"] { height: 189px !important; }
    [style*="height: 250px"] { height: 175px !important; }
    [style*="height: 200px"] { height: 140px !important; }
    [style*="height: 400px"] { height: 280px !important; }
    [style*="height: 490px"] { height: 343px !important; }
    [style*="min-height: 400px"] { min-height: 280px !important; }
    [style*="min-height: 500px"] { min-height: 350px !important; }
    [style*="padding-bottom: 80px"] { padding-bottom: 56px !important; }
}



/* Stats bubbles */
.stat-circle {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 10px;
}
@media (max-width: 767.98px) {
    .stats-cluster-container { 
        max-width: 280px !important; 
        margin-top: 40px !important;
    }
}
/* Laptop/Desktop: moving carousel with exactly 4 cards visible */
@media (min-width: 992px) {
    .home-testimonials,
    .home-recent {
        overflow: hidden !important;
    }

    .home-testimonials .services-slider-container {
        --desktop-slide-gap: 22px;
        --desktop-slide-width: calc(1.15 * ((min(100vw, 1540px) - 56px - (var(--desktop-slide-gap) * 3)) / 4));
        max-width: 1540px;
        margin: 0 auto;
        padding: 0 28px;
        overflow: hidden !important;
    }

    .home-recent .services-slider-container {
        --desktop-slide-gap: 22px;
        --desktop-slide-width: calc((min(100vw, 1540px) - 56px - (var(--desktop-slide-gap) * 3)) / 4);
        max-width: 1540px;
        margin: 0 auto;
        padding: 0 28px;
        overflow: hidden !important;
    }

    .home-testimonials .services-track,
    .home-recent .services-track-reverse {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: var(--desktop-slide-gap) !important;
        width: max-content !important;
        transform: translateX(0);
    }

    .home-testimonials .services-track {
        animation: slide-right-to-left 42s linear infinite !important;
    }

    .home-recent .services-track-reverse {
        animation: slide-left-to-right 42s linear infinite !important;
    }

    .home-testimonials .testimonial-slide,
    .home-recent .blog-slide {
        width: var(--desktop-slide-width) !important;
        min-width: var(--desktop-slide-width) !important;
        max-width: var(--desktop-slide-width) !important;
        flex: 0 0 var(--desktop-slide-width) !important;
        display: block !important;
    }

    .home-testimonials .testimonial-card {
        padding: 1.5rem !important;
        min-height: 230px;
        overflow: hidden;
    }

    .home-recent .blog-card > div:first-child {
        height: 210px !important;
    }

    .home-testimonials .testimonial-card p,
    .home-recent .blog-card p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .home-testimonials .testimonial-card h6,
    .home-recent .blog-card h5 {
        overflow-wrap: anywhere;
    }
}
/* Responsive media surfaces */
.responsive-media,
.responsive-card-media,
.about-mission-img,
.service-rest-img,
.appointment-img {
    width: 100%;
    overflow: hidden;
}

.responsive-media,
.responsive-card-media {
    aspect-ratio: 16 / 10;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.responsive-media > img,
.responsive-media > video,
.responsive-card-media > img,
.about-mission-img,
.service-rest-img,
.appointment-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.about-mission-img {
    aspect-ratio: 4 / 3;
    height: auto !important;
}

.responsive-card-media {
    aspect-ratio: 4 / 3;
}

.responsive-media--portrait {
    aspect-ratio: 4 / 5;
}

.responsive-media--wide {
    aspect-ratio: 16 / 9;
}

.responsive-media--square {
    aspect-ratio: 1 / 1;
}

.service-rest-img,
.appointment-img {
    aspect-ratio: 4 / 3;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

@media (max-width: 767.98px) {
    .responsive-media,
    .responsive-card-media {
        aspect-ratio: 4 / 3;
    }
    .responsive-media--portrait {
        aspect-ratio: 4 / 5;
    }
    .responsive-media--wide {
        aspect-ratio: 16 / 10;
    }
    .about-mission-img,
    .service-rest-img,
    .appointment-img {
        aspect-ratio: 4 / 3;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .responsive-media,
    .responsive-card-media {
        aspect-ratio: 16 / 10;
    }
    .responsive-media--portrait {
        aspect-ratio: 4 / 5;
    }
}
/* Background media cards */
.service-item-overlay {
    aspect-ratio: 4 / 3;
    min-height: 0 !important;
}
.contact-map-wrap iframe,
.responsive-media iframe {
    width: 100%;
    height: 100% !important;
    display: block;
}
@media (max-width: 767.98px) {
    .service-item-overlay {
        aspect-ratio: 4 / 3;
    }
    .contact-map-wrap {
        aspect-ratio: 4 / 3;
    }
}

/* Footer Font Sizes */
footer h5,
footer h5 a {
    font-size: 19px !important;
}

footer p,
footer li a,
footer .small,
footer p.small {
    font-size: 17px !important;
}

@media (max-width: 767.98px) {
    footer h5,
    footer h5 a {
        font-size: 18px !important;
    }
    footer p,
    footer li a,
    footer .small,
    footer p.small {
        font-size: 16px !important;
    }
    
    /* Home Page Mission Section Font Sizes */
    .home-mission-text h2 {
        font-size: 26px !important;
    }
    .home-mission-text p {
        font-size: 16px !important;
    }
}

.footer-credit-link:hover {
    opacity: 0.8;
}
.footer-credit-link:hover p {
    opacity: 1 !important;
}

