/**
 * ArturDevs - Layout Base CSS
 * Estilos base compartidos por todas las páginas
 * @version 2.0.0
 */

/* ==========================================================================
   CSS Variables - Tema Claro y Oscuro
   ========================================================================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Light theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --hero-gradient: linear-gradient(135deg, #4338ca 0%, #5b21b6 100%);
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar-custom {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.navbar-brand span {
    color: var(--primary);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Theme Toggle Button */
.btn-theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: var(--bg-tertiary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    z-index: 1000;
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

/* Desktop/Mobile Navigation Toggle */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .desktop-nav {
        display: none;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--primary);
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

/* ==========================================================================
   Common Buttons
   ========================================================================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================================================
   Common Cards
   ========================================================================== */
.card-custom {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-control-custom,
.form-select-custom {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    width: 100%;
}

.form-control-custom:focus,
.form-select-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--bg-secondary);
}

.form-control-custom::placeholder {
    color: var(--text-muted);
}

.form-label-custom {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: block;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert-custom {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

/* ==========================================================================
   Container Override
   ========================================================================== */
.container {
    max-width: 1200px;
}
