/* ============================================
   NOSOTROS.CSS — Llaqta Ingenieros SAC
   (actualizado con hover, escalado unificado y bordes corregidos)
   ============================================ */

/* ─── HERO BANNER ─── */
.hero-banner {
    position: relative;
    height: 350px;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.72) 100%),
        url('../img/nosotros.jpg') center / cover no-repeat;
    background-color: var(--negro);
    display: flex;
    align-items: flex-end;
    padding: 0 5% 3rem;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--amarillo) 40%, var(--amarillo-hover) 60%, transparent 100%);
}

.hero-inner {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

.hero-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amarillo);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-family: var(--fuente-titulo);
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--blanco);
    margin: 0;
}

.hero-title span { color: var(--amarillo); }

/* ─── ESPACIADO GENERAL DE SECCIONES ─── */
.nos-seccion {
    padding: 100px 0;
}

.nos-seccion.nos-galeria{
    margin-bottom: 00ñ;
}

/* VIDEO THUMBNAIL — marco estático en sección acerca */
.nosotros-video-marco {
    cursor: pointer;
    position: relative;
}

.nosotros-video-overlay {
    transition: opacity 0.4s ease;
}

/* Botón play central (abre modal) */
.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 72px; height: 72px;
    background: rgba(242,183,5,0.92);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--negro);
    cursor: pointer;
    transition: background var(--transicion), transform var(--transicion), box-shadow var(--transicion);
    box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 0 0 rgba(242,183,5,0);
    animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 0 0   rgba(242,183,5,0.4); }
    70%  { box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 0 18px rgba(242,183,5,0); }
    100% { box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 0 0   rgba(242,183,5,0); }
}

.video-play-btn:hover {
    background: var(--amarillo);
    transform: translate(-50%, -50%) scale(1.12);
}

/* Barra de progreso (preview) */
.video-progress-wrap {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 4;
    padding: 0 0 6px;
}
.video-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    border-radius: 0 0 var(--radio) var(--radio);
    overflow: hidden;
}
.video-progress-fill {
    height: 100%;
    background: var(--amarillo);
    width: 0%;
    transition: width 0.3s linear;
    border-radius: inherit;
}

/* ─── MODAL DE VIDEO ─── */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.video-modal.active {
    opacity: 1;
    pointer-events: all;
}

/* Backdrop borroso */
.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(14px) saturate(0.6);
    -webkit-backdrop-filter: blur(14px) saturate(0.6);
    transition: opacity 0.35s ease;
}

/* Contenedor flotante del video */
.video-modal-container {
    position: relative;
    z-index: 1;
    width: min(880px, 92vw);
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
}

.video-modal.active .video-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Botón cerrar */
.vmodal-close {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 10;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    cursor: pointer;
    transition: background var(--transicion), border-color var(--transicion);
}
.vmodal-close:hover {
    background: rgba(242,183,5,0.85);
    border-color: var(--amarillo);
    color: var(--negro);
}

/* Área del video */
.vmodal-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}
.vmodal-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── CONTROLES DEL MODAL ─── */
.vmodal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #1a1a1a;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.vmc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color var(--transicion), background var(--transicion);
    flex-shrink: 0;
}
.vmc-btn span {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--fuente-cuerpo, 'Barlow', sans-serif);
}
.vmc-btn:hover {
    color: var(--amarillo);
    background: rgba(242,183,5,0.08);
}

.vmc-play {
    width: 44px; height: 44px;
    background: var(--amarillo);
    border-radius: 50%;
    color: var(--negro);
    flex-shrink: 0;
}
.vmc-play:hover {
    background: var(--amarillo-hover, #c99b00);
    color: var(--negro);
}

/* Barra de progreso del modal */
.vmc-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.vmc-time {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    font-family: var(--fuente-cuerpo, 'Barlow', monospace);
    white-space: nowrap;
    flex-shrink: 0;
}

.vmc-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}
.vmc-progress-bar:hover { height: 6px; }

.vmc-progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: var(--amarillo);
    border-radius: 8px;
    pointer-events: none;
    width: 0%;
}

.vmc-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px;
    background: var(--amarillo);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.vmc-progress-bar:hover .vmc-progress-thumb { opacity: 1; }

/* ─── SECCIÓN GALERÍA 3 FOTOS ─── */
.nos-galeria {
    padding: 0;
    padding-top: 0;
    background: var(--verde);
    margin-top: 60px;
    margin-bottom: 120px;
}

