/* =========================================================================
   1. VARIABLES Y RESET GENERAL
   ========================================================================= */

/* Variables de color de la marca */
:root {
    --bg-color: #ffffff;      /* Blanco para el fondo de la tarjeta */
    --sidebar-bg: #0ea5e9;    /* Celeste para el menú lateral */
    --text-main: #334155;     /* Texto principal gris oscuro */
    --text-highlight: #0f172a;/* Texto resaltado/titulos oscuros */
    --accent-color: #0284c7;  /* Azul más oscuro para botones/activos */
    --accent-hover: #0369a1;  /* Azul oscuro para hover de botones */
    --hero-background-image: url('Imagenes/coliseo.jpg'); /* Imagen de fondo principal */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth; 
}

body {
    background-color: #f0f4f8; 
    color: var(--text-main);
}

/* =========================================================================
   2. TIPOGRAFÍA Y TEXTOS GLOBALES
   ========================================================================= */
h1 {
    color: var(--text-highlight);
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--text-highlight);
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
}

h3 {
    color: var(--text-highlight);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

p, li {
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* =========================================================================
   3. IMÁGENES Y MULTIMEDIA GLOBALES
   ========================================================================= */
.section-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cover-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.vertical-img {
    width: 350px;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.mobile-video {
    width: 320px;
    aspect-ratio: 9 / 16; 
    object-fit: cover; 
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    background-color: #000; 
}

/* =========================================================================
   4. ESTRUCTURA Y CONTENEDORES PRINCIPALES
   ========================================================================= */
.page-card {
    display: block; /* Se elimina el grid de la tarjeta antigua */
    width: 94%; 
    margin: 8rem auto 3rem auto; 
    max-width: 1400px;
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); 
    border: 1px solid rgba(0, 0, 0, 0.1); 
}

main {
    padding: 3rem 5rem;
}

section {
    min-height: 80vh; 
    padding-top: 2rem;
    margin-bottom: 4rem;
}

/* =========================================================================
   5. COMPONENTES GLOBALES (Navegación, Botones, Formularios)
   ========================================================================= */
/* -- Menú de Navegación Flotante -- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--sidebar-bg);
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 0.5rem 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav ul li {
    border-bottom: none;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff; 
    font-weight: bold;
    font-size: 0.9rem; 
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav ul li a:hover, 
nav ul li a.activo {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-3px); 
}

/* -- Botones Base y Controles de Formulario -- */
input, textarea, select {
    padding: 0.8rem;
    width: 100%;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    padding: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.submit-btn {
    margin-top: 1rem;
}

/* =========================================================================
   6. SECCIONES ESPECÍFICAS
   ========================================================================= */

/* --- 6.1 INICIO (HERO) --- */
#inicio {
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 70vh;
    padding: 5rem; 
    border-radius: 20px 20px 0 0; 
    margin-bottom: 0; 
    background-image: var(--hero-background-image);
    background-size: cover;
    background-position: center;
}

#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45); 
    border-radius: 20px 20px 0 0;
    z-index: 1;
}

/* Textos del Hero */
#inicio h1, #inicio h3 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
}

.hero-title-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.hero-title-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.hero-title-container h1 {
    margin-bottom: 0; 
    line-height: 1; 
    font-size: 6rem; 
}

.title-line-1, .title-line-2 {
    display: block; 
    text-align: left; 
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 2; 
}

.hero-content h3 {
    margin-top: 4rem; 
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.store-badge {
    height: 55px; 
    width: auto; 
    border-radius: 8px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-badge:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); 
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
    min-height: 350px;
    z-index: 2; 
    overflow: hidden; /* Evita que el logo rebote fuera del área visual */
}

/* -- Logo Rebotador -- */
.bouncing-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    /* La transición se aplica cuando JS añade la clase, para evitar lag durante el rebote */
}

.bouncing-logo.caught {
    transition: left 0.5s ease-in-out, top 0.5s ease-in-out, transform 0.5s ease-in-out !important;
    transform: translateX(-50%) scale(1.5); /* Se agranda un poquito al atraparlo para destacar */
}

/* --- 6.2 INFORMACIÓN (PROPÓSITO) --- */
.proposito-container {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: space-between;
}

.proposito-text {
    flex: 1;
}

.proposito-text p {
    font-size: 1.25rem;
    text-align: center;
}

.proposito-text h3 {
    font-size: 1.6rem; 
    margin-top: 1.5rem;
    color: var(--text-highlight);
}

