/* ==========================================================================
   VARIABLES DE DISEÑO (Colores "Atardecer Moderno")
   ========================================================================== */
:root {
    --primary-coral: #FF6B6B;
    --secondary-teal: #005F73;
    --accent-mustard: #E9C46A;
    --bg-offwhite: #F9F9F9;
    --text-dark: #2A2A2A;
    --white: #FFFFFF;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* ==========================================================================
   ESTILOS GENERALES Y CANDADO ANTI-DESBORDE MÓVIL
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-offwhite);
    color: var(--text-dark);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
header {
    background-color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
}
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    /* Ultra-wide: 3% de padding y 1600px max */
    padding: 1rem 3%; max-width: 1600px; margin: 0 auto; height: 80px; width: 100%;
}
.logo { font-size: 1.6rem; font-weight: 700; color: var(--secondary-teal); letter-spacing: -0.5px; }
.logo span { color: var(--primary-coral); }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: #555; }
.nav-links a:hover { color: var(--primary-coral); }

/* Hamburguesa (Móvil) */
.hamburger {
     display: none;
     cursor: pointer;
     flex-direction: column;
     gap: 6px;
     background: none;
     border: none;
     z-index: 1002;
}
.bar {
     width: 28px;
     height: 3px;
     background-color: var(--secondary-teal);
     border-radius: 2px;
     transition: var(--transition); 
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-primary {
    background-color: var(--primary-coral); color: var(--white); border: none;
    padding: 12px 30px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: var(--transition); display: inline-block; text-align: center;
}
.btn-primary:hover { background-color: #ff5252; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3); }
.btn-primary:disabled { background-color: #ffbaba; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-plantilla { padding: 6px 12px; font-size: 0.8rem; border: 1px solid var(--secondary-teal); color: var(--secondary-teal); background: white; border-radius: 20px; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.btn-plantilla:hover { background: var(--secondary-teal); color: white; }

.btn-tool { padding: 8px 15px; border: 1px solid #ccc; background: white; border-radius: 6px; cursor: pointer; transition: var(--transition); }
.btn-tool:hover { background: #eee; }

/* ==========================================================================
   HERO SECTION (Principal - Index)
   ========================================================================== */
.hero {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 100vh; padding: 100px 3% 40px; width: 100%; max-width: 1600px; margin: 0 auto; gap: 3rem;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-tag {
    color: var(--primary-coral); background: rgba(255, 107, 107, 0.1); padding: 6px 14px;
    border-radius: 30px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; display: inline-block; margin-bottom: 1.5rem;
}
h1 { font-size: 3.2rem; line-height: 1.15; color: var(--secondary-teal); margin-bottom: 1.2rem; font-weight: 700; }
.hero-highlight { color: var(--primary-coral); position: relative; }
.hero-highlight::after {
    content: ''; position: absolute; bottom: 5px; left: 0; width: 100%; height: 12px;
    background-color: rgba(233, 196, 106, 0.4); z-index: -1; border-radius: 4px;
}
p.lead { font-size: 1.15rem; margin-bottom: 2.5rem; color: #666; font-weight: 300; }

/* ==========================================================================
   CARRUSELES (Swiper.js)
   ========================================================================== */
.hero-slider-container { flex: 1; max-width: 600px; width: 100%; position: relative; min-width: 300px; }
.swiper-hero { width: 100%; height: 500px; border-radius: 24px; box-shadow: var(--shadow); }
.swiper-hero .swiper-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }

.testimonials { padding: 5rem 3%; text-align: center; background-color: transparent; width: 100%; max-width: 1600px; margin: 0 auto; }
.swiper-testimonio { width: 100%; padding-top: 40px; padding-bottom: 60px; }
.swiper-testimonio .swiper-slide {
    background-position: center; background-size: cover; width: 350px !important;
     height: auto; background-color: var(--white); padding: 2.5rem 2rem;
     border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
     position: relative; text-align: left; display: flex; flex-direction: column;
     justify-content: space-between;
}
.swiper-testimonio .swiper-slide::before {
    content: '"'; font-size: 5rem; color: var(--accent-mustard); opacity: 0.2;
    position: absolute; top: 10px; right: 20px; font-family: serif; line-height: 1;
}
.testimonio-autor { display: flex; align-items: center; gap: 15px; margin-top: 1.5rem; }
.testimonio-autor img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.testimonio-autor h4 { color: var(--secondary-teal); font-size: 1rem; margin-bottom: 2px;}
.testimonio-autor span { font-size: 0.8rem; color: #888; }

/* ==========================================================================
   FORMULARIOS Y CREACIÓN DE EVENTOS
   ========================================================================== */
.standard-input {
    width: 100%; padding: 12px 18px; border: 1px solid #eee; border-radius: 8px;
    outline: none; font-size: 1rem; color: #444; font-family: inherit; transition: border-color 0.3s ease;
}
.standard-input:focus { border-color: var(--primary-coral); }
.form-section { background: var(--white); padding: 2rem; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 2rem; border: 1px solid #eee; }
.form-section h3 { margin-bottom: 1.5rem; color: var(--secondary-teal); font-size: 1.2rem; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }
.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; font-size: 0.95rem; }

.url-preview { display: flex; align-items: center; background: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.url-preview span { padding: 12px 15px; background: #eee; color: #666; font-size: 0.95rem; border-right: 1px solid #ddd; }
.url-preview input { border: none; flex: 1; padding: 12px; font-size: 1rem; outline: none; background: transparent; width: 100%; }

/* Temas Visuales */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-top: 10px; }
.theme-option { cursor: pointer; position: relative; }
.theme-option input[type="radio"] { display: none; }
.theme-card { border: 2px solid #eee; border-radius: 12px; padding: 15px; text-align: center; transition: var(--transition); background: #fff; }
.theme-palette { display: flex; height: 30px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.theme-palette div { flex: 1; }
.t1 .c1 { background: #FF6B6B; } .t1 .c2 { background: #005F73; }
.t2 .c1 { background: #1A1A1A; } .t2 .c2 { background: #D4AF37; }
.t3 .c1 { background: #2E5C31; } .t3 .c2 { background: #E9E1C3; }
.t4 .c1 { background: #0077B6; } .t4 .c2 { background: #90E0EF; }
.t5 .c1 { background: #555555; } .t5 .c2 { background: #F0F0F0; }
.theme-option input[type="radio"]:checked + .theme-card { border-color: var(--primary-coral); box-shadow: 0 4px 15px rgba(255,107,107,0.2); transform: translateY(-3px); }
.theme-option input[type="radio"]:checked + .theme-card::after { content: '✓'; position: absolute; top: -10px; right: -10px; background: var(--primary-coral); color: white; width: 25px; height: 25px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px;}

/* Subida de Archivos y Modal */
.file-upload { border: 2px dashed #ddd; padding: 2rem; text-align: center; border-radius: 8px; background: #fafafa; cursor: pointer; transition: var(--transition); display: block;}
.file-upload:hover { border-color: var(--secondary-teal); background: #f0f8ff; }
.file-upload input[type="file"] { display: none; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; align-items: center; justify-content: center; }
.modal-content { background: #fff; width: 95%; max-width: 800px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { padding: 15px 20px; background: var(--secondary-teal); color: white; font-weight: bold; display: flex; justify-content: space-between; align-items: center;}
.modal-body { padding: 20px; max-height: 60vh; background: #eee; text-align: center;}
.modal-footer { padding: 15px 20px; background: #f9f9f9; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid #ddd;}
.img-container { max-height: 50vh; width: 100%; }
.img-container img { max-width: 100%; display: block; }
#preview-container { display: none; margin-top: 15px; text-align: center; }
#preview-final { width: 100%; height: auto; aspect-ratio: 21/9; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); border: 2px solid var(--secondary-teal); margin-bottom: 10px; }

/* ==========================================================================
   VISTA PÚBLICA DEL EVENTO (Invitación)
   ========================================================================== */
.invitation-hero {
    position: relative;
    z-index: 1;
    width: 100%;
     height: 55vh;
     min-height: 350px;
    max-height: 600px;
     display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px; 
}
.invitation-hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center center; z-index: -2;
}
.invitation-hero::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%); z-index: -1;
}
.invitation-box {
    background: var(--white); max-width: 800px; width: 90%;
     margin: -80px auto 40px; position: relative; z-index: 10;
    border-radius: 16px; padding: 3rem 2rem; box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    text-align: center; border-top: 6px solid var(--primary-coral);
}
.closed-notice { background: #ffebee; color: #d32f2f; padding: 15px; border-radius: 8px; font-weight: bold; margin-bottom: 2rem; }

/* ==========================================================================
   SECCIÓN DE VALOR (Features)
   ========================================================================== */
.features { background-color: var(--white); padding: 5rem 3%; margin-top: 2rem; width: 100%; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; width: 100%; max-width: 1600px; margin: 0 auto; }
.feature-card { padding: 1.5rem; text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 1.2rem; display: inline-block; }
.feature-card h3 { color: var(--secondary-teal); margin-bottom: 0.8rem; font-size: 1.3rem; }
.feature-card p { font-size: 0.95rem; color: #777; line-height: 1.7; }

/* ==========================================================================
   DASHBOARD Y VISTAS INTERNAS
   ========================================================================== */
.dashboard-container { padding: 120px 3% 60px; width: 100%; max-width: 1600px; margin: 0 auto; min-height: calc(100vh - 80px); }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.empty-state { text-align: center; padding: 4rem 2rem; background: var(--white); border-radius: 16px; box-shadow: var(--shadow); border: 2px dashed #eee; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { background-color: #f4f4f4; color: #888; text-align: center; padding: 2.5rem 3%; font-size: 0.85rem; border-top: 1px solid #eee; }

/* ==========================================================================
   PÁGINAS LEGALES UI 2026 (Términos, Privacidad, Reclamaciones)
   ========================================================================== */
.legal-page-container { 
    max-width: 1600px; 
    width: 100%; 
    margin: 0 auto; 
    padding-top: 140px !important; /* <-- FUERZA BRUTA: Empuja el contenido hacia abajo */
    padding-bottom: 60px;
    padding-left: 3%;
    padding-right: 3%;
}
.legal-header { 
    text-align: center; 
    margin-bottom: 40px; 
}
.legal-header h1 { 
    font-size: clamp(2rem, 5vw, 3.2rem); 
    color: var(--secondary-teal); 
    margin: 15px 0; 
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.legal-header p { 
    color: #888; 
    font-size: 0.95rem; 
    font-weight: 500;
}
.legal-content { 
    background: var(--white); 
    padding: clamp(30px, 8vw, 80px); 
    border-radius: 16px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.03); 
    border: 1px solid #f0f0f0; 
    line-height: 1.8; 
    color: #444; 
    font-size: 1.05rem;
}
.legal-content h2 { 
    color: var(--secondary-teal); 
    font-size: 1.5rem; 
    margin-top: 40px; 
    margin-bottom: 20px; 
    padding-bottom: 10px;
    border-bottom: 2px solid #f9f9f9;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { color: #333; font-size: 1.1rem; margin: 20px 0 10px 0; }
.legal-content p { margin-bottom: 20px; text-align: justify; }
.legal-content ul { 
    margin-bottom: 30px; 
    padding-left: 25px; 
    background: #fdfdfd;
    padding: 20px 20px 20px 45px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-teal);
}
.legal-content li { margin-bottom: 12px; }
.legal-content strong { color: #222; font-weight: 600; }
.legal-content a { color: var(--secondary-teal); font-weight: 600; text-decoration: underline; }

/* Tablas para páginas legales */
.legal-table { width: 100%; border-collapse: collapse; margin: 25px 0; font-size: 0.95rem; }
.legal-table th, .legal-table td { border: 1px solid #e2e8f0; padding: 15px; text-align: left; }
.legal-table th { background-color: var(--bg-offwhite); font-weight: 600; color: var(--secondary-teal); }

/* ==========================================================================
   RESPONSIVE (Celulares y Tablets)
   ========================================================================== */
@media (max-width: 850px) {
    .navbar { padding: 0.8rem 5%; height: 70px; width: 100%; }
    .hamburger { display: flex; z-index: 1002; }
    
    .nav-links {
        position: fixed;
         top: 0;
         right: 0;
         height: 100vh;
         width: 80%;
        background-color: var(--white);
         flex-direction: column;
         justify-content: center;
        align-items: center;
         box-shadow: -10px 0 30px rgba(0,0,0,0.1);
         transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
         transform: translateX(100%);
        z-index: 1001;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { font-size: 1.3rem; padding: 10px; }
    
    /* Landing Page Celular */
    .hero { flex-direction: column; padding-top: 100px; text-align: center; gap: 2.5rem; width: 100%; padding-left: 5%; padding-right: 5%; }
    .hero-content { max-width: 100%; }
    .hero-tag { margin: 0 auto 1.5rem; }
    h1 { font-size: 2.5rem; }
    .hero-highlight::after { bottom: 2px; height: 8px; }
    .swiper-hero { height: 350px; }
    
    /* Testimonios */
    .swiper-testimonio .swiper-slide { width: 300px !important; max-width: 85vw !important; padding: 1.5rem; }
    
    /* Vistas Internas Celular */
    .btn-primary { width: 100%; }
    .features { padding: 3rem 5%; }
    .features-grid { width: 100%; }
    .dashboard-header { flex-direction: column; text-align: center; }
    .dashboard-container { padding: 100px 5% 40px; width: 100%; }
    
    /* Formularios */
    .form-section { padding: 1.5rem; }
    .url-preview { flex-direction: column; align-items: stretch; text-align: center; }
    .url-preview span { border-right: none; border-bottom: 1px solid #ddd; }
    
    /* Invitación Pública */
    .invitation-hero { min-height: 250px; height: 40vh; margin-top: 70px; }
    .invitation-hero h1 { font-size: 2.2rem !important; }
    .invitation-box { margin: -30px auto 40px; padding: 2rem 1.2rem; width: 92%; }
    .invitation-box p { font-size: 1rem !important; }

   /* Páginas Legales Móvil */
    .legal-page-container { 
        padding-top: 120px !important; /* <-- Baja el título en celular */
        padding-left: 5%; 
        padding-right: 5%; 
    }
    .legal-content p, .legal-content li { text-align: left !important; }
}

/* Animación Hamburguesa */
.hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }