:root {
    --primary-color: #00A88E;
    --text-dark: #4A4A4A;
    --text-main: #666666;
    --shadow: 0 8px 30px rgba(0,0,0,0.1);
    --bg-color: #ffffff;
    --text-color: #4A4A4A;
    --navbar-bg: #ffffff;
    --hero-image-url: url('../assets/img/lab.png');
    --hero-overlay-color: rgba(43, 61, 79, 0.7);
}

@font-face {
    font-family: 'Bebas Neue Local';
    src: url('../assets/fonts/BebasNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --text-main: #e0e0e0;
        --navbar-bg: #1e1e1e;
        --card-bg: #2d2d2d;
    }
    .nav-link {
        color: var(--text-main) !important;
    }
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html.no-scroll-animation {
    scroll-behavior: auto !important;
}

.no-transition {
    scroll-behavior: auto !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    padding-top: 0 !important;
    -webkit-user-select: none; /* Safari/Chrome iOS */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ */
    user-select: none;         /* Estándar */
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
}

@media (min-width: 992px) {
    body { 
        padding-top: 80px;
    }
    .nav-text-min {
        font-size: 0.9rem;
    }
}

#contenedorInicio {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--hero-image-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-top: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

@media (max-width: 768px) {
    #contenedorInicio {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/img/lav.png') !important;
        background-size: 127% !important; 
        background-position: center 0%;
    }
    .nav-text-min {
        font-size: 0.65rem !important; 
        text-transform: uppercase;
        font-weight: 700;
        letter-spacing: 0.3px;
        white-space: nowrap; 
    }
    
    .nav-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        line-height: 1; 
    }

    .dropdown-toggle::after {
        display: none !important;
    }
}

@media (min-width: 992px) {
    #contenedorInicio {
        background-size: cover !important;
        background-position: center center;
        background-attachment: fixed; 
    }
}

.overlay-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hero-overlay-color);
    z-index: 5;
}

