/* ==========================================================================
   TemplateWhite Custom Stylesheet (Bootstrap 5 Overrides & Stitch Design Tokens)
   Dr. Arjun Mehta - Family Medicine & Compassionate Care
   Theme: Clinical Clarity
   ========================================================================== */

/* Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap");

/* --- WhiteTemplate Design System Tokens --- */
:root {
    --white-template-background: #f7f9fb;
    --white-template-surface-container: #eceef0;
    --white-template-surface-container-low: #f2f4f6;
    --white-template-surface-container-lowest: #ffffff;
    --white-template-surface-container-high: #e6e8ea;
    --white-template-surface-container-highest: #e0e3e5;

    --white-template-primary: #005c86;
    --white-template-primary-container: #0e76a8;
    --white-template-on-primary-container: #ebf5ff;
    --white-template-primary-fixed: #c9e6ff;

    --white-template-secondary: #006b5f;
    --white-template-secondary-container: #62fae3;

    --white-template-tertiary: #7e4b00;
    --white-template-tertiary-container: #9f6109;

    --white-template-on-background: #191c1e;
    --white-template-on-surface-variant: #40484f;
    --white-template-outline: #707880;
    --white-template-outline-variant: #bfc7d0;
    --white-template-error: #ba1a1a;

    --white-template-font-headline: "Manrope", sans-serif;
    --white-template-font-body: "Inter", sans-serif;

    /* Scrollbar */
    --green-template-scrollbar-width: 5px;
    --green-template-scrollbar-track: #f5f7fb;
    --green-template-scrollbar-thumb: var(--white-template-primary);
    --green-template-scrollbar-thumb-hover: var(
        --white-template-primary-container
    );
}

/* Base Body Styles */
body {
    background-color: var(--white-template-background) !important;
    color: var(--white-template-on-background) !important;
    font-family: var(--white-template-font-body) !important;
    font-size: 16px;
    line-height: 1.5;
}

#about,
#certificates,
#treatments,
#gallery,
#blogs,
#booking,
#faq,
#location {
    scroll-margin-top: 80px;
}

