/* Variables */
:root {
    --nav-height: 60px;
    --nav-text: #F5F5F5;
    --font-size: 16px;
    --logo-size: 1.5rem;
    --transition-speed: 0.3s;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos base */
body {
    padding-top: var(--nav-height);
}

/* Estilos mobile first */
.navbar {
    background-color: var(--primary-color);
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: var(--logo-size);
    font-weight: bold;
}

.nav-logo a {
    color: var(--nav-text);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.nav-logo a:hover { color: var(--accent-color); }

/* Menu de hamburgesa */
.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 21px;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
}

.bar {
    height: 3px;
    width: 100%;
    background-color: var(--nav-text);
    border-radius: 3px;
    transition: all var(--transition-speed);
    transform-origin: center;
}

/* Menu movil */
.nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    gap: 0;
    list-style: none;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease-in-out;
    overflow-y: auto;
    z-index: 999;
    margin: 0;
}

.nav-menu.active { transform: translateX(0); }

.nav-item {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
}

.nav-link {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    display: block;
    width: 100%;
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.nav-link:hover {
    color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.1);
}

/* Animacion del menu */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Media queries */
/* Escritorio */
@media screen and (min-width: 769px) {
    .navbar {
        position: fixed;
        height: var(--nav-height);
    }
    
    /* Ocultar hamburgesa */
    .hamburger {
        display: none;
    }

    /* Menu horizontal para escritorio */
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        background: none;
        padding: 0;
        transform: none;
        transition: none;
        overflow: visible;
        gap: 2rem;
        justify-content: flex-end;
    }
    
    .nav-item {
        width: auto;
        margin: 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        background: none;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--accent-color);
        transition: all var(--transition-speed);
        transform: translateX(-50%);
    }

    .nav-link:hover::after {
        width: 80%;
    }

    .nav-link:hover {
        background-color: transparent;
    }
}

/* Escritorio grande */
@media screen and (min-width: 1025px) {
    .nav-menu {
        gap: 2.5rem;
    }

    .nav-container {
        padding: 0 2rem;
    }
    
}