/* ===== HEADER PROFESIONAL Y ELEGANTE ===== */

/* Header principal con efecto glassmorphism */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header al hacer scroll - más compacto */
.main-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.main-header.scrolled .header-container {
    padding: var(--space-2) var(--space-6);
}

.main-header.scrolled .logo {
    height: 36px;
}

/* Contenedor del header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    transition: padding 0.3s ease;
}

/* Logo y marca mejorados */
.header-brand .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.header-brand .logo-link:hover {
    transform: translateY(-2px);
}

.header-brand .logo {
    height: 44px;
    width: auto;
    margin-right: var(--space-3);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-brand .brand-name {
    color: var(--dark-text);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
}

.header-brand .brand-accent {
    color: var(--primary);
    font-weight: 800;
}

/* Navegación principal */
.main-nav .nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-2);
}

.main-nav .nav-link {
    position: relative;
    color: var(--medium-text);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.main-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: inherit;
}

.main-nav .nav-link:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.main-nav .nav-link:hover::before {
    opacity: 1;
}

.main-nav .nav-link.active {
    color: var(--primary);
    background: linear-gradient(135deg,
        rgba(52, 152, 219, 0.1) 0%,
        rgba(52, 152, 219, 0.15) 100%);
}

.main-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Botones de acción */
.header-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* Botón Ingresar */
.btn-login {
    position: relative;
    color: var(--medium-text);
    background: transparent;
    border: 2px solid var(--primary);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: inherit;
}

.btn-login:hover {
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-login:hover::before {
    opacity: 1;
}

/* Botón Registrarse */
.btn-cta {
    position: relative;
    color: var(--white);
    background: var(--primary);
    border: 2px solid var(--primary);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: inherit;
}

.btn-cta:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.btn-cta:hover::before {
    opacity: 1;
}

/* Botón hamburguesa */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    position: relative;
    z-index: 1501;
}

.mobile-menu-toggle .toggle-bar {
    width: 26px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
}

/* ===== MENÚ MÓVIL: CAJA LATERAL IZQUIERDA ===== */
.mobile-nav {
    position: fixed;
    top: 0;              /* desde arriba */
    left: 0;             /* pegado al lado izquierdo */
    width: 80%;          /* no todo el ancho */
    max-width: 360px;    /* límite en móviles grandes */
    height: 100vh;       /* todo el alto */
    background: #ffffff; /* deja tus colores tal cual */
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    overflow-y: auto;
    padding: 70px 12px 16px; /* 70px ≈ alto header, ajusta si hace falta */
    display: none;       /* oculto por defecto */
}

/* visible con toggle */
.mobile-nav.active {
    display: block;
}

/* lista interna */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* links del menú móvil */
.mobile-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-text);
    background: #f5f5f5;
}

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

/* acciones (login / registro) */
.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.btn-block {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-nav-header img {
    height: 32px;
    width: auto;
}

.mobile-nav-header .brand-name {
    font-size: 16px;
    font-weight: 700;
}


/* Responsive general */
@media (max-width: 768px) {
    .main-nav,
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        padding: var(--space-3) var(--space-4);
    }

    body {
        padding-top: 68px;
    }
}

@media (max-width: 640px) {
    .header-brand .brand-name {
        font-size: var(--text-lg);
    }

    .header-brand .logo {
        height: 36px;
    }
}

/* Evitar que contenido quede debajo del header en desktop */
body {
    padding-bottom: 0;
}
