/* ========================================
   NAVBAR COMPONENT
   Complete navbar styling extracted from homepage
======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    padding: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.navbar--visible {
    background: rgba(15, 15, 15, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(147, 51, 234, 0.3);
}

/* Navbar Content */
.navbar__content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
}

/* Logo */
.navbar__logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
    position: relative;
    justify-self: start;
}

.navbar__logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 8px rgba(147, 51, 234, 0.3));
}

.navbar__logo:focus,
.navbar__logo:focus-visible,
.navbar__logo:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: scale(1.05);
}

/* Reset di default per tutti i link della navbar */
.navbar a,
.navbar a:focus,
.navbar a:active,
.navbar a:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Navigation Links */
.navbar__nav {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

.navbar__link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

/* Subtle underline animation */
.navbar__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar__link:hover {
    color: #ffffff;
    transform: translateY(-1px);
    background: rgba(147, 51, 234, 0.1);
}

.navbar__link:hover::after {
    width: 100%;
}

.navbar__link:focus {
    outline: none;
    color: #ffffff;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown__arrow {
    font-size: 0.75rem;
    color: #ffffff;
    transition: all 0.3s ease;
    margin-left: 0.1rem;
}

.dropdown:hover .dropdown__arrow {
    transform: rotate(180deg);
}

.dropdown__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    padding: 0.75rem 0;
    margin: 0;
    list-style: none;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown__link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown__link:hover,
.dropdown__link:focus {
    background: rgba(147, 51, 234, 0.15);
    border-left-color: #ec4899;
    color: #ffffff;
    outline: none;
    transform: translateX(5px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 32px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger__line {
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger:hover .hamburger__line {
    background: #ec4899;
}

.hamburger.active .hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: #ec4899;
}

.hamburger.active .hamburger__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active .hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: #ec4899;
}

/* Desktop Responsive - Menu a destra */
@media (min-width: 769px) {
    .navbar__content {
        grid-template-columns: auto 1fr;
    }

    .navbar__nav {
        justify-content: flex-end;
        justify-self: end;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* Mobile layout - switch back to flexbox for proper hamburger positioning */
    .navbar__content {
        display: flex;
        justify-content: space-between;
        padding: 0 1.5rem;
        height: 65px;
    }
    
    .navbar__logo {
        font-size: 1.6rem;
    }
    
    .navbar__nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 300px;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 2rem 2rem;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    .navbar__nav.navbar__nav--active {
        right: 0;
    }
    
    .navbar__link {
        font-size: 1.1rem;
        color: #ffffff;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(147, 51, 234, 0.15);
        justify-content: center;
        text-align: center;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Specific styling for dropdown arrows to be positioned correctly */
    .dropdown .navbar__link {
        justify-content: center;
        position: relative;
    }

    .dropdown .navbar__link .dropdown__arrow {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .navbar__link::after {
        display: none;
    }
    
    .dropdown__arrow {
        transition: all 0.3s ease;
        font-size: 0.75rem;
        margin-left: 0.2rem;
    }
    
    .dropdown__menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(147, 51, 234, 0.1);
        border: none;
        border-radius: 8px;
        padding: 0;
        margin: 0.5rem 0 0 0;
        min-width: auto;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .dropdown.active .dropdown__menu,
    .dropdown.dropdown--active .dropdown__menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }
    
    .dropdown.active .dropdown__arrow,
    .dropdown.dropdown--active .dropdown__arrow {
        transform: rotate(180deg);
    }
    
    .dropdown__link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-left: none;
        border-bottom: 1px solid rgba(147, 51, 234, 0.1);
    }
    
    .dropdown__link:last-child {
        border-bottom: none;
    }
    
    .dropdown__link:hover,
    .dropdown__link:focus {
        background: rgba(147, 51, 234, 0.2);
        transform: none;
        border-left: none;
    }

}

/* ========================================
   LANGUAGE SELECTOR ICONS
   Only icon styling - inherits dropdown behavior
======================================== */

/* Language selector icons and text styling */
.language-current__wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-current__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
}

.language-current__code {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.language-option__flag {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.language-option__name {
    flex: 1;
}

.language-option__code {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
