/* ============================================
   MATTIA FERRARESE THEME - MAIN STYLES
   Stile: Modern Political Campaign (US-inspired)
   Palette: FdI Blue (#003366) + Italian Tricolor
   ============================================ */

/* === CSS VARIABLES === */
:root {
    --mf-blue-dark: #001A33;
    --mf-blue: #003366;
    --mf-blue-mid: #004C99;
    --mf-blue-light: #0066CC;
    --mf-red: #C8102E;
    --mf-red-dark: #9B0000;
    --mf-green: #008C45;
    --mf-gold: #D4A843;
    --mf-white: #FFFFFF;
    --mf-offwhite: #F5F3EF;
    --mf-gray-100: #F8F9FA;
    --mf-gray-200: #E9ECEF;
    --mf-gray-300: #DEE2E6;
    --mf-gray-700: #495057;
    --mf-gray-900: #1A1A1A;
    --mf-font-display: 'Oswald', 'Impact', sans-serif;
    --mf-font-body: 'Barlow', 'Helvetica Neue', sans-serif;
    --mf-font-condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --mf-transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --mf-shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --mf-shadow-md: 0 4px 20px rgba(0,0,0,0.15);
    --mf-shadow-lg: 0 8px 40px rgba(0,0,0,0.2);
    --mf-shadow-xl: 0 16px 60px rgba(0,0,0,0.3);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--mf-font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--mf-gray-900);
    background: var(--mf-white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--mf-transition); }

.mf-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mf-font-display);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mf-section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--mf-blue);
    margin-bottom: 1rem;
    position: relative;
}

.mf-section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--mf-green), var(--mf-white), var(--mf-red));
    margin-top: 0.75rem;
}

.mf-section-title-center::after {
    margin-left: auto;
    margin-right: auto;
}

.mf-accent { color: var(--mf-red); }
.mf-accent-gold { color: var(--mf-gold); }

/* === BUTTONS === */
.mf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mf-font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2.5rem;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: var(--mf-transition);
    position: relative;
    overflow: hidden;
}

.mf-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.15);
    transition: left 0.4s ease;
}

.mf-btn:hover::before { left: 100%; }

.mf-btn-primary {
    background: var(--mf-red);
    color: var(--mf-white);
    border-color: var(--mf-red);
}
.mf-btn-primary:hover {
    background: var(--mf-red-dark);
    border-color: var(--mf-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--mf-shadow-md);
}

.mf-btn-outline {
    background: transparent;
    color: var(--mf-white);
    border-color: var(--mf-white);
}
.mf-btn-outline:hover {
    background: var(--mf-white);
    color: var(--mf-blue);
}

.mf-btn-blue {
    background: var(--mf-blue);
    color: var(--mf-white);
    border-color: var(--mf-blue);
}
.mf-btn-blue:hover {
    background: var(--mf-blue-mid);
    transform: translateY(-2px);
    box-shadow: var(--mf-shadow-md);
}

/* === HEADER / NAVBAR === */
.mf-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--mf-transition);
    background: transparent;
}

.mf-header.scrolled {
    background: rgba(0, 26, 51, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: var(--mf-shadow-md);
}

.mf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.mf-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mf-logo img {
    height: 45px;
    width: auto;
}

.mf-logo-text {
    font-family: var(--mf-font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--mf-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.mf-logo-text small {
    display: block;
    font-family: var(--mf-font-condensed);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    opacity: 0.8;
    color: var(--mf-gold);
}

.mf-nav { display: flex; align-items: center; gap: 0; }

.mf-nav a {
    font-family: var(--mf-font-condensed);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mf-white);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 1.2rem;
    position: relative;
}

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

.mf-nav a:hover::after,
.mf-nav a.active::after { width: 60%; }

.mf-nav-cta {
    margin-left: 1rem;
}

/* Mobile menu toggle */
.mf-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mf-menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--mf-white);
    margin: 6px 0;
    transition: var(--mf-transition);
}

/* Tricolor top bar */
.mf-topbar {
    height: 4px;
    background: linear-gradient(90deg, var(--mf-green) 33.33%, var(--mf-white) 33.33%, var(--mf-white) 66.66%, var(--mf-red) 66.66%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
}

.mf-header { top: 4px; }

/* WP Admin Bar compensation — when logged in, WP adds a 32px bar at top */
.admin-bar .mf-topbar {
    top: 32px;
}
.admin-bar .mf-header {
    top: 36px; /* 32px admin bar + 4px tricolor */
}
.admin-bar .mf-hero,
.admin-bar .mf-quartiere-hero {
    padding-top: 32px;
}
@media screen and (max-width: 782px) {
    /* WP admin bar is 46px on mobile */
    .admin-bar .mf-topbar {
        top: 46px;
    }
    .admin-bar .mf-header {
        top: 50px;
    }
    .admin-bar .mf-hero,
    .admin-bar .mf-quartiere-hero {
        padding-top: 46px;
    }
}

/* === HERO SECTION === */
.mf-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--mf-blue-dark);
    overflow: hidden;
    padding-top: 4px;
}

