/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary: #108542; /* Brand green */
    --primary-dark: #097f3c;
    --primary-light: #20a055;
    --accent: #58C6E9; /* From their UI css */
    --accent-green: #04d37f;
    --secondary-blue: #2a3d60;

    --bg-light: #F0F1F4;
    --bg-white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Typography & Buttons
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-blue);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: var(--bg-white);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(16, 133, 66, 0.3);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: var(--bg-white);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 133, 66, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--bg-white);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background: var(--bg-white);
    color: var(--secondary-blue);
    transform: translateY(-3px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--glass-shadow);
    padding: 0.8rem 0;
}

/* Header permanente para subpáginas (Cuerpo Médico y Novedades) */
.header.header-subpage {
    background: #ffffff !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07) !important;
    padding: 0.8rem 0 !important;
}

.header.header-subpage .logo img {
    height: 50px;
    filter: brightness(0) saturate(100%) invert(28%) sepia(77%) saturate(1514%) hue-rotate(115deg) brightness(96%) contrast(92%) !important;
}

.header.header-subpage .nav-link {
    color: var(--secondary-blue) !important;
}

.header.header-subpage .nav-link:hover,
.header.header-subpage .nav-link.active {
    color: var(--primary) !important;
}

.header.header-subpage .menu-toggle {
    color: var(--secondary-blue) !important;
}

.nav-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    transition: var(--transition);
    /* Logo todo blanco inicialmente para contrastar contra el fondo verde del Hero */
    filter: brightness(0) invert(1);
}

.header.scrolled .logo img {
    height: 50px;
    /* Convierte el logo a un verde oscuro (#097f3c) al bajar el menú */
    filter: brightness(0) saturate(100%) invert(28%) sepia(77%) saturate(1514%) hue-rotate(115deg) brightness(96%) contrast(92%);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--bg-white); /* White default for hero overlay */
    position: relative;
}

.header.scrolled .nav-link {
    color: var(--primary-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.header.scrolled .nav-link:hover {
    color: var(--primary);
}

.btn-turnos {
    background: var(--accent-green);
    color: var(--bg-white);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(4, 211, 127, 0.4);
}

.btn-turnos:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 133, 66, 0.4);
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--bg-white);
    cursor: pointer;
}

.header.scrolled .menu-toggle {
    color: var(--primary-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('imagenes/1647-2.jpg');
    background-size: cover;
    background-position: center 20%;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 133, 66, 0.85) 0%, rgba(42, 61, 96, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    color: var(--bg-white);
}

.hero-content h1 {
    color: var(--bg-white);
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--accent-green);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2.5rem;
    color: var(--bg-white);
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

/* ==========================================================================
   Services Section (Glassmorphism Cards)
   ========================================================================== */
.services {
    padding: 100px 0;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    top: 0;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(16, 133, 66, 0.15);
}

.card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-white) 0%, transparent 100%);
}

.card-content {
    padding: 0 30px 40px;
    position: relative;
    text-align: center;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: -35px auto 20px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(16, 133, 66, 0.3);
    border: 4px solid var(--bg-white);
    transition: var(--transition);
}

.service-card:hover .icon-wrapper {
    background: var(--accent-green);
    transform: rotateY(180deg);
}

.service-card:hover .icon-wrapper i {
    transform: rotateY(180deg); /* Counter-rotate icon to keep it straight */
}

.card-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.schedule-subtitle {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #8b95a5;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0;
}

.mt-small {
    margin-top: 15px;
}