.text-hero-main {
    font-family: 'Bebas Neue Local', sans-serif;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.text-hero-sub {
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.btn-hero {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-hero-secondary {
    background-color: #00A88E;
    color: white !important;
    border: 2px solid #00A88E;
}

.btn-hero-secondary:hover {
    background-color: #00A88E;
    border-color: #00A88E;
    transform: translateY(-2px);
}

.btn-hero-primary {
    background-color: #00A88E;
    color: white !important;
    border: 2px solid var(--primary-color);
}

.btn-hero-primary:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

@media (min-width: 576px) {
    .btn-hero {
        width: auto;
    }
}

.navbar {
    background-color: var(--navbar-bg) !important;
    padding: 15px 0;
    transition: all 0.3s;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-brand img { 
    height: 50px; 
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: 0.3s;
}

.nav-link:hover { 
    color: var(--primary-color) !important; 
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after { 
    width: 100%; 
}

.dropdown-toggle::after {
    display: none !important;
}

@media (min-width: 992px) {
    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        border: none;
        box-shadow: var(--shadow);
        border-radius: 12px;
        padding: 1rem 0;
        min-width: 220px;
        pointer-events: none;
    }

    .dropdown:hover > .dropdown-menu,
    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

@media (min-width: 992px) {
    .dropdown-menu[data-bs-popper] {
        top: 100% !important;
        margin-top: 0 !important;
        left: 0 !important;
    }
}

@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        background-color: white;
        border: 1px solid rgba(0,0,0,.15);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 1050;
    }
    
    .dropdown-item {
        padding: 12px 20px;
    }
}

.dropdown-item:hover {
    background-color: #f0fdfa;
    color: var(--primary-color);
}

.btn-portal {
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.btn-portal.lang-en-active {
    background-color: #008471;
}

.btn-portal:hover { 
    background-color: #008471; 
}

.btn-flecha-unica {
    position: fixed;
    bottom: 3px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.8);
    opacity: 0.6;
}

.btn-flecha-unica:hover,
.btn-flecha-unica:active {
    opacity: 1;
    transform: scale(1.1);
}

.titulo-seccion {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important; 
    font-family: 'Bebas Neue Local', sans-serif;
    font-size: 3rem;
}

@media (max-width: 991px) {
    .titulo-seccion {
        margin-bottom: 1rem !important;
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .swiper-button-prev-custom:hover, 
    .swiper-button-next-custom:hover {
        color: var(--primary-color);
        transform: scale(1.2);
        transition: all 0.2s ease;
        pointer-events: auto;
        opacity: 1;
    }
}

.inner-swiper {
    width: 350px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px -5px rgba(0,0,0,0.07);
    background-color: var(--bg-color);
}

.inner-swiper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

@media (max-width: 767px) {
    .swiper-button-prev-custom,
    .swiper-button-next-custom {
        pointer-events: none;
        opacity: 0.5;
    }
}

.bottom-bar {
    background-color: white;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.catalog-container {
    background-color: var(--card-bg);
}

.texto-dinamico {
    color: var(--text-main) !important;
    transition: color 0.3s ease;
}

#paquetes {
    scroll-margin-top: 130px;
}

.section-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.feat-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    background-color: rgba(209, 233, 240, 0.9);
}

.feat-link:hover {
    background-color: #f0f7f9;
    transform: translateY(-3px);
    border-color: #d1e9f0;
}

.feat-container {
    display: flex;
    align-items: center;
}

.feat-icon {
    width: 75px;
    height: 75px;
    min-width: 75px;
    background-color: #1eb9c1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin-right: 25px;
    box-shadow: 0 4px 10px rgba(30, 185, 193, 0.2);
}

.feat-icon.blue { background-color: #0084ad; }

.feat-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;

}

.feat-text p {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 0;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .feat-container { flex-direction: column; text-align: center; }
    .feat-icon { margin-right: 0; margin-bottom: 15px; }
    .section-title { font-size: 1.8rem; }
}

.status-map-container {
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 5;
    position: relative;
    margin-bottom: -1px;
    align-items: flex-start !important;
}

/* Animación de pulso para el círculo de "Abierto" */
.text-success.fa-circle {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.titulo-seccion {
    margin-bottom: 5px !important; /* Casi pegado al mapa */
}

.map-header-container {
    background-color: var(--navbar-bg);
    border-bottom: none !important;
    z-index: 5;
    position: relative;
}

/* Efecto hover para que el usuario sepa que puede hacer clic */
.status-map-container:hover {
    background-color: #fcfcfc !important;
}

iframe {
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: -1px; /* Elimina cualquier luz entre la barra y el mapa */
}

@media (max-width: 767px) {
    .status-map-container {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

.status-map-container {
    align-items: flex-start !important; /* Alinea al tope superior */
    justify-content: flex-start !important; /* Empuja todo a la izquierda */
    padding-left: 15px;
    align-items: flex-start !important;
    padding-top: 10px;
    min-height: 50px;
}

#horarioStatus {
    flex: 1;
    display: flex !important;
    justify-content: flex-start !important;
    text-align: left !important;
    min-width: 0;
}

#horarioStatus .text-muted {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: break-word;
}

#arrowSchedule {
    margin-top: 0 !important; 
    display: inline-block;
    vertical-align: middle;
}

.status-map-container .text-end {
    margin-left: auto; /* Empuja la ubicación al extremo derecho */
    white-space: nowrap;
}

/* Ajustes para móviles (menos de 768px) */
@media (max-width: 767px) {
    .card-especialidad {
        margin-bottom: 15px; /* Espacio entre tarjetas verticales */
        padding: 25px 20px !important; /* Más compacto lateralmente */
    }

    .card-especialidad h3 {
        font-size: 1.25rem !important; /* Texto un poco más pequeño para que no rompa */
    }

    .card-especialidad p {
        font-size: 0.85rem !important;
        padding: 0 10px; /* Evita que el texto toque los bordes de la tarjeta */
    }

    .icon-circle {
        width: 65px !important; /* Icono más pequeño en móvil */
        height: 65px !important;
    }
}

/* Efecto suave al tocar en celular */
.card-especialidad:active {
    transform: scale(0.98);
    transition: 0.2s;
}

/* Quita el comportamiento de "flex-row" si lo tenías en feat-container */
.feat-container {
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo */
    align-items: center;
    transition: transform 0.2s;
}

.feat-link:hover .feat-container {
    transform: translateY(-5px);
}


/* En celular las hace más compactas */
@media (max-width: 767px) {
    .feat-container {
        padding: 20px !important;
    }
    .feat-text h3 {
        font-size: 1.1rem !important;
    }
}

.feat-container-mini {
    background-color: #f8fdff; /* Un tono muy claro para no saturar */
    border-radius: 12px;
    border: 1px solid #e1f0f4;
    transition: all 0.2s;
}

.feat-icon-mini {
    width: 45px;
    height: 45px;
    background-color: #008ba3;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Evita que el icono se aplaste */
}

.feat-icon-mini.blue {
    background-color: #00a3ad;
}

.feat-text-mini h3 {
    font-size: 0.95rem !important; /* Texto pequeño para celular */
    font-weight: 600;
    color: #333;
}

/* Ocultamos la descripción en celulares muy pequeños para ganar espacio */
@media (max-width: 576px) {
    .feat-container-mini {
        padding: 10px !important;
    }
    .feat-text-mini p {
        display: none; /* Solo dejamos el título en móviles */
    }
}

/* Reduce el tamaño del título principal solo en celular */
@media (max-width: 576px) {
    h2.titulo-encabezado, 
    .clinical-text { 
        font-size: 1.1rem !important; 
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    /* Reduce el espacio que ocupa el contenedor de los botones */
    .container.mt-5 {
        margin-top: 0.5rem !important;
    }

    /* Reduce el tamaño de los iconos para ganar espacio lateral */
    .feat-icon-mini {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Ajuste para que el contenido NUNCA tape la Navbar */
#contenedorInicio {
    /* Si tu navbar mide aprox 80px, esto reserva ese espacio */
    padding-top: 90px !important; 
    min-height: auto !important; /* Evita que el d-flex centrado lo empuje hacia arriba */
    display: block !important; /* Cambiamos de flex a block para controlar mejor el flujo */
}

/* Solo para celulares, compactamos un poco más */
@media (max-width: 576px) {
    #contenedorInicio {
        padding-top: 85px !important; /* Ajusta este valor según el alto real de tu navbar */
        padding-bottom: 20px !important;
    }
    
    .text-hero-main {
        margin-top: 0 !important;
    }
}

/* EFECTO HOVER: Elevación y Sombra (Principalmente para PC) */
.d-md-flex a .bg-white{
    background-color: rgba(209, 233, 240, 0.9) !important; /* Cambia este valor */
}
.d-md-none a .bg-white {
    background-color: rgba(209, 233, 240, 0.9) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Al pasar el mouse (PC) */
@media (min-width: 992px) {
    a:hover .bg-white {
        background-color: rgba(255, 255, 255, 0.9) !important;
        transform: translateY(-8px);
        box-shadow: 0 12px 20px rgba(0,0,0,0.15) !important;
        border-color: var(--primary-color) !important;
    }
}

/* EFECTO CLICK (Feedback táctil para Celular) */
a:active .bg-white {
    transform: scale(0.95);
    background-color: #f8f9fa !important;
    transition: 0.1s;
}

/* Animación de los iconos al hacer hover */
a:hover .feat-icon-mini, 
a:hover .mx-auto {
    transform: rotate(10deg) scale(1.1);
    transition: transform 0.3s ease;
}

/* Esto le da la "memoria" de movimiento a TODOS los botones */
#contenedorInicio a .bg-white {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

#contenedorInicio a .bg-white {
    /* Quitamos la transición en celular para que no haya retrasos al tocar */
    transition: none; 
}

/* --- SOLO PARA PC (Desde 768px en adelante) --- */
@media (min-width: 768px) {
    #contenedorInicio a .bg-white {
        /* Activamos la suavidad solo en PC */
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    }

    #contenedorInicio a:hover .bg-white {
        transform: translateY(-8px);
        box-shadow: 0 12px 20px rgba(0,0,0,0.15) !important;
        border-color: var(--primary-color) !important;
    }
}

/* --- OPCIONAL: Feedback rápido en celular --- */
/* Si quieres que al menos cambie un poco el color al tocar (sin moverse) */
@media (max-width: 767px) {
    #contenedorInicio a:active .bg-white {
        background-color: #f0f0f0 !important;
    }
}

/* Desactiva el color de resaltado al tocar en dispositivos táctiles */
#contenedorInicio a,
#contenedorInicio .bg-white {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important; /* Desactiva el menú contextual al mantener presionado */
}

