/* ============================================================
FONT LOCALI - GDPR COMPLIANT (No Google font)
============================================================ */
/* Montserrat Regular (400) */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/font/montserrat-400.woff2') format('woff2');
}
/* Montserrat SemiBold (600) */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/font/montserrat-600.woff2') format('woff2');
}
/* Montserrat Bold (700) */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/font/montserrat-700.woff2') format('woff2');
}
/* GreatVibes Regular (Corsivo elegante) */
@font-face {
    font-family: 'GreatVibes';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/font/GreatVibes-Regular.woff2') format('woff2');
}

/* ============================================================
RADICI GENEALOGIA - Foglio di stile completo
============================================================ */
:root {
    --color-primary: #146B62;
    --color-accent: #BA440A;
    --color-accent-hover: #DF4900;
    --color-white: #ffffff;
    --color-bg-light: #F8F8F8;
    --color-text: #333333;
    --color-text-light: #555555;
    
    --font-main: 'Montserrat', sans-serif;
    --font-montserrat: 'Montserrat', sans-serif;
    --font-script: 'GreatVibes', cursive; /* Font corsivo per i titoli */
    
    --radius-card: 17px;
    --radius-btn: 999px;
    --max-width: 1200px;
    --section-pad: 60px 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--color-text); background: var(--color-white); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* BOTTONI */
