/* Botón hamburguesa */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hamburger-menu:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger-menu.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menú lateral */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-content {
    padding: 80px 30px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 40px;
    text-align: center;
}

.sidebar-header .logo-nav svg {
    width: 200px;
    height: auto;
}

.sidebar-header .logo-nav svg path {
    fill: white;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-menu-item {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu-item:hover {
    color: #ff8b4e;
    padding-left: 10px;
}

.sidebar-menu-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #ff8b4e;
    border-radius: 2px;
}

.sidebar-language-selector {
    display: none;
    padding-top: 20px;
}

.sidebar-language-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-language-select:hover,
.sidebar-language-select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff8b4e;
    outline: none;
}

.sidebar-language-select option {
    background: #1a1a1a;
    color: white;
}

/* Overlay para cerrar el menú */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modo oscuro */
.dark-mode .hamburger-menu {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.dark-mode .hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode .hamburger-icon span {
    background: #000;
}

.dark-mode .sidebar-menu {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.dark-mode .sidebar-menu-item {
    color: #000;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .sidebar-menu-item:hover {
    color: #ff8b4e;
}

.dark-mode .sidebar-header .logo-nav svg path {
    fill: #000;
}

.dark-mode .sidebar-language-select {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #000;
}

.dark-mode .sidebar-language-select:hover,
.dark-mode .sidebar-language-select:focus {
    background: rgba(0, 0, 0, 0.2);
    border-color: #ff8b4e;
}

.dark-mode .sidebar-language-select option {
    background: #f5f5f5;
    color: #000;
}

.dark-mode .sidebar-language-selector {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.content-drop {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 998;
}

.cta-lang {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.cta-lang:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.lang-content {
    display: block; /* El display se mantiene siempre como block para usar transiciones */
    overflow: hidden; 
    max-height: 0; 
    transition: max-height 0.3s ease-out;
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    /* border: 1px solid rgb(204, 204, 204);
    padding: 10px; */
    right: 0px;
    top: 100%;
    margin-top: 5px;
    list-style: none;
    width: 145px;
}

.lang-content.open {
    max-height: 200px; /* Ajusta a la altura de tu contenido. */
    border: 1px solid rgb(204, 204, 204);
    border-radius: 8px;
}

.lang-content a:hover {
    background: #b3b3b3;
}

.lang-content a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 5px 10px;
    border-radius: 3px;
}

.f-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    line-height: inherit;
}

.f-col {
    display: flex;
    flex-direction: column;
}

/* Hover states */
.f-row:hover .lang-content {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-menu {
        width: 300px;
        left: -300px;
    }

    .hamburger-menu {
        width: 35px;
        height: 35px;
        top: 15px;
        left: 15px;
    }

    .content-drop {
        top: 15px;
        right: 15px;
    }

    .f-row {
        width: 60px;
        height: 35px;
    }

    .selected-lang, a.lang-option {
        font-size: 15px;
    }

    .lang-content {
        width: 110px;
    }

    .hamburger-icon {
        width: 20px;
        height: 15px;
    }
    
    .sidebar-content {
        padding: 70px 20px 20px;
    }
    
    .sidebar-header .logo-nav svg {
        width: 150px;
    }
    
    .sidebar-menu-item {
        font-size: 16px;
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .sidebar-menu {
        width: 280px;
        left: -280px;
    }
    
    .hamburger-menu {
        width: 25px;
        height: 25px;
        top: 10px;
        left: 10px;
    }

    .content-drop {
        top: 10px;
        right: 10px;
    }

    .f-row {
        width: 50px;
        height: 25px;
    }

    .selected-lang, a.lang-option {
        font-size: 12px;
    }

    .lang-content {
        width: 90px;
    }
    
    .hamburger-icon {
        width: 15px;
        height: 10px;
    }
    
    .hamburger-icon span {
        height: 2px;
    }

    .sidebar-header {
        text-align: left;
    }
}
