/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0, 220, 255, 0.40) 0%, rgba(0, 120, 180, 0.10) 60%, rgba(0, 20, 40, 0.0) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 220, 255, 0.25);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Logo - Nav - Actions */
    align-items: center;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 52px;
    width: auto;
}

/* Navigation - Desktop */
.nav-menu.desktop-only {
    display: flex;
    gap: 30px;
    justify-self: center;
    /* Centers in the grid cell */
}

.header-actions.desktop-only {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-self: end;
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s, text-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-link:hover {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Navigation Dropdown */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
    /* Bridge to menu */
    margin-bottom: -20px;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 220, 255, 0.25);
    border-radius: 12px;
    padding: 10px 0;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    font-family: var(--font-main);
    font-weight: 600;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Metallic & Glass Hover Variants */
.dropdown-item.hover-glass:hover,
.mobile-submenu-link.hover-glass:hover {
    background: linear-gradient(90deg, rgba(0, 220, 255, 0.2), rgba(0, 220, 255, 0.6));
    color: #fff;
    padding-left: 25px;
    box-shadow: inset 0 0 15px rgba(0, 220, 255, 0.3);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.dropdown-item.hover-emerald:hover {
    background: linear-gradient(90deg, #022c22, #10b981);
    color: #fff;
    padding-left: 25px;
}

.dropdown-item.hover-blue:hover {
    background: linear-gradient(90deg, #020617, #3b82f6);
    color: #fff;
    padding-left: 25px;
}

.dropdown-item.hover-gold:hover {
    background: linear-gradient(90deg, #422006, #fcd34d);
    color: #000;
    padding-left: 25px;
}

.dropdown-item.hover-ruby:hover {
    background: linear-gradient(90deg, #450a0a, #ef4444);
    color: #fff;
    padding-left: 25px;
}

.dropdown-item.hover-tornasol:hover {
    background: linear-gradient(90deg, #000000, #b8860b, #ffd700);
    color: #000;
    padding-left: 25px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    justify-self: end;
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 220, 255, 0.25);
    padding: 30px 20px;
    z-index: 9999;
    overflow-y: auto;
}

.mobile-menu-drawer.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-link,
.mobile-nav-toggle {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 1px;
}

/* Submenu Styles */
.mobile-nav-item {
    display: flex;
    flex-direction: column;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-top: 5px;
}

.mobile-submenu.active {
    max-height: 500px;
    padding: 10px 0;
    margin-bottom: 15px;
}

.mobile-submenu-link {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.mobile-submenu-link:hover,
.mobile-submenu-link:active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.05);
    border-left: 2px solid #FFD700;
    padding-left: 25px;
}

.mobile-nav-toggle i {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: rgba(0, 220, 255, 0.8);
}

.mobile-nav-toggle.active i {
    transform: rotate(180deg);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 900px) {
    .header-inner {
        /* Flex evita huecos raros cuando las columnas desktop están en display:none */
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block;
        flex-shrink: 0;
    }
}

/* Footer */
footer {
    border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
}