.galeria-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 340px;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.galeria-fallback {
    background: linear-gradient(135deg, var(--verde-oscuro), var(--verde-claro)) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.galeria-fallback::before {
    content: '🏭';
    font-size: 3.5rem;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.galeria-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.7) saturate(0.8);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.galeria-item:hover img {
    filter: brightness(0.9) saturate(1);
    transform: scale(1.05);
}

.galeria-item:not(:last-child) {
    border-right: 2px solid rgba(255,255,255,0.15);
}

.galeria-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 32px 24px 18px;
    font-family: var(--fuente-titulo);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--blanco);
    text-transform: uppercase;
    transition: padding 0.3s ease;
}

.galeria-item:hover .galeria-label { padding-bottom: 24px; }

.galeria-label::before {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--amarillo);
    margin-bottom: 8px;
    transition: width 0.35s ease;
}
.galeria-item:hover .galeria-label::before { width: 40px; }

/* ─── HISTORIA: LAYOUT NARRATIVO ─── */
.nos-historia {
    background-color: #fafafa;
    background-image: radial-gradient(circle at 25% 30%, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

.section-label {
    position: relative;
    padding-left: 28px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background: var(--amarillo);
}

.historia-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
    margin-bottom: 120px;
}

.historia-texto h2 {
    font-family: var(--fuente-titulo);
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: 3px;
    color: var(--negro);
    line-height: 1;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}

.historia-texto h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 4px;
    background: var(--amarillo);
    border-radius: 2px;
}

.historia-intro {
    font-size: 1.12rem;
    color: #2e2e2e;
    line-height: 1.9;
    font-weight: 400;
}

.historia-texto {
    position: relative;
    padding-top: 20px;
}

.historia-texto::before {
    content: '“';
    font-family: var(--fuente-titulo);
    font-size: 7rem;
    color: rgba(242,183,5,0.08);
    position: absolute;
    top: -40px;
    left: -18px;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

.historia-texto > * {
    position: relative;
    z-index: 1;
}

/* ─── IMAGEN DE HISTORIA (con escalado unificado) ─── */
.historia-imagen {
    position: relative;
    border-radius: 10px;
    overflow: hidden;              /* Clave para que la barra no sobresalga al escalar */
    transition: transform 0.5s ease;
}

.historia-imagen::before {
    content: '';
    position: absolute;
    top: -16px;
    right: -16px;
    width: 55%;
    height: 55%;
    border: 2px solid var(--amarillo);
    border-radius: 10px;
    z-index: 0;
    pointer-events: none;
}

.historia-imagen img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    filter: brightness(0.92) saturate(0.95);
    transition: filter 0.5s ease;
}

/* Hover unificado: el contenedor escala completo, imagen y barra juntos */
.historia-imagen:hover {
    transform: scale(1.02);
}

.historia-imagen:hover img {
    filter: brightness(1) saturate(1.05);
}

.historia-imagen--fallback img { display: none; }
.historia-imagen--fallback {
    background: var(--negro);
    border-radius: 10px;
    height: 360px;
}

.historia-stats-bar {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    transition: box-shadow 0.35s ease;
}

.historia-imagen:hover .historia-stats-bar {
    box-shadow: 0 16px 36px rgba(0,0,0,0.28);
}

.hst-item {
    padding: 18px 12px;
    text-align: center;
}

.hst-item strong {
    display: block;
    font-family: var(--fuente-titulo);
    font-size: 2.2rem;
    color: var(--amarillo);
    letter-spacing: 2px;
    line-height: 1;
}

.hst-item span {
    display: block;
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 4px;
}

.hst-sep {
    width: 1px;
    background: rgba(0,0,0,0.1);
    margin: 14px 0;
}

/* ─── MISIÓN, VISIÓN Y VALORES ─── */
.mv-nueva {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    padding: 0;
}

/* ─── BLOQUES MISIÓN / VISIÓN (alternando) ─── */
.mv-bloque {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    margin-bottom: 80px;
}

/* Chip / etiqueta */
.mv-bloque-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 6px 14px 6px 10px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.mv-chip--amarillo {
    background: rgba(242,183,5,0.12);
    color: var(--amarillo);
    border: 1px solid rgba(242,183,5,0.25);
}

.mv-chip--verde {
    background: rgba(45,90,39,0.1);
    color: var(--verde);
    border: 1px solid rgba(45,90,39,0.2);
}

/* Título del bloque */
.mv-bloque-titulo {
    font-family: var(--fuente-titulo);
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    letter-spacing: 3px;
    color: var(--negro);
    line-height: 1;
    margin-bottom: 20px;
}