.link-green {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.link-green:hover {
    text-decoration: underline;
}

.btn-outline {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    border: 2px solid #58C6E9; /* Light blue from image */
    color: #2a3d60;
    border-radius: 30px;
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn-outline:hover {
    background: #58C6E9;
    color: var(--bg-white);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: 100px 0;
    background: var(--bg-white);
}

.about-grid {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.about-text .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.stats-row {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-text {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-img {
    position: relative;
}

.rounded-img {
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.img-overlay-card {
    position: absolute;
    bottom: -30px;
    left: -40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    max-width: 250px;
}

.img-overlay-card i {
    font-size: 3rem;
    color: var(--accent-green);
    margin-bottom: 10px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    padding: 120px 0;
    background-image: url('imagenes/medical21.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(9, 127, 60, 0.8), rgba(4, 211, 127, 0.7));
}

.cta-glass {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 60px 40px;
    border-radius: 30px;
    text-align: center;
    color: var(--bg-white);
    max-width: 700px;
    width: 90%;
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
}

.cta-glass h2 {
    color: var(--bg-white);
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.cta-glass p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cta-turnos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: var(--primary-dark);
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 2px solid #ffffff;
    text-decoration: none;
}

.btn-cta-turnos:hover {
    background: transparent;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.btn-cta-turnos i {
    font-size: 1.35rem;
}

.btn-cta-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #ffffff;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 2px solid #25D366;
    text-decoration: none;
}

.btn-cta-whatsapp:hover {
    background: #1eb855;
    border-color: #1eb855;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.45);
}

.btn-cta-whatsapp i {
    font-size: 1.45rem;
}

@media (max-width: 600px) {
    .cta-buttons-group {
        flex-direction: column;
        width: 100%;
    }
    .btn-cta-turnos,
    .btn-cta-whatsapp {
        width: 100%;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--secondary-blue);
    color: var(--bg-white);
    padding: 80px 0 20px;
}

.footer-top {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 70px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Makes the logo white */
}

.brand-col p {
    opacity: 0.8;
    max-width: 350px;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--bg-white);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-col h4 {
    color: var(--bg-white);
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col ul li a:hover {
    color: var(--accent-green);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info li i {
    font-size: 1.3rem;
    color: var(--accent-green);
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media screen and (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .img-overlay-card {
        left: 20px;
        bottom: 20px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Header & Navigation en Tablets y Celulares */
    .nav-container {
        width: 94%;
        gap: 10px;
    }
    
    .logo img, .header.scrolled .logo img, .header.header-subpage .logo img {
        height: 38px !important;
        max-width: 130px;
        object-fit: contain;
    }

    /* Ocultar CTA Turnos Online en móvil/tablet para evitar choque y desborde */
    .header .btn-turnos,
    .btn-turnos {
        display: none !important;
    }

    /* Menú hamburguesa siempre visible y accesible */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 2rem;
        flex-shrink: 0;
        cursor: pointer;
        z-index: 101;
        color: var(--bg-white);
    }

    .header.scrolled .menu-toggle,
    .header.header-subpage .menu-toggle {
        color: var(--secondary-blue) !important;
    }

    /* Botón Flotante WhatsApp en móvil: discreto, circular, no tapa filtros */
    .whatsapp-float-btn {
        bottom: 18px !important;
        right: 18px !important;
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45) !important;
    }

    .whatsapp-float-btn i {
        font-size: 2rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .whatsapp-float-text {
        display: none !important;
    }
    
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0,0,0,0.05);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }
    
    .navbar.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .nav-link {
        color: var(--secondary-blue) !important;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: clamp(2.4rem, 6vw, 4rem);
    }

    /* Animaciones livianas en Móvil para touch fluido sin jitter */
    .fade-in-up {
        transform: translateY(16px);
        transition: opacity 0.45s ease, transform 0.45s ease;
    }

    /* Page Banners en Móvil */
    .page-banner {
        padding: 95px 0 25px;
    }

    .page-banner h1 {
        font-size: 1.85rem;
    }

    .page-banner p {
        font-size: 0.95rem;
    }

    /* Novedades en Móviles */
    .news-page-section {
        padding: 30px 0 60px;
        width: 94%;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-card-img {
        height: 190px;
    }

    .news-card-body {
        padding: 20px;
    }

    .dialog-content {
        padding: 24px 18px;
    }
}

/* ==========================================================================
   Page Banners (Cuerpo Médico y Novedades)
   ========================================================================== */
.page-banner {
    background: linear-gradient(135deg, #108542 0%, #2a3d60 100%) !important;
    padding: 120px 0 35px !important;
    color: #ffffff !important;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(16, 133, 66, 0.15);
}

.page-banner-content {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

.page-banner h1 {
    color: #ffffff !important;
    font-size: clamp(2.2rem, 4.5vw, 3rem) !important;
    margin-bottom: 8px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-banner p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.05rem !important;
    margin-bottom: 0;
    max-width: 650px;
    margin: 0 auto;
}

/* ==========================================================================
   Cuerpo Médico - Página Dedicada (Diseño 2 Columnas Compacto y Optimizado)
   ========================================================================== */
.staff-page-section {
    padding: 25px 0 70px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjeta de Control Unificada y Compacta */
.staff-control-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 16px 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Grilla de Controles Superiores: Sedes (Columna 1) y Filtros (Columna 2) en 2 Columnas */
.staff-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
    width: 100%;
}

/* Columna 1 (Izquierda): Selector de Sedes (uno abajo del otro) */
.staff-sede-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.sede-switch-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 18px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--secondary-blue);
    background: #f1f4f8;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-sizing: border-box;
}

.sede-btn-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sede-switch-btn .sede-count-badge {
    background: rgba(42, 61, 96, 0.1);
    color: var(--secondary-blue);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: var(--transition);
    flex-shrink: 0;
}

.sede-switch-btn:hover {
    background: rgba(16, 133, 66, 0.08);
    color: var(--primary);
    border-color: rgba(16, 133, 66, 0.2);
}

.sede-switch-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 133, 66, 0.35);
    border-color: var(--primary);
}

.sede-switch-btn.active .sede-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.sede-label-compact {
    display: none;
}

/* Columna 2 (Derecha): Filtros (uno abajo del otro) */
.staff-filters-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.staff-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
}

.staff-search-wrapper i {
    position: absolute;
    left: 16px;
    font-size: 1.25rem;
    color: var(--primary);
    pointer-events: none;
    z-index: 2;
}

.staff-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border-radius: 50px;
    border: 2px solid rgba(42, 61, 96, 0.1);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fbfcfe;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.staff-search-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 133, 66, 0.12);
}

.staff-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.staff-select-wrapper i {
    position: absolute;
    left: 16px;
    font-size: 1.2rem;
    color: var(--primary);
    pointer-events: none;
    z-index: 2;
}

.staff-select-wrapper::after {
    content: '\ea4a';
    font-family: 'boxicons';
    position: absolute;
    right: 16px;
    color: var(--secondary-blue);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.staff-specialty-select {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 42px;
    border-radius: 50px;
    border: 2px solid rgba(42, 61, 96, 0.1);
    font-size: 0.88rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--secondary-blue);
    background: #fbfcfe;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.staff-specialty-select:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 133, 66, 0.12);
}

/* Info de la Sede Activa (Integrada y Compacta) */
.sede-info-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.sede-meta-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sede-meta-details h3 {
    font-size: 1.25rem;
    color: var(--secondary-blue);
    margin-bottom: 0;
}

.sede-meta-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sede-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-turnos-online {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--bg-white);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(16, 133, 66, 0.25);
    transition: var(--transition);
}

.btn-turnos-online:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 133, 66, 0.35);
}

.btn-descargar-cartilla {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--secondary-blue);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid rgba(42, 61, 96, 0.18);
    box-shadow: 0 4px 14px rgba(42, 61, 96, 0.08);
    transition: var(--transition);
    text-decoration: none;
    box-sizing: border-box;
}

