/* ============================================
   COMMON STYLES - gianlucagentile.com
   Stili condivisi per header, footer, menu, cookie
============================================ */

/* CSS Variables */
:root {
    --primary: #fcb321;
    --primary-dark: #e5a01e;
    --secondary: #000222;
    --text: #000222;
    --text-light: #64748b;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --shadow-glow: 0 0 60px rgba(252, 179, 33, 0.3);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Lato', sans-serif;
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--bg-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   HEADER
============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: var(--shadow-lg);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { flex-shrink: 0; }
.logo img { height: 48px; width: auto; transition: all 0.3s; }
.header.scrolled .logo img { height: 40px; width: auto; }

/* Logo switching based on scroll state */
.logo-white { display: block; }
.logo-color { display: none; }
.header.scrolled .logo-white { display: none; }
.header.scrolled .logo-color { display: block; }

/* For pages with light background (no dark hero) */
.header.light-hero {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: var(--shadow-lg) !important;
}
.header.light-hero .logo-white { display: none !important; }
.header.light-hero .logo-color { display: block !important; }
.header.light-hero .nav a { color: var(--text) !important; }
.header.light-hero .menu-toggle span { background: var(--secondary) !important; }

.nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.nav a {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
    position: relative;
    padding: 11px;
    transition: all 0.3s;
    white-space: nowrap;
}

.header.scrolled .nav a { color: var(--text); }

.nav a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav a:not(.btn-nav):hover::after { width: 100%; }

.btn-nav {
    background: var(--primary);
    color: var(--secondary) !important;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(252, 179, 33, 0.5);
    transition: all 0.3s;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 179, 33, 0.5);
}

/* Desktop CTA - visible on desktop only */
.btn-nav-desktop {
    display: inline-flex;
}

/* Nav footer - hidden on desktop */
.nav-footer {
    display: none;
}

/* Mobile header - hidden on desktop */
.nav-mobile-header {
    display: none;
}

/* Nav content wrapper - transparent on desktop */
.nav-content {
    display: contents;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s;
}

.header.scrolled .menu-toggle span { background: var(--secondary); }

/* Menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   MEGA MENU
============================================ */
.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item > a svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
}

.nav-item:hover > a svg {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 2, 34, 0.15), 0 10px 30px rgba(0, 2, 34, 0.1);
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

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

.mega-menu-inner {
    padding: 20px;
}

.mega-menu-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 16px;
    padding-left: 12px;
}

.mega-menu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mega-menu-item::after { display: none !important; }

.mega-menu-item:hover {
    background: linear-gradient(135deg, rgba(252, 179, 33, 0.08) 0%, rgba(252, 179, 33, 0.02) 100%);
    transform: translateX(4px);
}

.mega-menu-item:hover .mega-menu-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #ffd166 100%);
    transform: scale(1.05);
}

.mega-menu-item:hover .mega-menu-icon svg { stroke: var(--secondary); }

.mega-menu-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(252, 179, 33, 0.15) 0%, rgba(252, 179, 33, 0.05) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-dark);
    transition: all 0.3s;
}

.mega-menu-text { flex: 1; min-width: 0; }

.mega-menu-text strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.mega-menu-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Legacy dropdown support */
.dropdown { display: none; }

/* ============================================
   COMMON BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #ffd166 100%);
    color: var(--secondary);
    box-shadow: 0 8px 30px rgba(252, 179, 33, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffd166 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(252, 179, 33, 0.5);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(252, 179, 33, 0.1);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #000344;
    transform: translateY(-2px);
}

/* ============================================
   SECTION HEADER (Common)
============================================ */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(252, 179, 33, 0.1) 0%, rgba(252, 179, 33, 0.05) 100%);
    color: var(--primary-dark);
    padding: 10px 24px;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--secondary);
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.15rem;
    line-height: 1.8;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 100px 0 40px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(252, 179, 33, 0.3), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.footer-brand img {
    height: 56px;
    margin-bottom: 24px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.9;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 28px;
    color: var(--white);
    position: relative;
    padding-bottom: 12px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 14px; }

