/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* 0. LENIS SMOOTH SCROLL */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* 0.1 PAGE TRANSITIONS (Centered medical pulse) */
#page-transition-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#page-transition-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.medical-pulse {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pulse-icon-wrapper {
    position: relative;
    z-index: 2;
    background: var(--primary);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.medical-pulse i {
    font-size: 35px;
    color: #ffffff;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary);
    border-radius: 50%;
    animation: medicalPulse 1.5s ease-out infinite;
}

@keyframes medicalPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

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

:root {
    /* Floating UI Palette - Clean & Spacious */
    --primary: #1A2B3C;
    /* Cosmic Graphite */
    --primary-light: #2c4257;
    --accent: #64CCC5;
    /* Muted Mint */
    --accent-hover: #4FBDB4;
    --bg-body: #F8FAFC;
    /* Milky White */
    --bg-surface: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.6);
    /* More transparent */
    --text-main: #1A2B3C;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    /* Gradients - Soft & Airy */
    --gradient-primary: linear-gradient(135deg, #1A2B3C 0%, #2c4257 100%);
    --gradient-accent: linear-gradient(135deg, #64CCC5 0%, #22d3ee 100%);
    --gradient-float: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    /* Shadows (Floating) */
    --shadow-sm: 0 10px 30px -10px rgba(26, 43, 60, 0.05);
    /* Soft, distant shadow */
    --shadow-md: 0 20px 40px -10px rgba(26, 43, 60, 0.08);
    /* More float */
    --shadow-lg: 0 30px 60px -15px rgba(26, 43, 60, 0.12);
    /* High float */
    --shadow-glow: 0 0 40px rgba(100, 204, 197, 0.15);
    /* Radii - Soft Curves */
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;
    /* Transitions - Slow & Smooth */
    --transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Eloquent ease */
    /* Accessibility Mode */
    --accessibility-filter: grayscale(100%) contrast(1.2);
}

/* Accessibility Mode Application */
html.accessibility-mode {
    filter: var(--accessibility-filter) !important;
}

html.accessibility-mode .accessibility-toggle {
    background: var(--primary);
    color: white;
}

html {
    font-size: 18px;
    /* Increased base size for readability */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    padding-top: 0;
    /* Static layout, navbar will be sticky */
    animation: pageFadeIn 0.5s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

img {
    max-width: 100%;
    height: auto;
}

/* Global content images (CKEditor) */
.content img,
.news-content img,
.page-content img,
.content-body img,
.doctor-description img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

/* Animations */
@keyframes pageFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes btnBreathe {
    0% {
        box-shadow: 0 0 0 0 rgba(100, 204, 197, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(100, 204, 197, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(100, 204, 197, 0);
    }
}

@keyframes breathe {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: transform, opacity;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes float-slow {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(100, 204, 197, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(100, 204, 197, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(100, 204, 197, 0);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

.heartbeat-icon {
    animation: heartbeat 2s infinite;
}

/* --- GLOBAL ALERT ULTRA-PREMIUM STYLES --- */
.modal-backdrop.premium-backdrop {
    background-color: rgba(5, 10, 20, 0.7) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal.premium-modal .modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 60px -10px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* Shine Effect */
.modal.premium-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 60%,
            transparent 100%);
    animation: shine-slide 4s infinite linear;
    pointer-events: none;
}

@keyframes shine-slide {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(50%);
    }
}

.modal.premium-modal .modal-header {
    background: transparent;
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
    z-index: 2;
}

.modal.premium-modal .modal-body {
    position: relative;
    z-index: 2;
}

.modal.premium-modal.show .modal-dialog {
    animation: modalElasticPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalElasticPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }

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

}

/* Pulse Ripple Icon */
.icon-ripple-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 1.5rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.icon-ripple-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px currentColor;
    opacity: 0;
    z-index: -1;
    animation: ripple-wave 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-ripple-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px currentColor;
    opacity: 0;
    z-index: -1;
    animation: ripple-wave 2.5s infinite 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ripple-wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

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

/* SVG Icon Styles */
.alert-icon-svg {
    width: 32px;
    height: 32px;
    display: block;
}

/* Success Checkmark Animation - Trigger only on SHOW */
.checkmark-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.modal.premium-modal.show .checkmark-path {
    animation: drawCheck 0.8s ease forwards 1s;
    /* Delayed until after modal pop */
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* Danger Shake - Trigger only on SHOW */
.modal.premium-modal.show .alert-icon-svg.text-danger {
    animation: iconShake 0.5s ease-in-out forwards 1s;
}

/* Info Bounce - Trigger only on SHOW */
.modal.premium-modal.show .alert-icon-svg.text-info {
    animation: iconBounce 0.6s ease-in-out forwards 1s;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Warning Swing - Trigger only on SHOW */
.modal.premium-modal.show .alert-icon-svg.text-warning {
    animation: iconSwing 0.6s ease-in-out forwards 1s;
}

@keyframes iconSwing {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes iconShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* Gradient Text */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 800;
}

.text-gradient-info {
    background-image: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #0ea5e9;
}

.text-gradient-warning {
    background-image: linear-gradient(135deg, #f59e0b, #d97706);
    color: #f59e0b;
}

.text-gradient-danger {
    background-image: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ef4444;
}

.text-gradient-success {
    background-image: linear-gradient(135deg, #10b981, #059669);
    color: #10b981;
}

/* Custom Button */
.btn-premium-modal {
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    color: white !important;
}

.btn-premium-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}

.btn-gradient-info {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.btn-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-gradient-success {
    background: linear-gradient(135deg, #10b981, #059669);
}



.floating-element {
    animation: float 6s ease-in-out infinite;
}

/* Glassmorphism (Optimized) */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    will-change: transform;
}

/* Navbar (Optimized) */
.navbar {
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    will-change: transform;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    margin: 0 1.25rem;
    /* More horizontal spacing */
    padding: 0.5rem 0 !important;
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary) !important;
    transform: translateY(-2px);
}

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

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 140px;
    background: var(--bg-body);
    overflow: hidden;
}

/* Abstract Background Shapes */
.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(100, 204, 197, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    animation: float-slow 10s ease-in-out infinite alternate;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 43, 60, 0.03) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    animation: float-slow 12s ease-in-out infinite alternate-reverse;
}

.hero-title {
    font-size: 4.5rem;
    /* Huge title */
    font-weight: 800;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.3rem;
    /* Larger body */
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 4rem;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    padding: 1.2rem 3rem;
    /* Larger buttons */
    border-radius: 60px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    letter-spacing: 0.02em;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    animation: btnBreathe 3s infinite;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-light:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 40px;
    /* Wider gaps */
    padding: 40px 0;
}

.bento-item {
    grid-column: span 12;
}

@media (min-width: 992px) {
    .bento-item-4 {
        grid-column: span 4;
    }

    .bento-item-6 {
        grid-column: span 6;
    }

    .bento-item-8 {
        grid-column: span 8;
    }
}

/* Cards (Floating Style) */
.card {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-15px);
    /* Significant lift */
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    height: 300px;
    /* Taller images */
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
    /* Very slow zoom */
}

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

.card-body {
    padding: 3rem;
    /* More inner padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Sidebar Navigation */
.sidebar-menu {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    font-size: 1rem;
}

.sidebar-link:hover {
    background: rgba(100, 204, 197, 0.05);
    color: var(--primary);
    padding-left: 2.25rem;
    /* Slight slide right */
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(100, 204, 197, 0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--accent);
}

.sidebar-link i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    color: var(--accent);
}

.sidebar-link.active i {
    color: var(--primary);
}

.floating-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    padding: 1.2rem 2.5rem;
    border-radius: 60px;
    background: var(--accent);
    color: #1A2B3C;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    animation: pulse-glow 3s infinite;
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--accent-hover);
    color: white;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 6rem;
}

.section-title span {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 3.5rem;
    margin: 0;
}

/* Footer */
footer {
    background: #1A2B3C;
    color: #94a3b8;
    padding: 120px 0 80px;
    margin-top: 10rem;
    /* Huge separation */
    width: 100%;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}

footer h5 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
}

footer a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

footer a:hover {
    color: var(--accent);
    transform: translateX(10px);
    display: inline-block;
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    /* Reset for mobile */
    .hero-title {
        font-size: 3rem;
    }

    .hero-section {
        padding: 140px 0 80px;
    }

    .bento-item-4,
    .bento-item-6,
    .bento-item-8 {
        grid-column: span 12;
    }

    .card-body {
        padding: 2rem;
    }

    .floating-btn span {
        display: none;
    }

    .floating-btn {
        width: 70px;
        height: 70px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* Utility Classes */
.card-date-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 12px;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 0.5rem;
}

@media (min-width: 992px) {
    .admin-nav-btn {
        margin-top: 0;
    }
}

.admin-nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.admin-access-btn i {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Responsive Embeds (YouTube/Vimeo) from CKEditor */
.media,
figure.media {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    background: #000;
}

.media iframe,
figure.media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}



@media (max-width: 991px) {
    .hero-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
        /* Significantly smaller to fit screen */
        word-wrap: break-word;
        hyphens: auto;
    }

    .hero-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Fix news images on mobile to show full content (no crop) */
    .card-img-wrapper {
        height: auto !important;
        min-height: 200px;
    }

    .card-img-top {
        height: auto !important;
        object-fit: contain !important;
        max-height: 500px;
    }
}

/* Accessibility Toggle Button (Side Tab Redesign) */
/* ACCESSIBILITY TOOLKIT - RIGHT SIDE DRAWER */
.accessibility-wrapper {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    /* Align to top of panel or center */
    flex-direction: row-reverse;
    /* Button on right, panel to left */
}

/* Button - Tab Style */
.accessibility-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 30px 0 0 30px;
    /* Round left side only */
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    /* Blue-Cyan Gradient */
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    box-shadow: -5px 5px 20px rgba(13, 110, 253, 0.5);
    font-size: 26px;
    /* Slightly larger icon */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    right: 0;
    animation: pulse-blue-side 2s infinite;
}

@keyframes pulse-blue-side {
    0% {
        box-shadow: -5px 0 0 0 rgba(13, 110, 253, 0.7);
    }

    70% {
        box-shadow: -20px 0 0 0 rgba(13, 110, 253, 0);
        /* Wider pulse */
    }

    100% {
        box-shadow: -5px 0 0 0 rgba(13, 110, 253, 0);
    }
}

.accessibility-toggle-btn i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: eye-blink 3s infinite;
}