.btn { display: inline-block; background: var(--color-accent); color: var(--color-white); padding: 10px 28px; border-radius: var(--radius-btn); font-family: var(--font-main); font-weight: 700; font-size: 15px; transition: background 0.3s ease; border: none; cursor: pointer; }
.btn:hover { background: var(--color-accent-hover); }
.btn-green { background: var(--color-primary); }
.btn-green:hover { background: #0f534c; }
.btn-white { background: #fff; color: var(--color-primary); }
.btn-white:hover { background: #f0f0f0; }

/* TITOLI SEZIONI */
.section-title { font-family: var(--font-script); font-size: 82px; font-weight: 700; color: var(--color-primary); margin-bottom: 20px; }
 
/* HEADER */
.site-header { position: relative; overflow: visible; background: var(--color-white); box-shadow: 0 2px 10px rgba(0,0,0,0.07); z-index: 100; }
.header-inner { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px; padding: 14px 24px; max-width: var(--max-width); margin: 0 auto; }
.site-logo { position: relative; z-index: 20; display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { height: 56px !important; width: auto !important; display: block !important; aspect-ratio: 188 / 71; }
.site-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-list li { position: relative; }
.nav-list a { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--color-text); transition: color 0.2s; }
.nav-list a:hover, .nav-list a.active { color: var(--color-primary); }
.nav-list > li > a::after { content: ''; display: block; height: 2px; background: var(--color-primary); transform: scaleX(0); transition: transform 0.25s ease; border-radius: 2px; }
.nav-list > li > a:hover::after, .nav-list > li > a.active::after { transform: scaleX(1); }
.nav-list .nav-contatti a { background: var(--color-accent); color: var(--color-white); border-radius: var(--radius-btn); padding: 8px 20px; font-weight: 700; }
.nav-list .nav-contatti a:hover { background: var(--color-primary); }
.nav-list .nav-contatti a::after { display: none !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all 0.3s; }

/* BANDIERE LINGUA */
.lang-flags { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.lang-flag { display: flex; align-items: center; transition: transform 0.2s; }
.lang-flag:hover { transform: scale(1.15); }
.lang-flag img { width: 24px; height: 16px; display: block; border-radius: 2px; aspect-ratio: 3 / 2; }

/* HERO / PRESENTAZIONE */
.hero-section { padding: 64px 20px 50px; max-width: var(--max-width); margin: 0 auto; }
.hero-headline { font-size: clamp(22px, 3.5vw, 34px); font-weight: 700; color: var(--color-accent); margin-bottom: 32px; line-height: 1.3; }
.section-montserrat { font-family: var(--font-montserrat); font-size: 32px; color: var(--color-primary); margin-bottom: 20px; font-weight: 400; }
.presentation-text { font-size: 15px; line-height: 1.8; color: var(--color-text); margin-bottom: 28px; }

/* BLOCCO VALORE (VALUE PROPOSITION) - CENTRATO */
.hero-value-box {
    background: var(--color-bg-light);
    border-top: 4px solid var(--color-accent);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}
.hero-value-title {
    font-size: clamp(20px, 3vw, 26px);
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.hero-value-subtitle {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 24px;
    font-weight: 500;
}
.hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-cta-buttons .btn {
    font-size: 14px;
    padding: 12px 24px;
}

/* BOX CITAZIONE */
.verse-box { display: flex; gap: 32px; flex-wrap: wrap; background: var(--color-accent); border-radius: 12px; padding: 28px 32px; margin: 28px 0; position: relative; }
.verse-box::before { content: ''; position: absolute; left: 50%; top: 20%; bottom: 20%; width: 1px; background: rgba(255,255,255,0.5); }
.verse-col { flex: 1; min-width: 200px; }
.verse-col p { font-size: 14px; line-height: 1.9; color: #fff; }
.verse-source { font-size: 12px; font-style: italic; color: rgba(255,255,255,0.8); margin-top: 8px; }

/* SEZIONE TRUST E AUTHORITY */
.trust-section {
    padding: 40px 20px;
    background: var(--color-bg-light);
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    text-align: center;
}
.trust-inner { max-width: var(--max-width); margin: 0 auto; }
.trust-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    text-align: center;
    margin-bottom: 40px;
}
.trust-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 1rem;
}
.trust-stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 0.75rem;
}
.trust-stat-label {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 500;
    line-height: 1.4;
}
.stat-logo {
    max-width: 90px;
    width: 90px;
    height: 90px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* MESSAGGI / TESTIMONIANZE */
.trust-messages-title {
    font-family: var(--font-script); /* APPLICATO GREATVIBES */
    font-size: 44px; /* Aumentato per leggibilità corsivo */
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.2;
}
.trust-message-card {
    background: var(--color-white);
    padding: 28px;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border-left: 4px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.trust-message-text {
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.7;
    font-style: italic;
    flex: 1;
}
.trust-message-text::before {
    content: '\201C';
    font-size: 40px;
    color: var(--color-accent);
    font-family: serif;
    line-height: 0;
    vertical-align: -15px;
    margin-right: 5px;
}
.trust-message-author {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}
.trust-author-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.trust-author-info strong {
    display: block;
    font-size: 14px;
    color: var(--color-text);
}
.trust-author-info span {
    font-size: 12px;
    color: var(--color-text-light);
}

/* CAROUSEL TESTIMONIANZE (RIPRISTINATO) */
#testimonials-track .trust-message-card {
    flex: 0 0 calc(33.333% - 11px);
    max-width: calc(33.333% - 11px);
    min-width: calc(33.333% - 11px);
    transition: transform 0.3s ease;
}
#testimonials-track .trust-message-card:hover {
    transform: translateY(-5px);
}

/* BLOG / CAROUSEL */
.blog-section { padding: 48px 20px; max-width: var(--max-width); margin: 0 auto; }
.blog-section .section-title { 
    font-family: var(--font-script); /* APPLICATO GREATVIBES */
    font-size: 52px; /* Aumentato per leggibilità corsivo */
    color: var(--color-primary); 
    margin-bottom: 36px; 
    text-align: center; 
    font-weight: 400; 
    line-height: 1.2;
}
.carousel-wrapper { position: relative; }
.carousel-track-outer { overflow: hidden; border-radius: var(--radius-card); }
.carousel-track { display: flex; gap: 16px; transition: transform 0.4s ease; }

/* CARD DEL CAROUSEL - 4 CARD VISIBILI SU DESKTOP */
.blog-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-card);
    overflow: hidden;
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
    min-width: calc(25% - 12px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.blog-card img { width: 100%; height: 160px; object-fit: cover; display: block; aspect-ratio: 300 / 160; }
.blog-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.blog-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-light); padding-bottom: 10px; border-bottom: 1px solid #e0e0e0; }
.blog-card-meta img { width: 14px !important; height: 14px !important; aspect-ratio: 1 / 1; }
.blog-card-title { font-family: var(--font-montserrat); font-size: 20px; color: var(--color-primary); line-height: 1.3; margin: 0; font-weight: 400; }
.blog-card-excerpt { font-size: 14px; color: var(--color-text); line-height: 1.6; flex: 1; margin: 0; }
.blog-card .btn { align-self: flex-start; font-size: 13px; padding: 8px 18px; margin-top: 8px; }

/* FRECCE CAROUSEL */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-white);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.2s;
}
.carousel-btn:hover { background: var(--color-primary); color: #fff; }
.carousel-btn svg { width: 22px; height: 22px; fill: currentColor; }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* PALLINI CAROUSEL */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 8px 0;
}
.carousel-dot {
    position: relative;
    width: 14px;
    height: 14px;
    min-width: 24px;
    min-height: 24px;
    padding: 5px;
    margin: 0 2px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.carousel-dot::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -10px;
    right: -10px;
    min-width: 44px;
    min-height: 44px;
}
.carousel-dot.active {
    background: var(--color-accent);
    transform: scale(1.25);
}

