/* =========================================
   1. VARIABLES Y RESET GENERAL
   ========================================= */
:root {
    --primary-bg: #151e2b;
    --secondary-bg: #212C3E;
    --accent: #F69E35;
    --accent-hover: #e68a1c;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: #334155;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 130px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
}

/* Permitir selección en textos y campos */
p, h1, h2, h3, h4, h5, h6, span, li, div, input, select, textarea, th, td, code {
    user-select: text;
    -webkit-user-select: text;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;       /* Asegura que ocupe el ancho disponible */
    min-width: 0;      /* ¡CRUCIAL! Permite que el contenedor se encoja en Flexbox */
}

/* =========================================
   2. HEADER & NAVEGACIÓN (UNIFICADO)
   ========================================= */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(21, 30, 43, 0.95); /* Fondo sólido con ligera transp. */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    z-index: 1000;
    height: 115px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img { height: 70px; width: auto; }

.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--accent); }

/* Switch de Idioma */
.lang-switch {
    display: flex; gap: 10px; align-items: center;
    border-left: 1px solid var(--border);
    padding-left: 20px; margin-left: 20px;
    font-weight: 600; font-size: 0.9rem;
}
.lang-switch a { color: var(--text-muted); opacity: 0.5; }
.lang-switch a.active { color: var(--accent); opacity: 1; pointer-events: none; }

/* Enlace móvil oculto por defecto */
.mobile-link { display: none; }

/* =========================================
   3. BOTONES
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}
.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 1px solid var(--border);
    color: white;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Botón estático (Waitlist Active) */
.btn-static {
    display: inline-block;
    padding: 10px 24px;
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: default;
    opacity: 0.8;
}

/* =========================================
   4. SECCIONES GENERALES (Home)
   ========================================= */
section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 15px; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); }

/* Hero */
.hero {
    padding: 80px 0 100px;
    text-align: center;
    background: radial-gradient(circle at top center, #2d3b55 0%, var(--primary-bg) 60%);
}
.product-icon {
    height: 100px; width: 100px; margin-bottom: 25px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.hero h1 {
    font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.25rem; color: var(--text-muted);
    max-width: 700px; margin: 0 auto 40px;
}
.badge {
    background: rgba(246, 158, 53, 0.15); color: var(--accent);
    padding: 6px 12px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 600;
    margin-bottom: 20px; display: inline-block;
}

/* Grids y Tarjetas (Features & Pricing) */
.features { background-color: var(--secondary-bg); }
.grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 30px; border-radius: 12px; transition: 0.3s;
}
.card:hover { border-color: var(--accent); transform: translateY(-5px); }
.card h3 { margin-bottom: 15px; color: white; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.pricing-grid { max-width: 1000px; margin: 0 auto; }
.pricing-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    padding: 40px 30px; border-radius: 12px;
    text-align: center; position: relative;
}
.pricing-card.popular {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(246, 158, 53, 0.1);
}
.pricing-card.popular .badge {
    background-color: var(--accent); color: white;
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    z-index: 2; border: 4px solid var(--secondary-bg);
}
.price { font-size: 2.5rem; font-weight: 700; margin: 20px 0; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.features-list { text-align: left; margin: 30px 0; }
.features-list li { margin-bottom: 12px; color: var(--text-muted); font-size: 0.9rem; }
.features-list li::before { content: "✓"; color: var(--accent); margin-right: 10px; }

/* Seguridad */
#security { background: linear-gradient(180deg, var(--primary-bg) 0%, #0f1620 100%); }
.security-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.security-content h3 { color: white; margin-bottom: 10px; font-size: 1.3rem; }
.security-content p { color: var(--text-muted); margin-bottom: 20px; }
.security-box {
    background: rgba(75, 156, 211, 0.1);
    border: 1px solid rgba(75, 156, 211, 0.3);
    padding: 30px; border-radius: 12px;
}

/* =========================================
   5. FORMULARIOS (Contact & Early Access)
   ========================================= */
.form-section, .contact-section {
    padding: 80px 0;
    background: radial-gradient(circle at top center, #2d3b55 0%, var(--primary-bg) 60%);
}
.form-card {
    background-color: var(--secondary-bg); padding: 40px; border-radius: 12px;
    border: 1px solid var(--border); max-width: 650px; margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-main); font-size: 0.95rem; }
.required-star { color: var(--accent); margin-left: 4px; }

input, select, textarea {
    width: 100%; padding: 12px 15px; background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text-main); font-family: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.checkbox-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    background: rgba(0, 0, 0, 0.1); padding: 15px; border-radius: 6px;
    border: 1px solid var(--border);
}
.checkbox-item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); }
.checkbox-item input { width: auto; height: 16px; width: 16px; }

