:root {
    --yellow: #f7b835;
    --yellowHover:#FFD700;
    --brown: #473108;
    --brownLight: #4A4A4A;
    --red:#E91E63;
    --redHover:#C2185B;
    --white:#ffffff;
}

li{
    list-style-type: none;
}

/* Evitar scroll cuando el menú está abierto */
body.no-scroll {
    overflow: hidden;
}

/* Estilos del header */
header {
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(247, 184, 53, 1);
    padding: 1rem;
    transition: background 0.3s ease-in-out, opacity 0.3s;
    z-index: 1000;
}

header.scrolled {
    background: rgba(247, 184, 53, 1);
}

/* Contenedor del menú */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo a img {
    width: 100px;
    height: auto;
}

.logo a span {
    color: var(--brown);
    font-size: 1rem;
    font-weight: bold;
}

/* Botón menú hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    color: var(--brown);
    font-size: 2rem;
    cursor: pointer;
    display: block;
    margin-right: 15px;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.menu-toggle.open {
    transform: rotate(90deg);
}

/* Menú principal */
.nav-links {
    list-style: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--yellow);
    display: none;
    flex-direction: column;
    text-align: left;
    padding: 80px 1rem 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
}

.nav-links.active {
    transform: translateX(0);
    display: flex;
}

nav a {
    text-decoration: none;
    color: var(--brown);
    font-size: 1rem;
    font-weight: bold;
    padding: 12px 15px;
    display: block;
    transition: color 0.3s ease-in-out;
}

nav a:hover {
    color: #ec5555;
}

/* Submenús */
.submenu {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    list-style: none;
    text-decoration: none;
    width: 100%;
    border-radius: 5px;
    padding-left: 15px;
    margin: 5px 0;
}

.dropdown.active .submenu {
    display: block;
}

/* Flecha para dropdown en móvil */
@media (max-width: 767px) {
    .dropdown-toggle {
        position: relative;
        padding-right: 30px;
    }
    
    .dropdown-toggle::after {
        content: '+';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: '-';
    }
}

/* Estilos de enlaces del submenú */
.submenu li a {
    text-decoration: none;
    color: var(--brown);
    padding: 10px;
    font-size: 0.95rem;
    transition: background 0.3s ease-in-out;
}

.submenu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Design - Desktop */
/* Responsive Design - Desktop (768px en adelante) */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        position: static;
        height: auto;
        flex-direction: row;
        background: none;
        width: auto;
        transform: none !important;
        padding: 0;
        display: flex;
        overflow: visible; /* Asegura que no haya scroll */
    }

    .nav-links li {
        position: relative; /* Necesario para posicionar el submenú */
    }

    .dropdown:hover .submenu {
        display: block;
    }

    .submenu {
        position: absolute;
        top: 100%; /* Coloca el submenú justo debajo del item padre */
        left: 0;
        width: 180px;
        background: var(--white);
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
        display: none;
    }

    /* Solución definitiva para el hover gap */
    .dropdown {
        position: relative;
    }
    
    .dropdown::after {
        content: '';
        position: absolute;
        bottom: -10px; /* Extiende el área hoverable */
        left: 0;
        width: 100%;
        height: 10px;
        background: transparent;
    }
}

@media (min-width: 1100px) {
    .logo a span {
        margin-left: -15px;/*para que el span del logo quede más cerca*/
    }
}