/**
 * Casatese Theme - Custom CSS Completo
 * Include: Menu Responsive, Single Post, Pages, Search
 * Versione: 3.0
 */

/* ==========================================================================
   HEADER & NAVIGATION - DESKTOP
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}



/* FIX TITOLI MOBILE DIVENTA SPONSOR */
@media (max-width: 768px) {
    .sponsor-hero h1,
    .diventa-sponsor h1,
    h1 {
        font-size: 2rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    .sponsor-hero h2,
    .diventa-sponsor h2,
    h2 {
        font-size: 1.5rem !important;
        word-wrap: break-word !important;
    }
    
    .sponsor-hero p,
    .diventa-sponsor p {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }
    
    /* Pacchetti sponsor */
    .sponsor-packages .package-title,
    .package h3 {
        font-size: 1.3rem !important;
    }
    
    /* Statistiche */
    .sponsor-stats .stat-number,
    .stat-number {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
}


/* FIX STATISTICHE MOBILE */
@media (max-width: 768px) {
    .sponsor-stats .stat-number,
    .stat-number,
    .stats-grid .stat-number {
        font-size: 2rem !important;
    }
    
    .sponsor-stats .stat-label,
    .stat-label,
    .stats-grid .stat-label {
        font-size: 0.85rem !important;
    }
    
    .stats-grid,
    .sponsor-stats-grid {
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .sponsor-stats .stat-number,
    .stat-number,
    .stats-grid .stat-number {
        font-size: 1.6rem !important;
    }
    
    .sponsor-stats .stat-label,
    .stat-label,
    .stats-grid .stat-label {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
}

/* FIX SOCIAL FOOTER MOBILE */
@media (max-width: 768px) {
    .footer-section {
        text-align: center !important;
    }
    
    .social-links {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }
    
    .footer-content {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* CSS per le nuove frecce dello slider */
.slider-btn {
    font-size: 24px !important; /* Dimensione freccia */
    line-height: 1 !important;
    padding-bottom: 4px; /* Piccolo aggiustamento per centratura verticale */
    font-family: sans-serif; /* Assicura rendering corretto del carattere */
}

/* ==========================================================================
   HERO SLIDER COMPLETO
   ========================================================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    background: #1e293b;
    margin-top: 0 !important;
}

/* GALLERY FIX - RESET */
.article-gallery {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 40px 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.article-gallery .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    position: relative !important;
}

.article-gallery .gallery-item {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.article-gallery .gallery-item a {
    display: block !important;
    position: relative !important;
}

.article-gallery .gallery-item img {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: cover !important;
}

.article-gallery .gallery-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}



/* Rimuovi spazio tra header e contenuto */
.site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#content,
.site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix spazio mobile */
@media (max-width: 768px) {
    .site-header {
        margin-bottom: 0 !important;
    }
    
    .site-main,
    #main,
    main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .hero-slider {
        margin-top: 0 !important;
    }
    
    #content,
    .site-content,
    .content-area {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(220, 38, 38, 0.4) 100%);
    z-index: 1;
}

.slide-content {
    position: absolute !important;
    bottom: 100px !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    text-align: center !important;
    color: #ffffff !important;
    z-index: 2 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 30px 50px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.slide-content h2 {
    font-size: 3rem !important;
    font-weight: 900 !important;
    margin: 0 0 15px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7) !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 900px !important;
}

.slide-content p {
    font-size: 1.2rem !important;
    margin: 0 0 25px 0 !important;
    opacity: 0.95 !important;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5) !important;
    line-height: 1.5 !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 900px !important;
}

.slide-cta {
    display: inline-block !important;
    padding: 15px 40px !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 50px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4) !important;
    margin-top: 10px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.slide-cta:hover {
    background: #b91c1c !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5) !important;
    color: #ffffff !important;
}

/* Slider Controls - Frecce */
.slider-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.slider-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    padding: 0;
    margin: 0;
}

.slider-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: scale(1.1);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.slider-dot.active {
    background: #dc2626;
    border-color: #dc2626;
    transform: scale(1.2);
}

/* Slider Responsive */
@media (max-width: 1024px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-content {
        bottom: 60px;
        padding: 20px;
    }
    
    .slide-content h2 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 55vh;
        min-height: 350px;
    }
    
    .slide-content {
        bottom: 50px;
        width: 95%;
        padding: 15px;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
        letter-spacing: 1px;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .slide-cta {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px !important;
    }
    
    .slider-dots {
        bottom: 15px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 60vh !important;
        min-height: 350px !important;
        margin-top: 0 !important;
    }
    
    .slide-content {
        bottom: 60px !important;
        padding: 15px !important;
    }
    
    .slide-content h2 {
        font-size: 1.6rem !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 8px !important;
    }
    
    .slide-content p {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    .slide-cta {
        padding: 12px 25px !important;
        font-size: 0.85rem !important;
    }
    
    .slider-controls {
        padding: 0 10px !important;
    }
    
    .slider-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
    }
    
    .slider-dots {
        bottom: 15px !important;
        gap: 10px !important;
    }
    
    .slider-dot {
        width: 10px !important;
        height: 10px !important;
        border-width: 1px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
    }
    
    .slider-dot.active {
        transform: scale(1.1) !important;
    }
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* ==========================================================================
   STILE BOTTONI E LINK FOOTER
   ========================================================================== */

/* 1. BOTTONI SOCIAL (Stile "Pulsante") */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-links a .social-label {
    display: none; /* Nasconde il testo, mostra solo icona */
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Colori specifici per ogni social */
.social-links a.social-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-links a.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #dc2743;
}

.social-links a.social-youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

/* 2. LINK DEL MENU (Lista verticale con animazione) */
.footer-menu li a {
    color: #cbd5e1; /* Grigio chiaro */
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    padding: 5px 0;
}

.footer-menu li a:hover {
    color: #dc2626; /* Diventa rosso */
    padding-left: 10px; /* Si sposta a destra */
	text-decoration: none;
}

/* Freccetta che appare all'hover */
.footer-menu li a::before {
    content: '›';
    position: absolute;
    left: -10px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #dc2626;
    font-weight: bold;
}

.footer-menu li a:hover::before {
    opacity: 1;
    left: 0;
	text-decoration: none;
}

/* 3. LINK PRIVACY/CREDITS (Footer in basso) */
.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #dc2626;
    text-decoration: none;
}

/* ==========================================================================
   STILI LINK E BOTTONI NEWS (HOMEPAGE)
   ========================================================================== */

/* 1. Stile "Leggi tutto" nelle card (Link testuale colorato) */
.related-card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    color: White; /* Rosso Casatese */
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.related-card-link:hover {
    color: Yellow; /* Blu Casatese al passaggio del mouse */
    transform: translateX(5px); /* Effetto movimento freccia */
}

/* 2. Stile pulsante "Vedi tutte le notizie" (Bottone grande) */
.btn-view-all {
    display: inline-block;
    padding: 15px 35px;
    background-color: #1e40af; /* Sfondo Blu */
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    border-radius: 50px; /* Bordi arrotondati */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.btn-view-all:hover {
    background-color: #dc2626; /* Diventa Rosso al passaggio */
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

/* 3. Stile alternativo per "Leggi tutto" negli archivi (Bordo) */
.article-content .read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 24px;
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.article-content .read-more:hover {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Logo */
.site-logo {
    flex-shrink: 0;
    z-index: 10001;
}

.site-logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover img {
    transform: scale(1.02);
}

.site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

/* ==========================================================================
   NAVIGATION DESKTOP
   ========================================================================== */
.main-navigation {
    display: flex;
    align-items: center;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu > li {
    position: relative;
}

.primary-menu > li > a {
    display: block;
    padding: 12px 18px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 18px;
    right: 18px;
    height: 3px;
    background: #dc2626;
    border-radius: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current_page_item > a::after {
    transform: scaleX(1);
}

.primary-menu > li > a:hover {
    color: #dc2626;
    background: #fef2f2;
}

.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a {
    color: #dc2626;
}

/* Dropdown Arrow Desktop */
.primary-menu > li.menu-item-has-children > a {
    padding-right: 28px;
}

.primary-menu > li.menu-item-has-children > a::before {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

.primary-menu > li.menu-item-has-children:hover > a::before {
    transform: translateY(-50%) rotate(180deg);
}

/* Sottomenu Desktop */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 9999;
    border: 1px solid #e2e8f0;
}

.primary-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    margin: 0;
}

.primary-menu .sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.primary-menu .sub-menu li a:hover {
    background: #fef2f2;
    color: #dc2626;
    border-left-color: #dc2626;
    padding-left: 25px;
}

/* Sotto-sottomenu (terzo livello) */
.primary-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 5px;
}

.primary-menu .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================================================
   HAMBURGER BUTTON
   ========================================================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100001;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #1e293b;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin: 3px 0;
}

/* Hamburger Animation - X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background: #dc2626;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background: #dc2626;
}

/* ==========================================================================
   OVERLAY - DISABILITATO
   ========================================================================== */
.nav-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.nav-overlay.active {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Body lock when menu open */
body.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   MOBILE NAVIGATION
   ========================================================================== */
@media (max-width: 1024px) {
    .header-container {
        height: 70px;
    }
    
    .site-logo img {
        height: 50px;
    }
    
    /* Mostra hamburger */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Menu Mobile - Slide da destra */
    .main-navigation {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 85% !important;
        max-width: 380px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 90px 0 30px 0 !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2) !important;
        overflow-y: auto !important;
        z-index: 99999 !important;
        display: flex !important;
    }
    
    .main-navigation.active {
        right: 0 !important;
    }
    
    /* Menu Items Mobile */
    .primary-menu {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        display: flex !important;
    }
    
    .primary-menu > li {
        width: 100% !important;
        border-bottom: 1px solid #f1f5f9 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .primary-menu > li:last-child {
        border-bottom: none !important;
    }
    
    .primary-menu > li > a {
        padding: 18px 25px !important;
        font-size: 1.1rem !important;
        border-radius: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        color: #1e293b !important;
        text-decoration: none !important;
        background: #ffffff !important;
        font-weight: 600 !important;
    }
    
    .primary-menu > li > a:hover {
        background: #fef2f2 !important;
        color: #dc2626 !important;
    }
    
    .primary-menu > li > a::after {
        display: none !important;
    }
    
    /* Dropdown Arrow Mobile */
    .primary-menu > li.menu-item-has-children > a {
        padding-right: 25px !important;
    }
    
    .primary-menu > li.menu-item-has-children > a::before {
        position: static !important;
        transform: none !important;
        margin-left: auto !important;
        border-top: 6px solid #94a3b8 !important;
        border-left: 5px solid transparent !important;
        border-right: 5px solid transparent !important;
        transition: transform 0.3s ease !important;
    }
    
    .primary-menu > li.menu-item-has-children.submenu-open > a::before {
        transform: rotate(180deg) !important;
        border-top-color: #dc2626 !important;
    }
    
    /* Sottomenu Mobile */
    .primary-menu .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: #f8fafc !important;
        padding: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.4s ease !important;
        display: block !important;
        list-style: none !important;
        margin: 0 !important;
    }
    
    .primary-menu > li.submenu-open > .sub-menu {
        max-height: 1000px !important;
    }
    
    .primary-menu .sub-menu li {
        border-bottom: 1px solid #e2e8f0 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .primary-menu .sub-menu li:last-child {
        border-bottom: none !important;
    }
    
    .primary-menu .sub-menu li a {
        padding: 15px 25px 15px 40px !important;
        font-size: 1rem !important;
        border-left: none !important;
        color: #475569 !important;
        text-decoration: none !important;
        display: block !important;
        background: #f8fafc !important;
        font-weight: 500 !important;
    }
    
    .primary-menu .sub-menu li a::before {
        content: '→' !important;
        margin-right: 10px !important;
        color: #94a3b8 !important;
        transition: all 0.3s ease !important;
    }
    
    .primary-menu .sub-menu li a:hover {
        padding-left: 45px !important;
        background: #fef2f2 !important;
        border-left: none !important;
        color: #dc2626 !important;
    }
    
    .primary-menu .sub-menu li a:hover::before {
        color: #dc2626 !important;
    }
    
    /* Terzo livello mobile */
    .primary-menu .sub-menu .sub-menu {
        margin-left: 0 !important;
        background: #f1f5f9 !important;
    }
    
    .primary-menu .sub-menu .sub-menu li a {
        padding-left: 55px !important;
        background: #f1f5f9 !important;
    }
    
    .primary-menu .sub-menu li.submenu-open > .sub-menu {
        max-height: 500px !important;
    }
}

/* ==========================================================================
   EXTRA SMALL SCREENS
   ========================================================================== */
@media (max-width: 480px) {
    .header-container {
        height: 65px;
        padding: 0 15px;
    }
    
    .site-logo img {
        height: 45px;
    }
    
    .main-navigation {
        width: 100%;
        max-width: 100%;
        padding-top: 75px;
    }
    
    .primary-menu > li > a {
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    .primary-menu .sub-menu li a {
        padding: 14px 20px 14px 35px;
    }
}

/* ==========================================================================
   FIX CONTENUTO SOTTO HEADER FISSO
   ========================================================================== */
body {
    padding-top: 80px;
}

@media (max-width: 1024px) {
    body {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 65px;
    }
}

/* ==========================================================================
   SINGLE POST STYLES
   ========================================================================== */
.single-article {
    padding-top: 0;
}

.article-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #64748b;
}

.breadcrumb a {
    color: #1e40af;
    text-decoration: none;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #94a3b8;
}

.breadcrumb .current {
    color: #64748b;
}

.article-header .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.article-header .article-title {
    font-size: 3rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-header .article-excerpt {
    font-size: 1.2rem;
    color: #64748b;
    line-height: 1.6;
}

.article-featured-image {
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 15px;
    font-style: italic;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: #1e293b;
    margin: 40px 0 20px 0;
    font-weight: 700;
}

.article-body h2 {
    font-size: 2rem;
}

.article-body h3 {
    font-size: 1.5rem;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-left: 4px solid #1e40af;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #64748b;
    background: #f8fafc;
    padding: 20px;
    border-radius: 5px;
}

.article-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.article-tags h4 {
    margin-bottom: 15px;
    color: #1e293b;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    background: #f1f5f9;
    color: #64748b;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #1e40af;
    color: white;
}

.article-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.article-share h4 {
    margin-bottom: 20px;
    color: #1e293b;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.share-buttons a,
.share-buttons button {
    background: #f1f5f9;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-facebook:hover {
    background: #1877f2;
    color: white;
}

.share-twitter:hover {
    background: #1da1f2;
    color: white;
}

.share-whatsapp:hover {
    background: #25d366;
    color: white;
}

.share-copy:hover {
    background: #1e40af;
    color: white;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.author-box,
.related-articles {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.author-box h4,
.related-articles h4 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.2rem;
}

.author-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.author-info img {
    border-radius: 50%;
    flex-shrink: 0;
}

.author-details h5 {
    margin-bottom: 8px;
    color: #1e293b;
}

.author-details p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-post {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.related-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content h6 {
    margin-bottom: 5px;
    line-height: 1.3;
}

.related-content h6 a {
    color: #1e293b;
    text-decoration: none;
    font-size: 0.95rem;
}

.related-content h6 a:hover {
    color: #1e40af;
}

.related-content time {
    font-size: 0.8rem;
    color: #64748b;
}

/* ==========================================================================
   ARTICLE NAVIGATION
   ========================================================================== */
.article-navigation {
    background: #f8fafc;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.nav-previous,
.nav-next {
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
}

.nav-links a:hover {
    color: #1e40af;
}

/* ==========================================================================
   PAGE STYLES
   ========================================================================== */
.single-page {
    padding-top: 0;
}

.page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 20px;
}

.page-excerpt {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    padding: 60px 0;
}

.page-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

/* ==========================================================================
   SEARCH RESULTS STYLES
   ========================================================================== */
.search-results {
    padding-top: 0;
}

.search-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0;
    text-align: center;
}

.search-results-count {
    margin: 20px 0;
    color: #64748b;
    font-size: 1.1rem;
}

.search-form-container {
    max-width: 500px;
    margin: 30px auto 0;
}

.search-form {
    display: flex;
    gap: 0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-input-wrapper {
    display: flex;
    flex: 1;
    background: white;
}

.search-field {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-submit {
    background: #1e40af;
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #3b82f6;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 60px 0;
}

.search-result-item {
    display: flex;
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.result-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
}

.result-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.result-type {
    background: #1e40af;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.result-title {
    margin-bottom: 10px;
}

.result-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
}

.result-title a:hover {
    color: #1e40af;
}

.result-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 15px;
}

.result-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.result-link:hover {
    color: #3b82f6;
}

.no-search-results {
    text-align: center;
    padding: 60px 0;
}

.no-search-results h2 {
    color: #1e293b;
    margin-bottom: 20px;
}

.search-suggestions {
    max-width: 500px;
    margin: 40px auto;
    text-align: left;
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
}

.search-suggestions h3 {
    color: #1e293b;
    margin-bottom: 15px;
}

.search-suggestions ul {
    list-style-position: inside;
    color: #64748b;
}

.search-suggestions li {
    margin-bottom: 8px;
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */
.comments-section {
    background: #f8fafc;
    padding: 60px 0;
    border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .article-sidebar {
        position: static;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-next {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .article-header .article-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .article-header .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .search-result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .result-thumbnail {
        width: 100%;
        height: 200px;
        align-self: center;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .related-post {
        flex-direction: column;
        text-align: center;
    }
    
    .related-thumb {
        width: 100%;
        height: 150px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .article-header,
    .page-header,
    .search-header {
        padding: 40px 0;
    }
    
    .article-header .article-title,
    .page-title {
        font-size: 1.8rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .search-form {
        border-radius: 15px;
    }
    
    .search-field,
    .search-submit {
        padding: 12px 15px;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .site-header,
    .article-navigation,
    .article-share,
    .article-sidebar,
    .comments-section,
    .site-footer,
    .back-to-top,
    .mobile-menu-toggle,
    .nav-overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .single-article,
    .single-page {
        padding-top: 0;
    }
    
    .article-body,
    .page-body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .article-header .article-title,
    .page-title {
        font-size: 24pt;
        color: #000;
    }
}