/* DATABASE */
.db-section { background: var(--color-primary); color: #fff; text-align: center; padding: var(--section-pad); }
.db-inner { max-width: var(--max-width); margin: 0 auto; }
.db-title {
    font-family: var(--font-script); /* APPLICATO GREATVIBES */
    font-size: 52px; /* Aumentato per leggibilità corsivo */
    color: #fff;
    margin-bottom: 36px;
    text-align: center;
    font-weight: 400;
    line-height: 1.2;
}
.db-content p { color: rgba(255,255,255,0.95); font-size: 15px; line-height: 1.8; margin-bottom: 16px; }

/* CONTATTI */
.contact-section { background: var(--color-bg-light); padding: var(--section-pad); }
.contact-inner { max-width: var(--max-width); margin: 0 auto; display: flex; gap: 48px; align-items: flex-start; flex-wrap: wrap; }
.contact-intro { flex: 1; min-width: 260px; }
.contact-intro h3 { font-size: 22px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; }
.contact-form-box { flex: 1; min-width: 280px; background: var(--color-white); padding: 32px; border-radius: var(--radius-card); box-shadow: 0 5px 20px rgba(0,0,0,0.06); }
.contact-form-box h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.contact-form-box h2 .sub { color: var(--color-text); font-weight: 400; font-size: 16px; display: block; margin-top: 4px; }
.form-field { margin-bottom: 16px; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 6px; font-family: var(--font-main); font-size: 14px; transition: border-color 0.2s; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--color-primary); }
.form-field textarea { resize: vertical; min-height: 110px; }
.form-checkbox { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.form-checkbox input { width: auto; margin-top: 3px; accent-color: var(--color-primary); }
.form-checkbox label { font-size: 13px; color: var(--color-text-light); line-height: 1.5; }
.form-submit { width: 100%; font-size: 16px; padding: 14px; }

/* IMMAGINI CENTRATE */
.hero-section img,
.container img,
.db-section img,
.blog-section img,
.contact-section img {
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.gen-img {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 20px auto;
}
.gen-img img {
    display: block;
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    aspect-ratio: 600 / 400;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto;
}

/* FOOTER */
.site-footer { background: var(--color-white); padding: 48px 20px 30px; border-top: 1px solid #e8e8e8; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 200px 1.5fr 1fr; gap: 48px; align-items: start; }
.footer-col { display: flex; flex-direction: column; }
.footer-col-1 img { max-width: 180px; height: auto; display: block; aspect-ratio: 188 / 71; }
.footer-col-2 { gap: 24px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { font-size: 14px; font-weight: 600; color: var(--color-text); transition: color 0.2s; position: relative; display: inline-block; padding-bottom: 2px; }
.footer-nav a:hover { color: var(--color-primary); }
.footer-association-logos { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-association-logos a { display: block; transition: transform 0.2s; }
.footer-association-logos a:hover { transform: scale(1.05); }
.footer-association-logos img { max-width: 130px; height: auto; display: block; }
.footer-col-3 h4 { font-size: 16px; font-weight: 700; color: var(--color-primary); margin-bottom: 16px; margin-top: 0; }
.footer-col-3 ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col-3 li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--color-text); line-height: 1.5; }
.footer-col-3 li svg { flex-shrink: 0; width: 18px; height: 18px; fill: var(--color-accent); margin-top: 2px; }
.footer-col-3 a { color: var(--color-text); transition: color 0.2s; font-weight: 600; }
.footer-col-3 a:hover { color: var(--color-primary); }
.footer-progenita-info { margin-top: 20px; }
.footer-progenita-info a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); transition: color 0.2s; }
.footer-progenita-info a:hover { color: var(--color-primary); }
.footer-progenita-info .progenita-crown { width: 18px; height: 18px; flex-shrink: 0; fill: #BA440A; }
.footer-progenita-info span { font-size: 12px; color: var(--color-text-light); line-height: 1.5; }
.footer-bottom { max-width: var(--max-width); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid #e8e8e8; font-size: 12px; color: var(--color-text-light); text-align: center; }

/* WHATSAPP FLOAT */
.wa-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.3s ease, background 0.3s ease;
}
.wa-float:hover { transform: scale(1.1); background: #1ebe5d; }
.wa-float svg { width: 30px; height: 30px; fill: #ffffff; }

/* ============================================================
LINK PRIVACY POLICY NEI FORM (Stile simile a Header/Footer)
============================================================ */
.form-checkbox label a {
    color: var(--color-text); /* Colore normale del testo (grigio scuro) */
    text-decoration: none; /* Nessuna sottolineatura di default */
    font-weight: 600; /* Leggermente in grassetto, come i link del menu */
    transition: color 0.2s ease; /* Animazione fluida del cambio colore */
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.form-checkbox label a:hover {
    color: var(--color-primary); /* Diventa verde (#146B62) al passaggio del mouse */
    text-decoration: underline; /* Aggiunge la sottolineatura per massima evidenza */
}

/* ============================================================
SEZIONE SOCIAL (Ripristino stili mancanti)
============================================================ */
.footer-social {
  margin-top: 24px;
}
.footer-social h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  margin-top: 0;
}
.social-icons {
  display: flex;
  gap: 16px;
  align-items: center;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-light);
  transition: background 0.3s ease, transform 0.2s ease;
}
.social-icons a:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}
.social-icons a:hover svg {
  fill: #ffffff;
}
.social-icons svg {
  width: 20px;
  height: 20px;
  fill: var(--color-accent);
  transition: fill 0.3s ease;
}

/* Aggiustamento responsive per i Social su Mobile */
@media (max-width: 768px) {
  .footer-social, .social-icons {
    justify-content: center;
  }
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .blog-card {
        flex: 0 0 calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
        min-width: calc(33.333% - 11px);
    }
}
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .site-nav { display: none; width: 100%; padding-bottom: 12px; }
    .site-nav.open { display: block; }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
    .nav-list li { width: 100%; }
    .nav-list a { padding: 14px 8px; font-size: 16px; }
    .lang-flags { display: flex; gap: 10px; }
    .lang-flag img { width: 16px; height: 11px; }
    
    /* CAROUSEL TESTIMONIANZE TABLET */
    #testimonials-track .trust-message-card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-width: calc(50% - 8px);
    }
    
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-col-1 { grid-column: 1 / -1; text-align: center; align-items: center; }
    .footer-col-2 { grid-column: 1; }
    .footer-col-3 { grid-column: 2; }
}
@media (max-width: 768px) {
    .blog-card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-width: calc(50% - 8px);
    }
    .blog-card img { height: 140px; }
    .contact-inner, .footer-inner { flex-direction: column; grid-template-columns: 1fr; gap: 32px; }
    .footer-col-1, .footer-col-2, .footer-col-3 { grid-column: 1; align-items: center; text-align: center; }
    .footer-nav ul, .footer-association-logos, .footer-col-3 ul { justify-content: center; }
    .footer-col-3 li { justify-content: center; }
    .footer-progenita-info a { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
    /* CAROUSEL TESTIMONIANZE MOBILE */
    #testimonials-track .trust-message-card {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
    }
}
@media (max-width: 500px) {
    .blog-card {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
    }
    .btn { width: 100%; text-align: center; }
}