/*
Theme Name: Statistical Advisor
Description: Tema per statisticaladvisor.com: consulenza statistica per tesi e ricerca.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: statistical-advisor
*/

@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: #FAF7F0; color: #1F3A4D;
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
}
a { color: #1F3A4D; }
a:hover { color: #8A5A00; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #8A5A00; outline-offset: 2px; }
#contatti a:focus-visible, #contatti button:focus-visible { outline-color: #FAF7F0; }
#sa-form input:focus-visible, #sa-form textarea:focus-visible, #sa-form button:focus-visible, #sa-form a:focus-visible { outline-color: #1F3A4D; }
img { max-width: 100%; height: auto; }
.sa-skip { position: absolute; left: -9999px; top: 0; background: #1F3A4D; color: #FAF7F0; padding: 12px 18px; z-index: 100; }
.sa-skip:focus { left: 0; }
.sa-page { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.sa-page h1 { font-family: "Source Serif 4", Georgia, serif; font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 24px; }
.sa-content h2, .sa-content h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; margin: 2em 0 0.6em; }
.sa-meta { color: #4A5F6E; font-size: 15px; }

@media (max-width: 520px) {
  main h1 { font-size: 40px !important; }
  main h2 { font-size: 32px !important; }
}

/* Modulo WPForms nella sezione contatti */
.sa-wpforms .wpforms-container { margin: 0; }
.sa-wpforms .wpforms-field { padding: 0 0 18px; }
.sa-wpforms .wpforms-field-label { font-size: 15px; font-weight: 600; color: #1F3A4D; }
.sa-wpforms .wpforms-form input[type=text], .sa-wpforms .wpforms-form input[type=email], .sa-wpforms .wpforms-form textarea {
  width: 100%; max-width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 46px;
  border: 1px solid #B9AF98; border-radius: 6px; background: #FFFFFF; color: #1F3A4D;
}
.sa-wpforms .wpforms-form textarea { min-height: 120px; }
.sa-wpforms .wpforms-form .wpforms-submit {
  background: #D9A441; color: #1F3A4D; border: 0; border-radius: 6px; padding: 14px 26px; min-height: 48px;
  font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
}
.sa-wpforms .wpforms-form .wpforms-submit:hover { background: #C8942F; }
.sa-wpforms .wpforms-confirmation-container-full { background: #E3F0E6; color: #1B4D2B; border: 0; border-radius: 6px; }

/* Casi di studio */
[hidden] { display: none !important; }
.sa-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.sa-chip { font: inherit; font-size: 15px; font-weight: 500; color: #1F3A4D; background: #FFFFFF; border: 1px solid #B9AF98; border-radius: 999px; padding: 9px 18px; min-height: 44px; cursor: pointer; }
.sa-chip:hover { border-color: #1F3A4D; }
.sa-chip[aria-pressed="true"] { background: #1F3A4D; border-color: #1F3A4D; color: #FAF7F0; }
.sa-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.sa-case { background: #FFFFFF; border: 1px solid #E4DDCF; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.sa-case-thumb { display: block; width: 100%; padding: 0; margin: 0; border: 0; border-bottom: 1px solid #E4DDCF; background: #FCFCFB; cursor: pointer; height: 230px; overflow: hidden; }
.sa-case-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.sa-case-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sa-case-area { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8A5A00; }
.sa-case h3 { margin: 0; font-family: "Source Serif 4", Georgia, serif; font-size: 21px; line-height: 1.25; font-weight: 600; }
.sa-case-sum { margin: 0; font-size: 15px; line-height: 1.5; color: #3F5565; }
.sa-case-kpi { margin: auto 0 0; padding-top: 6px; font-size: 14px; line-height: 1.4; color: #4A5F6E; }
.sa-case-kpi span { font-family: "Source Serif 4", Georgia, serif; font-size: 24px; font-weight: 700; color: #8A5A00; margin-right: 6px; white-space: nowrap; }
.sa-case-link { align-self: flex-start; font: inherit; font-size: 16px; font-weight: 600; color: #1F3A4D; background: none; border: 0; border-bottom: 2px solid #1F3A4D; padding: 8px 0; min-height: 44px; cursor: pointer; }
.sa-case-link:hover { color: #8A5A00; border-color: #8A5A00; }
.sa-dialog { width: min(960px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 12px; background: #FAF7F0; color: #1F3A4D; overflow: auto; }
.sa-dialog::backdrop { background: rgba(31, 58, 77, 0.62); }
.sa-dialog-in { padding: 36px 36px 32px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.sa-dialog-x { position: absolute; right: 14px; top: 10px; width: 44px; height: 44px; font: inherit; font-size: 30px; line-height: 1; color: #1F3A4D; background: none; border: 0; cursor: pointer; }
.sa-dialog-title { margin: 0 44px 0 0; font-family: "Source Serif 4", Georgia, serif; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.sa-kpis { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0; }
.sa-kpis div { flex: 1 1 200px; border-left: 3px solid #D9A441; padding: 2px 0 2px 14px; font-size: 14px; line-height: 1.4; color: #3F5565; }
.sa-kpis span { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 30px; line-height: 1.1; font-weight: 700; color: #8A5A00; }
.sa-figs { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: center; }
.sa-figs-2, .sa-figs-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.sa-figs figure { margin: 0; background: #FCFCFB; border: 1px solid #E4DDCF; border-radius: 8px; padding: 10px; display: flex; align-items: center; justify-content: center; }
.sa-figs-2 img, .sa-figs-4 img { width: 100% !important; }
.sa-figs img { display: block; max-height: 520px; width: auto; max-width: 100%; height: auto; }
.sa-dialog h4 { margin: 10px 0 0; font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8A5A00; }
.sa-dialog-in > p { margin: 0; font-size: 16px; line-height: 1.6; color: #3F5565; }
.sa-dialog-in > p.sa-case-area { color: #8A5A00; font-size: 13px; padding-right: 48px; }
.sa-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px !important; }
.sa-tags span { font-size: 13px; color: #1F3A4D; background: #F1EBDD; border-radius: 999px; padding: 5px 12px; }
.sa-dialog-cta { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 12px; }
@media (max-width: 520px) { .sa-dialog-in { padding: 28px 20px 24px; } .sa-dialog-title { font-size: 26px; } }