.highlight-amarillo { color: var(--amarillo); }

/* Divisor decorativo */
.mv-bloque-divisor {
    width: 52px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 24px;
}

.mv-divisor--amarillo { background: var(--amarillo); }
.mv-divisor--verde { background: var(--verde); }

/* Texto descripción */
.mv-bloque-desc {
    font-size: 1rem;
    color: #3a3a3a;
    line-height: 1.95;
    font-weight: 400;
}

/* Contenedor de imagen */
.mv-bloque-imagen {
    position: relative;
}

.mv-img-wrap {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.mv-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 18px;
}

.mv-img-wrap--amarillo::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: -14px;
    width: 120px;
    height: 120px;
    border: 3px solid var(--amarillo);
    border-radius: 18px;
    z-index: 0;
    pointer-events: none;
}

.mv-img-wrap--verde::after {
    content: '';
    position: absolute;
    top: -14px;
    right: -14px;
    width: 120px;
    height: 120px;
    border: 3px solid var(--verde);
    border-radius: 18px;
    z-index: 0;
    pointer-events: none;
}

.mv-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    position: relative;
    z-index: 1;
    transition: transform 0.6s ease, filter 0.5s ease;
    filter: brightness(0.92) saturate(0.9);
}

.mv-img-wrap:hover img {
    transform: scale(1.04);
    filter: brightness(1) saturate(1);
}

/* Fallback sin imagen */
.mv-img-fallback {
    background: linear-gradient(135deg, var(--verde-oscuro, #1a3a17) 0%, var(--verde, #2d5a27) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255,255,255,0.3);
}

/* ─── ENCABEZADO SECCIÓN VALORES ─── */
.mv-valores-header {
    text-align: center;
    margin-bottom: 40px;
}

.mv-valores-header .section-label {
    display: inline-block;
    padding-left: 28px;
}

.mv-valores-titulo {
    font-family: var(--fuente-titulo);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    letter-spacing: 3px;
    color: var(--negro);
    line-height: 1;
    margin-top: 12px;
}

/* Valores */
.mv-valores-nueva {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.mvv-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;                /* Línea decorativa ahora queda dentro del borde redondeado */
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mvv-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.mvv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--verde);
    border-radius: 16px 16px 0 0;
}

.mvv-icon {
    width: 38px; height: 38px;
    background: rgba(45,90,39,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--amarillo);
}

.mvv-card strong {
    display: block;
    font-family: var(--fuente-titulo);
    font-size: 1rem;
    letter-spacing: 1.5px;
    color: var(--negro);
    margin-bottom: 6px;
}

.mvv-card p {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
    .historia-layout {
        gap: 40px;
    }
    .mv-bloque {
        gap: 48px;
    }
}

@media (max-width: 860px) {
    .historia-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .historia-imagen::before { display: none; }
    .historia-texto h2::after {
        width: 50px;
    }
    .historia-texto::before {
        font-size: 5rem;
        top: -30px;
        left: -12px;
    }

    .mv-bloque {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-bottom: 56px;
    }

    /* En visión, la imagen va arriba en móvil también */
    .mv-bloque--vision .mv-bloque-imagen {
        order: -1;
    }

    .mv-valores-nueva {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .nos-historia {
        background-image: none;
    }
    .hero-banner { height: 240px; padding-bottom: 2rem; }
    .nos-seccion { padding: 70px 0; }

    .galeria-track {
        grid-template-columns: 1fr;
        height: auto;
    }
    .galeria-item { height: 200px; }
    .galeria-item:not(:last-child) {
        border-right: none;
        border-bottom: 2px solid rgba(255,255,255,0.15);
    }

    .mv-panels { gap: 12px; }
    .mv-panel { padding: 32px 24px; }

    .mv-valores-nueva {
        grid-template-columns: 1fr 1fr;
    }

    .historia-stats-bar {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }
    .hst-sep { display: none; }

    .nosotros-grid { grid-template-columns: 1fr !important; gap: 32px; }
    .nosotros-grid .nosotros-video-wrap { width: 100%; }

    .vmodal-controls { gap: 6px; padding: 12px 12px; }
    .vmc-btn span { display: none; }

    .historia-texto h2 {
        font-size: 2.4rem;
    }
    .historia-intro {
        font-size: 1rem;
        line-height: 1.8;
    }
    .hst-item {
        padding: 14px 8px;
    }
    .hst-item strong {
        font-size: 1.8rem;
    }
}