/*
 BIOHACKING 360 LABS — MOBILE-LAYOUT-02
 Correccion real de selectores existentes.
 Exclusivo para pantallas <= 760px.
*/

@media (max-width:760px) {

  /*
   HEADER:
   - Boton menu columna izquierda
   - Logo columna central
   - Idioma columna derecha

   No forzamos nav display:none:
   el controlador movil existente
   conserva su logica de apertura.
  */

  html body header .wrap.header-inner {
    display:grid !important;
    grid-template-columns:
      44px minmax(0,1fr) 84px !important;
    align-items:center !important;
    justify-items:stretch !important;
    column-gap:5px !important;
    min-height:80px !important;
    padding-top:12px !important;
    padding-bottom:12px !important;
    position:relative !important;
  }

  html body header .header-inner
  > #mobile-menu-toggle {
    grid-column:1 !important;
    grid-row:1 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    position:relative !important;
    inset:auto !important;
    transform:none !important;
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
    margin:0 !important;
    padding:0 !important;
    border-radius:12px !important;
    z-index:5 !important;
    order:unset !important;
  }

  html body header .header-inner
  > a.official-brand {
    grid-column:2 !important;
    grid-row:1 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    justify-self:center !important;
    position:static !important;
    transform:none !important;
    margin:0 !important;
    padding:0 !important;
    min-width:0 !important;
    width:100% !important;
    max-width:175px !important;
    order:unset !important;
    z-index:2 !important;
  }

  html body header .header-inner
  > a.official-brand img {
    display:block !important;
    width:100% !important;
    max-width:155px !important;
    height:auto !important;
    max-height:58px !important;
    object-fit:contain !important;
    margin:0 auto !important;
  }

  html body header .header-inner
  > .actions {
    grid-column:3 !important;
    grid-row:1 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    justify-self:end !important;
    position:static !important;
    inset:auto !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    transform:none !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    pointer-events:auto !important;
    z-index:6 !important;
  }

  html body header .header-inner
  > .actions > .language-switch {
    display:block !important;
    position:relative !important;
    margin:0 !important;
    width:auto !important;
    flex:none !important;
  }

  html body header .language-switch
  > summary {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    min-width:80px !important;
    width:80px !important;
    min-height:42px !important;
    padding:7px 5px !important;
    border-radius:12px !important;
    white-space:nowrap !important;
  }

  html body header .language-switch
  .bh-globe {
    width:18px !important;
    height:18px !important;
    flex:none !important;
  }

  html body header .language-switch
  .bh-flag-svg {
    width:23px !important;
    height:16px !important;
  }

  html body header .language-switch
  .bh-chevron {
    width:11px !important;
    height:11px !important;
  }

  /* Navegacion movil: fuera de las
     columnas centrales del header. */
  html body header .header-inner
  > #main-navigation {
    grid-column:1 / -1 !important;
  }

  /*
   HERO — CTA EN DOS COLUMNAS.
   Cada boton ocupa la mitad disponible.
  */

  html body #inicio .hero-content .ctas {
    display:grid !important;
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
    align-items:stretch !important;
    justify-items:stretch !important;
    column-gap:10px !important;
    row-gap:0 !important;
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  html body #inicio .hero-content
  .ctas > .btn {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    min-height:50px !important;
    padding:10px 6px !important;
    margin:0 !important;
    text-align:center !important;
    font-size:clamp(11px,3.2vw,14px) !important;
    white-space:normal !important;
    line-height:1.2 !important;
    box-sizing:border-box !important;
  }

  /*
   REDES SOCIALES REALES:
   .bh-social-cards, no .social-cards.
  */

  html body #inicio .bh-social-extra {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  html body #inicio .bh-social-cards {
    display:grid !important;
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
    align-items:stretch !important;
    gap:9px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  html body #inicio .bh-social-cards > * {
    min-width:0 !important;
    max-width:none !important;
    width:100% !important;
    box-sizing:border-box !important;
    padding:11px 7px !important;
    margin:0 !important;
    overflow:hidden !important;
    border-radius:14px !important;
  }

  html body #inicio .bh-social-cards
  :is(a,span,strong,small) {
    min-width:0;
  }

  html body #inicio .bh-social-cards
  .bh-social-card {
    overflow:hidden;
  }

  html body #inicio .bh-social-cards
  .bh-social-card-title {
    font-size:12px !important;
  }

  /*
   Beneficios: mantener legibilidad
   y centrado debajo de ambas redes.
  */

  html body #inicio .bh-benefits {
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center !important;
    align-items:center !important;
    gap:10px 12px !important;
  }
}

