/*!
Theme Name: Kadence Child
Template: kadence
Version: 1.0.7
Text Domain: kadence-child
*/

/* ================================================================
   FIERA DI CENTO — CHILD THEME
   Tutti gli stili visivi sono definiti qui.
   I blocchi Greenshift gestiscono solo la struttura.
   ================================================================ */


/* ----------------------------------------------------------------
   1. VARIABILI CSS
   ---------------------------------------------------------------- */

:root {

    /* Colori principali */
    --color-navy:        #1a3d6e;   /* Blu navy — hero, footer, sezioni scure */
    --color-blue:        #2a7bc5;   /* Blu medio — sezioni, accenti */
    --color-accent:      #1e90d5;   /* Blu vivace — CTA, icone, link */
    --color-accent-dark: #1670ad;   /* CTA hover */

    /* Neutri */
    --color-white:       #ffffff;
    --color-bg-light:    #f4f7fb;
    --color-bg-card:     #ffffff;
    --color-border:      #d4dce8;

    /* Testo */
    --color-text:        #1a2d4a;
    --color-text-muted:  #5a6a7e;

    /* Tipografia */
    --font-main:         'Poppins', sans-serif;
    --font-size-base:    1rem;           /* 16px */
    --font-size-sm:      0.875rem;       /* 14px */
    --font-size-lg:      1.125rem;       /* 18px */
    --font-size-xl:      1.25rem;        /* 20px */

    --h1-size:           clamp(2.25rem, 5vw, 3.5rem);
    --h2-size:           clamp(1.75rem, 3.5vw, 2.5rem);
    --h3-size:           clamp(1.25rem, 2.5vw, 1.75rem);
    --h4-size:           1.25rem;
    --h5-size:           1.1rem;
    --h6-size:           1rem;

    --font-weight-normal:   400;
    --font-weight-medium:   500;
    --font-weight-semibold: 600;
    --font-weight-bold:     700;

    --line-height-heading:  1.2;
    --line-height-body:     1.65;

    /* Spaziature */
    --space-xs:   0.5rem;
    --space-sm:   1rem;
    --space-md:   1.5rem;
    --space-lg:   2.5rem;
    --space-xl:   4rem;
    --space-xxl:  6rem;

    /* Layout */
    --container-max:  1200px;
    --container-pad:  clamp(1rem, 4vw, 2.5rem);

    /* Bordi e raggi */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-full: 9999px;

    /* Ombre */
    --shadow-card:  0 2px 16px rgba(26, 61, 110, 0.10);
    --shadow-hover: 0 6px 28px rgba(26, 61, 110, 0.18);

    /* Transizioni */
    --transition: all 0.22s ease;
}


/* ----------------------------------------------------------------
   2. RESET E BASE
   ---------------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family:             var(--font-main);
    font-size:               var(--font-size-base);
    font-weight:             var(--font-weight-normal);
    color:                   var(--color-text);
    line-height:             var(--line-height-body);
    background:              var(--color-white);
    -webkit-font-smoothing:  antialiased;
}

img, video {
    max-width: 100%;
    height:    auto;
    display:   block;
}

a {
    color:           var(--color-accent);
    text-decoration: none;
    transition:      var(--transition);
}
a:hover {
    color: var(--color-accent-dark);
}


/* ----------------------------------------------------------------
   3. TIPOGRAFIA
   ---------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family:   var(--font-main);
    font-weight:   var(--font-weight-bold);
    line-height:   var(--line-height-heading);
    color:         var(--color-navy);
    margin-top:    0;
    margin-bottom: var(--space-sm);
}

h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--h4-size); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--h5-size); font-weight: var(--font-weight-medium); }
h6 { font-size: var(--h6-size); font-weight: var(--font-weight-medium); }

p {
    margin-top:    0;
    margin-bottom: var(--space-sm);
    color:         var(--color-text);
    font-size:     var(--font-size-base);
    line-height:   var(--line-height-body);
}
p:last-child { margin-bottom: 0; }

/* Testi su sfondo scuro */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6,
.section--dark p,
.section--dark a,
.section--dark li,
.hero-section h1,
.hero-section h2,
.hero-section p,
.footer-section h1,
.footer-section h2,
.footer-section h3,
.footer-section p,
.footer-section a {
    color: var(--color-white);
}

