/* =========================================
   ESTILOS GLOBALES Y FUENTES
   ========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f4;
}

/* =========================================
   SECCIÓN DE SERVICIOS BIOMÉDICOS
   ========================================= */
.servicios-tec-container {
    width: 100%;
    padding: 80px 20px;
    background-color: #f4f4f4; /* PRIMERA SECCIÓN: GRIS CLARO */
    text-align: center;
    box-sizing: border-box;
}

.titulo-servicios {
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitulo-servicios {
    color: #666;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 50px;
}

.servicios-tec-grid {
    display: flex;         /* Activa el modo flexbox */
    flex-wrap: wrap;       /* Permite que bajen si no caben en pantallas pequeñas */
    gap: 20px;            /* Espacio entre las tarjetas */
    justify-content: center; /* Centra las tarjetas horizontalmente */
    width: 100%;
}

.servicio-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    width: 45%;
    min-width: 320px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-bottom: 6px solid #14b8a5; /* Color Turquesa Tecnopromedica */
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.servicio-card:hover {
    transform: translateY(-10px);
}

.icono-servicio {
    font-size: 45px;
    color: #14b8a5;
    margin-bottom: 20px;
}

.servicio-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.servicio-card p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.lista-detalles {
    list-style: none;
    padding: 0;
}

.lista-detalles li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lista-detalles li i {
    color: #14b8a5;
    font-size: 14px;
}

/* =========================================
   SECCIÓN DE GALERÍA
   ========================================= */
.gallery-section {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff; /* SEGUNDA SECCIÓN: BLANCO */
    padding: 60px 20px;
    display: flex;
    flex-direction: column; 
    align-items: center;
    box-sizing: border-box;
}

.seccion-galeria-extra {
    width: 100%;
    text-align: center;
}

.titulo-galeria-seccion {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitulo-galeria {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* 🔥 CONTENEDOR QUE CRECE (EL RECUADRO TURQUESA) */
.gallery-wrapper {
    width: 90%;
    max-width: 950px;
    margin: 0 auto;
    background: rgba(20, 184, 165, 0.75); /* Turquesa con transparencia */
    border-radius: 15px;
    padding: 30px;
    max-height: 600px; /* Límite de altura antes del scroll */
    overflow-y: auto; 
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.gallery-wrapper h2 {
    margin-bottom: 20px;
    display: block;
    color: white; /* Título interno en blanco */
    font-size: 1.8rem;
    text-align: center;
}

/* ✨ SCROLLBAR PERSONALIZADO */
.gallery-wrapper::-webkit-scrollbar {
    width: 6px;
}

.gallery-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.gallery-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.5);
}

/* GRID DE IMÁGENES */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 3/2; 
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* =========================================
   OVERLAY Y POPUP (MODAL)
   ========================================= */
.overlay {
    position: fixed;
    inset: 0;
    display: none; 
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.popup img {
    width: 100%;
    border-radius: 10px;
}

.popup button {
    margin-top: 15px;
    padding: 10px 25px;
    border: none;
    background: #14b8a5;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
}

/* =========================================
   RESPONSIVE (ADAPTACIÓN A MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    .servicio-card {
        width: 100%;
    }
    
    .titulo-servicios {
        font-size: 2rem;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr); 
    }

    .titulo-galeria-seccion {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr; 
    }
    
    .gallery-wrapper {
        padding: 15px;
    }
}
.tm-btn-gallery { 
    background: var(--accent-color); 
    color: #ffffff; 
    padding: 10px 25px; /* Reducido un poco para que sea menos robusto */
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Cambios para que no sea muy grande */
    display: inline-block; 
    width: auto;           /* Ya no ocupa todo el ancho */
    min-width: 150px;      /* Opcional: le da un tamaño base elegante */
    margin-top: 20px;      /* Reducido de 35px a 20px para que no flote tanto */
    
    font-family: "Poppins", sans-serif;
    text-align: center;
    border: none;
    box-sizing: border-box;
}

.tm-btn-gallery:hover { 
    background: #e7e7e7; 
    color: var(--accent-color); 
    transform: translateY(-3px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Sombra suave para el efecto hover */
}