/* Heading Fonts & Color */
h1,
h2,
h3,
h4,
h5,
h6,
.font-heading,
.display-5,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--white-template-font-headline) !important;
    color: var(--white-template-on-background) !important;
}
a {
    text-decoration: none !important;
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
    vertical-align: middle;
}
.material-symbols-outlined.fill-1 {
    font-variation-settings:
        "FILL" 1,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

/* Template Utility Color Helper Classes */
.wt-bg-container {
    background-color: var(--white-template-surface-container) !important;
}
.wt-bg-container-low {
    background-color: var(--white-template-surface-container-low) !important;
}
.wt-bg-container-highest {
    background-color: var(
        --white-template-surface-container-highest
    ) !important;
}
.wt-bg-card {
    background-color: var(--white-template-surface-container-lowest) !important;
}
.wt-today-highlight {
    background-color: rgba(0, 92, 134, 0.06) !important;
}
.wt-badge-today {
    background-color: var(--white-template-primary) !important;
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.wt-text-primary {
    color: var(--white-template-primary) !important;
}
.wt-text-title {
    color: var(--white-template-on-background) !important;
    text-decoration: none !important;
}
.wt-text-body {
    color: var(--white-template-on-surface-variant) !important;
    text-decoration: none !important;
}
.wt-text-tertiary {
    color: var(--white-template-tertiary) !important;
}
.wt-border-variant {
    border-color: rgba(191, 199, 208, 0.25) !important;
}

/* Override standard Bootstrap color classes to enforce WhiteTemplate theme */
.text-muted,
.text-secondary-emphasis,
.text-secondary {
    color: var(--white-template-on-surface-variant) !important;
}
.text-dark {
    color: var(--white-template-on-background) !important;
}
.text-primary {
    color: var(--white-template-primary) !important;
}
.text-warning {
    color: var(--white-template-tertiary) !important;
}
.bg-light {
    background-color: var(--white-template-surface-container-low) !important;
}
.bg-primary-subtle {
    background-color: var(--white-template-on-primary-container) !important;
    color: var(--white-template-primary) !important;
}
.text-danger {
    color: var(--white-template-error) !important;
}

/* Sticky Navbar Styles */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: rgba(247, 249, 251, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(191, 199, 208, 0.3) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.sticky-nav .navbar-brand {
    font-family: var(--white-template-font-headline) !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: var(--white-template-on-background) !important;
    letter-spacing: -0.01em;
}
.white-brand {
    padding-block: 0px;
}
.sticky-nav .white-brand-sub {
    font-size: 0.75rem;
    color: var(--white-template-primary);
    font-weight: 500;
}

.sticky-nav .nav-link {
    color: var(--white-template-on-surface-variant) !important;
    font-family: var(--white-template-font-body) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    transition: color 0.2s ease;
}

.sticky-nav .nav-link:hover,
.sticky-nav .nav-link.active {
    color: var(--white-template-primary) !important;
}

/* Nav Pill Consultation Button */
.btn-nav-consultation {
    background-color: var(--white-template-primary) !important;
    color: #ffffff !important;
    border-radius: 50rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 1.35rem !important;
    border: none !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-block;
}
.btn-nav-consultation:hover {
    background-color: #004c6e !important;
    color: #ffffff !important;
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Section Padding */
.section-py-xl {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
.section-py-lg {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Clinic Cards & Shadows */
.clinic-card {
    background-color: var(--white-template-surface-container-lowest) !important;
    border-radius: 1.5rem !important;
    border: 1px solid rgba(191, 199, 208, 0.25) !important;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.04) !important;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.clinic-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* Subtitle Badges */
.badge-subtitle {
    font-family: var(--white-template-font-body) !important;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white-template-primary-container) !important;
}

/* Aspect Ratios & Dimensions */
.hero-profile-img {
    aspect-ratio: 1 / 1;
}
.wt-about-title {
    color: var(--white-template-primary) !important;
    font-size: 2rem !important;
}
.wt-about-body-text {
    font-size: 1.2rem !important;
}
.about-profile-img {
    aspect-ratio: 4 / 3;
    object-position: top;
}
.section-header-max-width {
    max-width: 650px;
}
.faq-container-max-width {
    max-width: 800px;
}
.blog-card-img {
    height: 200px;
}
.map-iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 0;
}

/* Footer Social Buttons */
.footer-social-btn {
    width: 38px;
    height: 38px;
}
.footer-brand-text {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
}

/* Custom Buttons */
.btn-primary-custom {
    background-color: var(--white-template-primary) !important;
    color: #ffffff !important;
    border-radius: 50rem !important;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    border: none !important;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: #004c6e !important;
    opacity: 0.95;
}
.btn-outline-custom {
    border: 1px solid var(--white-template-outline) !important;
    color: var(--white-template-on-background) !important;
    border-radius: 50rem !important;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    background: transparent !important;
    transition: all 0.2s ease;
}
.btn-outline-custom:hover {
    background-color: var(--white-template-surface-container) !important;
    color: var(--white-template-on-background) !important;
}

/* Secondary Button (Stitch Design Specification: 2px Primary Border with Primary Text Color) */
.btn-secondary-outline-custom {
    border: 2px solid var(--white-template-primary) !important;
    color: var(--white-template-primary) !important;
    border-radius: 50rem !important;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    background: transparent !important;
    transition: all 0.2s ease;
}
.btn-secondary-outline-custom:hover {
    background-color: rgba(0, 92, 134, 0.08) !important;
    color: var(--white-template-primary) !important;
}

/* Video Cards */
.video-card-thumb {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background-color: var(--white-template-surface-container-highest);
    cursor: pointer;
}
.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.video-card-thumb:hover img {
    transform: scale(1.08);
}
.video-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}
.video-duration-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 0.375rem;
    z-index: 3;
}
.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.video-card-play span {
    font-size: 52px !important;
}
.video-overlay-text .video-overlay-heading {
    color: white !important;
}
.video-card-thumb:hover .video-card-play {
    opacity: 1;
}

/* Gallery Items */
.gallery-item {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.04);
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    padding: 0.35rem 1rem;
    border-radius: 50rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white-template-on-background);
}

/* FAQ Accordion Overrides */
.faq-accordion .accordion-item {
    border-radius: 1rem !important;
    border: 1px solid rgba(191, 199, 208, 0.25) !important;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.04) !important;
    background-color: var(--white-template-surface-container-lowest) !important;
}
.faq-accordion .accordion-button {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white-template-on-background) !important;
    background-color: var(--white-template-surface-container-lowest) !important;
    box-shadow: none !important;
    padding: 1.25rem 1.5rem;
}
.faq-accordion .accordion-button:not(.collapsed) {
    background-color: var(--white-template-surface-container-lowest) !important;
    color: var(--white-template-primary) !important;
}

/* Form Inputs */
.form-control {
    background-color: var(--white-template-surface-container-lowest) !important;
    border-color: var(--white-template-outline-variant) !important;
    color: var(--white-template-on-background) !important;
}
.form-control:focus {
    border-color: var(--white-template-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 92, 132, 0.15) !important;
}

