/* ============================================================
   FUENTES
   ============================================================ */
@font-face {
    font-family: 'bebasNBook';
    src: url(/assets/fonts/BebasNeueBook.otf);
}
@font-face {
    font-family: 'bebasNBold';
    src: url(/assets/fonts/BebasNeueBold.otf);
}
@font-face {
    font-family: 'campMedium';
    src: url(/assets/fonts/CamptonMedium.otf);
}
@font-face {
    font-family: 'campSemiBlIt';
    src: url(/assets/fonts/CamptonSemiBoldItalic.otf);
}
@font-face {
    font-family: 'campLight';
    src: url(/assets/fonts/CamptonLight.otf);
}
@font-face {
    font-family: 'campBook';
    src: url(/assets/fonts/CamptonBook.otf);
}
@font-face {
    font-family: 'campBold';
    src: url(/assets/fonts/CamptonBold.otf);
}
@font-face {
    font-family: 'campSemiBl';
    src: url(/assets/fonts/CamptonSemiBold.otf);
}
@font-face {
    font-family: 'monse';
    src: url(/assets/fonts/Montserrat-Medium.ttf);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 16px; /* base para rem */
}

body {
    overflow-x: hidden;
}

#mark {
    font-weight: bolder;
}

img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 7rem;
    background-color: #2D4754;
    position: sticky;
    top: 0;
    font-family: 'bebasNBook';
    z-index: 9999;
}

nav > ul {
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
}

ul > li > a {
    color: aliceblue;
    text-decoration: none;
    text-transform: uppercase;
    font-size: clamp(1rem, 1.5vw, 1.9rem);
    transition: opacity 0.2s ease;
}

ul > li > a:hover {
    opacity: 0.75;
}

.logo {
    width: clamp(3rem, 5vw, 5.5rem);
    height: auto;
}

.logo img {
    object-fit: contain;
    width: 100%;
    height: auto;
}

/* ============================================================
   HAMBURGUESA (oculta por defecto en desktop)
   ============================================================ */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 10000;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: aliceblue;
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.4s;
}

/* ============================================================
   HEADER / HERO BANNER
   ============================================================ */
.header {
    /* En desktop ocupa toda la pantalla, en móvil se adapta al contenido */
    height: auto;
    min-height: 100svh;
    display: flex;
    justify-content: flex-start;
    align-items: stretch; /* ← heroBanner estira para llenar el header */
    flex-direction: column;
}

