/* ==========================================================================
   FONDAZIONE DE MARCHI - CODICE CORRETTO, LEGGERO E ULTRA-NITIDO
   ========================================================================== */

/* 1. RISORSE ESTERNE (Carica i simboli social + il font Poppins) */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   1.1 FORZATURA NITIDEZZA ICONE (Risolve l'effetto sfocato)
   ========================================================================== */
/* Questo blocco applica un rendering sub-pixel ultra-definito a tutte le icone del sito */
.fa, .fas, .far, .fab, .fa-brands, [class*="fa-"],
[class*="eicon-"], .elementor-icons,
.dashicons, .dashicons-before,
#wpadminbar .ab-icon, #wpadminbar .ab-icon::before {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-smooth: always !important;
    transform: translateZ(0); /* Attiva l'accelerazione hardware per bordi netti */
}

/* 2. PROTEZIONE RIGIDA DI TUTTE LE ICONE (Evita i rettangoli vuoti) */
#wpadminbar .ab-icon, 
#wpadminbar .ab-icon::before, 
#wpadminbar .dashicons, 
#wpadminbar .dashicons::before,
.dashicons, 
.dashicons::before {
    font-family: 'dashicons' !important;
    display: inline-block !important;
}

.fa, .fas, .far, .fab, .fa-brands, [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome", sans-serif !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

[class*="eicon-"], .elementor-icons {
    font-family: "elementor-icons" !important;
}

/* 3. TIPOGRAFIA NATURALE (Solo su testi reali, senza appesantire) */
body, p, h1, h2, h3, h4, h5, h6, input, button, .menu-item a {
    font-family: 'Poppins', system-ui, sans-serif;
}
body {
    font-weight: normal; 
}

/* 3.1 ECCEZIONE: Testi delle anteprime (Sempre leggeri - Regular 400) */
.elementor-posts-container .elementor-post__excerpt,
.elementor-posts-container .elementor-post__excerpt *,
.elementor-post__excerpt,
.elementor-post__excerpt p,
.elementor-post__excerpt span,
.post-excerpt,
.post-excerpt p,
.entry-summary,
.entry-summary p {
    font-weight: 400 !important;
}

/* 4. ELIMINAZIONE DELLE SOLE FRECCE AZZURRE GIGANTI DELLO SLIDER */
.elementor-swiper-button, 
.elementor-swiper-button-prev, 
.elementor-swiper-button-next,
.swiper-button-prev,
.swiper-button-next,
.elementor-swiper-button i,
.elementor-swiper-button svg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* 5. DESIGN DEI TITOLI H1 (Eleganti ed equilibrati) */
.single-post h1, .page h1, .single-post h1.entry-title, .page h1.entry-title,
.single-post h1.post-title, .page h1.post-title, .single-post .page-title h1, 
.page .page-title h1, .single-post .page-title-wrap h1, .page .page-title-wrap h1,
.single-post .title-header h1, .page .title-header h1, .single-post .fancy-header h1, 
.page .fancy-header h1, .single-post .entry-header h1, .page .entry-header h1 {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: clamp(30px, 4vw, 40px) !important;
    font-weight: 800 !important;
    text-transform: none !important;
    color: #0f172a !important;
    letter-spacing: -1px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    margin: 20px auto 10px auto !important;
    max-width: 850px !important;
    display: block !important;
}

/* 6. RIMOZIONE ELEMENTI GRAFICI NATIVI (Staffe rosse del tema) */
.single-post .page-title-wrap::before, .page .page-title-wrap::before,
.single-post .page-title-wrap::after, .page .page-title-wrap::after,
.single-post .title-header::before, .page .title-header::before,
.single-post .title-header::after, .page .title-header::after,
.single-post h1::before, .page h1::before,
.single-post h1::after, .page h1::after,
.single-post .entry-title::before, .page .entry-title::before,
.single-post .entry-title::after, .page .entry-title::after {
    display: none !important;
    content: "" !important;
    border: none !important;
    background: none !important;
}

/* 7. METADATI BLOG */
.single-post .entry-meta, .single-post .post-meta, .single-post .metadata, .single-post .post-attribution {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    color: #64748b !important;
    font-weight: 700 !important;
    margin: 25px 0 40px 0 !important;
    text-align: center !important;
}
.single-post .entry-meta a, .single-post .post-meta a {
    color: #0f172a !important;
    text-decoration: none !important;
    border-bottom: 1.5px solid #d9251c !important;
    padding-bottom: 2px !important;
}

/* ==========================================================================
   8. DESIGN FOOTER MONO-ROSSO ISTITUZIONALE
   ========================================================================== */
body { overflow-x: hidden !important; }

footer, #colophon, .site-footer, .footer-wrap, #footer, .site-footer-bottom {
    background-color: #d9251c !important;
}
footer, footer p, footer div, footer span, footer li, #colophon, #colophon p, .site-footer p {
    color: #ffffff !important;
}
footer a, #colophon a, .site-footer a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.fdm-footer-wrapper {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    background-color: #d9251c !important;
    box-sizing: border-box !important;
}
.fdm-footer-main {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 60px 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 30px !important;
}
.fdm-footer-col { flex: 1 1 220px !important; box-sizing: border-box !important; }