/* Floating Scroll Top Button */
.btn-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1040;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--white-template-primary) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.btn-scroll-top:active {
    transform: scale(0.9);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* --------------------------------------------------------------------------
   TABLET & MOBILE BREAKPOINT (< 992px)
   Consolidated section-wise styles for medium & small screens
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    /* Section Padding */
    .section-py-xl {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
    .section-py-lg {
        padding-top: 2.25rem;
        padding-bottom: 2.25rem;
    }

    /* Navbar */
    .sticky-nav .navbar-toggler {
        padding: 0.4rem 0.6rem;
        border-radius: 0.5rem;
        background-color: var(--white-template-surface-container);
        border: 1px solid var(--white-template-outline-variant) !important;
    }
    .sticky-nav .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(0, 92, 134, 0.2) !important;
    }
    .sticky-nav .navbar-toggler-icon {
        filter: invert(20%) sepia(50%) saturate(1000%) hue-rotate(170deg);
    }
    .sticky-nav .navbar-collapse {
        background-color: var(--white-template-surface-container-lowest);
        padding: 1.25rem;
        border-radius: 1rem;
        margin-top: 0.75rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(191, 199, 208, 0.25);
    }
    .sticky-nav .navbar-nav {
        margin-bottom: 1rem !important;
    }
    .sticky-nav .btn-primary-custom {
        width: 100%;
        text-align: center;
    }

    /* Hero Section */
    .display-5 {
        font-size: 2.25rem !important;
    }

    /* About The Doctor */
    #about .img-fluid {
        aspect-ratio: 16 / 9 !important;
    }

    /* Health Video Library / Treatments */
    .video-card-thumb {
        aspect-ratio: 16 / 9;
    }
    .video-card-play {
        opacity: 1;
    }

    /* Appointment Booking Form */
    #booking .clinic-card {
        margin-top: 1rem;
    }

    /* Location & Map Section */
    .min-h-300 {
        min-height: 320px !important;
    }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE BREAKPOINT (< 576px)
   Consolidated section-wise styles for extra small screens
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    /* Section Padding */
    .section-py-xl {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    .section-py-lg {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }

    /* Hero Buttons */
    .display-5 {
        font-size: 1.85rem !important;
    }
    .btn-primary-custom,
    .btn-outline-custom,
    .btn-secondary-outline-custom {
        width: 100%;
        text-align: center;
    }

    /* Stats Section */
    .clinic-card.p-4 {
        padding: 1.25rem !important;
    }
    .fs-1 {
        font-size: 2rem !important;
    }

    /* Clinic Hours */
    #hours .d-flex.justify-content-between {
        font-size: 0.9rem;
    }

    /* Health Video Library / Treatments */
    .video-card-thumb {
        aspect-ratio: 4 / 3;
    }

    /* Gallery Section */
    .gallery-item img {
        aspect-ratio: 16 / 9;
    }
    .gallery-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

    /* FAQ Accordion */
    .faq-accordion .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }
}
.treatment-slider-wrapper .swiper-slide {
    /* NEW */
    height: auto;
}
.treatment-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}
.treatment-nav-prev {
    left: -20px;
}
.treatment-nav-next {
    right: -20px;
}
.treatment-text-box {
    min-height: 150px;
    max-height: 150px;
    display: flex;
    flex-direction: column;
}
.treatment-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    margin: 0 4px;
}
.treatment-pagination .swiper-pagination-bullet-active {
    background: var(--wt-primary, #085ea5);
    width: 24px;
    border-radius: 6px;
}
.video-card-thumb {
    /* NEW */
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-nav-btn {
    /* NEW */
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}
.blog-nav-prev {
    left: -40px;
}
.blog-nav-next {
    right: -40px;
}
.blog-pagination .swiper-pagination-bullet {
    /* NEW */
    width: 8px;
    height: 8px;
    background: #d1d5db;
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
}
.blog-pagination .swiper-pagination-bullet-active {
    background: var(--wt-primary, #085ea5);
    width: 24px;
    border-radius: 6px;
}
@media (max-width: 1400px) {
    /* NEW */
    .blog-nav-prev {
        left: -30px;
    }
    .blog-nav-next {
        right: -30px;
    }
}
@media (max-width: 1200px) {
    .blog-nav-btn {
        width: 40px;
        height: 40px;
    }
    .blog-nav-prev {
        left: -20px;
    }
    .blog-nav-next {
        right: -20px;
    }
}
/* Scroll-triggered Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--green-template-scrollbar-thumb)
        var(--green-template-scrollbar-track);
}
.custom-scrollbar::-webkit-scrollbar {
    width: var(--green-template-scrollbar-width);
    height: var(--green-template-scrollbar-width);
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--white-template-primary);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--green-template-scrollbar-thumb);
    border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--green-template-scrollbar-thumb-hover);
}

/* Gallery Section Utility Classes */
.gallery-card {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0px 4px 20px #005c866b;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}
