/* =====================================================
   STYLE.CSS - STUDIO LEGALE ASSOCIATO
   Design professionale responsive + animazioni
   Colori: Blu scuro professionale (#1e3a8a), Oro (#d4af37)
   ===================================================== */

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Impedisce lo scroll orizzontale */
}

body {

    line-height: 1.6;
    color: #030202;
    padding-top: 0; /* Forza l'header ad attaccarsi al bordo */
}


/* =====================================================
   HEADER E NAVIGAZIONE FISSA
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Playfair Display', serif;
    color: white;
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.logo-text {
	
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 0.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #d4af37;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #d4af37;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* HAMBURGER MOBILE */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}
#chi-siamo.section {
    padding: 100px 0;
    /* Sfumatura da Bianco in alto a Grigio chiarissimo in basso */
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    border-bottom: 1px solid #e2e8f0; /* Opzionale: una linea sottile di chiusura */
}

/* =====================================================
   CONTAINER E SEZIONI
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
	 background: trasparent;
}

.section {
    padding: 100px 0;
	
}

.bg-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* =====================================================
   HERO SECTION CON ANIMAZIONE SFONDO
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    width: 100vw; /* Usa viewport width per essere sicuri al 100% */
    margin-left: calc(-50vw + 50%); /* Centratura forzata se dentro un container */
    margin-right: calc(-50vw + 50%);
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    position: relative;
    overflow: hidden;
    color: white;
}

/* Modifica la classe .hero-content */
.hero-content {
    text-align: center;
    max-width: 100%;
    z-index: 2;
    position: relative;
    padding-top: 80px; /* Sostituisce i <br> garantendo spazio fisso */
}
.hero-title {
    
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    min-height: 1.2em; /* Riserva lo spazio verticale */
    display: block;
}

.gradient-text {
    background: linear-gradient(45deg, #d4af37, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* BOTTONI ANIMATI */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
	
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0 0.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, #d4af37, #fbbf24);
    color: #1e3a8a;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: white;
    color: #1e3a8a;
    transform: translateY(-3px);
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

/* PARTICELLE DECORATIVE */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* =====================================================
   HEADER SEZIONE GENERICO
   ===================================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #1e3a8a;
    margin-bottom: 1rem;
}
.member-avatar {
    width: 100px; /* O la dimensione che preferisci */
    height: 100px;
    overflow: hidden; /* Taglia le parti dell'immagine in eccesso */
    border-radius: 50%; /* Se vuoi che la foto sia tonda */
    display: flex;
    justify-content: center;
    align-items: center;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fondamentale: riempie il riquadro senza schiacciare la foto */
    object-position: center; /* Centra il volto se la foto è troppo grande */
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #d4af37, #fbbf24);
    margin: 0 auto 1rem;
}

.section-subtitle {
    color: white;
    font-size: 1.1rem;
}

/* =====================================================
   CHI SIAMO - ABOUT SECTION
   ===================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color:#1e3a8a;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.8rem 0;
    font-size: 1rem;
    color: #475569;
    position: relative;
    padding-left: 2rem;
}

.features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #d4af37, #fbbf24);
    border-radius: 50%;
}

/* IMMAGINE PLACEHOLDER ANIMATA */
.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.image-content {
    text-align: center;
    color: #64748b;
}

.image-icon {
    font-size: 6rem;
    display: block;
    margin-bottom: 1rem;
}

/* =====================================================
   SERVIZI - CARDS ANIMATED
   ===================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.1), transparent);
    transition: left 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.service-card p {
    color: #64748b;
    line-height: 1.6;
}

/* =====================================================
   TEAM SECTION
   ===================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
    transition: all 0.3s ease;
}

.member-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member:hover .member-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 60px rgba(30,58,138,0.4);
}

.avatar-icon {
    font-size: 3.5rem;
}

.team-member h3 {
    font-size: 1.4rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.role {
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* =====================================================
   CONTATTI - FORM ANIMATO
   ===================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.5);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    background: rgba(255,255,255,0.8);
}

.contact-item .icon {
    font-size: 1.5rem;
    margin-top: 0.2rem;
    min-width: 30px;
}

.contact-item strong {
    color: #1e3a8a;
    display: block;
    font-size: 1.1rem;
}

/* FORM ANIMATO */
.form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 0 0.5rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #1e3a8a;
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #d4af37, #fbbf24);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

/* =====================================================
   DOVE SIAMO
   ===================================================== */
.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.location-info h3 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
}

.location-info p {
    margin-bottom: 1rem;
    color: #64748b;
}

.opening-hours {
    margin-top: 2rem;
}

.opening-hours h4 {
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(255,255,255,0.5);
    padding: 1.5rem;
    border-radius: 15px;
}

.map-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.map-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.map-placeholder h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: #1e3a8a;
    color: white;
    text-align: center;
    padding: 3rem 0 2rem;
}

