/* assets/css/styles.css */

/* Custom plain CSS for the project (No Tailwind directives here) */

:root {
    --brand-navy: #001a3d;
    /* Deeper, more premium navy */
    --brand-green: #7ab22b;
    /* Slightly more organic green */
    --brand-green-light: #8ec63f;
    --brand-light: #f8fafc;
    --brand-accent: #0ea5e9;
    /* Sky blue for subtle accents */
    --text-main: #0f172a;
    /* Slate-900 */
    --text-muted: #475569;
    /* Slate-600 */

    /* Standard Spacing */
    --section-padding: 7rem;
    /* py-28 equivalent */
    --element-spacing: 1.5rem;
    --container-max: 1280px;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: 15px;
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* Base Utility for Common Spacing */
.p-std {
    padding: var(--element-spacing) !important;
}

.m-std {
    margin: var(--element-spacing) !important;
}

/* Global Typography */
body {
    margin: 0;
    padding: 0;
    line-height: 1.625;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Reusable Heading & Paragraph Styles */
.h1-style {
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--brand-navy);
    letter-spacing: -0.025em;
}

.h2-style {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--brand-navy);
    letter-spacing: -0.02em;
}

/* --------- Tablet (md) Typography Overrides --------- */
@media (min-width: 768px) {
    .h1-style {
        font-size: 3.5rem;
    }

    .h2-style {
        font-size: 2.75rem;
    }
}

/* --------- Desktop (lg) Typography Overrides --------- */
@media (min-width: 1024px) {
    .h1-style {
        font-size: 4.5rem;
    }

    .h2-style {
        font-size: 3.5rem;
    }
}

/* --------- Subheadings & Paragraphs Typography --------- */
.h3-style {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin-bottom: 0.75rem;
}

