:root {
    /* Modo Claro */
    --primary-color: #003366;
    --primary-dark: #002244;
    --secondary-color: #f0f8ff;
    --text-color: #333;
    --text-light: #555;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --bg-color: #ffffff;
    --dropdown-bg: #ffffff;
    --hamburger-color: #003366;
    --body-bg: #f9f9f9;
}

/* Modo Oscuro */
[data-theme="dark"] {
    --primary-color: #0a84ff;
    --primary-dark: #0066cc;
    --secondary-color: #1c2c3f;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --bg-color: #1a1a1d;
    --dropdown-bg: #2c2c30;
    --hamburger-color: #0a84ff;
    --body-bg: #1a1a1d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--body-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* NAVEGACIÓN PRINCIPAL */
nav {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1002;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
    filter: var(--logo-filter, none);
}

[data-theme="dark"] .logo-img {
    --logo-filter: brightness(1.2) invert(0.1);
}

.brand-name {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

/* ENLACES DE NAVEGACIÓN */
.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2vw, 30px);
    transition: var(--transition);
}

.nav-links a, .dropdown-btn {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 0;
}

.nav-links a:hover, .dropdown-btn:hover {
    color: var(--primary-color);
}

/* BOTONES DE AUTENTICACIÓN */
.auth-buttons {
    display: flex;
    gap: clamp(10px, 1.5vw, 15px);
}

.btn {
    padding: clamp(8px, 1vw, 10px) clamp(15px, 2vw, 20px);
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.85rem, 1vw, 0.9rem);
}

.btn-login {
    background-color: var(--bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-login:hover {
    background-color: var(--secondary-color);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: 2px solid var(--primary-color);
}

.btn-register:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* MENÚ DESPLEGABLE */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dropdown-bg);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 5px;
    max-height: 0;
    overflow: hidden;
    top: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

[data-theme="dark"] .dropdown-content {
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
    max-height: 350px;
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
}

.dropdown-arrow {
    display: inline-block;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-color);
    transition: var(--transition);
}

.dropdown:hover .dropdown-arrow,
.dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
    border-top-color: var(--primary-color);
}

/* MENÚ HAMBURGUESA */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--hamburger-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* VERSIÓN MÓVIL */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1002;
    }
    
    /* OCULTAR COMPLETAMENTE EL LOGOTIPO EN MÓVIL */
    .logo-container {
        display: none !important;
    }
    
    nav {
        padding: 12px 5%;
        justify-content: flex-end;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: transform 0.4s ease, opacity 0.4s ease;
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        opacity: 1;
        transform: none;
        transition: max-height 0.4s ease;
        display: block !important;
    }
    
    .dropdown.active .dropdown-content {
        max-height: 500px;
    }
    
    .dropdown-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 0;
    }
    
    .hamburger.active {
        position: fixed;
        right: 5%;
        top: 25px;
    }
    
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--hamburger-color);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--hamburger-color);
    }
}

@media (max-width: 480px) {
    nav {
        padding: 10px 3%;
    }
    
    .nav-links {
        padding: 70px 20px 25px;
    }
    
    .hamburger.active {
        right: 3%;
        top: 20px;
    }
}