* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Raleway", sans-serif;
}

body {
    background-color: rgb(244, 250, 255);
}

/* El wrapper le da "alto de scroll" a la sección para que
   el usuario pueda scrollear mientras el hero queda fijo (sticky)
   y la animación va progresando. Subí/bajá el 250vh para hacer
   la transición más larga o más corta. */
.hero-wrapper {
    position: relative;
    height: 250vh;
}

.hero-section {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    padding: 20px;
}

/* ---- Título (izquierda) ---- */
.hero-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 40px;
    padding: 40px;
    will-change: transform, opacity;
}

.logo {
    width: 100%;
    height: 100px;
    overflow: hidden;
    display: flex;
    justify-content: start;
}

.logo img {
    width: auto;
    height: 100%;
    object-fit: contain;
}

.hero-title h1 {
    font-size: 5rem;
}

.hero-title span {
    font-size: 2rem;
}

.hero-title a {
    padding: 15px;
    border-radius: 24px;
    text-decoration: none;
    color: aliceblue;
    background-color: #2b2b2b;
    font-weight: 700;
}

/* ---- Fondo de video (centro) ---- */
.hero-bkg {
    position: absolute;
    top: 25px;
    left: 35%;
    width: 30%;
    height: 95%;
    background-color: aquamarine;
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    will-change: left, width, border-radius;
}

/* Texto que invita al click, aparece al hacer hover sobre hero-bkg */
.hero-bkg-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    transform: translate(-50%, -50%) translateY(10px);
    background-color: #ffaf03;
    color: #2b2b2b;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-bkg:hover .hero-bkg-hint {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

/* Una vez que arrancó la animación de scroll (video expandiéndose),
   el hint queda oculto aunque sigas en hover, para no pisar el texto. */
.hero-bkg.hero-bkg--hide-hint .hero-bkg-hint {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(10px);
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.video-player.active {
    display: block;
}

/* Overlay oscuro sobre el video, aparece con el scroll */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* Bloques de texto sobre el video expandido */
.hero-text-blocks {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: aliceblue;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    will-change: transform, opacity;
}

.hero-text-tag {
    background-color: #ffaf03;
    color: #2b2b2b;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-text-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.hero-text-bottom a {
    background-color: #ffaf03;
    color: #2b2b2b;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-decoration: none;
}


.hero-text-blocks h2 {
    font-size: 3rem;
    max-width: 800px;
    margin-bottom: 20px;
}

.hero-text-blocks p {
    font-size: 1.3rem;
    max-width: 600px;
}

/* ---- Aside (derecha) ---- */
.hero-aside {
    position: absolute;
    top: 0;
    left: 65%;
    width: 35%;
    height: 100%;
    will-change: transform, opacity;
}

.header {
    width: 100%;
}

.header ul {
    display: flex;
    justify-content: space-between;
    align-items: start;
    list-style: none;
    padding: 40px 0px;
}

.header li {
    background-color: #2b2b2b;
    color: aliceblue;
    padding: 10px;
    border-radius: 24px;
    font-size: 1rem;
    transition: 0.5s;
}

.header li:hover {
    background-color: #ffaf03;
    color: #2b2b2b;
    cursor: pointer;
}

.hero-aside-bottom {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    align-items: start;
    padding: 20px;
}

.hero-aside h2 {
    font-size: 2rem;
}


/* Sección de ejemplo para poder ver el efecto al scrollear */
.primary {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: aliceblue;
    gap: 40px;
    padding: 5%;
}

.primary-img {
    width: 45%;
    height: 80%;
    position: relative;
    z-index: 0;
    overflow: hidden;
    /* recorta todo lo que se salga del contenedor */
}

.primary-content {
    width: 55%;
    height: 100%;
}

/* ---- Sección de áreas de trabajo ---- */

.areas-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.area-item {
    padding: 30px 0;
    cursor: pointer;
    transition: 0.3s;
}

.area-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2b2b2b;
    transition: 0.3s;
}

.area-item:hover h3 {
    color: #ffaf03;
    transform: translateX(20px);
}

/* Tarjeta flotante que sigue al cursor */
.area-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 420px;
    height: 440px;
    background-color: #2b2b2b;
    background-size: cover;
    background-position: center;
    color: aliceblue;
    padding: 22px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.25s ease, background-image 0.25s ease;
    will-change: transform, opacity;
}

/* Overlay oscuro para que el texto se lea sobre la imagen de fondo */
.area-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.692), rgba(0, 0, 0, 0.801));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.area-card.has-bg::before {
    opacity: 1;
}

.area-card p {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    font-weight: 700;
}

.area-card p {
    max-height: 100%;
    overflow: hidden;
}

.area-card.visible {
    opacity: 1;
}

:root {
    --c1: #003049;
    --c2: #fdf0d5;
    --c3: #669bbc;
    --c4: #c1121f;
    --hover-duration: .6s;
    --hover-ease: cubic-bezier(.4, 0, .2, 1);
}