@media(max-width:370px) {
  html body header .wrap.header-inner {
    grid-template-columns:
      42px minmax(0,1fr) 78px !important;
    column-gap:2px !important;
  }

  html body header .header-inner
  > a.official-brand img {
    max-width:135px !important;
  }

  html body header .language-switch
  > summary {
    width:76px !important;
    min-width:76px !important;
    gap:3px !important;
  }

  html body #inicio .bh-social-cards {
    gap:6px !important;
  }

  html body #inicio .bh-social-cards > * {
    padding:9px 5px !important;
  }
}

/* =========================================================
   BH_MOBILE_HERO_01

   Correccion vertical del encabezado y el hero.
   Mantiene intacto el diseño de escritorio.
   ========================================================= */

/* La fotografía adicional no aparece en escritorio. */
.bh-mobile-hero-photo {
    display:none;
}

@media(max-width:760px) {

    /*
     HEADER MAS DELGADO
     Menú - Logo - Idioma.
    */

    html body header .wrap.header-inner {
        min-height:64px !important;
        padding-top:6px !important;
        padding-bottom:6px !important;
    }

    html body header .header-inner
    > #mobile-menu-toggle {
        width:38px !important;
        height:38px !important;
        min-width:38px !important;
        border-radius:10px !important;
    }

    html body header .header-inner
    > a.official-brand {
        max-width:148px !important;
    }

    html body header .header-inner
    > a.official-brand img {
        max-width:140px !important;
        max-height:48px !important;
    }

    html body header .language-switch > summary {
        min-height:38px !important;
        height:38px !important;
        border-radius:10px !important;
    }

    /*
     HERO
     Quitar la fotografía como fondo
     para mostrarla completa como imagen real.
    */

    html body #inicio.hero {
        height:auto !important;
        min-height:0 !important;
        background-image:none !important;
        padding-top:0 !important;
        padding-bottom:0 !important;
        overflow:hidden;
    }

    html body #inicio.hero > .wrap {
        height:auto !important;
        min-height:0 !important;
        padding-top:17px !important;
        padding-bottom:0 !important;
        align-items:start !important;
    }

    html body #inicio.hero .hero-content {
        width:100% !important;
        max-width:100% !important;
        min-height:0 !important;
        padding:0 !important;
        margin:0 auto !important;
    }

    html body #inicio.hero h1 {
        font-size:clamp(25px,6.2vw,33px) !important;
        line-height:1.12 !important;
        letter-spacing:-.035em !important;
        margin-top:0 !important;
        margin-bottom:10px !important;
    }

    html body #inicio.hero
    .hero-content > p {
        font-size:clamp(13px,3.5vw,15px) !important;
        line-height:1.43 !important;
        margin-top:0 !important;
        margin-bottom:13px !important;
    }

    /*
     BOTONES COMPACTOS.
    */

    html body #inicio .hero-content .ctas {
        margin-top:10px !important;
        margin-bottom:10px !important;
        gap:9px !important;
    }

    html body #inicio .hero-content .ctas > .btn {
        min-height:40px !important;
        padding:8px 5px !important;
        font-size:clamp(11px,3.1vw,13px) !important;
        border-radius:999px !important;
    }

    /*
     REDES SOCIALES COMPACTAS.
     Siempre se mantienen 50/50.
    */

    html body #inicio .bh-social-extra {
        margin-top:9px !important;
        margin-bottom:0 !important;
    }

    html body #inicio .bh-social-eyebrow {
        margin-top:0 !important;
        margin-bottom:8px !important;
        font-size:clamp(15px,4vw,19px) !important;
        line-height:1.1 !important;
    }

    html body #inicio .bh-social-cards {
        grid-template-columns:
          repeat(2,minmax(0,1fr)) !important;
        gap:8px !important;
        margin-top:0 !important;
        margin-bottom:8px !important;
    }

    html body #inicio .bh-social-cards > * {
        min-height:0 !important;
        padding:8px 6px !important;
    }

    html body #inicio .bh-benefits {
        margin-top:8px !important;
        margin-bottom:0 !important;
        gap:5px 10px !important;
    }

    html body #inicio .bh-benefit {
        font-size:clamp(10px,2.7vw,12px) !important;
        line-height:1.3 !important;
    }

    /*
     FOTOGRAFIA DEL HERO.
     Se muestra completa, sin object-fit:cover.
    */

    html body #inicio.hero
    .bh-mobile-hero-photo {
        display:flex !important;
        align-items:center;
        justify-content:center;
        position:relative;
        width:100%;
        max-width:100%;
        height:clamp(145px,25dvh,230px);
        min-height:0;
        margin:5px auto 0;
        padding:0 10px;
        box-sizing:border-box;
        overflow:hidden;
        pointer-events:none;
        z-index:1;
    }

    html body #inicio.hero
    .bh-mobile-hero-photo img {
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        height:100% !important;
        object-fit:contain !important;
        object-position:center center !important;
        padding:0 !important;
        margin:0 auto !important;
        background:transparent;
    }
}

