/* CSS Principal y Diseño Corporativo - Avanced Technology */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(22, 28, 45, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-secondary: #06b6d4; /* Cian */
    --color-secondary-hover: #0891b2;
    --color-accent: #a855f7; /* Violeta */
    --color-accent-hover: #9333ea;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-speed: 0.3s;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
}

/* Reset y Estilos Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Fondo decorativo futurista */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

button, input, select, textarea {
    font-family: inherit;
}

/* Layout y Contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navegación */
.main-header {
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Hamburguesa móvil */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all var(--transition-speed) ease;
}

/* Pie de Página */
.main-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px 0;
    margin-top: 100px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-info-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-info-desc {
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-title {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-contact-item svg {
    margin-top: 4px;
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal-links {
    display: flex;
    gap: 24px;
}

/* Efectos de Vidrio (Glassmorphism) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    padding: 30px;
    transition: all var(--transition-speed) ease;
}

.glass-card:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

/* Botones Comunes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-secondary-hover) 100%);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

/* WhatsApp flotante */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 99;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Media Queries Responsivos */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        padding: 40px;
        transition: left 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        border-top: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.25rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Modales de Autenticación Premium */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.95), rgba(10, 15, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    padding: 35px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal-content {
    transform: translateY(0);
}

.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-close:hover {
    color: #fff;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.auth-tab.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: -2px;
}

.auth-form-pane {
    display: none;
}

.auth-form-pane.active {
    display: block;
}

/* Código de verificación de 6 dígitos */
.code-inputs-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 8px;
}

.code-input-char {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: border-color 0.2s;
}

.code-input-char:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Dropdown de usuario autenticado en Header */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-info {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-email {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.user-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-dropdown-item.logout-btn {
    color: #ef4444;
}

.user-dropdown-item.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Menú Desplegable (Dropdown) Multinivel - Avanced Technology */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 320px;
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.98), rgba(10, 15, 30, 0.99));
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-sm);
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-dropdown-wrapper.active .nav-dropdown {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: left;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    line-height: 1.4;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 24px;
}

/* Submenú anidado (segundo nivel) */
.nested-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-nested {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 250px;
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.98), rgba(10, 15, 30, 0.99));
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-sm);
    padding: 10px 0;
    z-index: 1001;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nested-dropdown-wrapper.active .nav-dropdown-nested {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.arrow {
    font-size: 0.65rem;
    margin-left: 5px;
    vertical-align: middle;
    transition: transform 0.2s;
    display: inline-block;
}

/* Elementos deshabilitados o libres */
.dropdown-item.disabled-item {
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed;
    background: none !important;
}

.dropdown-item.disabled-item:hover {
    padding-left: 20px;
}

/* Soporte responsivo para móviles */
@media (max-width: 768px) {
    .nav-dropdown-wrapper {
        width: 100%;
        text-align: center;
    }
    
    .nav-dropdown, .nav-dropdown-nested {
        display: none;
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.02);
        box-shadow: none;
        border: none;
        opacity: 1;
        transform: none !important;
        transition: none;
        padding-left: 15px;
        box-sizing: border-box;
    }
    
    .nav-dropdown-wrapper.active > .nav-dropdown {
        display: block;
    }
    
    .nested-dropdown-wrapper.active > .nav-dropdown-nested {
        display: block;
    }
    
    .dropdown-item {
        color: var(--text-muted);
        text-align: center;
        padding: 12px;
    }
    
    .dropdown-item:hover {
        padding-left: 12px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .nav-dropdown-wrapper.active > .dropdown-toggle .arrow {
        transform: rotate(180deg);
    }
}