/* Soprattitolo / etichetta */
.label-eyebrow {
    font-size:      var(--font-size-sm);
    font-weight:    var(--font-weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color:          var(--color-accent);
    display:        block;
    margin-bottom:  var(--space-xs);
}


/* ----------------------------------------------------------------
   4. LAYOUT E CONTAINER
   ---------------------------------------------------------------- */

.site-container,
.entry-content > * {
    max-width:     var(--container-max);
    margin-left:   auto;
    margin-right:  auto;
    padding-left:  var(--container-pad);
    padding-right: var(--container-pad);
}

.section-padding {
    padding-top:    var(--space-xxl);
    padding-bottom: var(--space-xxl);
}
.section-padding--sm {
    padding-top:    var(--space-xl);
    padding-bottom: var(--space-xl);
}

.section-title {
    text-align:    center;
    margin-bottom: var(--space-lg);
}


/* ----------------------------------------------------------------
   5. BOTTONI
   ---------------------------------------------------------------- */

.wp-block-button__link,
.gspb_button,
a.btn,
button.btn {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    font-family:      var(--font-main);
    font-size:        var(--font-size-base);
    font-weight:      var(--font-weight-semibold);
    line-height:      1;
    text-decoration:  none;
    cursor:           pointer;
    border:           2px solid transparent;
    border-radius:    var(--radius-full);
    padding:          0.75rem 2rem;
    transition:       var(--transition);
    white-space:      nowrap;
    letter-spacing:   0.03em;
}

/* Bottone primario — blu pieno */
.wp-block-button__link,
.gspb_button,
.btn--primary {
    background-color: var(--color-accent);
    border-color:     var(--color-accent);
    color:            var(--color-white) !important;
}
.wp-block-button__link:hover,
.gspb_button:hover,
.btn--primary:hover {
    background-color: var(--color-accent-dark);
    border-color:     var(--color-accent-dark);
    color:            var(--color-white) !important;
    transform:        translateY(-1px);
    box-shadow:       var(--shadow-hover);
}

/* Bottone outline su sfondo chiaro */
.btn--outline {
    background-color: transparent;
    border-color:     var(--color-accent);
    color:            var(--color-accent) !important;
}
.btn--outline:hover {
    background-color: var(--color-accent);
    color:            var(--color-white) !important;
}

/* Bottone outline su sfondo scuro o hero */
.btn--outline-white {
    background-color: transparent;
    border-color:     var(--color-white);
    color:            var(--color-white) !important;
}
.btn--outline-white:hover {
    background-color: var(--color-white);
    color:            var(--color-navy) !important;
}


/* ----------------------------------------------------------------
   6. NAVIGAZIONE
   ---------------------------------------------------------------- */

#masthead,
.site-header,
.kadence-sticky-header {
    background-color: var(--color-white);
    box-shadow:       0 1px 8px rgba(26, 61, 110, 0.08);
}

.site-logo img,
.custom-logo {
    max-height: 52px;
    width:      auto;
}

.main-navigation a,
.nav-primary a,
#site-navigation a,
.kadence-navigation a {
    font-family:    var(--font-main);
    font-size:      var(--font-size-sm);
    font-weight:    var(--font-weight-semibold);
    color:          var(--color-navy);
    letter-spacing: 0.03em;
    padding:        0.5rem 0.75rem;
    transition:     var(--transition);
}
.main-navigation a:hover,
.nav-primary a:hover,
.kadence-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-accent);
}


/* ----------------------------------------------------------------
   7. HERO
   ---------------------------------------------------------------- */

.hero-section {
    position:         relative;
    overflow:         hidden;
    min-height:       90vh;
    display:          flex;
    align-items:      center;
    background-color: var(--color-navy);
}

.hero-section::before {
    content:    '';
    position:   absolute;
    inset:      0;
    background: linear-gradient(
        135deg,
        rgba(26, 61, 110, 0.80) 0%,
        rgba(26, 61, 110, 0.55) 100%
    );
    z-index: 1;
}

.hero-section > * {
    position: relative;
    z-index:  2;
}

.hero-section h1 {
    font-size:     clamp(2.5rem, 6vw, 4.5rem);
    font-weight:   var(--font-weight-bold);
    color:         var(--color-white);
    line-height:   1.1;
    margin-bottom: var(--space-sm);
}

.hero-section h2,
.hero-subtitle {
    font-size:     clamp(1rem, 2.5vw, 1.35rem);
    font-weight:   var(--font-weight-medium);
    color:         rgba(255, 255, 255, 0.88);
    margin-bottom: var(--space-lg);
}

/* Countdown */
.countdown-wrapper {
    display:       flex;
    gap:           var(--space-md);
    margin-bottom: var(--space-lg);
}
.countdown-item {
    text-align: center;
    color:      var(--color-white);
}
.countdown-item .number {
    font-size:   clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    display:     block;
}
.countdown-item .label {
    font-size:      var(--font-size-sm);
    opacity:        0.75;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}


/* ----------------------------------------------------------------
   8. CARDS E BOX
   ---------------------------------------------------------------- */

.card,
.box-rapido {
    background:    var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow:    var(--shadow-card);
    padding:       var(--space-lg) var(--space-md);
    text-align:    center;
    transition:    var(--transition);
}
.card:hover,
.box-rapido:hover {
    box-shadow: var(--shadow-hover);
    transform:  translateY(-3px);
}

.card-icon {
    width:         56px;
    height:        56px;
    margin:        0 auto var(--space-sm);
    color:         var(--color-accent);
}
.card-icon svg,
.card-icon img {
    width:  100%;
    height: 100%;
}

.card h3,
.box-rapido h3 {
    font-size:     var(--h4-size);
    color:         var(--color-navy);
    margin-bottom: var(--space-xs);
}
.card p,
.box-rapido p {
    font-size: var(--font-size-sm);
    color:     var(--color-text-muted);
}


/* ----------------------------------------------------------------
   9. SFONDI SEZIONI
   ---------------------------------------------------------------- */

.section--white { background-color: var(--color-white); }
.section--light { background-color: var(--color-bg-light); }
.section--navy  { background-color: var(--color-navy); }
.section--blue  { background-color: var(--color-blue); }

.section--navy h1, .section--navy h2, .section--navy h3,
.section--navy h4, .section--navy h5, .section--navy h6,
.section--navy p, .section--navy a, .section--navy li,
.section--blue h1, .section--blue h2, .section--blue h3,
.section--blue h4, .section--blue h5, .section--blue h6,
.section--blue p, .section--blue a, .section--blue li {
    color: var(--color-white);
}


/* ----------------------------------------------------------------
   10. NUMERI E STATISTICHE
   ---------------------------------------------------------------- */

.stat-number {
    font-size:   clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-bold);
    color:       var(--color-accent);
    line-height: 1;
    display:     block;
}
.stat-label {
    font-size:      var(--font-size-sm);
    font-weight:    var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color:          var(--color-text-muted);
    margin-top:     var(--space-xs);
}

.section--navy .stat-number,
.section--blue .stat-number {
    color: var(--color-white);
}
.section--navy .stat-label,
.section--blue .stat-label {
    color: rgba(255, 255, 255, 0.70);
}


/* ----------------------------------------------------------------
   11. FORM — CONTACT FORM 7
   ---------------------------------------------------------------- */

.wpcf7-form {
    width: 100%;
}
.wpcf7-form p {
    margin-bottom: var(--space-sm);
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea,
.wpcf7-form select {
    width:            100%;
    font-family:      var(--font-main);
    font-size:        var(--font-size-base);
    color:            var(--color-text);
    background-color: var(--color-white);
    border:           1.5px solid var(--color-border);
    border-radius:    var(--radius-md);
    padding:          0.7rem 1rem;
    transition:       border-color 0.2s, box-shadow 0.2s;
    outline:          none;
    appearance:       none;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    border-color: var(--color-accent);
    box-shadow:   0 0 0 3px rgba(30, 144, 213, 0.15);
}
.wpcf7-form textarea {
    min-height: 140px;
    resize:     vertical;
}
.wpcf7-form select {
    background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a3d6e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:   no-repeat;
    background-position: right 1rem center;
    padding-right:       2.5rem;
}
.wpcf7-form label {
    font-size:     var(--font-size-sm);
    font-weight:   var(--font-weight-semibold);
    color:         var(--color-navy);
    display:       block;
    margin-bottom: 0.3rem;
}
.wpcf7-form input[type="checkbox"] {
    width:        18px;
    height:       18px;
    accent-color: var(--color-accent);
    margin-right: 0.5rem;
    cursor:       pointer;
}
.wpcf7-submit {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    font-family:      var(--font-main);
    font-size:        var(--font-size-base);
    font-weight:      var(--font-weight-semibold);
    border:           2px solid var(--color-accent);
    border-radius:    var(--radius-full);
    padding:          0.75rem 2.5rem;
    background-color: var(--color-accent);
    color:            var(--color-white);
    cursor:           pointer;
    letter-spacing:   0.03em;
    transition:       var(--transition);
    min-width:        180px;
}
.wpcf7-submit:hover {
    background-color: var(--color-accent-dark);
    border-color:     var(--color-accent-dark);
    transform:        translateY(-1px);
    box-shadow:       var(--shadow-hover);
}
.wpcf7-response-output {
    font-size:     var(--font-size-sm);
    padding:       0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-top:    var(--space-sm);
    border:        none !important;
}
.wpcf7-mail-sent-ok {
    background: #d1fae5;
    color:      #065f46;
}
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: #fee2e2;
    color:      #991b1b;
}
.wpcf7-not-valid-tip {
    font-size:    var(--font-size-sm);
    color:        #dc2626;
    margin-top:   0.25rem;
    display:      block;
}


