/* =========================================================
   PÁGINA NOSOTROS
   1) Hero: logo grande con circuitos animados alrededor
      (fondo claro, se desvanece al bajar)
   2) Información base de la empresa
   3) Misión, Visión y Valores
   ========================================================= */

/* ---------- Video de fondo de toda la página ---------- */
.nos-video-fondo {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    background: var(--navy-900);
}
.nos-video-velo {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(6,16,33,.82), rgba(6,16,33,.9));
}
/* las secciones se vuelven transparentes para dejar ver el video */
.nos-con-fondo .section { background: transparent !important; }
/* textos claros sobre el fondo oscuro */
.nos-con-fondo .section-head h2 { color: #fff; }
.nos-con-fondo .section-head p { color: #d5e0f0; }
.nos-con-fondo .section-head .eyebrow { color: var(--sky-400); }

/* ---------- 1) Hero del logo con circuitos ---------- */
.nos-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 40%, #0d2b4d 0%, #071a30 55%, #030d1a 100%);
}
/* variante clara: para las animaciones de partículas/esfera (azules) */
.nos-hero.nos-hero-claro {
    background: radial-gradient(circle at 50% 42%, #ffffff 0%, #eef4fb 55%, #dce8f6 100%);
}

/* el lienzo de circuitos ocupa todo el hero, detrás del logo */
.nos-circuitos {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* el logo, al frente y en grande, sobre toda la animación */
.nos-logo {
    position: relative;
    z-index: 2;
    width: min(70vw, 620px);
    max-width: 90%;
    filter: drop-shadow(0 0 40px rgba(94, 200, 255, .35)) drop-shadow(0 10px 30px rgba(0, 0, 0, .5));
    animation: nos-logo-latido 4s ease-in-out infinite;
}
@keyframes nos-logo-latido {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.02); }
}

/* halo suave detrás del logo, para que resalte sobre los circuitos */
.nos-logo-halo {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(72vw, 660px);
    height: min(72vw, 660px);
    max-width: 94%;
    z-index: 1;
    background: radial-gradient(circle, rgba(7, 26, 48, .92) 0%, rgba(7, 26, 48, .6) 45%, rgba(7, 26, 48, 0) 72%);
    pointer-events: none;
}

.nos-hero.nos-hero-claro .nos-logo-halo {
    background: radial-gradient(circle, rgba(255,255,255,.92) 0%, rgba(255,255,255,.6) 45%, rgba(255,255,255,0) 72%);
}
.nos-hero.nos-hero-claro .nos-scroll-hint { color: var(--navy-900); }
.nos-scroll-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #cfe4ff;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: nos-flota 2s ease-in-out infinite;
}
.nos-scroll-hint span { font-size: 1.3rem; line-height: 1; }
@keyframes nos-flota {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .nos-logo, .nos-scroll-hint { animation: none; }
}

/* ---------- 2) Información base de la empresa ---------- */
.nos-info {
    max-width: 900px;
    margin: 0 auto;
}
.nos-info p {
    text-align: justify;
    hyphens: auto;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 18px;
}
/* Bloque de video vertical (izquierda) + texto (derecha) */
.nos-video-bloque {
    display: grid;
    grid-template-columns: minmax(0, 340px) 1fr;
    gap: 40px;
    align-items: start;   /* video y texto arrancan a la misma altura */
    margin-top: 40px;
}
.nos-video-caja {
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 9 / 16;            /* vertical */
    background: linear-gradient(135deg, #14395f, #0b2447 60%, #071a30);
    box-shadow: var(--shadow);
    max-width: 340px;
    width: 100%;
}
.nos-video-caja video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nos-video-texto .eyebrow {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 12px;
    line-height: 1;
}
/* el primer elemento del texto no debe tener espacio arriba, para que
   arranque exactamente a la misma altura que el video */
.nos-video-texto > :first-child { margin-top: 0; }
.nos-con-fondo .nos-video-texto h2 { color: #fff; }
.nos-con-fondo .nos-video-texto p { color: #d5e0f0; }
.nos-video-texto h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--navy-900);
    margin: 0 0 18px;
    line-height: 1.25;
}
.nos-video-texto h2::after {
    content: '';
    display: block;
    width: 52px; height: 3px;
    margin-top: 14px;
    background: linear-gradient(90deg, var(--gold-500), var(--sky-400));
}
.nos-video-texto p {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.8;
    text-align: justify;
    margin: 0 0 16px;
}
.nos-video-texto p:last-child { margin-bottom: 0; }

/* en móvil se apila: video arriba, texto abajo */
@media (max-width: 760px) {
    .nos-video-bloque {
        grid-template-columns: 1fr;
        gap: 24px;
        justify-items: center;
    }
    .nos-video-texto { text-align: left; }
}

/* ---------- 3) Misión, Visión y Valores ---------- */
.nos-mvv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.nos-mvv-tarjeta {
    position: relative;
    background: linear-gradient(160deg, #12385f, #0b2447);
    color: #fff;
    border-radius: 18px;
    padding: 34px 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.nos-mvv-tarjeta::before {
    /* detalle decorativo: líneas de circuito en la esquina */
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background:
        repeating-linear-gradient(45deg, transparent 0 8px, rgba(94, 241, 255, .12) 8px 9px);
    border-radius: 50%;
}
.nos-mvv-icono {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(94, 241, 255, .15);
    border: 1px solid rgba(94, 241, 255, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}
.nos-mvv-tarjeta h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0 0 12px;
}
.nos-mvv-tarjeta p {
    color: #d5e0f0;
    font-size: .98rem;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

/* la tarjeta de Valores puede llevar una lista */
.nos-valores-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nos-valores-lista li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eaf3ff;
    font-size: .96rem;
}
.nos-valores-lista li::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sky-400);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--sky-400);
}

