/* ==========================================================================
   mobile-fixes.css
   Ajustes de responsive para teléfonos y tablets.
   Se carga al final: sólo sobreescribe dentro de media queries,
   el diseño de escritorio no se toca.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base: sin scroll horizontal y palabras largas que no rompan el layout
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    html,
    body {
        overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6, p, li, a, label {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* El header es fijo: que los anclas (#categorias, #premios...) no queden debajo */
    section[id] {
        scroll-margin-top: 80px;
    }
}

html {
    scroll-behavior: smooth;
}


/* --------------------------------------------------------------------------
   2. Header: logo y botón de menú en una sola fila (antes ocupaba ~165px)
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    header.style-2 {
        margin-top: 76px;   /* debe coincidir con la altura real de la barra fija */
    }

    .menu-fixed {
        min-height: 0;
    }

    .menu-fixed .navbar {
        padding-top: 0;
        padding-bottom: 0;
    }

    .menu-fixed .navbar > .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-brand {
        padding: 8px 0;
        margin: 0;
        flex: 0 1 auto;
        max-width: calc(100% - 64px);
    }

    .navbar-brand img {
        max-height: 60px;
        width: auto;
        max-width: 100%;
    }

    button.navbar-toggler {
        flex: 0 0 auto;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        color: #1e2345;
    }

    .navbar-collapse {
        flex-basis: 100%;
    }

    .menu-left ul li a {
        padding: 14px 4px;          /* área táctil más cómoda */
        font-size: 17px;
        border-bottom: 1px solid #dcdcdc;
    }

    .menu-left ul li:last-child a {
        border-bottom: none;
    }
}

@media only screen and (max-width: 400px) {
    header.style-2 {
        margin-top: 68px;
    }

    .navbar-brand img {
        max-height: 52px;
    }
}


/* --------------------------------------------------------------------------
   3. Banner: quitar las franjas decorativas sueltas y el espacio muerto
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    /* Las dos barras de color (azul y blanca) son decoración pensada para el
       layout de escritorio; en móvil aparecían como franjas sueltas. */
    .banner .content-left:before,
    .banner .content-right:before {
        display: none;
    }

    /* Capa oscura para que el texto blanco se lea sobre la foto */
    .banner .banner-overlay {
        background-color: rgba(10, 14, 40, .55);
    }

    .banner-content {
        padding: 40px 0 50px;
    }

    .banner .content-left {
        padding: 0 15px;
    }

    .banner .content-right {
        padding: 0 15px;
    }

    .banner .content-right > .content {
        padding: 10px 0 0;
    }

    /* El bloque tenía padding-bottom: 140px puesto en línea */
    .banner .content-right > .content[style] {
        padding-bottom: 0 !important;
    }

    .banner .content-left span {
        font-size: 130px;
        line-height: 1;
    }

    .banner .content-left p {
        font-size: 26px;
        line-height: 1.2;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .banner .content-right h2 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 18px;
    }

    .banner .content-right ul {
        margin-bottom: 25px;
    }

    .banner .content-right ul li {
        display: block;
        margin: 0 0 8px;
        font-size: 16px;
        line-height: 1.4;
    }

    /* Cuenta regresiva: rejilla flexible en vez de floats */
    .banner .content-right ul.countdown {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 0;
        margin-bottom: 0;
    }

    .banner .content-right .clock-item {
        float: none;
        display: block;
        margin: 0;
        flex: 1 1 0;
        min-width: 0;
        max-width: 84px;
    }

    .banner .content-right .clock-item span {
        height: 64px;
        width: 64px;
        font-size: 20px;
        line-height: 64px;
        margin-bottom: 8px;
    }

    .banner .content-right .clock-item p {
        font-size: 11px;
        letter-spacing: .5px;
    }
}

@media only screen and (max-width: 400px) {

    .banner .content-left span {
        font-size: 100px;
    }

    .banner .content-left p {
        font-size: 22px;
    }

    .banner .content-right h2 {
        font-size: 24px;
    }

    .banner .content-right ul.countdown {
        gap: 8px;
    }

    .banner .content-right .clock-item span {
        height: 56px;
        width: 56px;
        font-size: 18px;
        line-height: 56px;
    }
}