.btn-descargar-cartilla i {
    color: #e11d48;
    font-size: 1.18rem;
    transition: var(--transition);
}

.btn-descargar-cartilla:hover {
    background: var(--secondary-blue);
    color: #ffffff;
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 61, 96, 0.22);
}

.btn-descargar-cartilla:hover i {
    color: #ffffff;
}

/* Bloques por Especialidad (Compactos, Prolijos y Premium) */
.specialty-block {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.specialty-block:hover {
    box-shadow: 0 6px 20px rgba(16, 133, 66, 0.07);
}

.specialty-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1.5px solid rgba(16, 133, 66, 0.1);
}

.specialty-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 200px;
    min-width: 0;
}

.specialty-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(16, 133, 66, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.specialty-header h3 {
    font-size: 1.1rem;
    color: var(--secondary-blue);
    margin-bottom: 0;
    word-break: break-word;
    font-weight: 700;
}

.specialty-badge {
    background: rgba(4, 211, 127, 0.1);
    color: #047857;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Grilla de Doctores dentro de la especialidad (Compacta, Cómoda y Sin Aire Excesivo) */
.specialty-doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}

.doctor-item-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(42, 61, 96, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.doctor-item-card:hover {
    background: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 133, 66, 0.1);
    border-color: rgba(16, 133, 66, 0.25);
}

.doctor-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(16, 133, 66, 0.2);
}

.doctor-item-details {
    flex: 1;
    min-width: 0;
}

