/* =============================================================
   CSS BASE - ES26ConcursoTicketsHS
   Promo: Concurso Sube tu Ticket H&S + Challenge STRAVA

   DISEÑO:
   - Zona logo H&S: fondo AZUL H&S
   - Logo H&S: BLANCO
   - Navegación: fondo BLANCO + texto NEGRO
   - Header promocional: imagen a ancho completo + texto GANA/subtitulo
     flotando a la derecha (NO va horneado en la imagen)
   - Footer promocional: imagen a ancho completo (STRAVA + QR horneados)
   ============================================================= */


/* =============================================================
   VARIABLES
   ============================================================= */

:root {
    --main-background-color: #003DA6; /* Azul H&S */
    --main-link-color: #ffffff;
    --main-nav-link-color: #000000;
    --main-nav-background-color: #ffffff;
    --base-font-size: 50px;
    --color-strava: #FC5200; /* Naranja STRAVA */
}


/* =============================================================
   FONDO DE PAGINA
   ============================================================= */

html {
    background-color: var(--main-background-color);
}


/* =============================================================
   IMAGENES
   ============================================================= */

img {
    max-width: 100%;
    height: auto;
}


/* =============================================================
   FUENTES PERSONALIZADAS - Gilroy
   ============================================================= */

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy/Gilroy-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy/Gilroy-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy/Gilroy-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}


/* =============================================================
   NAVEGACION
   ============================================================= */

#lnkHome {
    color: var(--main-nav-link-color);
}

#myTopnav {
    background-color: var(--main-nav-background-color) !important;
}

#hlSkipToMain {
    background-color: var(--main-nav-background-color);
    color: var(--main-nav-link-color);
}

    #hlSkipToMain:focus {
        outline: 3px solid var(--main-nav-link-color);
        outline-offset: 4px;
    }

.skip-to-main-content-link {
    display: inline-block;
    padding: 0.5em 1em;
    line-height: normal;
    white-space: normal;
    overflow: visible;
    box-sizing: border-box;
    top: 0px;
}

.link-menu-item {
    color: var(--main-nav-link-color) !important;
    font-family: 'Gilroy', sans-serif;
}

.navbar-default .navbar-toggle {
    border-color: var(--main-nav-link-color);
}


/* =============================================================
   LOGO H&S
   -------------------------------------------------------------
   Fondo: AZUL H&S
   Logo: BLANCO
   ============================================================= */

.header-logo-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #003DA6 !important;
    display: block !important;
    text-align: center;
}


/* =============================================================
   LOGO H&S - CONVERTIR A BLANCO
   -------------------------------------------------------------
   El PNG original contiene el logo en azul.
   Este filtro convierte el logo a blanco.
   ============================================================= */

#promotionLogoH1_Bis {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 40px auto 0 auto !important;
    /*
     * Convierte el azul del logo a blanco.
     * La transparencia del PNG se mantiene.
     */
    filter: brightness(0) invert(1) !important;
}


/* =============================================================
   TITULO / LOGO
   ============================================================= */

#promotionLogoH1 {
    color: var(--main-link-color);
    font-family: 'Gilroy', sans-serif;
    font-size: 18px;
}


/* =============================================================
   HEADER
   -------------------------------------------------------------
   El header que contiene el logo es azul.
   ============================================================= */

header {
    background-color: #003DA6 !important;
}

.texto-index-legal {
    font-size: 16px;
    color: #000000;
    font-family: 'Gilroy', sans-serif;
    display: block;
    margin-bottom: 20px;
    line-height: 22px;
}
/* =============================================================
   HOME - IMAGEN HERO A ANCHO COMPLETO
   ============================================================= */

.home-floating-container {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
}

    .home-floating-container img {
        display: block;
        width: 100%;
        height: auto;
    }

.home-floating-text {
    position: absolute;
    top: 50%;
   width: 100%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    color: #ffffff !important;
    font-family: 'Gilroy', sans-serif !important;
    text-align: center;
    line-height: 1.2;
    font-weight: 900;
}

/* El div que envuelve AltTextImageHome (id fijo puesto por el propio sitio)
   tiene tambien la clase .home-floating-text (position:absolute). Al tener
   dentro un <span class="text-box-home-floating-text"> (tambien absolute),
   este div se queda con altura 0 y un ancho que no es el de la imagen,
   y se convierte en el contenedor de referencia equivocado para ese span.
   Lo neutralizamos por su ID para que el span de dentro se posicione
   correctamente contra .home-floating-container (la imagen real). */
#IdHomeFloatingText.home-floating-text {
    position: static;
    width: auto;
    height: auto;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
}

.home-floating-text--small {
    display: block;
    font-size: 0.6em;
    color: #ffffff;
    font-weight: normal;
}