.footer-column a {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-column a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 20px;
    width: 100%;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.footer-legal a:hover {
    color: var(--primary);
}

.footer-legal span {
    color: rgba(255, 255, 255, 0.4);
}

.footer-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    margin: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-partner img {
    height: 100px;
    transition: transform 0.3s;
}

.footer-partner img:hover {
    transform: scale(1.05);
}

.footer-partner p {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

/* ============================================
   COOKIE BANNER
============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
}

.cookie-banner-text h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.cookie-banner-text p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-accept {
    background: var(--primary);
    color: var(--secondary);
    box-shadow: 0 4px 15px rgba(252, 179, 33, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 179, 33, 0.4);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border-color);
}

.cookie-btn-reject:hover {
    border-color: var(--text-light);
    background: var(--bg-secondary);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cookie-btn-settings:hover {
    background: rgba(252, 179, 33, 0.1);
}

.cookie-link {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: underline;
}

.cookie-link:hover {
    color: var(--primary);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1) translateY(0);
}

.cookie-modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    color: var(--text);
}

.cookie-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    background: var(--border-color);
}

.cookie-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-light);
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-modal-body > p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.cookie-category {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-secondary);
    cursor: pointer;
}

.cookie-category-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.cookie-category-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 28px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
    min-width: 120px;
}

/* Cookie Settings Floating Button */
.cookie-settings-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(252, 179, 33, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-settings-float.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.cookie-settings-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(252, 179, 33, 0.5);
}

.cookie-settings-float svg {
    width: 24px;
    height: 24px;
    fill: var(--secondary);
}

.cookie-settings-float .tooltip {
    position: absolute;
    left: 60px;
    background: var(--secondary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.cookie-settings-float .tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent var(--secondary) transparent transparent;
}

.cookie-settings-float:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   RESPONSIVE - Common Elements
============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1200px) {
    .nav { gap: 20px; }
    .nav a { font-size: 0.9rem; padding: 10px 6px; }
    .btn-nav { padding: 12px 24px; font-size: 0.9rem; }
}

@media (max-width: 1024px) {
    .nav { gap: 16px; }
    .nav a { font-size: 0.85rem; padding: 8px 4px; }
    .btn-nav { padding: 10px 20px; font-size: 0.85rem; }

    .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-column:last-child { grid-column: auto; }

    .mega-menu {
        max-width: 95%;
    }

    .mega-menu-inner {
        grid-template-columns: 1fr 1fr;
    }

    .mega-menu-cta {
        grid-column: 1 / -1;
        flex-direction: row;
        padding: 24px 32px;
        gap: 24px;
        text-align: left;
    }

    .mega-menu-cta-icon {
        margin-bottom: 0;
    }

    .mega-menu-cta > div {
        flex: 1;
    }
}

@media (max-width: 768px) {
    /* ============================================
       FULL-SCREEN MOBILE MENU
       Compatible with: iOS Safari, Chrome, Firefox, Samsung Internet
       Tested on: iPhone SE, iPhone 12/13/14, iPad, Android devices
    ============================================ */

    /* RESET - Force override desktop styles */
    .nav,
    .nav.active,
    .nav * {
        box-sizing: border-box !important;
    }

    /* Full-screen nav container */
    .nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        height: -webkit-fill-available !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #000222 !important;
        background: linear-gradient(180deg, #000222 0%, #050530 100%) !important;
        display: none !important;
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -webkit-align-items: stretch !important;
        -ms-flex-align: stretch !important;
        align-items: stretch !important;
        -webkit-justify-content: flex-start !important;
        -ms-flex-pack: start !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        z-index: 9999 !important;
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .nav.active {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
    }

    /* Mobile Menu Header */
    .nav-mobile-header {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-justify-content: space-between !important;
        -ms-flex-pack: justify !important;
        justify-content: space-between !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        padding: 12px 16px !important;
        padding-top: max(12px, env(safe-area-inset-top)) !important;
        background: #000222 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        -webkit-flex-shrink: 0 !important;
        -ms-flex-negative: 0 !important;
        flex-shrink: 0 !important;
        min-height: 60px !important;
        width: 100% !important;
    }

    .nav-mobile-header .nav-logo {
        display: block !important;
        line-height: 0 !important;
    }

    .nav-mobile-header .nav-logo img {
        height: 32px !important;
        width: auto !important;
        max-width: 150px !important;
        display: block !important;
    }

    .nav-mobile-close {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        background: rgba(255,255,255,0.1) !important;
        border: none !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        -webkit-justify-content: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-mobile-close:active {
        background: rgba(255,255,255,0.2) !important;
    }

    .nav-mobile-close svg {
        width: 20px !important;
        height: 20px !important;
        stroke: #ffffff !important;
        stroke-width: 2.5 !important;
        fill: none !important;
    }

    /* Scrollable content area */
    .nav-content {
        display: block !important;
        -webkit-flex: 1 1 0 !important;
        -ms-flex: 1 1 0px !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 8px 16px 16px 16px !important;
        width: 100% !important;
    }

    /* Nav items reset */
    .nav-content .nav-item,
    .nav-content > a {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    .nav-content .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    /* Nav item links */
    .nav-content .nav-item > a {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-justify-content: space-between !important;
        -ms-flex-pack: justify !important;
        justify-content: space-between !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        width: 100% !important;
        padding: 14px 0 !important;
        margin: 0 !important;
        color: #ffffff !important;
        font-family: 'Poppins', sans-serif !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        background: transparent !important;
        border: none !important;
    }

    .nav-content .nav-item > a::after {
        display: none !important;
        content: none !important;
    }

    .nav-content .nav-item > a svg {
        width: 16px !important;
        height: 16px !important;
        stroke: #ffffff !important;
        fill: none !important;
        -webkit-transition: -webkit-transform 0.25s ease !important;
        transition: transform 0.25s ease !important;
        -webkit-flex-shrink: 0 !important;
        -ms-flex-negative: 0 !important;
        flex-shrink: 0 !important;
        margin-left: 10px !important;
    }

    .nav-content .nav-item.open > a svg {
        -webkit-transform: rotate(180deg) !important;
        -ms-transform: rotate(180deg) !important;
        transform: rotate(180deg) !important;
    }

    /* Direct links (Chi Sono, Blog) */
    .nav-content > a {
        display: block !important;
        width: 100% !important;
        padding: 14px 0 !important;
        margin: 0 !important;
        color: #ffffff !important;
        font-family: 'Poppins', sans-serif !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        background: transparent !important;
    }

    .nav-content > a::after {
        display: none !important;
        content: none !important;
    }

    .nav-content > a:last-child {
        border-bottom: none !important;
    }

    /* Mega menu / Submenu */
    .mega-menu {
        position: static !important;
        display: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px 0 10px 0 !important;
        padding: 0 !important;
        background: rgba(255,255,255,0.04) !important;
        border-radius: 12px !important;
        border: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        -webkit-transform: none !important;
        -ms-transform: none !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .nav-item.open .mega-menu {
        display: block !important;
        padding: 8px !important;
    }

    .mega-menu-inner {
        padding: 0 !important;
        display: block !important;
        width: 100% !important;
    }

    .mega-menu-items {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mega-menu-item {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 10px 12px !important;
        margin: 0 0 2px 0 !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        background: transparent !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }

    .mega-menu-item::after {
        display: none !important;
        content: none !important;
    }

    .mega-menu-item:active {
        background: rgba(252, 179, 33, 0.15) !important;
    }

    .mega-menu-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        background: rgba(252, 179, 33, 0.12) !important;
        border-radius: 8px !important;
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        -webkit-justify-content: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important;
        -webkit-flex-shrink: 0 !important;
        -ms-flex-negative: 0 !important;
        flex-shrink: 0 !important;
    }

    .mega-menu-icon svg {
        width: 18px !important;
        height: 18px !important;
        stroke: #fcb321 !important;
        fill: none !important;
    }

    .mega-menu-text {
        -webkit-flex: 1 !important;
        -ms-flex: 1 !important;
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .mega-menu-text strong {
        display: block !important;
        color: #ffffff !important;
        font-family: 'Poppins', sans-serif !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .mega-menu-text span {
        display: block !important;
        color: rgba(255,255,255,0.5) !important;
        font-size: 11px !important;
        font-weight: 400 !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .mega-menu-cta {
        display: none !important;
    }

    /* Footer with CTA */
    .nav-footer {
        display: block !important;
        width: 100% !important;
        padding: 16px !important;
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
        background: #000222 !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        -webkit-flex-shrink: 0 !important;
        -ms-flex-negative: 0 !important;
        flex-shrink: 0 !important;
    }

    .nav-footer .btn-nav {
        display: block !important;
        width: 100% !important;
        padding: 14px 20px !important;
        margin: 0 !important;
        background: #fcb321 !important;
        color: #000222 !important;
        font-family: 'Poppins', sans-serif !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-decoration: none !important;
        border: none !important;
        border-radius: 50px !important;
        box-shadow: 0 4px 15px rgba(252, 179, 33, 0.3) !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }

    .nav-footer .btn-nav:active {
        background: #e5a31e !important;
    }

    /* Hide desktop elements */
    .btn-nav-desktop {
        display: none !important;
    }

    .nav-overlay {
        display: none !important;
    }

    /* Menu toggle button */
    .menu-toggle {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: flex !important;
        z-index: 10000 !important;
        position: relative !important;
    }

    .menu-toggle.active span {
        background: #ffffff !important;
    }

    /* Footer responsive */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .footer-bottom {
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    /* Cookie responsive */
    .cookie-banner-content {
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-align-items: stretch !important;
        -ms-flex-align: stretch !important;
        align-items: stretch !important;
        text-align: center !important;
    }

    .cookie-banner-actions {
        -webkit-justify-content: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important;
    }

    .cookie-btn {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }

    .cookie-modal-content {
        max-height: 85vh !important;
    }
}

@media (max-width: 480px) {
    .btn { width: 100%; justify-content: center; }

    /* Small screen mobile menu optimizations */
    .nav-mobile-header {
        padding: 10px 12px !important;
        min-height: 54px !important;
    }

    .nav-mobile-header .nav-logo img {
        height: 28px !important;
    }

    .nav-mobile-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .nav-content {
        padding: 6px 12px 12px 12px !important;
    }

    .nav-content .nav-item > a,
    .nav-content > a {
        padding: 12px 0 !important;
        font-size: 14px !important;
    }

    .mega-menu-item {
        padding: 8px 10px !important;
        gap: 10px !important;
    }

    .mega-menu-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .mega-menu-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .mega-menu-text strong {
        font-size: 12px !important;
    }

    .mega-menu-text span {
        font-size: 10px !important;
    }

    .nav-footer {
        padding: 12px !important;
    }

    .nav-footer .btn-nav {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }

    /* Cookie */
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-settings-float {
        bottom: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
    }

    .cookie-settings-float svg {
        width: 20px;
        height: 20px;
    }

    .cookie-settings-float .tooltip {
        display: none;
    }
}

/* Very small screens (iPhone SE, older phones) */
@media (max-width: 360px) {
    .nav-mobile-header .nav-logo img {
        height: 24px !important;
    }

    .nav-content .nav-item > a,
    .nav-content > a {
        padding: 10px 0 !important;
        font-size: 13px !important;
    }

    .mega-menu-item {
        padding: 6px 8px !important;
    }

    .mega-menu-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

    .mega-menu-text strong {
        font-size: 11px !important;
    }

    .mega-menu-text span {
        font-size: 9px !important;
    }
}

/* Landscape mode on phones */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
    .nav-mobile-header {
        padding: 8px 16px !important;
        min-height: 48px !important;
    }

    .nav-mobile-header .nav-logo img {
        height: 24px !important;
    }

    .nav-content .nav-item > a,
    .nav-content > a {
        padding: 8px 0 !important;
        font-size: 13px !important;
    }

    .mega-menu-item {
        padding: 6px 8px !important;
    }

    .mega-menu-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }

    .nav-footer {
        padding: 8px 16px !important;
    }

    .nav-footer .btn-nav {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}
