/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 0;
    background: linear-gradient(135deg, var(--color-bg-light) 60%, rgba(18, 119, 176, 0.05) 100%);
    position: relative;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 0;
    align-items: stretch;
    min-height: 80vh;
}

.hero-content {
    padding: 80px 5% 120px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.hero-content h1 span {
    color: var(--color-secondary);
    display: block;
}

.hero-content p {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 600;
    font-stretch: semi-condensed;
    color: var(--color-text-muted);
    margin-bottom: 36px;
    border-left: 4px solid var(--color-secondary);
    padding-left: 16px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 120px 0 0 120px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.hero-img-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ==========================================================================
   SECCIÓN DE ESTADÍSTICAS / TRUST FACTORS
   ========================================================================== */
.stats-section {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 24px 0 70px 0;
    margin-top: 0;
    /* Extra padding-bottom para que la galería se superponga sin cortar texto */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item h3,
.stat-item .stat-number {
    display: block;
    font-family: var(--font-body);
    font-weight: 800;
    font-stretch: semi-condensed;
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    background-color: rgba(255, 255, 255, 0.12);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
    color: var(--color-white);
}

.stat-item:hover .stat-icon {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   SECCIÓN DE GALERÍA DE IMÁGENES (PUENTE DE TRANSICIÓN)
   ========================================================================== */
.lab-gallery-section {
    position: relative;
    margin-top: -60px;
    /* Flota sobre la división entre stats y background */
    margin-bottom: -40px;
    /* Se solapa con el wrapper para eliminar franja blanca */
    padding-bottom: 0;
    z-index: 5;
    overflow: visible;
    /* Fondo bgE.jpg continuo con el wrapper inferior */
    background-image: linear-gradient(rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.1)), url('../../assets/images/bgE.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Efecto parallax sincronizado */
}

/* Capa de opacidad semi-transparente (misma que exams-section) */
.lab-gallery-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(241, 245, 249, 0.75);
    z-index: -1;
}

/* Degradado de fusión azul (stats) → transparente */
.lab-gallery-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom,
            rgba(16, 51, 157, 0.4),
            transparent);
    z-index: -1;
    pointer-events: none;
}

.lab-gallery-grid {
    display: flex;
    gap: 24px;
    padding: 40px 24px 60px;
    /* Padding horizontal para usar todo el ancho */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Edge */
    max-width: none;
    /* Anular límite del container padre */
    margin-left: -24px;
    /* Compensar el padding del container */
    margin-right: -24px;
    padding-left: calc((100vw - 1600px) / 2 + 24px);
    /* Empezar alineado al container */
    padding-right: 48px;
    /* Espacio de respiro a la derecha */
}

.lab-gallery-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.gallery-card {
    min-width: 300px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Soporta imágenes cuadradas 850x850 sin distorsión */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-caption {
    font-family: var(--font-body);
    font-weight: 700;
    font-stretch: semi-condensed;
    font-size: 0.95rem;
    text-align: center;
    color: var(--color-text-main);
    padding-bottom: 4px;
}

/* Rotaciones y traslaciones desalineadas (Estilo collage premium) */
.card-offset-1 {
    transform: translateY(-15px) rotate(-1.5deg);
}

.card-offset-2 {
    transform: translateY(15px) rotate(1deg);
}

.card-offset-3 {
    transform: translateY(-8px) rotate(-0.5deg);
}

.card-offset-4 {
    transform: translateY(20px) rotate(2deg);
}

.card-offset-5 {
    transform: translateY(-12px) rotate(-1deg);
}

/* Hover dinámico: se endereza, se eleva y hace zoom en la imagen */
.gallery-card:hover {
    transform: translateY(-35px) rotate(0deg) scale(1.06);
    z-index: 10;
    box-shadow: var(--shadow-hard);
    border-color: var(--color-secondary);
}

.gallery-card:hover .gallery-img-wrapper img {
    transform: scale(1.1);
}

/* ==========================================================================
   SECCIÓN: NOSOTROS Y SERVICIOS
   ========================================================================== */
.about-section {
    padding: 96px 0;
    background-color: rgba(255, 255, 255, 0.5);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

.feature-card {
    display: flex;
    gap: 16px;
    background-color: var(--color-bg-light);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.feature-card:hover {
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    border-color: rgba(18, 119, 176, 0.2);
}

.feature-icon-wrapper {
    background-color: rgba(18, 119, 176, 0.1);
    color: var(--color-secondary);
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.feature-text h4 {
    font-family: var(--font-body);
    font-weight: 700;
    font-stretch: semi-condensed;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   SECCIÓN: AGENDAR CITA (FORMULARIO)
   ========================================================================== */
.booking-section {
    padding: 96px 0;
    background-color: rgba(241, 245, 249, 0.75);
}

.booking-card {
    background-color: var(--color-white);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: grid;
    grid-template-columns: 2fr 3.5fr 2fr;
}

.booking-info-panel {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.booking-info-panel h3 {
    color: var(--color-white);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.booking-info-panel p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
}

.contact-quick-list {
    list-style: none;
}

.contact-quick-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.contact-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-wrapper svg {
    width: 18px;
    height: 18px;
}

.booking-form-panel {
    padding: 48px;
}

.booking-image-panel {
    display: flex;
    background-color: var(--color-bg-alt);
    position: relative;
    overflow: hidden;
}

.booking-side-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.booking-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-full {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-bg-light);
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-secondary);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(18, 119, 176, 0.1);
}