.mf-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mf-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    filter: grayscale(30%);
}

.mf-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        135deg,
        rgba(0, 26, 51, 0.95) 0%,
        rgba(0, 51, 102, 0.85) 40%,
        rgba(0, 51, 102, 0.7) 60%,
        rgba(0, 26, 51, 0.9) 100%
    );
}

/* Diagonal stripes decoration */
.mf-hero-stripes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 3;
    overflow: hidden;
}

.mf-hero-stripes::before {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -5%;
    width: 110%;
    height: 150px;
    background: var(--mf-red);
    transform: skewY(-3deg);
    opacity: 0.9;
}

.mf-hero-stripes::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -5%;
    width: 110%;
    height: 150px;
    background: var(--mf-white);
    transform: skewY(-3deg);
}

.mf-hero-content {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 12rem;
    width: 100%;
}

.mf-hero-text { max-width: 600px; }

.mf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(200, 16, 46, 0.2);
    border: 1px solid rgba(200, 16, 46, 0.4);
    padding: 0.4rem 1.2rem;
    font-family: var(--mf-font-condensed);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mf-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.mf-hero-name {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    color: var(--mf-white);
    line-height: 0.95;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.mf-hero-name .mf-hero-name-last {
    display: block;
    color: var(--mf-gold);
    font-size: 1.15em;
}

.mf-hero-claim {
    font-family: var(--mf-font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: var(--mf-white);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    border-left: 4px solid var(--mf-red);
    padding-left: 1rem;
}

.mf-hero-subtitle {
    font-family: var(--mf-font-body);
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.mf-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.mf-hero-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    z-index: 5;
    margin-bottom: -12rem;
    align-self: flex-end;
}

.mf-hero-image > img:first-child {
    max-height: 90vh;
    width: auto;
    filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5));
    position: relative;
    z-index: 5;
}

/* Mattia entrance: fade in from below */
.mf-hero-img-animate {
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative circle behind hero image */
.mf-hero-image::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200,16,46,0.15) 0%, transparent 70%);
    z-index: 1;
    bottom: 15%;
}

/* === FdI LOGO BADGE === */
.mf-fdi-badge {
    position: absolute;
    bottom: 8rem;
    right: -10px;
    z-index: 6;
    width: 170px;
    height: 170px;
    filter: drop-shadow(0 8px 30px rgba(0,0,0,0.4));
}

/* Logo entrance: zoom in from nothing, THEN heartbeat loop */
.mf-fdi-animate {
    opacity: 0;
    transform: scale(0);
    animation: logoZoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards,
               fdiBeat 2.5s ease-in-out 2s infinite;
}

@keyframes logoZoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fdiBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.08); }
    30% { transform: scale(1); }
    45% { transform: scale(1.05); }
    60% { transform: scale(1); }
}

@media (max-width: 768px) {
    .mf-hero-image {
        margin-bottom: -6rem;
    }
    .mf-hero-image > img:first-child {
        max-height: 60vh;
    }
    .mf-fdi-badge {
        width: 100px;
        height: 100px;
        bottom: 4rem;
        right: 0;
    }
}

/* === STATS BAR === */
.mf-stats-bar {
    background: var(--mf-blue);
    padding: 3rem 0;
    position: relative;
    z-index: 10;
    margin-top: -5rem;
}

