/* ─── Base Reset & Variables ─────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #f43f5e;
    --accent-light: #fb7185;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #ffffff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    z-index: 2000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 2000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 12px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.3em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-cta {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Botón hamburguesa — oculto en desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Animación X al abrir */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Responsive navbar ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        padding: 80px 32px 32px;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2100;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.1em;
    }

    .nav-cta {
        width: auto;
        text-align: center;
        padding: 10px 24px;
        font-size: 0.95em;
    }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
    background: var(--dark);
    color: white;
    padding: 48px 0;
    text-align: center;
}

footer p {
    opacity: 0.7;
    font-size: 0.95em;
}