/**
 * FONDAZIONE ARMANDO - FOOTER ENHANCED CSS
 * 
 * CSS per footer migliorato con ACF
 * IMPORTANTE: Questo CSS sovrascrive gli stili footer esistenti in main.css
 */

/* ==========================================================================
   Reset stili footer esistenti
   ========================================================================== */

/* Rimuove stili footer vecchi quando footer-enhanced è presente */
.site-footer.footer-enhanced .footer-content {
    display: none !important; /* Nasconde il vecchio footer-content se presente */
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */

.newsletter-section {
    background: #024873 !important; /* Blu scuro solido come nell'immagine */
    padding: 21px 20px !important;
    color: #ffffff !important;
    width: 100% !important;
}

.newsletter-section .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.newsletter-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 40px !important;
    flex-wrap: wrap !important;
}

.newsletter-container > * {
    flex: 0 0 auto !important;
}

.newsletter-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
}

.newsletter-title {
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
}

.newsletter-subtitle {
    font-size: 18px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    opacity: 1 !important;
    line-height: 1.5 !important;
    color: #ffffff !important;
}

.newsletter-actions {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.btn-newsletter {
    display: inline-block !important;
    padding: 14px 32px !important;
    background: #26BF94 !important; /* Verde/teal come nell'immagine */
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.btn-newsletter:hover,
.btn-newsletter:focus {
    background: #22a582 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(38, 191, 148, 0.4) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Footer Main
   ========================================================================== */

/* Override stili footer esistenti con maggiore specificità */
.site-footer.footer-enhanced {
    background: transparent !important;
    color: #ffffff !important;
    padding: 0 !important;
}

.footer-enhanced .footer-main {
    background: #1a3a52 !important;
    padding: 60px 0 40px !important;
}

.footer-enhanced .footer-main .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-enhanced .footer-container {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1fr 1fr !important;
    gap: 40px !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   Footer Columns
   ========================================================================== */

.footer-enhanced .footer-column-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #26BF94 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 20px !important;
    line-height: 1.3 !important;
}

/* About Column */
.footer-enhanced .footer-about {
    padding-right: 20px;
}

.footer-enhanced .footer-logo {
    margin-bottom: 20px !important;
}

.footer-enhanced .footer-logo-img {
    max-width: 180px !important;
    height: auto !important;
    filter: none !important; /* Rimuove filtro bianco se presente */
}

/* Footer Description - Massima specificità */
.site-footer.footer-enhanced .footer-about .footer-description,
.footer-enhanced .footer-about .footer-description,
.footer-enhanced .footer-description {
    font-size: 15px !important;
    line-height: 1.7 !important;
    opacity: 1 !important;
    margin-bottom: 20px !important;
    margin-top: 20px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    text-align: left !important;
}

/* Social Icons */
.footer-enhanced .footer-social {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.footer-enhanced .social-link {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 20px !important;
    transition: all 0.3s ease !important;
}

.footer-enhanced .social-link:hover {
    background: #26BF94 !important;
    transform: translateY(-3px) !important;
    color: #ffffff !important;
}

.footer-enhanced .social-link i {
    line-height: 1 !important;
}

/* Links Columns (Link Rapidi, Come Aiutarci) */
.footer-enhanced .footer-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-enhanced .footer-menu li {
    margin-bottom: 12px !important;
}

.footer-enhanced .footer-menu li a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    line-height: 1.5 !important;
}

.footer-enhanced .footer-menu li a:hover {
    color: #26BF94 !important;
    transform: translateX(5px) !important;
}

/* Contact Column */
.footer-enhanced .contact-info {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-enhanced .contact-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.footer-enhanced .contact-item i {
    color: #26BF94 !important;
    font-size: 18px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    text-align: left !important;
}

.footer-enhanced .contact-item a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    flex: 1 !important;
}

.footer-enhanced .contact-item a:hover {
    color: #26BF94 !important;
}

.footer-enhanced .contact-item span {
    color: rgba(255, 255, 255, 0.85) !important;
    flex: 1 !important;
}

.footer-enhanced .contact-item strong {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */

.footer-enhanced .footer-bottom {
    background: #0f2738 !important;
    padding: 25px 0 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-top: none !important; /* Rimuove border-top se presente */
    margin-top: 0 !important;
}

.footer-enhanced .footer-bottom .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.footer-enhanced .footer-bottom-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.footer-enhanced .copyright p {
    margin: 0 !important;
}

.footer-enhanced .footer-legal-links {
    display: flex !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-enhanced .footer-legal-links li {
    margin: 0 !important;
}

.footer-enhanced .footer-legal-links a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.footer-enhanced .footer-legal-links a:hover {
    color: #26BF94 !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 992px) {
    .footer-enhanced .footer-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }
    
    .newsletter-container {
        gap: 30px !important;
    }
    
    .newsletter-section .newsletter-title {
        font-size: 28px !important;
    }
    
    .newsletter-section .newsletter-subtitle {
        font-size: 16px !important;
    }
    
    .btn-newsletter {
        padding: 12px 28px !important;
        font-size: 14px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .newsletter-section {
        padding: 40px 20px !important;
    }
    
    .newsletter-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 25px !important;
    }
    
    .newsletter-text {
        text-align: left !important;
        width: 100% !important;
    }
    
    .newsletter-section .newsletter-title {
        font-size: 24px !important;
    }
    
    .newsletter-section .newsletter-subtitle {
        font-size: 16px !important;
        margin-bottom: 0 !important;
    }
    
    .newsletter-actions {
        width: 100% !important;
    }
    
    .btn-newsletter {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 14px 24px !important;
        font-size: 14px !important;
    }
    
    .footer-enhanced .footer-main {
        padding: 40px 0 30px !important;
    }
    
    .footer-enhanced .footer-container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: left !important;
    }
    
    .footer-enhanced .footer-about {
        padding-right: 0 !important;
        text-align: left !important;
    }

    .footer-enhanced .footer-logo {
        text-align: left !important;
    }

    .footer-enhanced .footer-logo-img {
        margin-left: 0 !important;
        margin-right: auto !important;
        max-width: min(200px, 75vw) !important;
    }

    .footer-enhanced .footer-column-title {
        text-align: left !important;
    }

    .footer-enhanced .footer-links,
    .footer-enhanced .footer-help {
        text-align: left !important;
    }

    .footer-enhanced .footer-menu {
        text-align: left !important;
        width: 100% !important;
    }

    .footer-enhanced .footer-menu li {
        text-align: left !important;
    }

    .footer-enhanced .footer-menu li a {
        text-align: left !important;
    }
    
    .footer-enhanced .footer-contact {
        text-align: left !important;
    }
    
    .footer-enhanced .footer-social {
        justify-content: flex-start !important;
    }
    
    .footer-enhanced .footer-bottom-content {
        flex-direction: column !important;
        text-align: left !important;
        align-items: flex-start !important;
    }
    
    .footer-enhanced .footer-legal-links {
        justify-content: flex-start !important;
    }
} /* ← chiusura @media 768px */

/* Small Mobile */
@media (max-width: 480px) {
    .newsletter-section .newsletter-title {
        font-size: 20px;
    }
    
    .newsletter-section .newsletter-subtitle {
        font-size: 14px;
    }
    
    .btn-newsletter {
        padding: 14px 30px;
        font-size: 14px;
    }
    
    .footer-enhanced .footer-column-title {
        font-size: 16px !important;
    }
    
    .footer-enhanced .footer-menu li a,
    .footer-enhanced .contact-item {
        font-size: 14px !important;
    }
    
    .footer-enhanced .social-link {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

/* ==========================================================================
   Utilities & Overrides
   ========================================================================== */

/* Assicura che i link Remix Icon siano centrati */
.footer-social .social-link i,
.contact-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ← fix overflow orizzontale: le colonne della griglia possono
   restringersi sotto il min-content (1fr = minmax(auto, 1fr)) */
.footer-enhanced .footer-column {
    min-width: 0;
}

/* ← fix overflow orizzontale: i testi spezzano le stringhe lunghe
   (email, URL, C.F. da ACF) invece di allargare la griglia */
.footer-enhanced .contact-item a,
.footer-enhanced .contact-item span,
.footer-enhanced .footer-description,
.footer-enhanced .footer-menu a {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Fix per menu WordPress nativi */
.footer-menu .menu-item {
    margin: 0;
}

.footer-menu .menu-item a {
    padding: 0;
}

/* Stile specifico per back to top button (se non già presente) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #26BF94;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #22a582;
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .newsletter-section,
    .footer-social,
    .back-to-top {
        display: none;
    }
    
    .footer-main {
        background: #ffffff;
        color: #000000;
    }
    
    .footer-column-title {
        color: #024873;
    }
    
    .footer-menu li a,
    .contact-item,
    .contact-item a {
        color: #000000;
    }
}