/* ----------------------------------------------------------------
   12. FOOTER
   ---------------------------------------------------------------- */

.site-footer,
#colophon {
    background-color: var(--color-navy);
    color:            var(--color-white);
    padding-top:      var(--space-xl);
    padding-bottom:   var(--space-lg);
    font-size:        var(--font-size-sm);
}

.footer-columns {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   var(--space-lg);
    margin-bottom:         var(--space-lg);
}

.footer-col h3,
.footer-col h4 {
    font-size:      var(--font-size-base);
    font-weight:    var(--font-weight-semibold);
    color:          var(--color-white);
    margin-bottom:  var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.footer-col p,
.footer-col address,
.footer-col a {
    font-size:   var(--font-size-sm);
    color:       rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    font-style:  normal;
}
.footer-col a:hover {
    color: var(--color-white);
}

.footer-divider {
    border:     none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin:     var(--space-md) 0;
}

.footer-bottom {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             var(--space-sm);
    font-size:       var(--font-size-sm);
    color:           rgba(255, 255, 255, 0.50);
}
.footer-bottom a {
    color: rgba(255, 255, 255, 0.50);
}
.footer-bottom a:hover {
    color: var(--color-white);
}

.footer-social {
    display: flex;
    gap:     var(--space-sm);
}
.footer-social a {
    display:          flex;
    align-items:      center;
    justify-content:  center;
    width:            36px;
    height:           36px;
    border-radius:    50%;
    background-color: rgba(255, 255, 255, 0.12);
    color:            var(--color-white) !important;
    transition:       var(--transition);
}
.footer-social a:hover {
    background-color: var(--color-accent);
}


/* ----------------------------------------------------------------
   13. MAPPA
   ---------------------------------------------------------------- */

.mappa-wrapper {
    border-radius: var(--radius-lg);
    overflow:      hidden;
    box-shadow:    var(--shadow-card);
}
.mappa-wrapper iframe,
.mappa-wrapper img {
    width:   100%;
    display: block;
}

.mappa-legenda-item {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    font-size:   var(--font-size-sm);
    color:       var(--color-text);
    margin-bottom: 0.5rem;
}
.mappa-legenda-dot {
    width:        14px;
    height:       14px;
    border-radius: 3px;
    flex-shrink:  0;
}


/* ----------------------------------------------------------------
   14. FAQ — ACCORDION
   ---------------------------------------------------------------- */

.faq-item {
    border-bottom: 1px solid var(--color-border);
}
.faq-item summary,
.faq-question {
    font-family:     var(--font-main);
    font-size:       var(--font-size-base);
    font-weight:     var(--font-weight-semibold);
    color:           var(--color-navy);
    padding:         var(--space-md) 0;
    cursor:          pointer;
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    list-style:      none;
}
.faq-answer,
.faq-item p {
    font-size:      var(--font-size-sm);
    color:          var(--color-text-muted);
    padding-bottom: var(--space-md);
    line-height:    var(--line-height-body);
}


/* ----------------------------------------------------------------
   15. UTILITA'
   ---------------------------------------------------------------- */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-white  { color: var(--color-white) !important; }
.text-navy   { color: var(--color-navy) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-muted  { color: var(--color-text-muted) !important; }

.bg-navy  { background-color: var(--color-navy); }
.bg-blue  { background-color: var(--color-blue); }
.bg-light { background-color: var(--color-bg-light); }
.bg-white { background-color: var(--color-white); }

.divider {
    border:     none;
    border-top: 1px solid var(--color-border);
    margin:     var(--space-lg) 0;
}


/* ----------------------------------------------------------------
   16. RESPONSIVE
   ---------------------------------------------------------------- */

@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl:  2.5rem;
        --space-xxl: 3.5rem;
    }
    .hero-section {
        min-height: 70vh;
    }
    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .footer-bottom {
        flex-direction: column;
        text-align:     center;
    }
    .countdown-wrapper {
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .wp-block-button__link,
    .gspb_button {
        width:      100%;
        text-align: center;
    }
}