.mf-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.mf-stat-item {
    padding: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.mf-stat-item:last-child { border-right: none; }

.mf-stat-number {
    font-family: var(--mf-font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--mf-gold);
    line-height: 1;
}

.mf-stat-label {
    font-family: var(--mf-font-condensed);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
}

/* ==========================================
   BIO SECTION — WRITTEN FROM SCRATCH
   ========================================== */
.mf-bio {
    padding: 5rem 0 4rem;
    background: var(--mf-offwhite);
}

/* Row: text left, photo right */
.mf-bio-row {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.mf-bio-col-text {
    flex: 1;
}

.mf-bio-col-photo {
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.mf-bio-col-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.mf-bio-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--mf-gray-700);
    margin-bottom: 1rem;
}

.mf-bio-text p:first-of-type::first-letter {
    font-family: var(--mf-font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--mf-red);
    float: left;
    line-height: 0.85;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
}

/* Cards: 4 columns */
.mf-bio-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.mf-bio-card {
    padding: 1.5rem;
    background: var(--mf-white);
    border-left: 4px solid var(--mf-red);
    box-shadow: var(--mf-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mf-bio-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mf-shadow-md);
}

.mf-bio-card-icon {
    font-size: 1.5rem;
    color: var(--mf-blue);
    margin-bottom: 0.75rem;
}

.mf-bio-card-title {
    font-family: var(--mf-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--mf-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.mf-bio-card-desc {
    font-size: 0.85rem;
    color: var(--mf-gray-700);
    line-height: 1.5;
}

/* TABLET & MOBILE */
@media (max-width: 1024px) {
    .mf-bio {
        padding: 2.5rem 0 2rem;
    }
    .mf-bio-row {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    .mf-bio-col-photo img {
        max-height: 70vh;
        object-fit: cover;
        object-position: top center;
    }
    .mf-bio-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .mf-bio-card {
        padding: 1.25rem 1.5rem;
    }
    .mf-bio-card-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    .mf-bio-card-title {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    .mf-bio-card-desc {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* === INSTAGRAM FEED === */
.mf-instagram-section {
    padding: 5rem 0;
    background: var(--mf-blue-dark);
    position: relative;
    overflow: hidden;
}

.mf-instagram-subtitle {
    text-align: center;
    margin-bottom: 2.5rem;
}

.mf-instagram-subtitle a {
    color: var(--mf-gold);
    font-family: var(--mf-font-display);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.mf-instagram-subtitle a:hover {
    color: var(--mf-white);
}

.mf-instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.mf-instagram-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4/5;
    border-radius: 4px;
}

.mf-instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.mf-instagram-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.6);
}

.mf-instagram-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mf-instagram-overlay i {
    font-size: 2.5rem;
    color: var(--mf-white);
}

.mf-instagram-item:hover .mf-instagram-overlay {
    opacity: 1;
}

.mf-instagram-video {
    cursor: pointer;
}

.mf-instagram-play i {
    font-size: 2.5rem;
    color: var(--mf-white);
    background: rgba(200,16,46,0.85);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
}

.mf-instagram-play {
    opacity: 0.9;
}

.mf-instagram-video:hover .mf-instagram-play {
    opacity: 1;
}

.mf-instagram-video:hover .mf-instagram-play i {
    background: rgba(200,16,46,1);
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.mf-instagram-cta {
    text-align: center;
}

.mf-instagram-cta .mf-btn-outline {
    color: var(--mf-white);
    border-color: var(--mf-white);
}

.mf-instagram-cta .mf-btn-outline:hover {
    background: var(--mf-red);
    border-color: var(--mf-red);
    color: var(--mf-white);
}

@media (max-width: 1024px) {
    .mf-instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 600px) {
    .mf-instagram-section {
        padding: 3rem 0;
    }
    .mf-instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .mf-instagram-overlay i {
        font-size: 1.5rem;
    }
}

/* === GALLERY === */
.mf-gallery-section {
    padding: 6rem 0;
    background: var(--mf-gray-900);
    position: relative;
    overflow: hidden;
}

.mf-gallery-section .mf-section-title { color: var(--mf-white); }

.mf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.mf-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    border-radius: 2px;
}

.mf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.3s ease;
}

.mf-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,26,51,0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mf-gallery-item:hover img {
    transform: scale(1.08);
}

.mf-gallery-item:hover::after { opacity: 1; }

.mf-gallery-item .mf-gallery-icon {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: rgba(200,16,46,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--mf-transition);
}

.mf-gallery-item:hover .mf-gallery-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Modal */
.mf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 20, 0.92);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.mf-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.mf-modal-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    cursor: default;
}

.mf-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: var(--mf-shadow-xl);
}

.mf-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: var(--mf-white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--mf-transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mf-modal-close:hover { color: var(--mf-red); transform: rotate(90deg); }

.mf-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(200,16,46,0.8);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--mf-transition);
}

.mf-modal-nav:hover { background: var(--mf-red); }
.mf-modal-prev { left: -60px; }
.mf-modal-next { right: -60px; }

/* === MILANO MAP SECTION === */
.mf-map-section {
    padding: 3.5rem 0 3rem;
    background: var(--mf-blue-dark);
    position: relative;
    overflow: hidden;
}

/* Blurred background image */
.mf-map-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.mf-map-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(25px) saturate(0.6);
    opacity: 0.15;
    transform: scale(1.1); /* prevent blur edge artifacts */
}
.mf-map-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,26,51,0.8) 0%, rgba(0,26,51,0.6) 50%, rgba(0,26,51,0.85) 100%);
}

.mf-map-section .mf-container {
    position: relative;
    z-index: 2;
}
.mf-map-section .mf-section-title { text-align: center; }

.mf-map-intro {
    text-align: center;
    max-width: 550px;
    margin: 0 auto 1.5rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
}

.mf-milano-map-wrapper {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    padding: 0;
}

.mf-milano-map-svg {
    width: 100%;
    height: auto;
}