/* Bloque contenedor de las barras */
.bars-block {
    position: absolute;
    inset: 0;
    /* en vez de height:100vh, ocupa exactamente el contenedor */
    height: 100%;
    width: 100%;
    z-index: 1;
    /* por debajo de la imagen, arriba del fondo */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bars-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}

/* Se usa margin-right en vez de "gap" para animar la separación:
     animar "gap" no tiene el mismo soporte/consistencia entre navegadores,
     y con margin nos aseguramos de que coincida exactamente con el fade de la imagen. */
.bar {
    flex: 1;
    height: 100%;
    margin-right: 1vw;
    transform: translate(-120%, 120%);
    opacity: 0;
    /* Gradiente que se anima solo (cambia de colores con el tiempo) */
    background: linear-gradient(180deg, var(--c1), var(--c2), var(--c3), var(--c4));
    background-size: 100% 300%;
    animation: hueShift 8s ease-in-out infinite;
    transition: transform 1.1s cubic-bezier(.16, .8, .24, 1), opacity 1.1s ease,
        margin-right var(--hover-duration) var(--hover-ease);
    border-radius: 24px;
}

.bar:last-child {
    margin-right: 0;
}

/* Cuando se hace hover sobre un área, las barras se pegan entre sí (sin gap) */
.bars-wrapper.merged .bar {
    margin-right: 0;
}

/* Imagen relacionada al área, aparece por encima de las barras al hacer hover */
.area-bg-image {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--hover-duration) var(--hover-ease);
    border-radius: 24px;
}

.area-bg-image.visible {
    opacity: 1;
}

/* Cuando el bloque entra en pantalla, se agrega esta clase con JS */
.bars-block.in-view .bar {
    transform: translate(0, 0);
    opacity: 1;
}

/* Delay escalonado para que las barras entren en cascada desde abajo-izquierda */
.bars-block.in-view .bar:nth-child(1) {
    transition-delay: .00s;
}

.bars-block.in-view .bar:nth-child(2) {
    transition-delay: .06s;
}

.bars-block.in-view .bar:nth-child(3) {
    transition-delay: .12s;
}

.bars-block.in-view .bar:nth-child(4) {
    transition-delay: .18s;
}

.bars-block.in-view .bar:nth-child(5) {
    transition-delay: .24s;
}

.bars-block.in-view .bar:nth-child(6) {
    transition-delay: .30s;
}

.bars-block.in-view .bar:nth-child(7) {
    transition-delay: .36s;
}

.bars-block.in-view .bar:nth-child(8) {
    transition-delay: .42s;
}

.bars-block.in-view .bar:nth-child(9) {
    transition-delay: .48s;
}

.bars-block.in-view .bar:nth-child(10) {
    transition-delay: .54s;
}

/* Animación del gradiente moviéndose dentro de cada barra (cambia de color en el tiempo) */
@keyframes hueShift {
    0% {
        background-position: 0% 0%;
        filter: hue-rotate(0deg);
    }

    50% {
        background-position: 0% 100%;
        filter: hue-rotate(180deg);
    }

    100% {
        background-position: 0% 0%;
        filter: hue-rotate(360deg);
    }
}

.label {
    position: relative;
    z-index: 2;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bar {
        transition: none;
        animation: none;
    }
}

.secondary {
    width: 100%;
    height: auto;
}

.secondary-title {
    border-top: solid 5px #ffaf03;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 5%;
    padding-right: 20%;
    border-radius: 0 0 48px 0;
}

.secondary-title h2 {
    font-size: 3rem;
}

.secondary-title p {
    font-size: 1.3rem;
}

.secondary-carrucel {
    padding: 40px;
}

/* ============================================================
   Sección de tarjetas con tableros (iframes) y efecto paralax
   ============================================================ */

.panels-section {
    padding: 120px 60px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* Le da "aire" arriba/abajo para que el paralax tenga
       recorrido antes de que las tarjetas entren/salgan de pantalla. */
    overflow: visible;
}

.panels-header {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 16px;
}

.panels-eyebrow {
    background-color: #ffaf03;
    color: #2b2b2b;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 700;
}

.panels-header h2 {
    font-size: 2.6rem;
    color: #2b2b2b;
}

.panels-header p {
    font-size: 1.15rem;
    color: #4a4a4a;
}

/* ---- Carrusel ---- */
.panels-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.panels-track {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 24px;
    scrollbar-width: none;
}

.panels-track::-webkit-scrollbar {
    display: none;
}

.panels-arrow {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background-color: #2b2b2b;
    color: aliceblue;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.panels-arrow:hover {
    background-color: #ffaf03;
    color: #2b2b2b;
}

/* ---- Tarjeta (más ancha, formato "flight card") ---- */
.panel-card {
    flex: 0 0 auto;
    width: min(560px, 82vw);
    scroll-snap-align: start;
    background-color: #ffffff;
    border-radius: 28px;
    padding: 14px;
}

.panel-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    overflow: hidden;
    background-color: rgb(232, 240, 247);
}