.home-floating-text--large {
    font-size: 22px;
    color: #ffffff;
}

.home-floating-text--extralarge {
    display: block;
    font-size: 60px;
    color: #ffffff;
}



/* =============================================================
   HEADER PROMOCIONAL
   -------------------------------------------------------------
   Imagen a ancho completo. El logo H&S SI va horneado en la
   imagen (lado izquierdo), pero "GANA" + subtitulo + legal NO:
   se colocan con .header-floating-text flotando a la derecha,
   sobre el area azul vacia de la imagen.
   ============================================================= */

.header-floating-container {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
}

    .header-floating-container img {
        display: block;
        width: 100%;
        height: auto;
    }

.header-floating-text {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    box-sizing: border-box;
    color: #ffffff !important;
    font-family: 'Gilroy', sans-serif !important;
    text-align: center;
    font-size: 38px;
    font-weight: 900;
    line-height: 0.6em;
}

/* Variantes de tamaño para usar dentro del texto flotante
   (ej: <span class="header-floating-text--extralarge">GANA</span>) */
.header-floating-text--extralarge {
    display: block;
    font-size: 3em;
    font-weight: 900;
    padding-bottom: 20px;
}

.header-floating-text--large {
    display: block;
    font-size: 0.7em;
    font-weight: 700;
    margin-top: 8px;
}

.header-floating-text--small {
    display: block;
    font-size: 0.28em;
    font-weight: 400;
    margin-top: 40px;
    opacity: 0.85;
    line-height: 1.3em;
    padding-bottom: 10px;
}


/*======================================================
  HOME
 =======================================================*/

/* Caja que SI se posiciona (va dentro del contenido de AltTextImageHome,
   ej: <span class="text-box-home-floating-text">...</span>). Sube (o baja)
   el "top" para ajustar la altura a la que aparece dentro de la imagen. */
.text-box-home-floating-text {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    color: #ffffff;
    font-family: 'Gilroy', sans-serif;
   
}

/* =============================================================
   FOOTER PROMOCIONAL
   -------------------------------------------------------------
   Imagen a ancho completo.
   Texto + QR horneados dentro de la imagen.
   ============================================================= */

.footer-floating-container {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
    font-size: 30px; /* base para el 0.7em del texto flotante */
}

    .footer-floating-container img {
        display: block;
        width: 100%;
        height: auto;
    }


/* =============================================================
   FOOTER - ENLACES LEGALES
   ============================================================= */

.link-footer {
    text-decoration: underline;
}

    .link-footer,
    .link-footer:hover,
    .link-footer:focus {
        color: var(--main-link-color);
    }

        .link-footer:hover,
        .link-footer:focus {
            outline: 3px solid var(--main-link-color);
            outline-offset: 3px;
            border-radius: 3px;
        }

.texto-footer-letrapeq {
    color: var(--main-link-color);
}


/* =============================================================
   FORMULARIO / SURVEY
   ============================================================= */

.survey tbody tr td input {
    margin-top: -4px;
}


/* =============================================================
   FOOTER PROMOCIONAL - TEXTO FLOTANTE
   -------------------------------------------------------------
   Texto blanco arriba, centrado, casi a todo el ancho del
   banner -a modo de titular- sobre STRAVA + QR (que SI van
   horneados en la imagen, debajo). Controlado por
   AltTextImageFooter (BBDD).
   ============================================================= */

.footer-floating-text {
    color: #ffffff !important;
    font-family: 'Gilroy', sans-serif !important;
}

/* Caja que SI se posiciona (va dentro del contenido de
   AltTextImageFooter, ej:
   <span class="text-box-footer-floating-text">
     <span class="footer-floating-text--large">...</span>
   </span> ) */
.text-box-footer-floating-text {
    position: absolute;
    top: 4%;
    left: 6%;
    width: 62%;
    box-sizing: border-box;
    color: #ffffff;
    font-family: 'Gilroy', sans-serif;
    text-align: center;
    line-height: 1.15;
    font-size: 0.7em;
    white-space: nowrap;
    /* Fondo semitransparente: sube el contraste texto/fondo a ~7.3:1
       (AAA) independientemente del tamaño de letra en cada breakpoint. */
    background-color: rgba(0, 0, 0, 0.35);
    padding: 8px 14px;
    border-radius: 10px;
    z-index: 2;
}

.footer-floating-text--large {
    /*  display: block;*/
    font-size: 1.7em;
    font-weight: 700;
    color: #ffffff !important;
}