.mf-municipio-path {
    cursor: pointer;
    transition: filter 0.35s ease, stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.35s ease;
    stroke: var(--mf-blue-dark);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.mf-municipio-group {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Safety net: municipios always visible by default — 
   JS dims them only on hover via inline styles */
.mf-municipio-path {
    opacity: 1;
}

.mf-municipio-label {
    font-family: var(--mf-font-display);
    font-size: 10px;
    font-weight: 700;
    fill: white;
    text-anchor: middle;
    pointer-events: none;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
    paint-order: stroke;
    stroke: rgba(0,0,0,0.6);
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mf-municipio-number {
    font-family: var(--mf-font-display);
    font-size: 22px;
    font-weight: 800;
    fill: white;
    text-anchor: middle;
    pointer-events: none;
    opacity: 0.9;
}

.mf-municipio-group:hover .mf-municipio-label {
    opacity: 1;
}

/* Map info bar — minimal */
.mf-map-infobar {
    max-width: 650px;
    margin: 0.75rem auto 0;
    min-height: 40px;
    transition: all 0.3s ease;
}
.mf-map-infobar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    font-family: var(--mf-font-condensed);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.3);
}
.mf-map-infobar-default i {
    color: var(--mf-gold);
    opacity: 0.4;
    animation: infobarPulse 2s ease-in-out infinite;
}
@keyframes infobarPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}
.mf-map-infobar-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    animation: infobarFade 0.25s ease;
}
@keyframes infobarFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.mf-map-infobar-color {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: background 0.3s;
}
.mf-map-infobar-name {
    font-family: var(--mf-font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mf-white);
}
.mf-map-infobar-sep {
    color: rgba(255,255,255,0.25);
    font-size: 0.9rem;
}
.mf-map-infobar-zones {
    font-family: var(--mf-font-condensed);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.03em;
}
.mf-map-infobar-arrow {
    color: var(--mf-gold);
    font-size: 0.75rem;
    opacity: 0.6;
    margin-left: 0.3rem;
}
@media (max-width: 640px) {
    .mf-map-infobar-detail {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* === PROJECTS SECTION === */
.mf-projects-section {
    padding: 6rem 0;
    background: var(--mf-blue-dark);
    position: relative;
    overflow: hidden;
}

.mf-projects-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200,16,46,0.08) 0%, transparent 70%);
}

.mf-projects-section .mf-section-title { color: var(--mf-white); text-align: center; }

.mf-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.mf-project-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem;
    transition: var(--mf-transition);
    position: relative;
    overflow: hidden;
}

.mf-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--mf-red), var(--mf-gold));
}

.mf-project-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px);
    box-shadow: var(--mf-shadow-lg);
}

.mf-project-card-icon {
    font-size: 2.5rem;
    color: var(--mf-gold);
    margin-bottom: 1.5rem;
}

.mf-project-card h3 {
    font-size: 1.5rem;
    color: var(--mf-white);
    margin-bottom: 1rem;
}

.mf-project-card p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* === CONTACT / CTA SECTION === */
.mf-cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--mf-blue) 0%, var(--mf-blue-dark) 100%);
    position: relative;
    text-align: center;
}

.mf-cta-section h2 {
    color: var(--mf-white);
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.mf-cta-section p {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === FORM STYLES === */
.mf-contact-form-wrapper {
    padding: 4rem 0;
}

.mf-contact-form-inner {
    background: var(--mf-white);
    padding: 3rem;
    box-shadow: var(--mf-shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.mf-contact-form-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--mf-green), var(--mf-white), var(--mf-red));
}

.mf-form-title {
    font-family: var(--mf-font-display);
    font-size: 2rem;
    color: var(--mf-blue);
    margin-bottom: 2rem;
}

.mf-form-title-accent { color: var(--mf-red); }

.mf-form-subtitle {
    display: block;
    font-family: var(--mf-font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--mf-gray-700);
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.25rem;
}

.mf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.mf-form-group label {
    display: block;
    font-family: var(--mf-font-condensed);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mf-blue);
    margin-bottom: 0.5rem;
}

.mf-form-group input,
.mf-form-group select,
.mf-form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--mf-gray-200);
    font-family: var(--mf-font-body);
    font-size: 0.95rem;
    color: var(--mf-gray-900);
    background: var(--mf-gray-100);
    transition: var(--mf-transition);
    border-radius: 0;
    outline: none;
}

.mf-form-group input:focus,
.mf-form-group select:focus,
.mf-form-group textarea:focus {
    border-color: var(--mf-blue);
    background: var(--mf-white);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

.mf-form-full { margin-bottom: 1.5rem; }

.mf-form-checkbox {
    margin-bottom: 1.5rem;
}

.mf-form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--mf-gray-700);
}

.mf-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    accent-color: var(--mf-red);
}

.mf-btn-submit { width: 100%; justify-content: center; }
.mf-btn-loading { display: none; }
.mf-btn-submit.loading .mf-btn-text { display: none; }
.mf-btn-submit.loading .mf-btn-loading { display: inline; }

.mf-form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    font-family: var(--mf-font-body);
    font-size: 0.95rem;
    text-align: center;
}

.mf-form-feedback.success { background: rgba(0,140,69,0.1); color: var(--mf-green); border: 1px solid var(--mf-green); }
.mf-form-feedback.error { background: rgba(200,16,46,0.1); color: var(--mf-red); border: 1px solid var(--mf-red); }

/* === FOOTER === */
.mf-footer {
    background: var(--mf-gray-900);
    padding: 4rem 0 0;
}

.mf-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mf-footer-about h3 {
    font-family: var(--mf-font-display);
    font-size: 1.5rem;
    color: var(--mf-white);
    margin-bottom: 1rem;
}

