/* ===== HOSPITALES SECTION ===== */
.hospitales-section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hospitales-section h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

/* GRID DE HOSPITALES */
.hospital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* TARJETA DE HOSPITAL */
.hospital-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    cursor: pointer;
    /* Eliminamos el zoom */
    transition: box-shadow 0.3s ease;
}

.hospital-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* SOLO sombra al hover / touch, sin zoom */
.hospital-card:hover,
.hospital-card:active {
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* OVERLAY */
.hospital-card .overlay {
    position: absolute;
    bottom: -100%; /* empieza fuera del contenedor */
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-direction: column;
    transition: bottom 0.3s ease-in-out;
}

/* ANIMACIÓN AL HOVER / TOUCH */
.hospital-card:hover .overlay,
.hospital-card:active .overlay {
    bottom: 0; /* se desliza hacia arriba */
}

/* BOTONES */
.hospital-card .overlay button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.hospital-card .overlay button:hover {
    background-color: #0056b3;
}

/* ===== RESPONSIVE ===== */
@media(max-width: 768px){
    .hospitales-section {
        padding: 30px 10px;
    }

    .hospitales-section h1 {
        font-size: 2rem;
    }

    .hospital-card img {
        height: 180px;
    }
}

@media(max-width: 480px){
    .hospitales-section {
        padding: 20px 5px;
    }

    .hospital-card img {
        height: 160px;
    }

    .hospital-card .overlay button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    /* Mostrar overlay cuando la tarjeta tiene clase activa */
.hospital-card.active .overlay {
    bottom: 0;
}

}