.doctor-item-details h4 {
    font-size: 0.9rem;
    color: var(--secondary-blue);
    margin-bottom: 2px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doctor-item-details p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Cuerpo Médico - Adaptación Responsiva para Tablets y Móviles (<= 850px)
   ========================================================================== */
@media screen and (max-width: 850px) {
    .staff-page-section {
        padding: 16px 0 60px;
        width: 94%;
        max-width: 100%;
    }

    .staff-control-card {
        padding: 14px 12px;
        border-radius: 16px;
        gap: 12px;
        overflow: visible;
    }

    /* Grilla de controles en móvil: 1 sola columna vertical (Sedes arriba, Filtros abajo) */
    .staff-controls-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Columna de Sedes en móvil: ancho completo */
    .staff-sede-column {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .sede-switch-btn {
        width: 100% !important;
        height: 42px !important;
        padding: 0 14px !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }

    .sede-btn-title {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
    }

    .sede-switch-btn .sede-count-badge {
        padding: 2px 7px !important;
        font-size: 0.74rem !important;
        margin-left: 4px !important;
        flex-shrink: 0 !important;
    }

    /* Columna de Filtros en móvil: ancho completo, visible y apilada */
    .staff-filters-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .staff-search-wrapper,
    .staff-select-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
    }

    .staff-search-input {
        width: 100% !important;
        height: 42px !important;
        padding: 0 14px 0 42px !important;
        font-size: 0.88rem !important;
        box-sizing: border-box !important;
    }

    .staff-search-wrapper i {
        left: 14px !important;
        font-size: 1.15rem !important;
    }

    .staff-specialty-select {
        width: 100% !important;
        height: 42px !important;
        padding: 0 34px 0 40px !important;
        font-size: 0.88rem !important;
        box-sizing: border-box !important;
    }

    .staff-select-wrapper i {
        left: 14px !important;
        font-size: 1.15rem !important;
    }

    .staff-select-wrapper::after {
        right: 14px !important;
    }

    .sede-info-strip {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding-top: 10px !important;
    }

    .sede-meta-details p {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
    }

    .btn-turnos-online,
    .btn-descargar-cartilla {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 0.88rem !important;
    }

    /* Tarjetas por Especialidad en Móvil (100% contenidas sin desborde y compactas) */
    .specialty-block {
        padding: 12px 12px !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .specialty-header {
        padding-bottom: 8px !important;
        margin-bottom: 10px !important;
        gap: 8px !important;
    }

    .specialty-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.95rem !important;
        border-radius: 6px !important;
    }

    .specialty-header h3 {
        font-size: 0.98rem !important;
    }

    .specialty-badge {
        font-size: 0.72rem !important;
        padding: 2px 7px !important;
    }

    .specialty-doctors-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .doctor-item-card {
        padding: 7px 10px !important;
        gap: 8px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .doctor-item-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
    }

    .doctor-item-details h4 {
        font-size: 0.85rem !important;
    }

    .doctor-item-details p {
        font-size: 0.72rem !important;
    }
}

/* Teléfonos móviles estándar y compactos (<= 480px) */
@media screen and (max-width: 480px) {
    .sede-label-full {
        display: none !important;
    }

    .sede-label-compact {
        display: inline !important;
        font-size: 0.88rem;
    }

    .badge-text-full {
        display: none !important;
    }
}

/* ==========================================================================
   Novedades - Página Dedicada
   ========================================================================== */
.news-page-section {
    padding: 60px 0 100px;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 36px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(16, 133, 66, 0.14);
}

.news-card-img {
    height: 230px;
    background-size: cover;
    background-position: center;
}

.news-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.news-card-body h3 {
    font-size: 1.35rem;
    color: var(--secondary-blue);
    margin-bottom: 12px;
    line-height: 1.35;
}

.news-card-body p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition);
}

.btn-read-more:hover {
    color: var(--accent-green);
    transform: translateX(5px);
}

/* Modal Dialog */
.news-dialog {
    border: none;
    border-radius: 24px;
    padding: 0;
    width: 90%;
    max-width: 780px;
    margin: auto;
    background: var(--bg-white);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.news-dialog::backdrop {
    background: rgba(16, 32, 60, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dialog-content {
    padding: 40px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--secondary-blue);
    transition: var(--transition);
    z-index: 10;
}

.dialog-close:hover {
    background: var(--danger);
    color: #ffffff;
}

.dialog-img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
}

.dialog-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
}

.dialog-body p {
    margin-bottom: 1.2rem;
}

/* ==========================================================================
   Home Important Popup Modal
   ========================================================================== */