.p-style {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* Tablet paragraph scaling */
@media (min-width: 768px) {
    .p-style {
        font-size: 1rem;
    }
}

.p-large {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Tablet large-paragraph scaling */
@media (min-width: 768px) {
    .p-large {
        font-size: 1.25rem;
    }
}

/* Glassmorphism Classes */
.glass-header {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.group:hover .group-hover-white,
.group-hover-white:hover {
    filter: brightness(0) invert(1) !important;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* --- Preloader Overrides --- */
html.preloader-running {
    overflow: hidden !important;
}

.preloader-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999; /* Ensure it's above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #001a3d;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    visibility: visible;
}

.preloader-overlay.preloader-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner-css {
    position: absolute;
    width: 6.5rem; /* Slightly larger */
    height: 6.5rem;
    border: 3px solid rgba(255, 255, 255, 0.15); /* Thicker border */
    border-top: 3px solid #ffffff; /* Brighter top circle slice */
    border-radius: 50%;
    animation: preloader-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; /* More dynamic, smoother curve */
    will-change: transform;
}

@keyframes preloader-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Custom transitions or non-Tailwind styles */
.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay Utils for Hero Text Appearance after Preloader */
.delay-3000 { animation-delay: 4s !important; animation-fill-mode: both !important; }
.delay-3200 { animation-delay: 4.2s !important; animation-fill-mode: both !important; }
.delay-3500 { animation-delay: 4.5s !important; animation-fill-mode: both !important; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Nav & Button Components */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--brand-green);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* Subtle Repeating Background Pattern */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.38 0h3.247zM4.23 0L0 4.227V1.414L1.414 0h2.817zm1.414 0l5.657 5.657-1.414 1.414L4.23 1.414 5.644 0zm11.314 0l5.657 5.657-1.414 1.414L15.544 1.414 16.958 0zm11.314 0l5.657 5.657-1.414 1.414L26.858 1.414 28.272 0zm11.314 0l5.657 5.657-1.414 1.414L38.172 1.414 39.586 0zM50.898 0l5.657 5.657-1.414 1.414L49.484 1.414 50.898 0zM57.16 0l.828.828-1.415 1.415L54.627 0h2.533zM0 60h2.828L0 57.172V60zm0-11.314L5.657 54.34 4.243 55.757 0 51.514v-2.828zm0-11.314L11.314 48.686l-1.414 1.415-9.9 9.9V54.34zm0-11.314l16.97 16.97-1.414 1.414L0 34.514v-2.828zm0-11.314l22.627 22.627-1.414 1.414L0 23.199v-2.828zm0-11.314l28.284 28.284-1.414 1.414L0 11.885V9.057zm0-11.314l33.94 33.94-1.414 1.414L0 .571V0h.571zm11.314 0l22.627 22.627-1.414 1.414L11.314 11.885V9.057zm11.314 0l16.97 16.97-1.414 1.414L22.628 5.657V2.828zm11.314 0l11.314 11.314-1.414 1.414L33.942.571V0h.571zm11.314 0l5.657 5.657-1.414 1.414L45.256 1.414 46.67 0h4.242zM0 0h2.828L0 2.828V0zm0 11.314L5.657 5.657l-1.414-1.415L0 8.485v2.829zm0 11.314l11.314-11.314L9.9 9.9 0 19.8v2.828zm0 11.314l16.97-16.97-1.414-1.414L0 31.114v2.828zm0 11.314l22.627-22.627-1.414-1.414L0 42.427v2.828zm0 11.314L28.284-1.414 26.87 0 0 26.87v2.828zM0 56.57l5.657-5.657-1.415-1.414L0 53.743v2.828z' fill='%23002855' fill-opacity='0.15' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.nav-link:hover {
    color: var(--brand-navy) !important;
}

.btn-primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #003366 100%);
    color: white !important;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 26, 61, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(0, 26, 61, 0.25);
    filter: brightness(1.1);
}

.btn-secondary {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid var(--brand-navy);
    color: var(--brand-navy) !important;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: var(--brand-navy);
    color: rgb(0, 0, 0) !important;
    transform: translateY(-2px);
}

.btn-green {
    padding: 0.75rem 2rem;
    background: var(--brand-green);
    color: var(--brand-navy) !important;
    border-radius: 9999px;
    font-weight: 700;
    box-shadow: 0 10px 25px -5px rgba(122, 178, 43, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-green:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 20px 40px -10px rgba(122, 178, 43, 0.4);
}

/* --- Global Brand Palette Overrides --- */
/* Forces specific brand colors independent of Tailwind config scope */
.bg-brand-green {
    background-color: var(--brand-green) !important;
}

.bg-brand-green-light {
    background-color: var(--brand-green-light) !important;
}

.bg-brand-navy {
    background-color: var(--brand-navy) !important;
}

.text-brand-green {
    color: var(--brand-green) !important;
}

.text-brand-green-light {
    color: var(--brand-green-light) !important;
}

.text-brand-navy {
    color: var(--brand-navy) !important;
}

/* --------- Global Layout Wrapping --------- */
/* Replaces standard container classes with precise padding */
.mx-padding {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Desktop container alignment */
@media (min-width: 1024px) {
    .mx-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* --- Reusable Layout & Component Classes --- */

/* Standard Section Spacing */
.section-spacing {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

@media (max-width: 768px) {
    .section-spacing {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Compact Section Spacing (for adjacent sections) */
.section-spacing-sm {
    padding-bottom: var(--section-padding);
}

@media (max-width: 768px) {
    .section-spacing-sm {
        padding-bottom: 2rem;
    }
}

/* Hero Section Spacing (for internal pages) */
.hero-spacing {
    padding-top: 9rem;
    padding-bottom: 5rem;
}

/* Tablet Hero Layout Optimization */
@media (min-width: 768px) {
    .hero-spacing {
        padding-top: 10rem;
        padding-bottom: 5rem;
    }
}

/* Desktop Hero Layout Optimization */
@media (min-width: 1024px) {
    .hero-spacing {
        padding-top: 11rem;
        padding-bottom: 6rem;
    }
}

/* Section Header Structure */
.section-header {
    text-align: center;
    max-width: 48rem;
    /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    /* mb-20 */
}

.section-subtitle {
    color: var(--brand-green);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 0.75rem;
    /* text-xs */
    margin-bottom: 1rem;
    /* mb-4 */
    display: block;
}

.section-title {
    margin-bottom: 1.5rem;
    /* mb-6 */
    color: var(--brand-navy);
}

.section-description {
    color: var(--text-muted);
}

/* Premium Card Component */
.card-premium {
    background-color: white;
    padding: 1rem;
    /* p-5 */
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 26, 61, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #f8fafc;
    /* border-slate-50 */
    position: relative;
    overflow: hidden;
}

/* Tablet Card Spacing Optimization */
@media (min-width: 768px) {
    .card-premium {
        padding: 2rem;
        border-radius: 2rem;
    }
    /* Section Header Structure */
    .section-header {
        margin-bottom: 3rem;
    }
}

/* Desktop Card Spacing Optimization */
@media (min-width: 1024px) {
    .card-premium {
        padding: 2.5rem;
        border-radius: 2.5rem;
    }
    /* Section Header Structure */
    .section-header {
        margin-bottom: 5rem;
    }
}

.card-premium:hover {
    box-shadow: 0 30px 70px rgba(0, 26, 61, 0.1);
    transform: translateY(-0.75rem);
    /* hover:-translate-y-3 */
}

/* Icon Box Component */
.icon-box {
    width: 4rem;
    /* w-16 */
    height: 4rem;
    /* h-16 */
    background-color: #f8fafc;
    /* bg-slate-50 */
    color: var(--brand-navy);
    border-radius: 1rem;
    /* rounded-2xl */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    /* mb-8 */
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .icon-box {
    background-color: var(--brand-navy);
    color: white;
    transform: rotate(6deg);
    /* group-hover:rotate-6 */
}

/* Link with Arrow Animation */
.link-arrow {
    color: var(--brand-navy);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-arrow span {
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.link-arrow:hover span {
    border-color: var(--brand-green);
}

.link-arrow svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.link-arrow:hover svg {
    transform: translateX(4px);
}

/* --- Premium Redesign Enhancements --- */

/* Standardized Section Spacing (now using var(--section-padding)) */

/* Mission & Vision Premium Layout */
.mv-card {
    background: white;
    border-radius: 3rem;
    padding: 3rem;
    height: 100%;
    border: 1px solid rgba(0, 26, 61, 0.03);
    box-shadow: 0 20px 50px rgba(0, 26, 61, 0.04);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.mv-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 80px rgba(0, 26, 61, 0.08);
    border-color: rgba(122, 178, 43, 0.2);
}

.mv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 0;
    background: var(--brand-green);
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mv-card:hover::before {
    height: 100%;
}

.mv-icon {
    width: 5rem;
    height: 5rem;
    background: #f8fafc;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    margin-bottom: 2.5rem;
    transition: all 0.5s ease;
}

.mv-card:hover .mv-icon {
    background: var(--brand-navy);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Gallery Hover Enhancement */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    cursor: pointer;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 26, 61, 0.9) 0%, rgba(0, 26, 61, 0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

/* Doctor Card Premium Redesign */
.dr-card {
    display: flex;
    background: white;
    border-radius: 4rem;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 26, 61, 0.05);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #f1f5f9;
    min-height: 480px;
}

.dr-card:not(:last-child) {
    margin-bottom: 2rem;
}

.dr-card:hover {
    box-shadow: 0 40px 90px rgba(0, 26, 61, 0.1);
}

.dr-image-wrapper {
    width: 40%;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.dr-card-reverse .dr-image-wrapper {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.dr-card:hover .dr-image-wrapper img {
    transform: scale(1.05);
}

.dr-content {
    width: 60%;
    padding: 5rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dr-specialty-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 999px;
    margin-bottom: 2rem;
    border: 1px solid #dcfce7;
}

/* Tablet/Mobile Doctor Cards Stacked Format */
@media (max-width: 1024px) {
    .dr-card {
        flex-direction: column;
        border-radius: 3rem;
        min-height: auto;
    }

    .dr-image-wrapper,
    .dr-content {
        width: 100%;
    }

    .dr-image-wrapper,
    .dr-card-reverse .dr-image-wrapper {
        clip-path: none !important;
        height: 360px;
    }

    .dr-content {
        padding: 3rem;
    }
}

/* Gradient Text Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #25d366;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 16px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: #25d366;
    animation: wa-pulse 2.5s ease-out infinite;
    z-index: -1;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.6);
        opacity: 0;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* --- Before & After Slider Components --- */
.before-after-slider img {
    pointer-events: none;
    user-select: none;
}

/* Fix for AOS blocking interactions on interactive children */
[data-aos] {
    pointer-events: auto !important;
}

/* Scoped Style for Swiper Coverflow specific fixes */
.gallery-swiper .swiper-slide {
    background-position: center;
    background-size: cover;
}
.gallery-swiper .swiper-slide-shadow-left,
.gallery-swiper .swiper-slide-shadow-right {
    border-radius: 1.5rem;
}