.mf-footer-about p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.mf-footer h4 {
    font-family: var(--mf-font-display);
    font-size: 1rem;
    color: var(--mf-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.mf-footer-links { list-style: none; }

.mf-footer-links li { margin-bottom: 0.75rem; }

.mf-footer-links a {
    color: rgba(255,255,255,0.6);
    font-family: var(--mf-font-condensed);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--mf-transition);
}

.mf-footer-links a:hover { color: var(--mf-white); padding-left: 5px; }

.mf-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.mf-footer-contact-item i { color: var(--mf-red); width: 20px; text-align: center; }

.mf-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

.mf-footer-tricolor {
    height: 3px;
    background: linear-gradient(90deg, var(--mf-green) 33.33%, var(--mf-white) 33.33%, var(--mf-white) 66.66%, var(--mf-red) 66.66%);
    margin-top: 1.5rem;
}

.mf-footer-mdb {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}
.mf-footer-mdb a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: rgba(255,255,255,0.3);
    transition: color 0.3s ease;
}
.mf-footer-mdb a:hover {
    color: rgba(255,255,255,0.5);
}
.mf-footer-mdb span {
    font-family: var(--mf-font-condensed);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.mf-footer-mdb img {
    height: 28px;
    width: auto;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}
.mf-footer-mdb a:hover img {
    opacity: 0.55;
}

/* === SOCIAL LINKS === */
.mf-social-links {
    display: flex;
    gap: 0.75rem;
}

.mf-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: var(--mf-white);
    font-size: 1rem;
    transition: var(--mf-transition);
}

.mf-social-link:hover {
    background: var(--mf-red);
    transform: translateY(-3px);
}

/* === BREADCRUMBS === */
.mf-breadcrumbs {
    padding: 1rem 0;
    font-family: var(--mf-font-condensed);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.05em;
}

.mf-breadcrumbs a { color: rgba(255,255,255,0.6); }
.mf-breadcrumbs a:hover { color: var(--mf-white); }
.mf-breadcrumbs .sep { margin: 0 0.5rem; }
.mf-breadcrumbs .current { color: var(--mf-gold); }

/* === QUARTIERE SINGLE PAGE === */
.mf-quartiere-hero {
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    position: relative;
    padding: 4rem 0 3rem;
    margin-top: 4px;
}

.mf-quartiere-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mf-quartiere-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mf-quartiere-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, var(--mf-blue-dark) 0%, rgba(0,26,51,0.7) 50%, rgba(0,26,51,0.4) 100%);
}

.mf-quartiere-hero-content {
    position: relative;
    z-index: 3;
}

.mf-quartiere-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--mf-white);
    margin-bottom: 0.5rem;
}

.mf-quartiere-hero .mf-municipio-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--mf-red);
    color: var(--mf-white);
    font-family: var(--mf-font-condensed);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.4rem 1.2rem;
    margin-bottom: 1rem;
}

.mf-quartiere-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding: 4rem 0;
}

.mf-quartiere-main {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--mf-gray-700);
}

.mf-quartiere-main h2 {
    font-size: 1.8rem;
    color: var(--mf-blue);
    margin: 2rem 0 1rem;
    text-transform: uppercase;
}

.mf-quartiere-sidebar {
    position: sticky;
    top: 6rem;
    align-self: start;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.mf-animate-in {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .mf-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 10rem;
    }

    .mf-hero-text { max-width: 100%; }
    .mf-hero-buttons { justify-content: center; }
    .mf-hero-claim { border-left: none; padding-left: 0; text-align: center; }

    .mf-hero-image { display: none; }

    .mf-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .mf-footer-grid { grid-template-columns: 1fr 1fr; }
    .mf-quartiere-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mf-container { padding: 0 1.25rem; }

    .mf-nav { display: none; }
    .mf-menu-toggle { display: block; }

    /* Mobile menu */
    .mf-nav.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 26, 51, 0.98);
        padding: 6rem 2rem 2rem;
        z-index: 999;
        align-items: center;
        gap: 1rem;
    }

    .mf-nav.active a {
        font-size: 1.3rem;
        padding: 1rem;
    }

    .mf-hero-content { padding: 8rem 1.5rem 10rem; }
    .mf-hero-name { font-size: 3rem; }

    .mf-stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .mf-stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .mf-stat-number { font-size: 2.2rem; }

    .mf-form-row { grid-template-columns: 1fr; }
    .mf-footer-grid { grid-template-columns: 1fr; }

    .mf-gallery-grid { grid-template-columns: 1fr 1fr; }

    .mf-modal-prev { left: 10px; }
    .mf-modal-next { right: 10px; }

    .mf-contact-form-inner { padding: 2rem 1.5rem; }

    .mf-section-title { font-size: 2rem; }
}

@media (max-width: 480px) {
    .mf-gallery-grid { grid-template-columns: 1fr; }
    .mf-hero-name { font-size: 2.5rem; }
    .mf-hero-badge { font-size: 0.7rem; }
    .mf-btn { padding: 0.8rem 1.5rem; font-size: 0.85rem; }
}

/* ========================================================================
   SINGLE QUARTIERE PAGE
   ======================================================================== */