.home-popup-dialog {
    border: none;
    border-radius: 24px;
    padding: 0;
    width: 90%;
    max-width: 580px;
    margin: auto;
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-popup-dialog.is-open {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.home-popup-dialog::backdrop {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.home-popup-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.home-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-blue);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.home-popup-close:hover {
    background: #ffffff;
    color: var(--primary);
    transform: rotate(90deg) scale(1.08);
}

.home-popup-media {
    width: 100%;
    height: 230px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.home-popup-media::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.5) 100%);
}

.home-popup-tag {
    position: absolute;
    bottom: 14px;
    left: 20px;
    z-index: 2;
    background: #e11d48;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

.home-popup-badge-bar {
    padding: 24px 28px 0;
}

.home-popup-badge-bar .home-popup-tag {
    position: static;
}

.home-popup-body {
    padding: 24px 30px 28px;
}

.home-popup-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.home-popup-body h3 {
    font-size: 1.5rem;
    color: var(--secondary-blue);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 14px;
}

.home-popup-text {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
    max-height: 160px;
    overflow-y: auto;
}

.home-popup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

.btn-popup-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-popup-read:hover {
    background: var(--primary-dark);
    transform: translateX(3px);
    color: #ffffff;
}

.btn-popup-dismiss {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup-dismiss:hover {
    background: #f8fafc;
    color: var(--text-main);
    border-color: #94a3b8;
}

@media (max-width: 600px) {
    .home-popup-dialog {
        width: 95%;
        max-width: 95%;
    }
    .home-popup-body {
        padding: 20px;
    }
    .home-popup-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-popup-read, .btn-popup-dismiss {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Botón Flotante de WhatsApp (Exclusivo Turnos)
   ========================================================================== */
.whatsapp-float-btn {
    position: fixed;
    bottom: 26px;
    right: 26px;
    background: #25D366;
    color: #ffffff;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 16px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
    z-index: 999;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float-btn:hover {
    background: #20ba5a;
    color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-btn i {
    font-size: 2.2rem;
    line-height: 1;
}

.whatsapp-float-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.wa-main-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.wa-sub-text {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
    .whatsapp-float-btn {
        bottom: 18px !important;
        right: 18px !important;
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45) !important;
    }
    .whatsapp-float-btn i {
        font-size: 2rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
    .whatsapp-float-text {
        display: none !important;
    }
}

/* ==========================================================================
   Botón Modesto y Modal Código QR Cartilla Médica
   ========================================================================== */
.cartilla-download-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-qr-cartilla-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--secondary-blue);
    border: 2px solid rgba(42, 61, 96, 0.18);
    box-shadow: 0 4px 14px rgba(42, 61, 96, 0.08);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.btn-qr-cartilla-mini:hover {
    background: var(--secondary-blue);
    color: #ffffff;
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 61, 96, 0.22);
}

.btn-qr-cartilla-mini:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Modal QR Dialog */
.qr-modal-dialog {
    border: none;
    border-radius: 24px;
    padding: 0;
    width: 90%;
    max-width: 460px;
    margin: auto;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.qr-modal-dialog::backdrop {
    background: rgba(16, 32, 60, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.qr-modal-card {
    padding: 32px 28px 28px;
    text-align: center;
    position: relative;
    background: #ffffff;
}

.qr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #64748b;
    transition: var(--transition);
}

.qr-modal-close:hover {
    background: var(--danger);
    color: #ffffff;
}

.qr-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 133, 66, 0.1);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.qr-modal-header h3 {
    color: var(--secondary-blue);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.qr-modal-header p {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 18px;
}

.qr-modal-image-wrap {
    display: inline-block;
    padding: 12px;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    margin-bottom: 18px;
    transition: transform 0.2s;
}

.qr-modal-image-wrap:hover {
    transform: scale(1.02);
}

.qr-modal-image-wrap img {
    display: block;
    width: 210px;
    height: 210px;
    border-radius: 6px;
}

.qr-modal-footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qr-modal-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(16, 133, 66, 0.22);
}

.qr-modal-download-link:hover {
    background: #0d6e36;
    color: #ffffff;
    transform: translateY(-2px);
}

.qr-modal-permalink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    padding-top: 4px;
}

.qr-modal-permalink:hover {
    color: var(--primary);
}

@media (max-width: 850px) {
    .cartilla-download-group {
        width: 100% !important;
    }
    .cartilla-download-group .btn-descargar-cartilla {
        flex: 1 1 auto !important;
        width: auto !important;
    }
}