/* Solo para celulares, forzamos la sombra normal incluso al presionar */
@media (max-width: 767px) {
    #contenedorInicio a:active .bg-white {
        /* Mantenemos la sombra normal del shadow-sm de Bootstrap */
        box-shadow: 0 .125rem .25rem rgba(0,0,0,0.075) !important;
        
        /* Aseguramos que no se mueva nada */
        transform: none !important; 
    }
}

/* Bloqueo de funciones nativas al mantener presionado en móvil */
#contenedorInicio a, 
#contenedorInicio .bg-white,
#contenedorInicio h3,
#contenedorInicio i {
    /* 1. Elimina el recuadro gris/azul de toque (iOS/Android) */
    -webkit-tap-highlight-color: transparent !important;
    
    /* 2. Evita que aparezca el menú de "Copiar/Guardar imagen" (iOS/Android) */
    -webkit-touch-callout: none !important;
    
    /* 3. Evita que el usuario pueda seleccionar el texto de los botones */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
    /* 4. Evita el "arrastre" accidental de iconos o imágenes */
    -webkit-user-drag: none !important;
}

/* Asegurar que el estado activo no dispare sombras extra en móvil */
@media (max-width: 767px) {
    #contenedorInicio a:active .bg-white,
    #contenedorInicio a:focus .bg-white {
        outline: none !important;
        box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important; /* Mantener la sombra original */
        transform: none !important;
    }
}