/* --- HERO --- */
.mf-quartiere-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: var(--mf-blue-dark);
    overflow: hidden;
    padding-top: 80px;
}
.mf-quartiere-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.mf-quartiere-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    filter: grayscale(20%);
}
.mf-quartiere-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0,26,51,0.7) 0%, rgba(0,26,51,0.85) 50%, var(--mf-blue-dark) 100%);
}
.mf-quartiere-hero-bignum {
    position: absolute;
    z-index: 3;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mf-font-display);
    font-size: clamp(15rem, 30vw, 30rem);
    font-weight: 900;
    color: var(--mun-color, var(--mf-red));
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
}
.mf-quartiere-hero-content {
    position: relative;
    z-index: 5;
    padding: 0;
}

/* --- HERO GRID: testo + form --- */
.mf-quartiere-hero-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    padding: 6rem 3rem 8rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* --- FORM NELLA HERO --- */
.mf-quartiere-hero-form {
    background: var(--mf-white);
    border-radius: 0;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    overflow: hidden;
    width: 100%;
    animation: mf-hero-form-in 0.8s ease-out 0.3s both;
}
@keyframes mf-hero-form-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.mf-quartiere-hero-form .mf-q-segnala-form-header {
    background: var(--mf-red);
    color: var(--mf-white);
    padding: 1.2rem 2rem;
    font-family: var(--mf-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mf-quartiere-hero-form .mf-q-segnala-form-header i {
    color: var(--mf-white);
    font-size: 1.2rem;
}
.mf-quartiere-hero-form .onda-crm-form-container,
.mf-quartiere-hero-form .mf-contact-form {
    padding: 2rem 2rem 1.5rem;
}
.mf-quartiere-hero-form .mf-q-segnala-form-trust {
    padding: 1rem 2rem;
    font-size: 0.85rem;
    color: var(--mf-gray-700);
    background: var(--mf-gray-100);
    text-align: center;
}
.mf-quartiere-hero-form .mf-q-segnala-form-trust i {
    color: var(--mf-green);
    margin-right: 0.3rem;
}

/* --- Segnala grid full width (senza form) --- */
.mf-q-segnala-grid--full {
    grid-template-columns: 1fr !important;
    max-width: 800px;
    margin: 0 auto;
}
.mf-quartiere-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.5rem 1.2rem;
    font-family: var(--mf-font-condensed);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}
.mf-quartiere-hero-badge-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    flex-shrink: 0;
}
.mf-quartiere-hero-title {
    font-family: var(--mf-font-display);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    color: var(--mf-white);
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.mf-quartiere-hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}
.mf-quartiere-hero-headline {
    font-family: var(--mf-font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
    margin-bottom: 1rem;
}
.mf-quartiere-hero-headline strong {
    color: var(--mf-red);
    font-weight: 800;
    font-size: 1.3em;
}
.mf-quartiere-hero-trust {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.mf-quartiere-hero-trust span {
    font-family: var(--mf-font-condensed);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.mf-quartiere-hero-trust i {
    color: var(--mf-green);
    margin-right: 0.3rem;
}
.mf-quartiere-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.mf-quartiere-hero-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--mf-green) 33.33%, var(--mf-white) 33.33%, var(--mf-white) 66.66%, var(--mf-red) 66.66%);
    z-index: 10;
}


/* =============================================
   SEGNALA SUBITO — CTA IMMEDIATA
   ============================================= */
.mf-q-segnala {
    padding: 5rem 0;
    background: var(--mf-offwhite);
}
.mf-q-segnala-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.mf-q-segnala-tag {
    display: inline-block;
    background: var(--mf-red);
    color: var(--mf-white);
    font-family: var(--mf-font-condensed);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
}
.mf-q-segnala-tag i { margin-right: 0.3rem; }
.mf-q-segnala-text h2 {
    font-family: var(--mf-font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--mf-blue-dark);
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 1rem;
}
.mf-q-segnala-claim {
    font-family: var(--mf-font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--mf-gray-700);
    margin-bottom: 1rem;
}
.mf-q-segnala-text p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--mf-gray-700);
    margin-bottom: 1rem;
}
.mf-q-segnala-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--mf-gray-200);
}
.mf-q-segnala-stat { text-align: center; }
.mf-q-segnala-stat-num {
    display: block;
    font-family: var(--mf-font-display);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--mf-red);
    line-height: 1;
}
.mf-q-segnala-stat-num--pos {
    color: var(--mf-red);
}
.mf-q-segnala-stat-num--pos::before {
    content: '#';
}
.mf-q-segnala-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mf-gray-700);
    margin-top: 0.3rem;
    display: block;
}
.mf-q-segnala-stat-source {
    display: block;
    font-size: 0.7rem;
    color: var(--mf-gray-500, #999);
    margin-top: 0.4rem;
    font-style: italic;
}
.mf-q-segnala-form {
    background: var(--mf-white);
    border: 1px solid var(--mf-gray-200);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}
.mf-q-segnala-form-header {
    background: var(--mf-blue-dark);
    color: var(--mf-white);
    padding: 1rem 1.5rem;
    font-family: var(--mf-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mf-q-segnala-form-header i { color: var(--mf-red); font-size: 1.1rem; }
.mf-q-segnala-form-trust {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    color: var(--mf-gray-700);
    background: var(--mf-gray-100);
    text-align: center;
}
.mf-q-segnala-form-trust i { color: var(--mf-green); margin-right: 0.3rem; }
.mf-q-segnala-form .onda-crm-form-container,
.mf-q-segnala-form .mf-contact-form { padding: 1.5rem; }

/* =============================================
   I PROBLEMI
   ============================================= */
.mf-q-problemi {
    padding: 5rem 0;
    background: var(--mf-white);
}
.mf-q-problemi-sub {
    text-align: center;
    font-size: 1.25rem;
    color: var(--mf-gray-700);
    margin-bottom: 3rem;
    font-weight: 300;
}
.mf-q-problemi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.mf-q-problemi-card {
    padding: 2rem 1.5rem;
    background: var(--mf-offwhite);
    border-top: 4px solid var(--mf-red);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mf-q-problemi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--mf-shadow-md);
}
.mf-q-problemi-card-icon {
    font-size: 2.5rem;
    color: var(--mf-red);
    margin-bottom: 1rem;
}
.mf-q-problemi-card h3 {
    font-family: var(--mf-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mf-blue-dark);
    margin-bottom: 0.5rem;
}
.mf-q-problemi-card p {
    font-size: 0.95rem;
    color: var(--mf-gray-700);
    line-height: 1.5;
}
.mf-q-problemi-cta { text-align: center; }

/* =============================================
   EDITOR CONTENT
   ============================================= */
.mf-quartiere-editor-content {
    padding: 4rem 0;
    background: var(--mf-offwhite);
}
.mf-quartiere-editor-content .mf-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--mf-gray-700);
}