.heroBanner {
    width: 100%;
    flex: 1;              /* ← ocupa todo el espacio disponible del header */
    min-height: 0;        /* ← permite que flex-1 funcione sin desborde */
    background-image: url('../assets/img/bgHeader.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.5s ease-in-out;
}

.heroBannerContent {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
}

.bannerContentText {
    width: 50%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    text-align: left;
    padding: 2rem;
}

.bannerContentText h1 {
    font-size: clamp(2rem, 4.5vw, 6rem);
    color: aliceblue;
    font-family: 'campBook';
    line-height: 1.15;
}

h1 > span {
    font-family: 'campSemiBlIt';
}

.bannerContentText p {
    padding-top: 1.5rem;
    font-family: 'campLight';
    color: aliceblue;
    font-size: clamp(1rem, 1.5vw, 1.7rem);
    line-height: 1.5;
}

.bannerContentVideo {
    width: 40%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bannerContentVideo video {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

.heroBannerBtn {
    width: 100%;
    padding: 1rem 0 2rem;
    padding-bottom: 13rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Asegura que el botón quede pegado al fondo del banner */
    margin-top: auto;
}

.heroBannerBtn > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.heroBannerBtn > a > img {
    height: clamp(3rem, 5vw, 4rem);
    width: auto;
}

/* ============================================================
   BANEO (BANNER MÉDICO)
   ============================================================ */
.baneo {
    width: 100%;
    min-height: 10rem;
    background-color: #99CCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'campBook';
    gap: 2rem;
    padding: 2rem 3rem;
    flex-wrap: wrap;
}

.baneoTexto {
    flex: 1 1 280px;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #2D4754;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    line-height: 1.4;
}

.baneoTexto h1 {
    font-size: clamp(1rem, 2vw, 1.5rem);
}

.baneoTexto span {
    font-family: 'campBold';
    font-weight: bolder;
}

.adText span {
    font-family: 'campBold';
    font-weight: bolder;
}

.baneoBtn {
    flex: 1 1 200px;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.baneoBtn a {
    display: inline-flex;
}

.baneoBtn a img {
    height: clamp(3rem, 5vw, 4rem);
    width: auto;
}

/* ============================================================
   VIDEO WRAPPER & FEEDBACK ICON
   ============================================================ */
.video-wrapper {
    position: relative;
    width: 100%;
    cursor: pointer;
    display: block;
    border-radius: 20px;
    overflow: hidden;
}

.video-feedback-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 70px;
    height: 70px;
    background: rgba(153, 204, 204, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-out;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-wrapper.is-paused .video-feedback-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-feedback-icon.flash-pause {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-shape {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #2D4754;
    margin-left: 5px;
}

.pause-shape {
    display: flex;
    gap: 6px;
}

.pause-shape::before,
.pause-shape::after {
    content: '';
    width: 7px;
    height: 26px;
    background: #2D4754;
    border-radius: 2px;
}

/* ============================================================
   UTILIDADES JS
   ============================================================ */
.element-in-view {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.resize-animation-stopper * {
    transition: none !important;
    animation: none !important;
}

.fade-in-ready {
    animation: fadeInMedia 0.5s ease-in;
}

@keyframes fadeInMedia {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   BREAKPOINTS RESPONSIVOS
   ============================================================ */

/* --- TABLET GRANDE / LAPTOP PEQUEÑO (≤ 1280px) --- */
@media (max-width: 1280px) {
    .bannerContentText h1 {
        font-size: clamp(1.8rem, 3.5vw, 4rem);
    }

    .bannerContentText {
        padding: 1.5rem;
    }
}

/* --- TABLET (≤ 1024px) --- */
@media (max-width: 1024px) {
    nav {
        height: 6rem;
    }

    .bannerContentText {
        width: 50%;
        padding: 1.5rem;
    }

    .bannerContentVideo {
        width: 45%;
    }

    .bannerContentText h1 {
        font-size: clamp(1.6rem, 3vw, 3rem);
    }

    .baneo {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1rem;
    }

    .baneoTexto {
        max-width: 100%;
        width: 100%;
    }

    .baneoBtn {
        max-width: 80%;
        width: 80%;
        padding: 0.5rem;
    }
}

/* --- TABLET PEQUEÑA / MÓVIL GRANDE (≤ 768px) --- */
@media (max-width: 768px) {
    /* Nav hamburguesa */
    .hamburger {
        display: block;
    }

    nav {
        height: 5.5rem;
        position: relative;
    }

    nav > ul {
        position: fixed;
        left: -100%;
        top: 5.5rem;
        flex-direction: column;
        background-color: #2D4754;
        width: 100%;
        height: calc(100vh - 5.5rem);
        transition: left 0.4s ease;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 2rem;
        flex-wrap: nowrap;
        overflow-y: auto;
    }

    nav > ul.active {
        left: 0;
    }

    ul > li > a {
        font-size: 1.8rem;
    }

    /* Hero: sin espacio blanco residual */
    .header {
        min-height: 100svh;
        /* height: auto ya está en el base */
    }

    .heroBanner {
        min-height: calc(100svh - 5.5rem);
        /* flex: 1 ya está en el base */
    }

    .heroBannerContent {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.25rem 1rem;
        gap: 1.5rem;
        flex: 1; /* empuja el botón hacia abajo */
    }

    .bannerContentText {
        width: 100%;
        text-align: center;
        align-items: center;
        padding: 0;
    }

    .bannerContentText h1 {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .bannerContentText p {
        font-size: clamp(0.95rem, 3.5vw, 1.3rem);
        padding-top: 1rem;
    }

    .bannerContentVideo {
        width: 90%;
    }

    .heroBannerBtn > a > img {
        height: 3rem;
    }

    /* Baneo */
    .baneo {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 1rem;
        text-align: center;
    }

    .baneoTexto {
        max-width: 100%;
        width: 100%;
        font-size: 0.95rem;
    }

    .baneoTexto h1 {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }

    .baneoBtn {
        max-width: 90%;
        width: 90%;
    }

    /* Hamburguesa → X */
    .hamburger.is-active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* --- MÓVIL (≤ 480px) --- */
@media (max-width: 480px) {
    nav {
        height: 5rem;
    }

    nav > ul {
        top: 5rem;
        height: calc(100vh - 5rem);
    }

    .heroBannerContent {
        padding: 1.5rem 1rem 0.75rem;
    }

    .bannerContentText h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    .bannerContentText p {
        font-size: clamp(0.85rem, 4vw, 1.1rem);
    }

    .bannerContentVideo {
        width: 95%;
    }

    .heroBannerBtn > a > img {
        height: 2.8rem;
    }

    .baneoTexto h1 {
        font-size: clamp(0.9rem, 4.5vw, 1.1rem);
    }

    .video-feedback-icon {
        width: 55px;
        height: 55px;
    }

    .play-shape {
        border-width: 10px 0 10px 18px;
    }

    .pause-shape::before,
    .pause-shape::after {
        width: 6px;
        height: 20px;
    }
}

/* --- MÓVIL PEQUEÑO (≤ 360px) --- */
@media (max-width: 360px) {
    .bannerContentText h1 {
        font-size: 1.5rem;
    }

    .bannerContentText p {
        font-size: 0.85rem;
    }

    ul > li > a {
        font-size: 1.5rem;
    }
}

/* --- LANDSCAPE MÓVIL (altura < 500px) --- */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: auto;
    }

    .heroBanner {
        height: auto;
    }

    .heroBannerContent {
        flex-direction: row;
        padding: 1rem;
        gap: 1rem;
    }

    .bannerContentText {
        width: 50%;
        text-align: left;
        align-items: flex-start;
    }

    .bannerContentVideo {
        width: 45%;
    }

    nav > ul {
        gap: 1rem;
        padding-top: 1rem;
    }
}

/* --- PANTALLAS GRANDES (≥ 1600px) --- */
@media (min-width: 1600px) {
    nav {
        height: 8rem;
    }

    ul > li > a {
        font-size: 2rem;
    }

    .logo {
        width: 6.5rem;
    }

    .bannerContentText h1 {
        font-size: 6.5rem;
    }

    .bannerContentText p {
        font-size: 1.9rem;
    }

    .baneoTexto h1 {
        font-size: 1.8rem;
    }
}

/* --- 4K / ULTRA-WIDE (≥ 2200px) --- */
@media (min-width: 2200px) {
    html {
        font-size: 20px;
    }

    .bannerContentText h1 {
        font-size: 7rem;
    }

    .bannerContentText p {
        font-size: 2rem;
    }

    nav {
        height: 9rem;
    }
}