/* --------------------------------------------------------------------------
   4. Títulos de sección: eran de 48px fijos y desbordaban la pantalla
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    .section-header h1,
    .section-header h2,
    .section-header h3 {
        font-size: 34px;
        line-height: 1.15;
    }

    .section-header p em {
        font-size: 18px !important;
        line-height: 1.4;
    }

    .contact .contact-form h2 {
        font-size: 26px;
        line-height: 1.2;
    }
}

@media only screen and (max-width: 480px) {

    .section-header h1,
    .section-header h2,
    .section-header h3 {
        font-size: 27px;
    }

    /* El h1 de PREMIOS trae font-size en línea */
    .section-header h1[style] {
        font-size: 30px !important;
    }

    .section-header p em {
        font-size: 16px !important;
    }

    .contact .contact-form h2 {
        font-size: 22px;
    }
}


/* --------------------------------------------------------------------------
   5. Secciones: menos padding vertical en móvil
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 767px) {

    .padding-120 {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .pricing .overlay {
        padding-top: 55px;
        padding-bottom: 55px;
    }
}


/* --------------------------------------------------------------------------
   6. Categorías: separación entre los cuatro bloques
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    #categorias .pricing-items .row > div {
        margin-bottom: 35px;
    }

    #categorias .pricing-items .row > div:last-child {
        margin-bottom: 0;
    }

    #categorias .pricing-items i {
        font-size: 46px !important;
    }

    #categorias .pricing-items h6 {
        padding-top: 14px !important;
        font-size: 16px;
        line-height: 1.35;
        margin-bottom: 0;
    }
}


/* --------------------------------------------------------------------------
   7. Premios: tarjetas más compactas y legibles
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    .pricing .pricing-item {
        margin-bottom: 25px;
    }

    .pricing .pricing-item .pricing-header {
        padding: 22px 18px;
    }

    .pricing .pricing-item .pricing-header .name {
        font-size: 24px !important;
        line-height: 1.2;
    }

    .pricing .pricing-item .pricing-options {
        padding: 18px;
    }

    .pricing .pricing-item .pricing-options p {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 0;
        line-height: 1.45;
    }

    .pricing .pricing-item .pricing-options p span {
        flex: 0 0 auto;
        margin-top: 3px;
    }

    /* Segundo lugar: el título iba en blanco sobre gris claro (ilegible) */
    .pricing .pricing-item[style*="#D7D7D7"] .pricing-header .name {
        color: #4a4a4a;
    }

    /* Fila "ESCUELAS GANADORAS": las columnas vacías generaban huecos */
    #premios .pricing-items .row > div:empty {
        display: none;
    }
}


/* --------------------------------------------------------------------------
   8. Formulario
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    /* 16px evita que iOS haga zoom al enfocar un campo */
    .contact .contact-form .contact-input {
        font-size: 16px;
        padding: 13px 15px;
        margin-bottom: 18px;
        border: 1px solid #d8d8d8;
        border-radius: 4px;
        min-height: 48px;
    }

    .contact .contact-form select.contact-input {
        -webkit-appearance: none;
        appearance: none;
        background-position: right 12px center;
    }

    .contact .contact-form .contact-submit {
        display: block;
        width: 100%;
        border: none;
        border-radius: 4px;
        padding: 16px 20px;
        font-size: 16px;
        margin-top: 10px !important;
    }

    /* Sí / No: separados y con área táctil usable */
    .contact .contact-form input[type="radio"] {
        width: 20px;
        height: 20px;
        margin: 0 8px 0 0;
        vertical-align: middle;
    }

    .contact .contact-form input[type="radio"] + label {
        display: inline-block;
        margin: 0 22px 0 0;
        padding: 8px 0;
        font-size: 16px;
        vertical-align: middle;
        cursor: pointer;
    }

    .contact .contact-form input[type="radio"] ~ p,
    .contact .contact-form p {
        line-height: 1.4;
    }

    /* reCAPTCHA centrado y que nunca desborde */
    .g-recaptcha {
        display: flex;
        justify-content: center;
    }

    .contact .contact-form .alert {
        width: 100%;
        text-align: left;
        line-height: 1.45;
    }
}

/* reCAPTCHA: en pantallas muy angostas se escala para que quepa */
@media only screen and (max-width: 350px) {

    .g-recaptcha > div {
        transform: scale(.88);
        transform-origin: 50% 0;
    }
}


/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {

    footer .overlay {
        padding: 45px 0;
    }

    /* El logo tenía width: 10% en línea: en móvil quedaba de ~39px */
    footer img[style] {
        width: auto !important;
        max-width: 110px;
        height: auto;
    }

    footer .event-social li a {
        width: 44px;
        height: 44px;
        line-height: 44px;
    }

    footer p {
        font-size: 14px;
        line-height: 1.6;
    }
}
