/* ============================================================
   EVENTIUM - Base CSS (Variables, Reset, Global Components)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   1. COLOR AND DESIGN VARIABLES
   ============================================================ */
:root {
    /* Primary Colors */
    --primary-color: #6366f1;           /* Indigo - Primary Action */
    --primary-dark: #4f46e5;            /* Dark Indigo - Hover */
    --primary-light: #818cf8;           /* Light Indigo */
    
    /* Secondary Colors */
    --secondary-color: #10b981;         /* Green - Success */
    --secondary-dark: #059669;          /* Dark Green */
    --secondary-light: #6ee7b7;         /* Light Green */
    
    /* Status Colors */
    --danger-color: #ef4444;            /* Red - Error/Danger */
    --warning-color: #f59e0b;           /* Orange - Warning */
    --info-color: #3b82f6;              /* Blue - Info */
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Background Colors - Dark Mode by Default */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    
    /* Borders */
    --border-color: #374151;
    --border-dark: #4b5563;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    
    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Line Height */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* ============================================================
   2. RESET AND GLOBAL STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   4. CONTAINER AND GRID
   ============================================================ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

.content {
    width: 100vw;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.cta-button,
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-lg);
}

.cta-button:hover,
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.secondary-button,
.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.secondary-button:hover,
.btn-secondary:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.btn-success {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--secondary-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
}

/* ============================================================
   6. NAVEGACIÓN Y HEADER
   ============================================================ */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    vertical-align: middle;
}

/* Hamburger Menu Button - Oculto en desktop */
.nav-toggle {
    display: none !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
    z-index: 1001;
}

.nav-toggle:hover {
    background-color: var(--bg-tertiary);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger animation cuando está activo */
.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-links {
    display: flex;
    list-style: none !important;
    list-style-type: none !important;
    gap: var(--spacing-xl);
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none !important;
    list-style-type: none !important;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Elementos solo para móvil - ocultos en desktop */
.mobile-auth {
    display: none !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
}

.btn-login:hover {
    background-color: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   7. FOOTER
   ============================================================ */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    display: block;
    margin-bottom: var(--spacing-sm);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ============================================================
   8. CARDS AND COMPONENTS
   ============================================================ */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ============================================================
   9. UTILITIES
   ============================================================ */
.min-vh-100 {
    min-height: 100vh;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.gap-md {
    gap: var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.px-lg {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.py-lg {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    h1 {
        font-size: var(--font-size-4xl);
    }
    
    h2 {
        font-size: var(--font-size-3xl);
    }
    
    /* Show hamburger menu on mobile */
    .nav-toggle {
        display: flex !important;
    }
    
    /* Hide desktop auth buttons on mobile */
    .nav-actions {
        display: none !important;
    }
    
    /* Mobile Menu Styles - oculto por defecto */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 100px var(--spacing-xl) var(--spacing-xl);
        gap: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        overflow-y: auto;
        list-style: none;
    }
    
    /* Mostrar menú cuando tiene clase .show */
    .nav-links.show {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        list-style: none;
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        padding: var(--spacing-lg) var(--spacing-md);
        font-size: var(--font-size-lg);
        color: var(--text-primary);
        border-radius: var(--radius-md);
        transition: all var(--transition-base);
        text-decoration: none;
    }
    
    .nav-links a:hover {
        background-color: var(--bg-tertiary);
        color: var(--primary-color);
        padding-left: var(--spacing-lg);
    }
    
    /* Show mobile auth section */
    .mobile-auth {
        display: block;
        width: 100%;
        padding-top: var(--spacing-lg);
        border-top: 1px solid var(--border-color);
        margin-top: auto;
    }
    
    .btn-login-mobile {
        display: block;
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        background-color: var(--primary-color);
        color: white;
        font-weight: var(--font-weight-semibold);
        font-size: var(--font-size-base);
        border-radius: var(--radius-lg);
        text-align: center;
        text-decoration: none;
        transition: all var(--transition-base);
    }
    
    .btn-login-mobile:hover {
        background-color: var(--primary-dark);
        transform: translateY(-2px);
    }
    
    .mobile-profile-link {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        background-color: var(--bg-secondary);
        border-radius: var(--radius-lg);
        text-decoration: none;
        color: var(--text-primary);
    }
    
    .mobile-avatar {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        object-fit: cover;
        border: 2px solid var(--primary-color);
    }
    
    .mobile-auth .user-profile {
        justify-content: flex-start;
    }
    
    .mobile-auth .user-info {
        align-items: flex-start;
        text-align: left;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-links {
        gap: var(--spacing-lg);
    }
    
    .nav-links a {
        font-size: var(--font-size-sm);
    }
}

/* ============================================================
   USER PROFILE HEADER
   ============================================================ */
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.user-profile:hover {
    background-color: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    line-height: var(--line-height-tight);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: var(--line-height-tight);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
    
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    .cta-button,
    .secondary-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-base);
    }
}