/*
 Pantallas cortas: menos espacios
 sin ocultar contenido.
*/

@media(max-width:760px) and (max-height:740px) {

    html body #inicio.hero > .wrap {
        padding-top:10px !important;
    }

    html body #inicio.hero h1 {
        font-size:clamp(23px,5.8vw,29px) !important;
        margin-bottom:7px !important;
    }

    html body #inicio.hero
    .hero-content > p {
        font-size:13px !important;
        line-height:1.35 !important;
        margin-bottom:8px !important;
    }

    html body #inicio .bh-social-extra {
        margin-top:5px !important;
    }

    html body #inicio.hero .bh-mobile-hero-photo {
        height:clamp(125px,21dvh,175px);
        margin-top:0;
    }
}

/*
 Móviles muy estrechos:
 mantener las columnas y evitar
 cortes horizontales.
*/

@media(max-width:370px) {

    html body #inicio.hero h1 {
        font-size:24px !important;
    }

    html body #inicio .bh-social-cards {
        gap:6px !important;
    }

    html body #inicio .bh-social-cards > * {
        padding:6px 4px !important;
    }

    html body #inicio.hero .bh-mobile-hero-photo {
        padding:0 5px;
    }
}


/* BH_MOBILE_HERO_02_START */

/* =========================================================
   MOBILE-HERO-02
   - Logo realmente centrado en movil
   - Hero ocupa el alto visible restante
   - Evita ver la siguiente seccion
   ========================================================= */