/* =============================================================
   RESPONSIVE
   -------------------------------------------------------------
   Puntos de corte SINCRONIZADOS con el cambio de imagen
   desktop/tablet/mobile de dasmcore/styles.css:
     - Desktop: por defecto (>700px)
     - Tablet:  max-width 700px
     - Mobile:  max-width 500px
   El header y el home usan layout logo+texto lado a lado en
   desktop/tablet, y apilado (logo arriba, texto abajo) en mobile.
   ============================================================= */

/* ---------- TABLET (<=700px) ---------- */
@media screen and (max-width: 700px) {

    .text-box-home-floating-text {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        color: #ffffff;
        font-family: 'Gilroy', sans-serif;
    }

    .home-floating-text {
        position: absolute;
        top: 50%;
        width: 100%;
        transform: translate(-50%, -50%);
        box-sizing: border-box;
        color: #ffffff !important;
        font-family: 'Gilroy', sans-serif !important;
        text-align: center;
        line-height: 1.2;
        font-weight: 900;
    }


    .footer-floating-text--large {
        /*  display: block;*/
        font-size: 1.2em;
        font-weight: 700;
        color: #ffffff !important;
    }

    #promotionLogoH1 {
        color: var(--main-link-color);
        font-family: 'Gilroy', sans-serif;
        font-size: 16px;
    }

    #promotionLogoH1_Bis {
        margin: 20px auto 0 auto !important;
    }

    /* Header: mismo layout lado a lado, banner mas pequeño */
    .header-floating-text {
        right: 4%;
        width: 48%;
        font-size: 26px;
    }

    .header-floating-text--extralarge {
        display: block;
        font-size: 2em;
        font-weight: 900;
        padding-bottom: 20px;
    }

   

    .home-floating-text--small {
        font-size: 0.28em;
    }

    .home-floating-text--large {
        font-size: 16px;
    }

    .home-floating-text--extralarge {
        font-size: 40px;
    }

    /* Footer: mismo titular centrado sobre STRAVA, banner mas pequeño.
       font-size subido (27px -> 0.7em=~19px) para no bajar del umbral
       de "texto grande" de accesibilidad (WCAG AA). */
    .footer-floating-container {
        font-size: 27px;
    }

    .text-box-footer-floating-text {
        top: 2%;
        left: 4%;
        width: 44%;
        font-size: 0.6em;
        line-height: 0.95;
        padding: 0;
        background-color: transparent;
    }
}

/* ---------- MOBILE (<=500px) ---------- */
@media screen and (max-width: 500px) {

    /* Header: logo arriba, texto flotante centrado debajo
       (la imagen headermobile.jpg apila el logo en la mitad
       superior, dejando el area de texto en la inferior) */

    .text-box-home-floating-text {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        color: #ffffff;
        font-family: 'Gilroy', sans-serif;
    }

    .header-floating-text--large {
        display: block;
        font-size: 0.4em;
        font-weight: 700;
        margin-top: 8px;
    }

    .home-floating-text--large br {
        line-height: 0;
    }

    #promotionLogoH1 {
        color: var(--main-link-color);
        font-family: 'Gilroy', sans-serif;
        font-size: 14px;
    }

    .header-floating-text {
        top: 30%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        box-sizing: border-box;
        padding: 0 5%;
        text-align: left;
        /*font-size: 16px;*/
    }

    /* Home: mismo criterio que el header */
    .home-floating-text {
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 45%;
        box-sizing: border-box;
        color: #ffffff !important;
        font-family: 'Gilroy', sans-serif !important;
        text-align: center;
        line-height: 1.2;
        font-size: 38px;
        font-weight: 900;
    }

    .home-floating-text--small {
        font-size: 10px;
    }

    .home-floating-text--large {
        font-size: 12px;
        
    }

    .home-floating-text--extralarge {
        font-size: 26px;
    }

    .header-floating-text--extralarge {
        display: block;
        font-size: 1.5em;
        font-weight: 900;
        padding-bottom: 20px;
    }


    .footer-floating-text--large {
        display: block;
        font-size: 0.3em;
        font-weight: 900;
    }

    /* Footer: titular centrado sobre STRAVA, banner mas estrecho.
       font-size subido (24px -> 0.7em=~17px) y caja un poco mas ancha
       para que el texto siga siendo legible en pantallas pequeñas. */
    .footer-floating-container {
        font-size: 24px;
    }

    .text-box-footer-floating-text {
        top: 35%;
        left: 50%;
        width: 60%;
        transform: translateX(-50%);
        padding: 0;
        background-color: transparent;
        white-space: normal;
        font-size: 26px;
        text-align: left;
        padding-left: 20px;
    }
}

.texto-index-legal {
    font-size: 14px;
    color: #000000;
    font-family: 'Gilroy', sans-serif;
    display: block;
    margin-bottom: 20px;
    line-height: 22px;
}

/* =============================================================
   FIN CSS
   ============================================================= */
