/* ===== SECCIÓN DE HOSPITALES - CARRUSEL ===== */
.hospitales-section {
    padding: clamp(60px, 8vw, 120px) 0;
    background: #2d4f95;
    position: relative;
    overflow: hidden;
}

.hospitales-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

/* ===== CONTENEDOR ===== */
.hospitales-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(12px, 5vw, 40px);
}

/* ===== CABECERA ===== */
.hospitales-header {
    text-align: center;
    margin-bottom: clamp(50px, 8vw, 100px);
}

.hospitales-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.hospitales-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #ffffff;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hospitales-title strong {
    font-weight: 600;
}

.hospitales-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, #2c80b9, #1a5f9e);
    margin: 0 auto;
    position: relative;
}

.hospitales-divider::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: #d01341;
    border-radius: 3px;
}

/* ===== CARRUSEL CORREGIDO ===== */
.hospitales-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 -20px;
    padding: 10px 0;
}

.hospitales-track {
    display: flex;
    gap: clamp(20px, 3vw, 40px);
    padding: 20px;
    /* Cambiamos transition para que sea más elegante */
    transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
    /* Desactivamos snap-type cuando usamos transform por JS para evitar saltos */
    scroll-snap-type: none;
    will-change: transform;
}

/* Evitar que el usuario pueda arrastrar las imágenes y rompa el swipe */
.hospital-card img {
    pointer-events: none;
    user-select: none;
}


.hospital-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(25px, 4vw, 40px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 320px;
    max-width: 380px;
    flex-shrink: 0;
    scroll-snap-align: start;
    /* Asegurar que no haya superposición */
    margin: 0;
    opacity: 1;
    visibility: visible;
}

/* ===== TARJETAS ===== */
.hospital-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(25px, 4vw, 40px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 320px;
    max-width: 380px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.hospital-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c80b9, #1a5f9e, #2c80b9);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

.hospital-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.hospital-card:hover::before {
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Controles mejorados */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    position: relative;
    z-index: 20;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #2c80b9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 30;
}

.carousel-btn:hover:not(:disabled) {
    background: #2c80b9;
    transform: scale(1.1);
}

.carousel-btn:hover:not(:disabled) svg {
    stroke: #ffffff;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.carousel-btn svg {
    stroke: #2c80b9;
    stroke-width: 2;
    transition: stroke 0.3s ease;
}

.carousel-dots {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 20;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #ffffff;
    border-color: #2c80b9;
    transform: scale(1.2);
}

/* Indicador visual del slide actual */
.hospital-card.active {
    border: 2px solid #2c80b9;
    box-shadow: 0 20px 50px rgba(44, 128, 185, 0.3);
}

/* ===== LOGO ===== */
.hospital-logo {
    height: clamp(70px, 10vw, 100px);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hospital-logo img {
    max-height: 100%;
    max-width: 100%;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.hospital-card:hover .hospital-logo img {
    filter: grayscale(0%);
}

/* ===== TEXTO ===== */
.hospital-name {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hospital-brand {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: #2c80b9;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hospital-divider {
    width: 40px;
    height: 2px;
    background: #d01341;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.hospital-card:hover .hospital-divider {
    width: 80px;
    background: #2c80b9;
}

.hospital-tag {
    display: inline-block;
    background: rgba(44, 128, 185, 0.1);
    color: #1a557c;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hospital-description {
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ===== LISTA ===== */
.hospital-features {
    list-style: none;
    margin-top: 25px;
    padding-left: 0;
}

.hospital-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #475569;
    font-size: clamp(0.85rem, 1.4vw, 0.95rem);
}

.hospital-features li i {
    color: #d01341;
    margin-right: 10px;
    font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hospitales-carousel {
        margin: 0 -15px;
    }

    .hospital-card {
        min-width: 280px;
        max-width: 320px;
    }

    .carousel-controls {
        margin-top: 30px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hospitales-carousel {
        margin: 0 -10px;
    }

    .hospital-card {
        min-width: 260px;
        max-width: 300px;
        padding: 22px 18px;
    }

    .carousel-controls {
        margin-top: 25px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}