/* ==========================================================================
   POPUP MODAL (AJAX)
   ========================================================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 47, 108, 0.75); /* Azul Nivea con opacidad */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

/* Cuando se activa mediante JS */
.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-box {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 15px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-box {
    transform: scale(1);
}

.popup-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #004593;
    margin: 0;
}

.popup-text.sent {
    color: #4bb543; /* Verde para el éxito */
}

/* Botón de cerrar interno */
.btn-popup-close {
    background-color: #e54773; /* Mismo rosa que usás en tu sitio */
    color: #ffffff;
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.btn-popup-close:hover {
    background-color: #c9355d;
}

.file-group {
    position: relative; /* Por si necesitas posicionarlo de forma absoluta */
}

.file-success-check {
    display: flex;
    align-items: center;
    color: #28a745; /* Verde éxito */
    font-weight: bold;
    font-size: 14px;
    margin-top: 5px;
    padding-left: 10px;
}

/* --- ANIMACIÓN SPINNER (ENVIANDO...) --- */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #cce9f7;
    border-top: 5px solid #004593;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ANIMACIÓN CHECK VERDE (ENVIADO!) --- */
.success-icon {
    width: 65px;
    height: 65px;
}

.success-circle {
    stroke: #4bb543;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke-anim 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
    stroke: #4bb543;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke-anim 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke-anim {
    100% { stroke-dashoffset: 0; }
}

.error-icon {
    font-size: 3rem;
}

:root {
    --blue-bg-left: #a2def6;
    --blue-bg-right: #cce9f7;
    --blue-dark-fields: #003e8a;
    --blue-text: #0a3a75;
    --pink-btn: #e54773;
    --white: #ffffff;
}

@font-face {
  font-family: NIVEABrandType; /* set name */
  src: url('fonts/NIVEABrandType-Regular.otf'); /* url of the font */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'NIVEABrandType' , 'Arial Rounded MT Bold', 'Helvetica', sans-serif; /* Tipografía de aspecto amigable/bold */
}

body, html {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
    overflow-x: hidden; /* Evita scrolls horizontales residuales en la ventana principal */
}

/* CONTENEDOR SPLIT DE LA PANTALLA */
.hero-section {
    background-image: url("form-bg.png") ;
    background-size: cover;
    background-position: center;
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* --- COLUMNA IZQUIERDA --- */
.hero-left {
    flex: 1.1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    min-width: 0; /* Permite flex shrinkage correcto */
}

.hero-left-icons{
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.brand-logo {
    width: 90px;
    height: auto;
}

.hero-content {
    margin-top: 50px;
    align-self: center;
    width: 100%;
    max-width: 550px;
}

.tagline {
    background-color: #004998;
    color: var(--white);
    padding: 6px 14px;
    font-size: 1.8rem;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
    width:100%;
    text-align: center;
}

.main-title {
    color: #0b377b;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 900;
    margin: 20px 0 15px 0;
}

.main-title span {
    color: #002c6c;
}

.prize-card {
    background: linear-gradient(0.25turn,#dd3b8dFF,#dd3b8dAA,#dd3b8dFF);
    color: var(--white);
    display: inline-flex;
    align-items: flex-start;
    padding: 10px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.prize-card .amount {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1;
}

.prize-card .asterisks {
    font-size: 1.8rem;
    margin-top: 5px;
    margin-left: 2px;
}

.products-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.products-img {
    max-width: 95%;
    height: auto;
    object-fit: contain;
}


/* --- COLUMNA DERECHA --- */
.hero-right {
    flex: 1.3;
    padding: 30px 50px 40px 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    position: relative;
    z-index: 2;
    min-width: 0; /* Permite flex shrinkage correcto */
}

.right-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    width: 100%;
    margin: 30px auto;
}

.badge-n1 {
    width: 90px;
    height: auto;
    margin-left: -40px; 
}

.main-nav {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: space-between;
}

.main-nav a {
    color: var(--blue-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    padding-right: 15px;
}

.main-nav a:last-child {
    border-right: none;
    padding-right: 0;
}


/* --- FORMULARIO GRID --- */
.form-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

.input-group {
    background-color: var(--blue-dark-fields);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 4px 15px;
    height: 80px;
}

.icon-box {
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-box img {
    max-width: 35px;
    max-height: 35px;
}

.input-group input,
.input-group select {
    flex: 1;
    background: var(--white);
    border: none;
    height: 44px;
    border-radius: 22px;
    padding: 0 20px;
    font-size: 0.95rem;
    color: #333;
    font-weight: bold;
}

.input-group input::placeholder {
    color: #a0a0a0;
    font-weight: normal;
}

.input-group input:focus {
    outline: none;
}

.file-label {
    flex: 1;
    color: var(--white);
    font-size: 0.85rem;
    padding-left: 15px;
    cursor: pointer;
    line-height: 1.2;
}

.file-label strong {
    font-size: 0.95rem;
}

#ticket-upload {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
    color: var(--blue-text);
    font-size: 0.9rem;
    font-weight: bold;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.submit-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-submit {
    background-color: var(--pink-btn);
    color: var(--white);
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 12px 60px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: background-color 0.2s, transform 0.1s;
}

.btn-submit:hover {
    background-color: #d43662;
    transform: translateY(-1px);
}

/* ==========================================================================
   SECCIÓN CÓMO PARTICIPAR
   ========================================================================== */

.steps-section {
    background-color: #004593; 
    color: #ffffff;
    padding: 60px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.steps-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.steps-left {
    flex: 1;
    max-width: 550px;
}

.steps-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.steps-title::after {
    content: "";
    display: block;
    width: 100px;
    height: 4px;
    background-color: #ffffff;
    margin-bottom: 35px;
    margin-top: 15px;
    border-radius: 2px;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.steps-list li {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step-number {
    background-color: #59a6db; 
    color: #ffffff;
    font-weight: 700;
    font-size: 1.4rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.step-text {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

.step-text strong {
    font-weight: 700;
}

.steps-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 450px; 
    margin-top:30px;
}

.visual-assets-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
}

.visual-assets-wrapper img {
    position: absolute;
    height: auto;
    object-fit: contain;
}

.asset-botella-como-participar {
    max-height: 430px;
    z-index: 1;
}

.badge-all-products {
    background-color: #ec407a; 
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    padding: 12px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 20px;
    max-width: 340px;
    width: 100%;
}

/* ==========================================================================
   SECCIÓN PREGUNTAS FRECUENTES
   ========================================================================== */

.faq-section {
    background-color: #ffffff; 
    color: #004593; 
    padding: 60px 40px;
    display: flex;
    justify-content: center;
}

.faq-container {
    max-width: 1100px;
    width: 100%;
}

.faq-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: 0.5px;
}

.faq-divider {
    width: 100px;
    height: 4px;
    background-color: #004593;
    margin-bottom: 40px;
    border-radius: 2px;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.faq-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.faq-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-question {
    background-color: #aed1f2; 
    color: #004593;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 2px; 
    line-height: 1.3;
}

.faq-answer {
    color: #004593;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    padding-left: 15px; 
}

/* ==========================================================================
   SECCIÓN BASES Y CONDICIONES
   ========================================================================== */

.terms-section {
    background-color: #51a2dc; 
    color: #ffffff;
    padding: 60px 40px;
    display: flex;
    justify-content: center;
}

.terms-container {
    max-width: 1100px;
    width: 100%;
}

.terms-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: 0.5px;
}

.terms-divider {
    width: 100px;
    height: 4px;
    background-color: #ffffff;
    margin-bottom: 40px;
    border-radius: 2px;
}

.terms-scroll-box {
    background-color: #ffffff;
    color: #004593; 
    padding: 30px;
    border-radius: 4px;
    max-height: 400px; 
    overflow-y: scroll; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.terms-scroll-box h3 {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.terms-scroll-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: justify;
}

.terms-scroll-box::-webkit-scrollbar {
    width: 10px;
}
.terms-scroll-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.terms-scroll-box::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.terms-scroll-box::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* ==========================================================================
   FOOTER INSTITUCIONAL
   ========================================================================== */

.main-footer {
    background-color: #002f6c; 
    color: #ffffff;
    padding: 30px 40px;
    display: flex;
    justify-content: center;
}

.footer-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-brand-logo {
    height: 60px; 
    width: auto;
}

.footer-badge-n1 {
    height: 70px; 
    width: auto;
}

.footer-legal-text {
    flex: 1;
    text-align: center;
    max-width: 750px;
}

.footer-legal-text p {
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 4px 0;
    opacity: 0.9;
}


/* ==========================================================================
   NUEVO: RESPONSIVE LAPTOPS Y PANTALLAS MEDIANAS (1025px a 1440px)
   ========================================================================== */

@media screen and (max-width: 1440px) {
    .hero-left {
        padding: 30px 25px;
        flex: 1;
    }

    .hero-right {
        padding: 30px 30px 40px 40px;
        flex: 1.2;
    }

    .main-title {
        font-size: 2.6rem;
    }

    .tagline {
        font-size: 1.4rem;
    }

    .prize-card {
        padding: 8px 20px;
    }

    .prize-card .amount {
        font-size: 3.2rem;
    }

    .input-group {
        height: 70px;
        padding: 4px 10px;
    }

    .icon-box {
        width: 45px;
    }

    .icon-box img {
        max-width: 28px;
        max-height: 28px;
    }

    .input-group input,
    .input-group select {
        height: 38px;
        font-size: 0.9rem;
        padding: 0 12px;
    }

    .file-label {
        font-size: 0.8rem;
        padding-left: 8px;
    }

    .file-label strong {
        font-size: 0.85rem;
    }

    .badge-n1 {
        width: 90px;
        margin-left: -20px;
    }

    .main-nav a {
        font-size: 1rem;
    }
}


/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES TABLETS)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-section {
        padding: 0;
        gap: 0;
    }

    .products-img {
        max-width: 100%; 
        position: relative;
        left: 0;
        bottom: 0;
    }
}


/* ==========================================================================
   ESTILOS RESPONSIVE DEFINITIVOS PARA MÓVILES (WIDTH <= 768px)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* El contenedor principal pasa de horizontal (split) a vertical */
    .hero-section {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 !important;
        background-position: center;
    }

    /* Columnas ocupan el 100% del ancho real sin solaparse */
    .hero-left, .hero-right {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-left {
        padding: 40px 20px 20px 20px !important;
        align-items: center;
        text-align: center;
    }

    /* OCULTAR COMPLETAMENTE LA NAVEGACIÓN EN MOBILE */
    .main-nav {
        display: none !important;
    }

    /* Ajustes de logos superiores */
    .hero-left-icons {
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        width: 100%;
    }

    .brand-logo {
        width: 75px !important;
    }

    .badge-n1 {
        width: 90px !important;
        margin-left: 0 !important; /* Elimina margen negativo del desktop */
    }

    /* Contenidos y textos fluidos */
    .hero-content {
        margin-top: 20px !important;
        text-align: center;
        width: 100%;
        align-items: center;
    }

    .tagline {
        font-size: 1.2rem !important;
        width: 100%;
    }

    .main-title {
        font-size: 2.3rem !important;
        text-align: center;
        margin: 15px 0 !important;
        line-height: 1.2;
    }

    .prize-card {
        width: 100%;
        max-width: 340px;
        justify-content: center;
        padding: 10px 20px !important;
        margin: 10px auto !important;
    }

    .prize-card .amount {
        font-size: 2.8rem !important;
    }

    /* RESETEO CRÍTICO DE LA IMAGEN DE PRODUCTOS: Deja de flotar de forma absoluta */
    .products-container {
        position: relative !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 25px 0 10px 0 !important;
    }

    .products-img {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        max-width: 80% !important;
        height: auto !important;
        transform: none !important;
    }

    /* Contenedor del Formulario */
    .hero-right {
        padding: 30px 20px 40px 20px !important; /* Limpia el padding exagerado izquierdo */
        justify-content: center !important;
        margin-top: 0;
    }

    .right-header {
        margin: 10px auto 20px auto !important;
        text-align: center;
        justify-content: center;
    }

    .form-wrapper {
        width: 100% !important;
        margin-top: 10px !important;
    }

    /* FORZAR LA GRILLA DEL FORMULARIO A 1 COLUMNA */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        width: 100% !important;
    }

    /* Inputs fluidos y accesibles para dedos */
    .input-group {
        width: 100% !important;
        height: 70px !important; /* Altura más compacta y balanceada */
        padding: 4px 12px !important;
    }

    .icon-box {
        width: 45px !important;
    }

    .icon-box img {
        max-width: 28px !important;
        max-height: 28px !important;
    }

    .input-group input,
    .input-group select {
        font-size: 0.95rem !important;
        height: 42px !important;
        padding: 0 15px !important;
    }

    .terms-checkbox {
        font-size: 0.85rem !important;
        margin: 20px 0 !important;
        padding: 0 5px;
    }

    .btn-submit {
        width: 100% !important;
        padding: 14px !important;
        font-size: 1.2rem !important;
        border-radius: 25px !important;
    }

    /* Adaptación de Secciones Secundarias */
    .steps-container {
        flex-direction: column !important;
        padding: 10px !important;
        gap: 30px;
    }

    .steps-section {
        padding: 40px 20px !important;
    }

    .steps-title {
        font-size: 1.8rem !important;
        text-align: center;
    }
    
    .steps-title::after {
        margin: 15px auto 25px auto !important;
    }

    .steps-right {
        min-height: auto !important;
        margin-top: 10px;
    }

    .asset-botella-como-participar {
        max-width: 160px !important;
    }

    .faq-section {
        padding: 40px 20px !important;
    }

    .faq-title {
        font-size: 1.8rem !important;
    }

    .faq-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .terms-section {
        padding: 40px 20px !important;
    }
    
    .terms-title {
        font-size: 1.8rem !important;
    }

    .terms-scroll-box {
        padding: 15px !important;
    }

    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 25px !important;
    }

    .footer-legal-text {
        order: 3; 
    }
}

/* Ajuste extremo para pantallas diminutas (menores a 400px) */
@media (max-width: 400px) {
    .main-title {
        font-size: 1.9rem !important;
    }

    .prize-card .amount {
        font-size: 2.3rem !important;
    }

    .input-group {
        height: 65px !important;
    }
}