/* =============================================
   13 IMPEGNI — compatto
   ============================================= */
.mf-q-impegni {
    padding: 5rem 0;
    background: var(--mf-blue-dark);
    position: relative;
    overflow: hidden;
}
.mf-q-impegni-sub {
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    font-weight: 300;
}
.mf-q-impegni-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 1000px;
    margin: 0 auto;
}
.mf-q-impegni-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.mf-q-impegni-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(200,16,46,0.4);
}
.mf-q-impegni-num {
    font-family: var(--mf-font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--mf-red);
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}
.mf-q-impegni-icon {
    font-size: 1.3rem;
    color: var(--mf-gold);
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}
.mf-q-impegni-content h3 {
    font-family: var(--mf-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--mf-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}
.mf-q-impegni-content p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}
.mf-q-impegni-cta {
    text-align: center;
    margin-top: 3rem;
}
.mf-q-impegni-cta p {
    font-family: var(--mf-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--mf-white);
    margin-bottom: 1rem;
}

/* =============================================
   FORM FINALE
   ============================================= */
.mf-q-form-finale {
    padding: 5rem 0;
    background: var(--mf-offwhite);
}
.mf-q-form-finale-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.mf-q-form-finale h2 {
    font-family: var(--mf-font-display);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--mf-blue-dark);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.mf-q-form-finale-claim {
    font-size: 1.3rem;
    color: var(--mf-gray-700);
    margin-bottom: 2.5rem;
    font-weight: 300;
}
.mf-q-form-finale-box {
    background: var(--mf-white);
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--mf-gray-200);
    margin-bottom: 1rem;
    text-align: left;
}
.mf-q-form-finale-trust {
    font-size: 0.9rem;
    color: var(--mf-gray-700);
}
.mf-q-form-finale-trust i { color: var(--mf-green); margin-right: 0.3rem; }

/* btn-lg */
.mf-btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* =============================================
   THANK YOU PAGE
   ============================================= */
