/* ==========================================================================
   MASSA Ingegneria - tema istituzionale
   Linguaggio visivo ispirato ai siti delle grandi societa' di ingegneria:
   Arial, barra utility grigia, menu a una riga, schede squadrate con ombra
   leggera, fascia numeri scura, footer grigio chiaro.
   Colore d'accento: blu del marchio #1A486C.
   Caricato DOPO i fogli base: sovrascrive token e componenti.
   ========================================================================== */

:root {
  --blue: #1A486C;
  --blue-dark: #12354f;
  --blue-soft: #e8eff5;

  --b950: #1f1f1f;
  --b900: #262626;
  --b800: #333333;
  --b700: #12354f;      /* hover dei pulsanti primari */
  --b600: #1A486C;      /* primario = blu del marchio */
  --b500: #6f6f6f;
  --b400: #8c8c8c;
  --b300: #b5b5b5;
  --b200: #d4d4d4;
  --b150: #e3e3e3;
  --b100: #ececec;
  --b050: #f4f4f4;
  --feed-bg: #f4f4f4;
  --white: #ffffff;
  --text: #212529;
  --text-mid: #6f6f6f;
  --border: #e3e3e3;

  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --serif: var(--sans);
  --shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

/* ---------- Base ---------- */
body { font-family: var(--sans); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { font-style: normal !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: #fff; }

/* ---------- Titoli: Arial bold ---------- */
h1, h2, h3, h4, .hero h1, .section-title, .cta-title, .about-content h2,
.skills-left h2, .ss-left h2, .xticker-headline h2, .pf-subsection-title {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.hero h1 { font-size: clamp(32px, 3.6vw, 46px); color: #1f1f1f; margin-bottom: 22px; }
.hero h1 em, h1 em, h2 em, .section-title em, .cta-title em { color: var(--blue); font-weight: 700; }
.section-title { font-size: clamp(26px, 2.6vw, 36px); color: #1f1f1f; margin-bottom: 14px; }
.cta-title { font-size: clamp(26px, 2.8vw, 38px); color: #fff; }
.cta-title em { color: #fff; }
.section-sub, .hero-lead { color: var(--text-mid); font-size: 17px; line-height: 1.65; }

h1, h2 { font-weight: 700 !important; }

/* Etichette: piccole, maiuscole, bold, blu (come le etichette rosse di FS) */
.section-kicker, .hero-kicker, .cta-kicker, .mh-kicker, .pf-subsection-kicker, .svc-sub {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue);
}
.section-kicker::before, .section-kicker::after, .pf-subsection-kicker::before,
.pf-subsection-kicker::after, .hero-kicker::before { display: none; }

/* ---------- Pulsanti: pillola, maiuscolo bold ---------- */
.btn-primary, .btn-secondary, .btn-pri, .btn-sec, .nav-cta, .cta-btn-lg, .mf-btn,
.xticker-cta, .xtf-btn, .archive-footer-btn, .form-submit, .nl-btn,
.moodle-btn, .moodle-btn-sec, .press-cta a {
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 36px; min-height: 44px;
  padding: 0 26px !important; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary, .btn-pri, .nav-cta, .mf-btn, .form-submit, .nl-btn {
  background: var(--blue); color: #fff !important; border: 1px solid var(--blue);
}
.btn-primary:hover, .btn-pri:hover, .nav-cta:hover, .mf-btn:hover, .form-submit:hover, .nl-btn:hover {
  background: var(--blue-dark); border-color: var(--blue-dark); color: #fff;
}
.btn-secondary, .btn-sec { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-secondary:hover, .btn-sec:hover { background: var(--blue); color: #fff; }
.filter-btn, .gfilter-btn { font-family: var(--sans); font-weight: 700; letter-spacing: .05em; }
.filter-btn.active, .gfilter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Pulsante su fondi blu/scuri: invertito */
.cta-section .btn-primary, .cta-section .cta-btn-lg, .cta-box .btn-pri, .cta-box .btn-primary,
.det-cta-row .btn-primary, .schools-spot .btn-primary, .moodle .btn-primary, .testimonials .btn-primary {
  background: #fff; color: var(--blue) !important; border-color: #fff;
}
.cta-section .btn-primary:hover, .cta-section .cta-btn-lg:hover, .cta-box .btn-pri:hover,
.det-cta-row .btn-primary:hover, .schools-spot .btn-primary:hover, .moodle .btn-primary:hover {
  background: var(--blue-soft); border-color: var(--blue-soft); color: var(--blue) !important;
}
.cta-box .btn-sec, .cta-section .btn-secondary { color: #fff; border-color: #fff; }
.cta-box .btn-sec:hover, .cta-section .btn-secondary:hover { background: #fff; color: var(--blue); }

/* ---------- Barra utility (ticker notizie) ---------- */
.es-ticker { background: #ececec; color: #222; border-bottom: 1px solid #dcdcdc; padding: 7px 40px; gap: 18px; font-size: 12px; }
.es-ticker:hover { opacity: 1; background: #e3e3e3; }
.es-ticker-pill { background: transparent; padding: 0; border-radius: 0; }
.es-ticker-pill img { height: 26px; }
.es-ticker-kicker { color: var(--blue); opacity: 1; font-weight: 700; letter-spacing: .06em; }
.es-ticker-title { color: #222; font-weight: 700; }
.es-ticker-date { color: var(--text-mid); opacity: 1; }

/* ---------- Testata e menu a una riga ---------- */
.site-header { background: #fff; backdrop-filter: none; border-bottom: none; box-shadow: 0 1px 0 var(--border); }
.nav { padding: 12px 0; }
.brand-logo { height: 100px; }
.brand-partner, .brand-whatsapp-tall { border-radius: 4px; box-shadow: none !important; transform: none !important; }
.brand-partner { border-color: var(--border); }
.brand-partner:hover { border-color: var(--blue); }
.brand-stack .brand-partner { padding: 6px 14px; }
.brand-stack .brand-partner img { height: 36px; }

.subnav { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: 0 3px 6px -4px rgba(0,0,0,.18); }
.subnav-inner { max-width: 1240px; margin: 0 auto; justify-content: space-between; gap: 0; padding: 6px 40px; }
.subnav a {
  font-family: var(--sans); font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: #333; padding: 12px 6px; border-radius: 0; position: relative; white-space: nowrap; background: transparent !important;
}
.subnav a::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .2s; }
.subnav a:hover { color: var(--blue); }
.subnav a:hover::after { transform: scaleX(1); }
.subnav a.subnav-primary { color: #1f1f1f; font-weight: 700; }
.subnav a .sn-ic, .subnav-sep { display: none; }
.subnav-sep.subnav-break { display: block; width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

/* ---------- Hero ---------- */
.hero { background: #fff; padding: 64px 0 80px; border-bottom: 1px solid var(--border); }
.hero::before { display: none; }
.hero-photo { border-radius: 0; box-shadow: var(--shadow); }
.hero-stat-card, .hero-nameplate { border-radius: 0; box-shadow: var(--shadow); }

/* ---------- Fascia numeri scura (come gli "Highlights") ---------- */
.trust-bar { background: #2b2b2b; border: none; padding: 34px 0; }
.trust-item { border-right-color: rgba(255,255,255,.18); }
.trust-num { color: #fff; font-family: var(--sans); font-weight: 700; }
.trust-lbl { color: #cfcfcf; font-weight: 700; letter-spacing: .06em; }

/* ---------- Schede: angoli squadrati, ombra leggera ---------- */
.svc-block, .ind-card, .ind-card-fire, .t-card, .pf-card, .article-card, .book-card,
.ss-card, .modal, .press-cta, .case, .srv-card, .cl-card, .cta-box {
  border-radius: 0; box-shadow: var(--shadow);
}
.svc-block, .ind-card, .pf-card, .article-card, .book-card, .srv-card, .cl-card { border: none; background: #fff; }
.svc-block:hover, .ind-card:hover, .pf-card:hover, .article-card:hover, .srv-card:hover, .cl-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.2); transform: none;
}
.svc-block[class*="is-"], .ind-card[class*="is-"] { border-top: 3px solid var(--acc); }
.svc-big-num { font-family: var(--sans); font-weight: 700; }
.outlet-tag, .fp-kicker, .mc-tag { border-radius: 0; }

/* ---------- Sezioni di fondo ---------- */
.cta-section { background: var(--blue); }
.cta-section::before { display: none; }
.testimonials, .schools-spot, .moodle { background: #2b2b2b; }
.social-strip { background: #f4f4f4; }
.det-cta-row, .det-card-featured { background: #2b2b2b; }

/* ---------- Footer grigio chiaro ---------- */
footer { background: #f4f4f4; color: #333; border-top: 1px solid var(--border); }
.footer-grid { border-bottom: 1px solid #dcdcdc; }
.footer-logo { background: transparent; padding: 0; border-radius: 0; }
.footer-about, .footer-col a, .footer-col li, .footer-name-role { color: #555; }
.footer-col li { font-size: 13.5px; }
.footer-col strong { color: #1f1f1f !important; }   /* etichette con stile inline */
.footer-col li a { font-size: 13.5px; }
.footer-col h5, .footer-name { color: #1f1f1f; font-family: var(--sans); font-weight: 700; }
.footer-col a:hover, .footer-bottom a:hover { color: var(--blue); }
.footer-bottom, .footer-bottom a { color: var(--text-mid); }
.nl-divider { background: #dcdcdc; }
.nl-box .nl-title { color: #1f1f1f; font-family: var(--sans); }
.nl-box .nl-sub, .nl-consent { color: #555; }
.nl-consent a { color: var(--blue); }
.nl-consent input { accent-color: var(--blue); }
.nl-row input[type="email"] { background: #fff; color: #212529; border: 1px solid #c9c9c9; border-radius: 36px; }
.nl-row input[type="email"]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,72,108,.18); }
.social-strip .container a:not(.social-btn) { color: #555; }
.social-strip .container a:not(.social-btn):hover { color: var(--blue); }
.social-btn { background: var(--blue); color: #fff; border-radius: 50%; }
.social-btn:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Moduli ---------- */
input, textarea, select, button { font-family: var(--sans); }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Mobile e correzioni overflow (presenti anche nella versione precedente) ---------- */
.articles-grid > *, .footer-grid > *, .t-grid > *, .svc-grid > *, .hero-grid > *,
.books-row > *, .book-card > * { min-width: 0; }
.article-title, .footer-col a, .footer-about, .book-info, .book-title { overflow-wrap: anywhere; }
.article-meta { flex-wrap: wrap; gap: 6px 12px; }
.footer-logo { max-width: 100%; }
.footer-logo img { max-width: 100%; height: auto; max-height: 110px; object-fit: contain; }
@media (max-width: 960px) {
  .brand-logo { height: 72px; }
  .hero { padding: 44px 0 56px; }
  .es-ticker { padding: 7px 20px; }
  .subnav-inner { padding: 0 12px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .subnav-inner::-webkit-scrollbar { display: none; }
  .subnav a { padding: 14px 10px; }
}
@media (max-width: 760px) { .books-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .footer-grid, .articles-grid { grid-template-columns: minmax(0, 1fr); }
}