.footer-content {
    opacity: 0.9;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-logo .logo-icon {
    font-size: 2.5rem;
    margin-right: 0.5rem;
}

.footer-logo .logo-text {
    font-size: 2rem;
}

/* =====================================================
   ANIMAZIONI CSS
   ===================================================== */
.animate-slide-up {
    opacity: 0;
    transform: translateY(20px); /* Ridotto da 50 a 20 per meno slittamento */
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    will-change: transform, opacity; /* Ottimizza il rendering */
}

.animate-slide-right {
    opacity: 0;
   
}

.animate-slide-left {
    opacity: 0;
  
}

.animate-fade-in {
    opacity: 0;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

.animate-slide-up.animate-active,
.animate-slide-right.animate-active,
.animate-slide-left.animate-active,
.animate-fade-in.animate-active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    translateY(0) !important;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px; /* Assicurati che l'header sia alto 70px */
        flex-direction: column;
        background: rgba(30, 58, 138, 0.98);
        width: 100%;
        height: calc(100vh - 70px); /* Riempie lo schermo rimanente */
        text-align: center;
        transition: left 0.3s ease-in-out;

        overflow-y: auto; /* Permette lo scroll se ci sono molti link */
    }
      
    .nav-menu.active {
        left: 0;
    }
    
    /* Griglie: 1 colonna è perfetto per il mobile */
    .about-grid,
    .contact-grid,
    .location-content,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
.hero-buttons {
    min-height: 60px; /* Altezza media dei bottoni */
    display: flex;
    justify-content: center;
    gap: 1rem;
}
    
    .btn {
        margin: 0.5rem 0;
        width: 100%; /* I bottoni full-width sono più facili da cliccare */
        max-width: none; 
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 5%;
    }
    
    .form {
        padding: 2rem;
    }
    
    .service-card,
    .contact-item {
        padding: 2rem 1.5rem;
    }
}


.location-map {
    width: 100%;           /* Occupa tutto lo spazio disponibile... */
    max-width: 1200px;     /* ...ma non superare mai questa larghezza (opzionale) */
    margin: 0 auto;        /* Centra il contenitore nella pagina */
    box-sizing: border-box; /* Include padding e bordi nel calcolo della larghezza */
    padding: 15px;         /* Spazio interno per non far toccare i bordi dello schermo */
}

/* Se all'interno hai un iframe (es. Google Maps) */
.location-map iframe {
    width: 100% !important; /* Forza la mappa a stare nel div */
    height: 450px;          /* Altezza fissa per desktop */
    border: 0;
    border-radius: 8px;     /* Angoli arrotondati per un look moderno */
}

/* Media Query per dispositivi mobili (Smartphone) */
@media (max-width: 768px) {
    .location-map {
        padding: 10px;      /* Riduce il margine sui bordi dello schermo */
    }
    
    .location-map iframe {
        height: 300px;      /* Riduce l'altezza della mappa sui telefoni */
    }
}
/* =====================================================
   BLOG SECTION - NUOVO STILE
   ===================================================== */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

#blogSearch {
    width: 100%;
    padding: 1.2rem 5rem 1.2rem 1.5rem;
    border: none;
    font-size: 1.1rem;
    background: transparent;
}

#blogSearch:focus {
    outline: none;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.2rem;
}

/* FEATURED ARTICOLI (primi 2 grandi) */
.featured-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

.featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.featured-image, .blog-image {
    width: 100%;
    height: auto; /* Permette all'altezza di adattarsi */
    display: block;

    /* --- AGGIUNTA FONDAMENTALE PER IL CLS --- */
    /* Usa il rapporto d'aspetto reale delle tue immagini, es. 16:9 o 4:3 */
    aspect-ratio: 16 / 9;
    object-fit: cover; /* Assicura che l'immagine riempia lo spazio senza distorcersi */
}

/* Potrebbe essere necessario un contenitore per l'immagine */

.featured-image-container, .blog-image-container {
    overflow: hidden;
    border-radius: 10px;
    background-color: #f1f5f9; /* Colore di sfondo mentre carica */
    aspect-ratio: 16 / 9; /* Fondamentale */
    width: 100%;
}

.featured-card.no-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
}

.featured-content {
    padding: 2rem;
}

.featured-date {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: #d4af37;
}

/* =====================================================
   STILI OTTIMIZZATI PER LA GRIGLIA DEL BLOG
   ===================================================== */

/* 1. La Griglia del Blog */
.blog-grid {
    display: grid;
    /* Crea una griglia reattiva: 1 colonna su mobile, fino a 3 su schermi grandi */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem; /* Spazio tra le card */
    margin-top: 2rem;
}