.success-message {
    display: none; text-align: center; padding: 30px;
    background: rgba(16, 185, 129, 0.1); border: 1px solid #10b981; border-radius: 8px;
}
#hidden_iframe { display: none; }

/* =========================================
   6. PÁGINAS LEGALES (Terms, Privacy, License)
   ========================================= */
.legal-content { padding: 60px 0; }
.legal-content h1 { font-size: 2.5rem; margin-bottom: 10px; color: white; }
.legal-content h2 {
    font-size: 1.5rem; margin-top: 40px; margin-bottom: 15px;
    color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.legal-content h3 { font-size: 1.2rem; margin-top: 30px; margin-bottom: 10px; color: white; }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: 15px; }
.legal-content ul { margin-bottom: 20px; padding-left: 20px; color: var(--text-muted); }

.last-updated {
    font-size: 0.9rem; color: #64748b; margin-bottom: 40px;
    display: block; border-bottom: 1px solid var(--border); padding-bottom: 20px;
}

/* Tablas (Cookies) */
.cookie-table {
    width: 100%; border-collapse: collapse; margin: 20px 0;
    font-size: 0.9rem; border: 1px solid var(--border);
}
.cookie-table th, .cookie-table td {
    text-align: left; padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-muted);
}
.cookie-table th { background-color: var(--secondary-bg); color: var(--text-main); font-weight: 600; }

/* Caja de Licencia (License HTML) */
.license-container {
    background: rgba(0,0,0,0.2);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: #e2e8f0;
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 30px;
    max-height: 800px;
    overflow-y: auto;
}
.github-link {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--accent); font-weight: 600; margin-top: 20px;
    border: 1px solid var(--accent); padding: 10px 20px; border-radius: 6px;
}
.github-link:hover { background: rgba(246, 158, 53, 0.1); }


/* =========================================
   7. FOOTER
   ========================================= */
footer {
    border-top: 1px solid var(--border); padding: 60px 0 30px;
    background-color: #0f1620; font-size: 0.9rem; color: var(--text-muted);
    text-align: center; margin-top: auto;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px; margin-bottom: 50px; text-align: left;
}
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.address { font-style: normal; line-height: 1.6; }
.footer-links a { margin: 0 10px; }
.bottom-bar {
    text-align: center; padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.8rem;
}

/* =========================================
   8. RESPONSIVE (MÓVIL - VERSIÓN CORREGIDA)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Ajustes Generales y Header */
    header { height: auto; padding-bottom: 15px; }
    nav { flex-direction: column; gap: 15px; }
    .logo img { height: 70px; }
    .nav-links { display: none; }
    .lang-switch { border: none; padding: 0; margin: 0; }
    .hero h1 { font-size: 2.2rem; }
    
    /* 2. Enlace móvil (aparece debajo del botón) */
    .mobile-link {
        display: block;
        color: var(--text-muted);
        font-size: 0.9rem;
        text-decoration: underline;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    /* 3. Botones y Grids */
    .btn, .btn-outline { width: 100%; display: block; margin-bottom: 10px; }
    .btn-static { display: none; }
    .grid, .pricing-grid, .security-grid, .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        text-align: center;
    }
    .card, .pricing-card { padding: 25px 20px; }
    
    /* --- CORRECCIONES DE DESBORDAMIENTO --- */

    /* SOLUCIÓN TABLA: Caja bloque con scroll */
    .cookie-table {
        display: block;
        width: 100%; 
        max-width: 100%;       /* Asegura que nunca exceda el contenedor padre */
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* SOLUCIÓN LICENCIA: Romper líneas largas (Wrap) */
    .license-container {
        white-space: pre-wrap;       /* Mantiene formato pero permite saltos */
        word-wrap: break-word;       /* Rompe palabras normales */
        overflow-wrap: break-word;   /* Estándar moderno */
        word-break: break-all;       /* IMPORTANTE: Rompe las líneas de "======" */
        max-width: 100%;             /* Límite estricto de ancho */
        font-size: 0.8rem;           /* Texto un poco más pequeño ayuda */
        padding: 20px;               /* Reducir padding en móvil */
    }
    
    /* Seguridad extra para evitar scroll horizontal de página */
    body, html {
        overflow-x: hidden;
    }
}