@media (max-width: 760px) {

    :root {
        --bh-mobile-topbar-h: 44px;
        --bh-mobile-header-h: 76px;
        --bh-mobile-hero-h: calc(100dvh - var(--bh-mobile-topbar-h) - var(--bh-mobile-header-h));
    }

    /* =====================================================
       HEADER MOVIL REALMENTE CENTRADO
       ===================================================== */

    html body header .wrap.header-inner {
        display: grid !important;
        grid-template-columns: 112px minmax(0, 1fr) 112px !important;
        align-items: center !important;
        min-height: 76px !important;
        padding: 6px 14px !important;
        column-gap: 0 !important;
    }

    html body header .wrap.header-inner > #mobile-menu-toggle {
        grid-column: 1 !important;
        justify-self: start !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }

    html body header .wrap.header-inner > a.official-brand {
        grid-column: 2 !important;
        justify-self: center !important;
        align-self: center !important;
        margin: 0 auto !important;
        width: auto !important;
        max-width: 148px !important;
        text-align: center !important;
    }

    html body header .wrap.header-inner > a.official-brand img {
        display: block !important;
        margin: 0 auto !important;
        max-width: 142px !important;
        max-height: 52px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    html body header .wrap.header-inner > .actions {
        grid-column: 3 !important;
        justify-self: end !important;
        align-self: center !important;
        width: 112px !important;
        display: flex !important;
        justify-content: flex-end !important;
        margin: 0 !important;
    }

    html body header .language-switch {
        margin: 0 !important;
    }

    html body header .language-switch > summary {
        min-height: 40px !important;
        height: 40px !important;
        padding: 7px 10px !important;
        border-radius: 12px !important;
        gap: 7px !important;
    }

    html body header .language-switch > summary .bh-globe {
        width: 20px !important;
        height: 20px !important;
    }

    html body header .language-switch > summary .bh-selected-flag {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 22px !important;
        height: 16px !important;
    }

    html body header .language-switch > summary .bh-selected-flag svg {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* =====================================================
       HERO A ALTURA COMPLETA DEL CELULAR
       ===================================================== */

    html body #inicio.hero {
        height: var(--bh-mobile-hero-h) !important;
        min-height: var(--bh-mobile-hero-h) !important;
        max-height: var(--bh-mobile-hero-h) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        background-image: none !important;
    }

    html body #inicio.hero > .wrap {
        flex: 0 0 auto !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 10px 16px 0 16px !important;
        align-items: start !important;
    }

    html body #inicio.hero .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ocultar cualquier visual lateral de escritorio */
    html body #inicio.hero .hero-visual,
    html body #inicio.hero .hero-media,
    html body #inicio.hero .hero-image,
    html body #inicio.hero .hero-figure,
    html body #inicio.hero .hero-art,
    html body #inicio.hero > .wrap > picture,
    html body #inicio.hero > .wrap > figure,
    html body #inicio.hero > .wrap > img,
    html body #inicio.hero > .wrap > div:not(.hero-content) {
        display: none !important;
    }

    html body #inicio.hero h1 {
        font-size: clamp(21px, 6.1vw, 29px) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.035em !important;
        margin: 0 0 8px 0 !important;
    }

    html body #inicio.hero .hero-content > p {
        font-size: clamp(13px, 3.7vw, 15px) !important;
        line-height: 1.42 !important;
        margin: 0 0 10px 0 !important;
    }

    html body #inicio.hero .ctas {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin: 0 0 10px 0 !important;
    }

    html body #inicio.hero .ctas > .btn {
        min-height: 39px !important;
        height: 39px !important;
        padding: 8px 8px !important;
        font-size: 12px !important;
        border-radius: 999px !important;
    }

    html body #inicio .bh-social-extra {
        margin: 0 !important;
    }

    html body #inicio .bh-social-eyebrow {
        margin: 0 0 8px 0 !important;
        font-size: 18px !important;
        line-height: 1.1 !important;
    }

    html body #inicio .bh-social-cards {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin: 0 0 7px 0 !important;
    }

    html body #inicio .bh-social-cards > * {
        min-height: 0 !important;
        padding: 7px 6px !important;
    }

    html body #inicio .bh-benefits {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 4px 8px !important;
        margin: 0 !important;
        align-items: center !important;
    }

    html body #inicio .bh-benefit {
        font-size: 10px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* =====================================================
       FOTO MOVIL DENTRO DEL HERO, SIN MOSTRAR SIGUIENTE SECCION
       ===================================================== */

    html body #inicio.hero .bh-mobile-hero-photo {
        display: flex !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 6px 0 0 0 !important;
        padding: 0 12px 10px 12px !important;
        align-items: flex-end !important;
        justify-content: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    html body #inicio.hero .bh-mobile-hero-photo img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center bottom !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: transparent !important;
    }
}

/* telefonos mas bajos */
@media (max-width: 760px) and (max-height: 760px) {

    :root {
        --bh-mobile-topbar-h: 42px;
        --bh-mobile-header-h: 72px;
    }

    html body #inicio.hero > .wrap {
        padding-top: 8px !important;
    }

    html body #inicio.hero h1 {
        font-size: clamp(20px, 5.9vw, 27px) !important;
        margin-bottom: 6px !important;
    }

    html body #inicio.hero .hero-content > p {
        font-size: 13px !important;
        line-height: 1.34 !important;
        margin-bottom: 8px !important;
    }

    html body #inicio.hero .ctas {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    html body #inicio.hero .ctas > .btn {
        min-height: 37px !important;
        height: 37px !important;
        font-size: 11px !important;
    }

    html body #inicio .bh-social-eyebrow {
        font-size: 17px !important;
        margin-bottom: 6px !important;
    }

    html body #inicio .bh-social-cards {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    html body #inicio .bh-social-cards > * {
        padding: 6px 5px !important;
    }

    html body #inicio .bh-benefit {
        font-size: 9px !important;
    }

    html body #inicio.hero .bh-mobile-hero-photo {
        margin-top: 4px !important;
        padding-bottom: 8px !important;
    }
}

/* telefonos muy estrechos */
@media (max-width: 380px) {
    html body header .wrap.header-inner {
        grid-template-columns: 104px minmax(0, 1fr) 104px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    html body header .wrap.header-inner > .actions {
        width: 104px !important;
    }

    html body header .wrap.header-inner > a.official-brand img {
        max-width: 132px !important;
        max-height: 48px !important;
    }

    html body #inicio.hero h1 {
        font-size: 20px !important;
    }
}

/* BH_MOBILE_HERO_02_END */