/* 2. La Card Singola */
.blog-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.08);
    overflow: hidden; /* Nasconde le parti dell'immagine che potrebbero sbordare */
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column; /* Impila immagine e contenuto verticalmente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.15);
}

/* 3. Contenitore dell'Immagine (LA PARTE FONDAMENTALE) */
.blog-image-container {
    width: 100%;
    /* Forza un rapporto d'aspetto widescreen (16:9). Puoi cambiarlo a 4:3 se preferisci. */
    aspect-ratio: 16 / 9;
    background-color: #eef2ff; /* Sfondo per quando l'immagine non c'è o sta caricando */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 4. L'Immagine Reale */
.blog-image {
    width: 100%;
    height: 100%;
    /* La magia: riempie il contenitore senza deformarsi. Taglia le parti in eccesso. */
    object-fit: cover; 
}

/* 5. Il Placeholder (quando non c'è immagine) */
.blog-image-container .placeholder-icon {
    font-size: 3rem;
    color: #a5b4fc;
}

/* 6. Il Contenuto Testuale della Card */
.blog-content {
    padding: 1.5rem;
    flex-grow: 1; /* Fa sì che il contenuto occupi lo spazio rimanente */
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: #1e3a8a;
    line-height: 1.3;
    /* Impedisce ai titoli troppo lunghi di andare a capo all'infinito */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a 3 righe */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* PAGINAZIONE */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.page-btn {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(.disabled),
.page-btn.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    transform: translateY(-1px);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* SINGLE ARTICLE PAGE */
.single-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.article-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.article-title-single {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.article-meta-single {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.article-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #475569;
}

/* NAVIGAZIONE ARTICOLI */
.article-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.nav-btn:hover {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    transform: translateY(-2px);
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* RISPOSTIVO */
@media (max-width: 768px) {
    .featured-articles {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta-single {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .article-nav {
        flex-direction: column;
        gap: 1rem;
    }
}
/* Stili per messaggi di risposta del form */
#contactResponse .message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
    font-weight: 500;
}
#contactResponse .message.success {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}
#contactResponse .message.error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}
/* ===== EFFETTO FLIP CARD PER I SERVIZI ===== */

.flip-card-container {
    background-color: transparent;
    width: 100%; /* Larghezza desiderata */
    height: 300px; /* Altezza fissa per un effetto migliore */
    perspective: 1000px; /* Effetto 3D */
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* Attiva l'effetto al passaggio del mouse (o al tocco su mobile) */
.flip-card-container:hover .flip-card {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Per Safari */
    backface-visibility: hidden;
    
    /* Stili ereditati dalla vecchia .service-card */
    background-color: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* Assicura che il padding non rompa il layout */
}

.flip-card-back {
    background-color: #1e3a8a; /* Blu scuro per il retro */
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: #d4af37; /* Oro per il titolo */
}

.flip-card-back p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.flip-card-back .btn.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    background-color: #d4af37;
    color: #1e3a8a;
    border-radius: 25px;
    text-decoration: none;
}
/* ===== OTTIMIZZAZIONE GOOGLE MAPS (LAZY LOADING) ===== */

#lazyMap {
    position: relative;
    cursor: pointer;
    background-color: #e2e8f0;
    height: 450px; /* Deve essere identica all'altezza dell'iframe finale */
    width: 100%;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 138, 0.6); /* Overlay blu semi-trasparente */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

#lazyMap:hover .map-overlay {
    background-color: rgba(30, 58, 138, 0.4); /* L'overlay si schiarisce al passaggio del mouse */
}

.map-button {
    padding: 1rem 2rem;
    background-color: #d4af37; /* Oro */
    color: #1e3a8a; /* Blu scuro */
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    transform: scale(1);
    transition: transform 0.3s ease;
}

#lazyMap:hover .map-button {
    transform: scale(1.05); /* Leggero ingrandimento del pulsante */
}

/* Quando la mappa è caricata, l'iframe occupa tutto lo spazio */
#lazyMap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* Esempio di regola per l'immagine del team */
.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    
    /* --- AGGIUNTA FONDAMENTALE PER IL CLS --- */
    aspect-ratio: 1 / 1; /* Per un'immagine quadrata */
}
/* Stili per il consenso GDPR nel form contatti */
.form-group-gdpr {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Spazio tra checkbox e testo */
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.form-group-gdpr input[type="checkbox"] {
    width: 1.25rem; /* Dimensioni della checkbox */
    height: 1.25rem;
    accent-color: #1e3a8a; /* Colore della spunta (blu) */
    flex-shrink: 0; /* Impedisce alla checkbox di rimpicciolirsi */
}

.form-group-gdpr label {
    font-size: 0.9rem;
    color: #4b5563; /* Grigio scuro per il testo */
    line-height: 1.4;
    margin: 0;
}

.form-group-gdpr a {
    color: #1e3a8a; /* Blu per il link */
    text-decoration: underline;
    font-weight: 500;
}

.form-group-gdpr a:hover {
    color: #d4af37; /* Oro al passaggio del mouse */
}