/* El iframe se renderiza siempre a un ancho "de escritorio" fijo
   (1280x800), para que la página de adentro dispare su versión
   desktop y no la mobile. Después se achica visualmente con
   transform: scale() para que entre en el espacio real de la
   tarjeta — el JS calcula ese factor de escala. */
.panel-card-scaler {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 800px;
    transform-origin: top left;
}

.panel-card-scaler iframe {
    width: 1280px;
    height: 800px;
    border: 0;
    display: block;
    /* Arranca deshabilitado: el scroll de la página nunca queda
       atrapado dentro del tablero embebido. */
    pointer-events: none;
}

.panel-card-media--active .panel-card-scaler iframe {
    pointer-events: auto;
}

.panel-card-fav {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    color: #2b2b2b;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color 0.3s ease;
}

.panel-card-fav:hover {
    color: #e0475c;
}

.panel-card-fav--active {
    color: #e0475c;
}

/* Etiqueta para habilitar la interacción con el iframe */
.panel-card-activate {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    cursor: pointer;
    background: rgba(43, 43, 43, 0.25);
    color: aliceblue;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.35s ease, background-color 0.35s ease;
}

.panel-card-activate:hover {
    background: rgba(43, 43, 43, 0.4);
}

.panel-card-media--active .panel-card-activate {
    opacity: 0;
    pointer-events: none;
}

.panel-card-body {
    padding: 22px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-card-body h3 {
    font-size: 1.6rem;
    color: #2b2b2b;
}

.panel-card-subtitle {
    color: #8a8a8a;
    font-size: 1rem;
}

.panel-card-meta {
    display: flex;
    gap: 24px;
    margin: 16px 0;
    color: #4a4a4a;
    font-weight: 600;
}

.panel-card-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-card-meta i {
    color: #ffaf03;
}

.panel-card-actions {
    display: flex;
}

.panel-card-cta {
    width: 100%;
    background-color: #2b2b2b;
    color: aliceblue;
    border: 0;
    border-radius: 999px;
    padding: 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.panel-card-cta:hover {
    background-color: #ffaf03;
    color: #2b2b2b;
}

@media (max-width: 900px) {
    .panels-section {
        padding: 80px 24px;
    }

    .panels-arrow {
        display: none;
    }

    .panel-card {
        width: 88vw;
    }
}

.panel-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
}

.terciary {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 60px;
    gap: 10px;
}

.terciary-main {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
    border-radius: 24px;
    position: relative;
}

.terciary-main video{
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.terciary-title {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: #2c2c2c2f;
    background-position: center;
    background-size: cover;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 24px;
}

.terciary-title h2 {
    font-size: 3rem;
}

.terciary-title p {
    font-size: 1.5rem;
}


.terciary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    background: #2c2c2ca6;
    background-position: center;
    background-size: cover;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    color: aliceblue;
    border-radius: 14px;
}

.terciary-list span {
    font-size: 1.2rem;
}

.terciary-aside {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terciary-aside-top{
    width: 100%;
    height: 50%;
    background-color: #2b2b2b;
    border-radius: 24px;
}

.terciary-aside-bottom{
    width: 100%;
    height: 50%;
    background-color: #003049;
    border-radius: 24px;
    position: relative;
    overflow: hidden; /* nada de las tarjetas se sale del contenedor redondeado */
}

/* Wrapper de las tarjetas: ocupa todo el espacio disponible */
.terciary-cards{
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cada tarjeta mide exactamente lo mismo que el contenedor
   (mismo largo y ancho) y se apilan todas en el mismo lugar */
.terciary-card{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: aliceblue;
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s ease;
    overflow: hidden;
}

/* Solo la tarjeta activa se ve; el carrusel avanza cambiando esta clase */
.terciary-card.active{
    opacity: 1;
    pointer-events: auto;
}

/* El iframe ocupa el 100% del contenedor de la card, funcionando como fondo */
.terciary-card-iframe{
    position: absolute;
    inset: 0;
    width: 150%;
    height: 110%;
    border: none;
    pointer-events: none; /* el contenido de texto queda al frente; si querés
                              que el iframe sea interactivo, quitá esta línea */
                              left: -25%;
}

/* Contenido (ícono, título, texto) superpuesto sobre el iframe,
   con un degradado oscuro atrás para que se pueda leer */
.terciary-card-content{
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 12px;
    padding: 30px;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 50%, rgba(0, 0, 0, 0.932) 100%);
}

.terciary-card i{
    font-size: 1.8rem;
    color: #337bff;
}

.terciary-card h3{
    font-size: 1.6rem;
}

.terciary-card p{
    font-size: 1rem;
    max-width: 90%;
    opacity: .85;
    line-height: 1.5;
}