/* Secondary Navigation Styles */
#secondary-nav {
    background: rgba(30, 58, 138, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 65px;
    z-index: 999;
    backdrop-filter: blur(10px);
}

#secondary-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0.6rem 0;
    list-style: none;
    justify-content: center;
    overflow-x: auto;
}

#secondary-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
    border-radius: 4px;
    position: relative;
}

/* Hover effect */
#secondary-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fbbf24;
    transform: translateY(-1px);
}

/* Focus effect for keyboard navigation */
#secondary-nav a:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fbbf24;
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Active/Current page indicator */
#secondary-nav a:target,
#secondary-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fbbf24;
}

/* Underline animation on hover */
#secondary-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

#secondary-nav a:hover::after,
#secondary-nav a:focus::after,
#secondary-nav a.active::after {
    width: calc(100% - 2rem);
}

/* Special style for area riservata button */
#secondary-nav a[href="/login"] {
    background: rgba(255,255,255,0.15);
}

#secondary-nav a[href="/login"]:hover {
    background: rgba(255,255,255,0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #secondary-nav ul {
        gap: 0.25rem;
        padding: 0.5rem;
    }

    #secondary-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Smooth scroll behavior for the whole page */
html {
    scroll-behavior: smooth;
}

/* Target sections - adjust scroll position for sticky nav */
section[id] {
    scroll-margin-top: 130px; /* Height of navbar + secondary nav + padding */
}