/*
 * BIOVIA HERO STYLES
 * ============================================================================
 * Diseño responsive con Mobile-First CSS, respetando directrices del diseño.
 */

/* 0. Prevenir Scroll Horizontal (Causado por 100vw) */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 1. Reset básico y Contenedor Principal */
.biovia-hero-container *,
.biovia-hero-container *::before,
.biovia-hero-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.biovia-hero-container {
    position: relative;
    z-index: 0;
    /* Asegura un stacking context para sus pseudo-elementos hijos con z-index negativo */
    width: 100vw;
    /* Usamos unidades ds/svh para barra de navegador en móviles */
    height: 100vh;
    height: 100svh;
    min-height: 550px;
    /* Para evitar colapso total */
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Sacar el contenedor del flujo center normal de un builder y forzar 100vw */
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    font-family: var(--bio-font-main), 'Montserrat', sans-serif !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #3b2818;
    padding-top: 120px;
    padding-bottom: 32px;
    align-items: flex-start;
}

.biovia-hero-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-poster);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    opacity: 1;
    transition: opacity 0.45s ease;
}

.biovia-hero-container.is-video-ready::before {
    opacity: 0;
}


/* 2. Video de Fondo  */
.biovia-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.45s ease;
}

.biovia-hero-container.is-video-loading .biovia-hero-video {
    opacity: 0;
}

.biovia-hero-container.is-video-ready .biovia-hero-video {
    opacity: 1;
}

/* 3. Estructura de Contenido */
.biovia-hero-content {
    position: relative;
    z-index: 1;
    width: 90%;
    /* Margen lateral natural mobile */
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* En móviles va centrado */
    margin-top: 0;
}

/* Caja de Tópicos Oscurecida con Filtro de desenfoque */
.biovia-hero-box {
    width: 100%;
    /* Glassmorphism Elegante (Frontend Design) */
    background: rgba(18, 22, 18, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: #ffffff;

    /* El borde curvo mobile */
    border-radius: 24px;
    padding: 40px 24px;
    text-align: center;
}

.biovia-hero-title {
    font-family: var(--bio-font-main), 'Montserrat', sans-serif !important;
    /* Tipografía Fluida: se adapta proporcionalmente en cada pantalla sin romperse */
    font-size: 30px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin: 0 0 16px 0;
    color: #E9DCC1;
    letter-spacing: -0.02em !important;
    text-wrap: balance;
    /* Balanceo poético natural */
}

.biovia-hero-title sup {
    font-size: 0.5em;
    top: -0.6em;
}

.biovia-hero-subtitle {
    font-family: var(--bio-font-main), 'Montserrat', sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    color: #F9F4EB;
    text-wrap: pretty;
}

/* 4. Botones de Acción directos */
.biovia-hero-actions {
    display: flex;
    flex-direction: column;
    /* Apilados verticalmente en móviles */
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin: 32px auto 0;
    align-items: center;
}

.biovia-hero-btn {
    font-family: var(--bio-font-main), 'Montserrat', sans-serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    border-radius: 100px;
    /* Bordes de pastilla super elegantes */
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
    line-height: 1;
    /* Sombra estética Premium */
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
}

.biovia-hero-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(57, 134, 77, 0.5);
    /* Anillo de foco */
}

/* Colors de botones para encajar UI Original */
.biovia-hero-btn-primary {
    background-color: var(--bio-green-dark, #388e3c);
    /* Verde oscuro corporativo */
    color: #ffffff !important;
}

.biovia-hero-btn-primary:active {
    background-color: #27692b;
}

.biovia-hero-btn-secondary {
    background-color: var(--bio-green-sage, #a5d6a7);
    /* Verde clarito corporativo */
    color: var(--bio-text, #2C3E30) !important;
    /* Texto Oscuro Corporativo */
}

.biovia-hero-btn-secondary:active {
    background-color: #81c784;
}

/* Micro-Interacciones Hover para botones. Skills/micro-interactions */
@media (hover: hover) {
    .biovia-hero-btn-primary:hover {
        background-color: #2e7d32;
        transform: translateY(-2px);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    }

    .biovia-hero-btn-secondary:hover {
        background-color: #8cc489;
        color: var(--bio-text, #2C3E30) !important;
        transform: translateY(-2px);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    }
}


/* --------------------------------------------------------------------------
   B. TABLET VIEW (768px -> 1024px)
   Alineación armónica central con respiración de Whitespace.
-------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    .biovia-hero-container {
        padding-top: 88px;
        padding-bottom: 40px;
        align-items: center;
    }

    .biovia-hero-content {
        width: 85%;
        max-width: 800px;
    }

    .biovia-hero-box {
        border-radius: 32px;
        padding: 60px 48px;
    }

    .biovia-hero-actions {
        flex-direction: row;
        max-width: 100%;
        width: auto;
        justify-content: center;
        gap: 20px;
        margin-top: 40px;
    }

    .biovia-hero-title {
        font-size: 50px !important;
    }

    .biovia-hero-subtitle {
        font-size: 24px !important;
    }

    .biovia-hero-btn {
        padding: 18px 40px;
    }
}


/* --------------------------------------------------------------------------
   C. DESKTOP VIEW (1025px+)
   Fusión al borde izquierdo, asimetría sofisticada.
-------------------------------------------------------------------------- */
@media (min-width: 1025px) {
    .biovia-hero-container {
        padding-top: 0;
        padding-bottom: 0;
        align-items: center;
    }

    .biovia-hero-content {
        max-width: 100%;
        align-items: flex-start;
        width: 100%;
    }

    .biovia-hero-box {
        width: 55%;
        max-width: 850px;
        border-radius: 0 60px 60px 0;
        text-align: left;
        /* Reestablecemos paddings con respiración superior e inferior */
        padding: 80px 60px 80px 100px;
        border-left: none;
        /* Quitamos borde de cristal del limite pantalla */
    }

    .biovia-hero-title {
        font-size: 58px !important;
        line-height: 1.05 !important;
        margin-bottom: 22px;
        max-width: 720px;
    }

    .biovia-hero-subtitle {
        font-size: 22px;
        line-height: 1.45;
        max-width: 680px;
        padding-right: 15%;
        /* Evita que el texto sea excesivamente largo en lectura */
    }

    .biovia-hero-actions {
        flex-direction: row;
        width: min(100%, 680px);
        max-width: 680px;
        padding-left: 0;
        margin: 40px 0 0 0;
        justify-content: center;
        gap: 20px;
    }

    .biovia-hero-btn {
        width: auto;
        min-width: 240px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .biovia-hero-container {
        padding-top: 132px;
    }

    .biovia-hero-box {
        padding: 36px 20px;
    }
}