/* =========================================================
   RECONOCIMIENTOS y EVENTOS — cuadrícula de tarjetas
   (imagen arriba, texto abajo). Mismo estilo para ambas.
   ========================================================= */
.nos-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.nos-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(11, 36, 71, .07);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
    /* estado inicial para la animación al bajar */
    opacity: 0;
    transform: translateY(28px);
}
.nos-con-fondo .nos-card {
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, .25);
}
.nos-con-fondo .nos-card-cuerpo h3 { color: #fff; }
.nos-con-fondo .nos-card-cuerpo p { color: #d5e0f0; }
.nos-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.nos-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(11, 36, 71, .16);
}

.nos-card-img {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #14395f, #0b2447 60%, #071a30);
    background-size: contain;        /* imagen completa, sin recortar */
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* texto de respaldo cuando la imagen aún no existe */
.nos-card-img .ph-texto {
    color: rgba(255, 255, 255, .8);
    font-size: .85rem;
    font-weight: 600;
    text-align: center;
    padding: 16px;
}

.nos-card-cuerpo {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.nos-card-cuerpo h3 {
    font-size: 1.05rem;
    color: var(--navy-900);
    margin: 0;
    line-height: 1.3;
}
.nos-card-cuerpo h3::after {
    content: '';
    display: block;
    width: 40px; height: 3px;
    margin-top: 8px;
    background: linear-gradient(90deg, var(--gold-500), var(--sky-400));
}
.nos-card-cuerpo p {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

/* =========================================================
   CARRUSEL 3D (coverflow) de reconocimientos
   El central grande al frente; los laterales atrás, girados
   y más pequeños, dando profundidad.
   ========================================================= */
.nos-cf {
    position: relative;
    padding: 20px 40px 0;
    /* rompe el límite del .container (1180px) para ser más ancho:
       se estira hasta el ancho de la ventana, con un tope de 1600px */
    width: 96vw;
    max-width: 1600px;
    margin-left: 50%;
    transform: translateX(-50%);
}
.nos-cf-escenario {
    position: relative;
    height: 420px;
    perspective: 1600px;      /* profundidad 3D */
    overflow: hidden;
}
/* cada tarjeta se posiciona en 3D con JS (clases pos-*) */
.nos-cf-item {
    position: absolute;
    top: 0;
    left: 50%;
    width: 300px;
    height: 100%;
    margin-left: -150px;      /* centra (mitad del ancho) */
    transition: transform .55s ease, opacity .55s ease, filter .55s ease;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

/* posición central: grande, al frente */
.nos-cf-item.pos-0 {
    transform: translateX(0) translateZ(0) scale(1);
    opacity: 1;
    z-index: 5;
}
/* vecinos inmediatos (der/izq): atrás, girados */
.nos-cf-item.pos-1 {
    transform: translateX(260px) translateZ(-200px) rotateY(-32deg) scale(.86);
    opacity: .7;
    filter: brightness(.7);
    z-index: 4;
}
.nos-cf-item.pos--1 {
    transform: translateX(-260px) translateZ(-200px) rotateY(32deg) scale(.86);
    opacity: .7;
    filter: brightness(.7);
    z-index: 4;
}
/* segundos vecinos: más atrás */
.nos-cf-item.pos-2 {
    transform: translateX(460px) translateZ(-380px) rotateY(-38deg) scale(.76);
    opacity: .5;
    filter: brightness(.62);
    z-index: 3;
}
.nos-cf-item.pos--2 {
    transform: translateX(-460px) translateZ(-380px) rotateY(38deg) scale(.76);
    opacity: .5;
    filter: brightness(.62);
    z-index: 3;
}
/* terceros vecinos: aún más atrás y al borde */
.nos-cf-item.pos-3 {
    transform: translateX(640px) translateZ(-560px) rotateY(-46deg) scale(.64);
    opacity: .28;
    filter: brightness(.45);
    z-index: 2;
}
.nos-cf-item.pos--3 {
    transform: translateX(-640px) translateZ(-560px) rotateY(46deg) scale(.64);
    opacity: .28;
    filter: brightness(.45);
    z-index: 2;
}
/* el resto: ocultos */
.nos-cf-item.pos-oculto {
    transform: translateZ(-600px) scale(.6);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* la tarjeta en sí (reusa el look de .nos-card) */
.nos-cf-item .nos-card {
    opacity: 1;
    transform: none;
    height: 100%;
    cursor: pointer;
}
/* solo la central deja hacer clic cómodo */
.nos-cf-item:not(.pos-0) .nos-card { pointer-events: none; }

/* flechas */
.nos-cf-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(6,16,33,.55);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    transition: background .2s ease, border-color .2s ease;
}
.nos-cf-flecha:hover { background: rgba(6,16,33,.85); border-color: #fff; }
.nos-cf-flecha.prev { left: 4px; }
.nos-cf-flecha.next { right: 4px; }

/* puntitos */
.nos-cf-puntos {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
}
.nos-cf-puntos button {
    width: 10px; height: 10px;
    padding: 0; border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: background .25s ease, width .25s ease;
}
.nos-cf-puntos button.activo { background: var(--gold-500); width: 26px; border-radius: 999px; }

@media (max-width: 760px) {
    .nos-cf { padding: 10px 30px 0; }
    .nos-cf-escenario { height: 380px; }
    .nos-cf-item { width: 240px; margin-left: -120px; }
    /* en móvil acercamos los vecinos para que quepan */
    .nos-cf-item.pos-1  { transform: translateX(140px) translateZ(-200px) rotateY(-30deg) scale(.82); }
    .nos-cf-item.pos--1 { transform: translateX(-140px) translateZ(-200px) rotateY(30deg) scale(.82); }
    .nos-cf-item.pos-2, .nos-cf-item.pos--2 { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nos-cf-item { transition: none; }
}

/* ---------- Galería MINI: certificaciones (cuadros pequeños, muchos) ---------- */
.nos-galeria-mini {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
/* la imagen de las tarjetas mini respeta su proporción (más pequeña) */
.nos-card-mini .nos-card-img {
    height: auto;
    aspect-ratio: 4 / 3;
}
.nos-card-mini .nos-card-cuerpo {
    padding: 12px 14px;
}
.nos-card-mini .nos-card-cuerpo h3 {
    font-size: .92rem;
    margin: 0 0 4px;
}
.nos-card-mini .nos-card-cuerpo p {
    font-size: .78rem;
    line-height: 1.45;
    margin: 0;
}

/* =========================================================
   TESTIMONIOS — carrusel de 1 video a la vez (desliza horizontal)
   ========================================================= */
.nos-testi {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    /* espacio a los lados para que las flechas queden fuera del cuadro */
    padding: 0 70px;
}
/* la ventana recorta para mostrar solo 1 video */
.nos-testi-ventana {
    overflow: hidden;
    border-radius: 16px;
}
/* la pista contiene todos los videos en fila y se desplaza con JS */
.nos-testi-pista {
    display: flex;
    transition: transform .5s ease;
    will-change: transform;
}
/* cada video ocupa el 100% del ancho de la ventana */
.nos-testi-slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 9;
    background: #05101f;
    position: relative;
}
.nos-testi-slide video {
    width: 100%; height: 100%;
    object-fit: contain;      /* muestra el video completo (sea vertical u horizontal) */
    display: block;
    background: #05101f;
}
.nos-testi-ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #14395f, #0b2447 60%, #071a30);
    color: rgba(255,255,255,.7);
    font-size: .95rem;
    padding: 20px;
}
.nos-testi-ph small { color: rgba(255,255,255,.5); font-size: .78rem; }

/* flechas */
.nos-testi-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy-900);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(11,36,71,.18);
    transition: background .2s ease, color .2s ease;
}
.nos-testi-flecha:hover { background: var(--blue-500); color: #fff; }
.nos-testi-flecha.prev { left: 0; }
.nos-testi-flecha.next { right: 0; }

/* puntitos */
.nos-testi-puntos {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
}
.nos-testi-puntos button {
    width: 10px; height: 10px;
    padding: 0; border: 0;
    border-radius: 50%;
    background: rgba(11,36,71,.25);
    cursor: pointer;
    transition: background .25s ease, width .25s ease;
}
.nos-testi-puntos button.activo { background: var(--gold-500); width: 26px; border-radius: 999px; }

/* en móvil reducimos el espacio lateral y las flechas */
@media (max-width: 680px) {
    .nos-testi { padding: 0 44px; }
    .nos-testi-flecha { width: 38px; height: 38px; font-size: 1.3rem; }
}