/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}


/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

[data-theme="dark"] .mobile-menu {
    background: rgba(30, 31, 42, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
    right: 0;
    opacity: 1;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    margin: 0.3rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary);
    transform: translateX(5px);
}

.mobile-nav-link:active {
    transform: translateX(5px) scale(0.98);
}

/* Add icons to mobile nav links */
.mobile-nav-link::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 0.8rem;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    opacity: 0.7;
    transition: var(--transition);
}

.mobile-nav-link:hover::before {
    opacity: 1;
}

/* Icon for Home */
.mobile-nav-link[href="#home"]::before,
.mobile-nav-link[href="../#home"]::before,
.mobile-nav-link[href="../"]::before,
.mobile-nav-link[href="../index.html#home"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'%3E%3C/path%3E%3C/svg%3E");
}

/* Icon for Chi Sono */
.mobile-nav-link[href="#about"]::before,
.mobile-nav-link[href="../#about"]::before,
.mobile-nav-link[href="../index.html#about"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'%3E%3C/path%3E%3C/svg%3E");
}

/* Icon for Servizi */
.mobile-nav-link[href="#servizi"]::before,
.mobile-nav-link[href="../#servizi"]::before,
.mobile-nav-link[href="../index.html#servizi"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10'%3E%3C/path%3E%3C/svg%3E");
}

/* Icon for Blog */
.mobile-nav-link[href="#blog"]::before,
.mobile-nav-link[href="blog/"]::before,
.mobile-nav-link[href="blog/index.html"]::before,
.mobile-nav-link[href="./"]::before,
.mobile-nav-link[href="index.html"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253'%3E%3C/path%3E%3C/svg%3E");
}

/* Icon for Contatti */
.mobile-nav-link[href="#contatti"]::before,
.mobile-nav-link[href="../#contatti"]::before,
.mobile-nav-link[href="../index.html#contatti"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
}

/* Mobile Menu Header */
.mobile-menu-header {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(99, 102, 241, 0.05);
}

[data-theme="dark"] .mobile-menu-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.1);
}

.mobile-menu-header h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .mobile-menu-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.mobile-menu-footer small {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.75rem;
}