/* Estilo para la sección "Origen del Compromiso" con efecto de papel antiguo */
.origen-compromiso {
     text-align: center;
    background-color: #f4f0e8; /* Color pergamino base */
    /* Añadimos gradientes radiales para simular manchas de antigüedad */
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(188, 175, 152, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 85% 35%, rgba(188, 175, 152, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 50% 50%, rgba(210, 195, 170, 0.1) 0%, transparent 50%);
    padding: 2rem;
    margin-top: 3rem;
    border-radius: 4px;
    font-family: 'Georgia', serif; /* Fuente clásica para dar aspecto de antigüedad */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente */
    align-items: center;     /* Centra horizontalmente */
    /* Sombra escalonada para dar una sensación de papel viejo y con relieve */
    box-shadow: 
        0 1px 1px rgba(0,0,0,0.12),
        0 2px 2px rgba(0,0,0,0.12),
        0 4px 4px rgba(0,0,0,0.12),
        0 8px 8px rgba(0,0,0,0.12);
    border: 1px solid #dcd2c0; /* Borde sutil para definir el papel */
}

.origen-compromiso h3 {
    color: #5d4037; /* Tono marrón oscuro para el título */
    text-align: center;
}

.origen-compromiso p {
    color: #4e443a; /* Tono marrón para el texto */
    font-size: 1.1rem; /* Ajustamos el tamaño para este bloque */
    text-align: center; /* Centramos el texto para un look más solemne */
}
/* Estilos para la lista de objetivos, con diseño de tarjetas y colores */
.proposito-text ul {
    list-style: none;
    padding: 0;
}

.proposito-text ul li {
    border-left: 5px solid; /* El color se asignará con nth-child */
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 1rem; /* Ajuste para mejor lectura en tarjetas */
}

.proposito-text ul li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Asignación de colores para el borde izquierdo de cada objetivo */
.proposito-text ul li:nth-child(8n+1) { border-color: #3b82f6; background-color: rgba(59, 130, 246, 0.1); } /* Azul */
.proposito-text ul li:nth-child(8n+2) { border-color: #10b981; background-color: rgba(16, 185, 129, 0.1); } /* Verde */
.proposito-text ul li:nth-child(8n+3) { border-color: #f97316; background-color: rgba(249, 115, 22, 0.1); } /* Naranja */
.proposito-text ul li:nth-child(8n+4) { border-color: #8b5cf6; background-color: rgba(139, 92, 246, 0.1); } /* Púrpura */
.proposito-text ul li:nth-child(8n+5) { border-color: #ef4444; background-color: rgba(239, 68, 68, 0.1); } /* Rojo */
.proposito-text ul li:nth-child(8n+6) { border-color: #0ea5e9; background-color: rgba(14, 165, 233, 0.1); } /* Celeste */
.proposito-text ul li:nth-child(8n+7) { border-color: #f59e0b; background-color: rgba(245, 158, 11, 0.1); } /* Ámbar */
.proposito-text ul li:nth-child(8n)   { border-color: #6366f1; background-color: rgba(99, 102, 241, 0.1); } /* Índigo */

/* --- 6.3 INSTRUCCIONES --- */
#instrucciones {
    background-color: #e0f2fe; 
    padding: 4rem;
    border-radius: 20px;
}

#instrucciones h2 {
    color: #0369a1; 
    text-align: center;
}

.instrucciones-list {
    display: flex;
    flex-direction: column;
    gap: 0; 
    margin-top: 2rem;
}

.instruccion-item {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 6rem; 
    padding-bottom: 3rem; 
    margin-bottom: 3rem; 
    border-bottom: 4px solid #ffffff; 
}

.instruccion-item:last-child {
    border-bottom: none; 
    padding-bottom: 0;
    margin-bottom: 0;
}

.instruccion-texto {
    flex: 1;
    max-width: 450px; 
}

.instruccion-texto h3 {
    color: var(--accent-color); 
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
}

.instruccion-texto p {
    font-size: 1.3rem; 
    line-height: 1.8;
}

/* --- 6.4 BENEFICIOS --- */
.beneficios-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-top: 2rem;
}

.beneficios-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0;
    margin: 0;
    list-style: none; 
    counter-reset: beneficios-counter;
}

.beneficios-list li {
    position: relative;
    background-color: var(--bg-color);
    padding: 1.5rem 1.5rem 1.5rem 4rem; 
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); 
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    counter-increment: beneficios-counter;
}

.beneficios-list li::before {
    content: counter(beneficios-counter);
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.beneficios-list li:hover {
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.beneficios-img {
    flex: 1;
    margin-bottom: 0; 
    max-width: 450px;
}

/* --- 6.5 NOVEDADES (Carrusel y Ticker) --- */
.novedades-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.novedades-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 1.5rem 0;
    margin-bottom: 1rem;
    scrollbar-width: none; 
}

.novedades-gallery::-webkit-scrollbar {
    display: none; 
}

.gallery-item {
    width: 450px;
    height: 280px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    flex-shrink: 0; 
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.novedades-ticker-wrap {
    width: 100%;
    overflow: hidden; 
    padding: 1rem 0;
    margin-top: 2rem;
    cursor: default; 
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.novedades-ticker {
    display: flex;
    white-space: nowrap;
}

.novedades-ticker span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    padding-right: 50px; 
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

.novedades-ticker-wrap:hover .novedades-ticker {
    animation: ticker-scroll 5s linear infinite;
}

/* --- 6.6 SOPORTE Y QUEJAS --- */
.soporte-container {
    max-width: 750px; 
    margin: 1.5rem auto 0 auto; 
}

.form-tabs {
    display: flex;
}

.tab-btn {
    flex: 1;
    background-color: #e2e8f0;
    color: var(--text-main);
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.tab-btn.active {
    background-color: rgba(0, 0, 0, 0.03); 
    color: var(--accent-color);
}

.tab-btn:hover:not(.active) {
    background-color: #cbd5e1;
    transform: none; 
}

form.soporte-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 2rem;
    border-radius: 0 0 10px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-2 > div {
    display: grid;
    gap: 1rem;
}

.hidden-form {
    display: none !important;
}

/* =========================================================================
   7. FOOTER
   ========================================================================= */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

/* =========================================================================
   8. RESPONSIVIDAD (Media Queries)
   ========================================================================= */
@media screen and (max-width: 1024px) {
    main {
        padding: 2rem 3rem;
    }
    #inicio {
        padding: 4rem 3rem; 
    }
}

@media screen and (max-width: 850px) {
    .hero-title-container {
        justify-content: center;
    }
    
    .title-line-1, .title-line-2 {
        text-align: center;
    }

    .top-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        padding: 1rem 2rem;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        width: 100%;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    nav ul.show-menu {
        display: flex;
    }

    .page-card {
        margin-top: 5rem; /* Se ajusta ya que la cabecera es más pequeña con el nuevo menú */
    }

    #inicio {
        flex-direction: column;
        text-align: center;
        padding: 3rem 2rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        width: 100%;
    }

    .beneficios-container {
        flex-direction: column;
        gap: 2rem;
    }

    .beneficios-img {
        width: 100%;
        max-width: 400px;
    }

    .proposito-container {
        flex-direction: column; 
    }

    .vertical-img {
        width: 100%;
        max-width: 400px;
        height: 400px;
    }

    #instrucciones {
        padding: 3rem 2rem; 
    }

    .instruccion-item {
        flex-direction: column; 
        text-align: center;
    }

    .mobile-video {
        width: 100%;
        max-width: 320px;
    }

    main {
        padding: 2rem;
    }
}

@media screen and (max-width: 600px) {
    .page-card {
        width: 100%; 
        margin-top: 5rem;
        border-radius: 0;
        border: none;
    }

    .hero-title-container {
        gap: 1rem;
    }

    .hero-title-container h1 {
        font-size: 2.8rem; /* Tamaño más adecuado para dispositivos móviles Android */
    }

    .hero-title-logo {
        width: 60px;
        height: 60px;
    }

    .gallery-item {
        width: 260px; /* Mejor ajuste en Android */
        height: 260px;
    }

    #inicio {
        padding: 2rem 1rem; 
        border-radius: 0; 
    }

    #instrucciones {
        padding: 2rem 1rem;
        border-radius: 0;
    }

    main {
        padding: 1.5rem 1rem;
    }

    h2 {
        font-size: 1.8rem;
        text-align: center;
        padding-bottom: 0.75rem;
        border-bottom: 3px solid rgba(2, 132, 199, 0.5);
        margin-bottom: 2rem;
    }

    .toggle-wrapper {
        flex-direction: column; 
        align-items: flex-start;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-radius: 10px;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    form.soporte-form {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }

    .beneficios-list li {
        padding: 1.2rem 1.2rem 1.2rem 3.5rem; /* Reducir padding en mobile */
    }
}