.fdm-footer-col h3 {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 2px solid rgba(255,255,255,0.3) !important;
    padding-bottom: 8px !important;
}
.fdm-footer-col p { font-size: 14px !important; line-height: 1.6 !important; margin-bottom: 15px !important; }
.fdm-footer-col a.fdm-mail { text-decoration: underline !important; font-weight: 600 !important; }
.fdm-footer-col ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.fdm-footer-col ul li { margin-bottom: 12px !important; font-size: 14px !important; }
.fdm-footer-col ul li a { color: #ffffff !important; text-decoration: none !important; opacity: 0.85 !important; }
.fdm-footer-col ul li a:hover { opacity: 1 !important; text-decoration: underline !important; }

.fdm-newsletter-box {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    padding: 20px !important;
    border-radius: 12px !important;
}
.fdm-newsletter-box p { font-size: 13px !important; }
.fdm-newsletter-btn {
    display: block !important;
    background: #ffffff !important; 
    color: #d9251c !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 12px 20px !important;
    border-radius: 30px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
}
.fdm-newsletter-btn:hover { background: #18181b !important; color: #ffffff !important; transform: translateY(-2px) !important; }

.fdm-social-links { 
    display: flex !important; 
    gap: 12px !important; 
    margin-top: 20px !important; 
}
.fdm-social-icon, 
.fdm-social-icon i, 
.fdm-social-links a, 
.fdm-social-links a i {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: none !important;
    background-image: none !important;
}
.fdm-social-icon {
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important;
    width: 40px !important; 
    height: 40px !important; 
    border-radius: 50% !important;
    background-color: rgba(255,255,255,0.15) !important; 
    color: #ffffff !important; 
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}
.fdm-social-icon:hover { 
    transform: translateY(-3px) !important; 
    background-color: #ffffff !important; 
    color: #d9251c !important; 
}

/* ==========================================================================
   9. PAGINA NEWSLETTER DEDICATA (/newsletter)
   ========================================================================== */
.fdm-page-newsletter-container {
    display: flex !important; flex-wrap: wrap !important; background: #ffffff !important;
    border-radius: 16px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
    overflow: hidden !important; margin: 30px auto !important; max-width: 1050px !important;
}
.fdm-newsletter-image-col { flex: 1 1 450px !important; min-height: 450px !important; }
.fdm-newsletter-image-col img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }
.fdm-newsletter-form-col { flex: 1 1 450px !important; padding: 45px !important; box-sizing: border-box !important; background: #f8fafc !important; }
.fdm-newsletter-form-col h2 { color: #d9251c !important; font-size: 28px !important; font-weight: 700 !important; margin: 0 0 10px 0 !important; text-align: left !important; letter-spacing: -0.5px !important; }
.fdm-newsletter-form-col h2::after { display: none !important; }
.fdm-newsletter-form-col p { color: #475569 !important; font-size: 14px !important; line-height: 1.5 !important; margin-bottom: 25px !important; }

.fdm-page-form-row { display: flex !important; gap: 12px !important; margin-bottom: 12px !important; }
.fdm-page-form-group { display: flex !important; flex-direction: column !important; gap: 4px !important; margin-bottom: 12px !important; width: 100% !important; }
.fdm-page-form-row .fdm-page-form-group { margin-bottom: 0 !important; }
.fdm-page-form-group label { font-size: 11px !important; font-weight: 600 !important; color: #334155 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.fdm-page-form-group input {
    width: 100% !important; padding: 10px 14px !important; border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important; background: #ffffff !important; color: #1e293b !important;
    font-size: 14px !important; box-sizing: border-box !important; transition: all 0.2s ease !important;
}
.fdm-page-form-group input:focus { border-color: #d9251c !important; box-shadow: 0 0 0 3px rgba(217, 37, 28, 0.1) !important; outline: none !important; }

.fdm-page-privacy-group { display: flex !important; align-items: flex-start !important; gap: 10px !important; margin: 22px 0 !important; font-size: 13px !important; color: #475569 !important; }
.fdm-page-privacy-group input { margin-top: 3px !important; cursor: pointer !important; }
.fdm-page-privacy-group a { color: #d9251c !important; text-decoration: underline !important; }
.fdm-page-submit-btn {
    width: 100% !important; background: #d9251c !important; color: #ffffff !important; border: none !important;
    padding: 14px !important; border-radius: 30px !important; font-weight: 700 !important; font-size: 14px !important;
    text-transform: uppercase !important; letter-spacing: 0.5px !important; cursor: pointer !important; transition: all 0.2s ease !important;
}
.fdm-page-submit-btn:hover { background: #18181b !important; transform: translateY(-1px) !important; }

@media (max-width: 768px) {
    .fdm-newsletter-image-col { min-height: 250px !important; }
    .fdm-newsletter-form-col { padding: 30px 20px !important; }
    .fdm-page-form-row { flex-direction: column !important; gap: 12px !important; }
}

/* ==========================================================================
   STILI LAYOUT DONAZIONI - FONDAZIONE DE MARCHI
   ========================================================================== */
.fdm-donazioni-wrapper {
    font-family: 'Poppins', sans-serif;
    color: #334155;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Introduzione */
.fdm-intro-section {
    text-align: center;
    margin-bottom: 50px;
}
.fdm-intro-section h2 {
    color: #d9251c;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}
.fdm-intro-section p {
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
    color: #475569;
}
.fdm-divider {
    border: none;
    height: 3px;
    background: #f1f5f9;
    margin: 40px auto;
    max-width: 100px;
    border-radius: 2px;
}

/* Griglia Progetti */
.fdm-progetti-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fdm-progetti-title span {
    color: #d9251c;
}
.fdm-grid-progetti {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.fdm-card-progetto {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fdm-card-progetto:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.fdm-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.fdm-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.fdm-card-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 15px 0 12px 0 !important;
}
.fdm-card-content p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Box dei Tagli di Donazione */
.fdm-tagli-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px dashed #cbd5e1;
}
.fdm-tagli-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 10px;
    display: block;
}
.fdm-tagli-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.fdm-tagli-list li {
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fdm-tagli-list li::before {
    content: none !important;
}
.fdm-tagli-list strong {
    color: #d9251c;
}

/* Bottone Dona della Card */
.fdm-btn-dona-card {
    display: block;
    background: #d9251c;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;
    padding: 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
    margin-top: auto;
}
.fdm-btn-dona-card:hover {
    background: #18181b;
}

/* Sezione Metodi di Pagamento */
.fdm-metodi-section {
    background: #f8fafc;
    border-radius: 24px;
    padding: 40px;
    margin-top: 60px;
    border: 1px solid #e2e8f0;
}
.fdm-metodi-title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 40px;
}
.fdm-grid-metodi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.fdm-col-metodo {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.fdm-col-metodo h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
}
.fdm-col-metodo p {
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 20px;
}

/* QR Code */
.fdm-qr-container {
    margin-top: 15px;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 12px;
    background: #ffffff;
    max-width: 140px;
}
.fdm-qr-container img {
    width: 100%;
    height: auto;
    display: block;
}
.fdm-qr-label {
    font-size: 10px;
    color: #64748b;
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Info bancarie */
.fdm-bank-details {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin-bottom: 15px;
}
.fdm-bank-details code {
    display: block;
    font-family: monospace;
    background: #ffffff;
    padding: 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    margin-top: 5px;
    word-break: break-all;
}

/* Box Fiscale */
.fdm-box-fiscale {
    background: #fff5f5;
    border-left: 4px solid #d9251c;
    padding: 25px;
    border-radius: 12px;
    margin-top: 40px;
    font-size: 13.5px;
    color: #475569;
    text-align: left;
}
.fdm-box-fiscale strong {
    color: #d9251c;
}

@media (max-width: 768px) {
    .fdm-metodi-section {
        padding: 20px;
    }
    .fdm-grid-progetti {
        grid-template-columns: 1fr;
    }
}

/* Forza la pagina delle donazioni a essere larga e spaziosa */
.page-id-XXXX .entry-content, 
.page-id-XXXX .post-content, 
.page-id-XXXX .container,
.page-id-XXXX .et_pb_row, 
.page-id-XXXX .elementor-container {
    max-width: 1200px !important;
    width: 100% !important;
}

/* Rende le scritte dei tagli donazione leggibili e non contratte */
.fdm-tagli-list li {
    white-space: normal !important;
    word-break: break-word !important;
}