@keyframes eye-blink {

    0%,
    45%,
    55%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }

    /* Blinking effect */
}

.accessibility-toggle-btn:hover {
    padding-right: 15px;
    /* Slide out more */
    background: linear-gradient(135deg, #0dcaf0 0%, #0d6efd 100%);
    /* Invert gradient */
    animation: none;
}

.accessibility-toggle-btn:hover i {
    animation: none;
    /* Stop blink on hover */
}

/* Panel - Slide In Drawer */
.accessibility-panel {
    position: absolute;
    right: 70px;
    /* Next to button with spacing */
    top: 50%;
    transform: translateY(-50%) translateX(50px) scale(0.9);
    /* Start hidden, offset, and slightly smaller */

    width: auto;
    min-width: 320px;
    max-width: 85vw;

    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    /* Stronger blur */
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    color: white;

    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy premium feel */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.accessibility-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
}

.a11y-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Staggered Animation for Items */
/* Staggered Animation for Items */
.accessibility-panel .a11y-item,
.accessibility-panel .a11y-header,
.accessibility-panel .text-center {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease-out;
}

.accessibility-panel.show .a11y-header {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

.accessibility-panel.show .a11y-item:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.accessibility-panel.show .a11y-item:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.accessibility-panel.show .a11y-item:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.4s;
}

.accessibility-panel.show .text-center {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.a11y-header h6 {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: #fff !important;
    /* Force White */
}

.a11y-body {
    padding: 20px;
}

.a11y-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Force all text inside items to be white */
.a11y-item span,
.a11y-item label,
.a11y-item div {
    color: #fff !important;
    font-weight: 500;
}

.a11y-item:last-child {
    margin-bottom: 0;
}

.a11y-font-btn {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.a11y-font-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
}

.a11y-font-btn.active {
    background-color: white !important;
    color: #0d6efd !important;
    font-weight: bold;
    border-color: white !important;
}

/* --- MODES --- */

/* Grayscale */
html.a11y-grayscale {
    filter: grayscale(100%);
}

/* High Contrast (Yellow on Black) - NUCLEAR OPTION */
html.a11y-high-contrast,
html.a11y-high-contrast body,
html.a11y-high-contrast * {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffff00 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    border-color: #ffff00 !important;
}

/* Make links underline to distinguish them */
html.a11y-high-contrast a,
html.a11y-high-contrast a * {
    text-decoration: underline !important;
    color: #00ff00 !important;
    /* Green for links/buttons to stand out */
}

html.a11y-high-contrast .btn,
html.a11y-high-contrast button {
    border: 2px solid #00ff00 !important;
    color: #00ff00 !important;
}

/* Restore images but high contrast */
html.a11y-high-contrast img,
html.a11y-high-contrast svg {
    filter: grayscale(100%) contrast(2) !important;
    background-color: transparent !important;
    /* Don't black out transparent images */
}

/* Accessibility Panel Specifics */
html.a11y-high-contrast .accessibility-panel {
    border: 2px solid #fff !important;
}

/* Form inputs borders */
html.a11y-high-contrast input,
html.a11y-high-contrast textarea,
html.a11y-high-contrast select {
    border: 2px solid #ffff00 !important;
}

/* Navbar Toggle */
html.a11y-high-contrast .navbar-toggler-icon {
    filter: invert(1) sepia(100%) saturate(10000%) hue-rotate(60deg) !important;
    /* Make it yellow */
}

/* ===============================
   MEDIA EMBEDS (YOUTUBE, VIDEO)
================================ */
.content figure.media {
    margin: 2rem 0;
    width: 100%;
    clear: both;
}

.content figure.media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: none;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* CKEditor 5 defaults for oembed if needed */
.media oembed {
    display: block;
    width: 100%;
}

/* --- PREMIUM DOCTOR CARDS (Global) --- */
.doc-card-premium {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    will-change: transform, box-shadow;
}

.doc-card-premium:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.doc-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.doc-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.doc-card-premium:hover .doc-img-box img {
    transform: scale(1.08);
}

.doc-img-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
}

.doc-info {
    padding: 1.7rem 1.4rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-name {
    font-weight: 800;
    font-size: 1.3rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 5px;
}

.doc-pos {
    color: #2563eb;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    flex-grow: 1;
    margin-bottom: 20px;
}

.doc-info .btn-primary {
    margin-top: auto;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.doc-info .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}