/* ==========================================================================
   1. VARIABLES Y TEMAS (Modo Claro / Oscuro)
   ========================================================================== */
:root {
    /* Paleta Modo Claro (Por defecto) */
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    
    /* Efecto Cristal (Light) */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);

    /* Estructura */
    --container-width: 1200px;
    --transition-speed: 0.3s;
}

/* Paleta Modo Oscuro (Se activa mediante JS añadiendo el atributo) */
[data-theme="dark"] {
    --bg-color: #0b0f19;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    
    /* Efecto Cristal (Dark) */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   2. RESET Y BASE (SEO Técnico & Rendimiento)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    overflow-x: hidden;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* Utilidades */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary);
    font-weight: 800;
}

/* ==========================================================================
   3. COMPONENTES PREMIUM (Glassmorphism & Botones)
   ========================================================================== */
.glass-effect, .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-panel {
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Botones */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.btn-secondary:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-icon:hover {
    background: var(--glass-border);
}

/* ==========================================================================
   4. ESTRUCTURA Y LAYOUT (Navegación, Hero, Secciones)
   ========================================================================== */
/* Header */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: none; /* Mobile first: oculto en móviles */
    gap: 2rem;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Secciones genéricas */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid de Tarjetas */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.8rem;
}

/* Prueba Social / CTA */
.cta-box {
    text-align: center;
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.cta-box h2 {
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box .btn-primary {
    background: white;
    color: var(--text-color);
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

/* ==========================================================================
   5. ANIMACIONES (Motor JS e interacción)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   6. MEDIA QUERIES (Escritorio / Tablets)
   ========================================================================== */
@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
    
    /* En escritorio, ocultamos el botón primario del header si molesta, o lo mostramos */
    .nav-actions .btn-primary {
        display: inline-block;
    }
}