.text-warning { color: #ca2121 !important; }

@media (min-width: 992px) {
    /* Agranda "Laboratorios Cuellar" */
    .text-hero-main {
        font-size: 4rem !important; /* Tamaño grande para PC */
        line-height: 1.1 !important;
    }

    /* Agranda "Análisis clínicos y metabólicos" */
    .text-hero-sub {
        font-size: 1.5rem !important; /* Subtítulo más legible en PC */
        margin-top: 10px !important;
    }

    /* Ajusta la línea divisoria si quieres que crezca en PC */
    .divider {
        width: 100px !important; 
    }
}

#fullSchedule {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
    opacity: 0;
    display: block !important; /* Ahora siempre es block, pero con altura 0 */
}

#fullSchedule.show {
    max-height: 200px; /* Un valor lo suficientemente grande para tu tabla */
    opacity: 1;
    margin-top: 0px !important;
    transition: max-height 0.5s ease-in-out, opacity 0.4s ease;
}

#horarioStatus {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    /* Esto evita que el contenedor "tiemble" al abrirse */
    overflow: hidden; 
}

#horario {
    scroll-margin-top: 90px; /* Ajusta según el alto de tu barra en móvil */
}

/* Contenedor principal del Swiper */
.swiper-container-catalogo {
    position: relative;
    padding: 0 10px; /* Espacio para que no choquen en móvil */
}

@media (min-width: 1200px) {
    .swiper-container-catalogo {
        padding: 0 60px; /* Espacio suficiente para las flechas en PC */
    }
}

/* Estilo base de las flechas */
.custom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Centrado vertical */
    width: 45px;
    height: 45px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a3ad;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease; /* Suaviza los movimientos */
    border: none;
}

/* Posiciones a los costados */
.swiper-button-prev-custom { left: -60px; }
.swiper-button-next-custom { right: -60px; }

/* EFECTO VISUAL: Al pasar el mouse se levanta */
.custom-nav:hover {
    transform: translateY(-50%) scale(1.1); /* Se hace un poco más grande */
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    background-color: #f8f9fa;
}

/* EFECTO VISUAL: Al hacer clic se "hunde" */
.custom-nav:active {
    transform: translateY(-50%) scale(0.95); /* Se encoge un poco */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ocultar en móvil para no romper el slider */
@media (max-width: 1024px) {
    .custom-nav {
        display: none;
    }
}
.custom-nav::after {
    display: none !important; /* Mata la flecha predeterminada de Swiper */
}

.btn-flecha-unica {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* Esta clase se activará solo al final */
.btn-flecha-unica.show-at-bottom {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
@media (max-width: 767px) {
    .nav-text-min {
        font-size: 0.75rem !important; /* Un poco más pequeño para asegurar que no choque con los lados */
        display: block;
        text-align: center;
    }
}