.mf-grazie-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--mf-blue-dark);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}
.mf-grazie-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(200,16,46,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(0,102,204,0.06) 0%, transparent 50%);
}
.mf-grazie-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.mf-grazie-icon {
    font-size: 5rem;
    color: var(--mf-green);
    margin-bottom: 2rem;
}
.mf-grazie-title {
    font-family: var(--mf-font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--mf-white);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.mf-grazie-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 3rem;
}
.mf-grazie-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem;
    text-align: left;
    margin-bottom: 3rem;
    border-radius: 4px;
}
.mf-grazie-card h2 {
    font-family: var(--mf-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--mf-white);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.mf-grazie-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.mf-grazie-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.mf-grazie-step-num {
    font-family: var(--mf-font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--mf-red);
    background: rgba(200,16,46,0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
}
.mf-grazie-step-text strong {
    font-family: var(--mf-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--mf-white);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}
.mf-grazie-step-text p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}
.mf-grazie-share {
    margin-bottom: 2.5rem;
}
.mf-grazie-share > p {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1rem;
}
.mf-grazie-share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.mf-grazie-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    font-family: var(--mf-font-condensed);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mf-white);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}
.mf-share-fb:hover { background: #1877F2; border-color: #1877F2; }
.mf-share-wa:hover { background: #25D366; border-color: #25D366; }
.mf-share-ig:hover { background: #E4405F; border-color: #E4405F; }
.mf-grazie-back {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .mf-grazie-hero { padding: 4rem 0; }
    .mf-grazie-icon { font-size: 3.5rem; margin-bottom: 1.5rem; }
    .mf-grazie-card { padding: 1.5rem; }
    .mf-grazie-share-buttons { flex-direction: column; }
    .mf-grazie-share-btn { justify-content: center; }
}

/* --- ALTRI QUARTIERI --- */
.mf-quartiere-others {
    padding: 5rem 0;
    background: var(--mf-offwhite);
}
.mf-quartiere-others-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}
.mf-quartiere-others-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--mf-white);
    border: 1px solid var(--mf-gray-200);
    transition: all 0.3s;
}
.mf-quartiere-others-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.mf-quartiere-others-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mf-font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
.mf-quartiere-others-name {
    font-family: var(--mf-font-condensed);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mf-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- RESPONSIVE QUARTIERE --- */
@media (max-width: 1024px) {
    .mf-quartiere-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .mf-quartiere-hero-form {
        max-width: 100%;
    }
    .mf-q-segnala-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .mf-q-problemi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mf-q-impegni-list {
        grid-template-columns: 1fr;
    }
    .mf-quartiere-hero-bignum {
        font-size: 15rem;
        opacity: 0.05;
    }
}
@media (max-width: 768px) {
    .mf-q-problemi-grid {
        grid-template-columns: 1fr;
    }
    .mf-q-segnala-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .mf-q-segnala-stat-num {
        font-size: 2.5rem;
    }
    .mf-quartiere-hero {
        min-height: auto;
        align-items: flex-start;
        padding-top: 0;
    }
    .mf-quartiere-hero-grid {
        padding: 7rem 0 3rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        gap: 2rem;
    }
    .mf-quartiere-hero-bg img {
        opacity: 0.4;
        filter: grayscale(0%);
    }
    .mf-quartiere-hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(0,26,51,0.15) 0%,
            rgba(0,26,51,0.25) 30%,
            rgba(0,26,51,0.7) 55%,
            var(--mf-blue-dark) 100%
        );
    }
    .mf-quartiere-hero-content {
        padding: 0;
    }
    .mf-quartiere-hero-form {
        max-width: 100%;
    }
    .mf-quartiere-hero-bignum {
        display: block;
        font-size: 55vw;
        opacity: 0.15;
        right: -3%;
        top: 10%;
        transform: none;
        color: var(--mf-white);
    }
    .mf-quartiere-hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.7rem;
        margin-bottom: 1.25rem;
    }
    .mf-quartiere-hero-title {
        font-size: clamp(3.2rem, 13vw, 4.5rem);
        margin-bottom: 1.25rem;
        line-height: 0.95;
    }
    .mf-quartiere-hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
        color: rgba(255,255,255,0.85);
    }
    .mf-quartiere-hero-headline {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        margin-bottom: 0.75rem;
    }
    .mf-quartiere-hero-trust {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    .mf-quartiere-hero-trust span {
        font-size: 0.75rem;
    }
    .mf-quartiere-hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    .mf-quartiere-hero-buttons .mf-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    .mf-quartiere-others-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   MODAL — CHI È MATTIA
   ============================================= */
.mf-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 10, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mf-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.mf-modal {
    background: var(--mf-white);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.mf-modal-overlay.is-active .mf-modal {
    transform: translateY(0) scale(1);
}
.mf-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--mf-blue-dark);
    color: var(--mf-white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.mf-modal-close:hover {
    background: var(--mf-red);
}
.mf-modal-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}
.mf-modal-photo {
    background: var(--mf-blue-dark);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.mf-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.mf-modal-content {
    padding: 2.5rem;
}
.mf-modal-title {
    font-family: var(--mf-font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--mf-blue-dark);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.mf-modal-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--mf-gray-700);
    margin-bottom: 0.75rem;
}
.mf-modal-bio strong {
    color: var(--mf-blue-dark);
}
.mf-modal-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.mf-modal-card {
    background: var(--mf-offwhite, #f5f5f5);
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-left: 3px solid var(--mf-red);
}
.mf-modal-card i {
    display: block;
    font-size: 1.3rem;
    color: var(--mf-red);
    margin-bottom: 0.4rem;
}
.mf-modal-card span {
    font-family: var(--mf-font-condensed);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mf-blue-dark);
}
.mf-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.mf-modal-actions .mf-btn {
    font-size: 0.85rem;
    padding: 0.7rem 1.2rem;
}

/* Modal responsive */
@media (max-width: 768px) {
    .mf-modal-overlay {
        padding: 1rem;
        align-items: flex-end;
    }
    .mf-modal {
        max-height: 95vh;
    }
    .mf-modal-body {
        grid-template-columns: 1fr;
    }
    .mf-modal-photo {
        height: 220px;
    }
    .mf-modal-content {
        padding: 1.5rem;
    }
    .mf-modal-title {
        font-size: 1.6rem;
    }
    .mf-modal-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .mf-modal-actions {
        flex-direction: column;
    }
    .mf-modal-actions .mf-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
