/* Testo, sottotitolo e pulsante sopra le slide della home (usato anche dall'anteprima in admin) */
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(fonts/montserrat-600.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(fonts/montserrat-700.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-display: swap; src: url(fonts/open-sans-400.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-display: swap; src: url(fonts/open-sans-600.woff2) format('woff2'); }

.sl-wrap { position: relative; container-type: inline-size; overflow: hidden; }
.sl-wrap > img { display: block; width: 100%; height: auto; }
.sl-wrap .sl-link { position: absolute; inset: 0; z-index: 1; }

/* griglia 3x3: t/m/b = alto/meta'/basso, l/c/r = sinistra/centro/destra */
.sl-cap { position: absolute; inset: 0; z-index: 2; display: flex; padding: 3.2cqw 3.4cqw; pointer-events: none; box-sizing: border-box; }
.sl-cap.p-tl, .sl-cap.p-tc, .sl-cap.p-tr { align-items: flex-start; }
.sl-cap.p-ml, .sl-cap.p-mc, .sl-cap.p-mr { align-items: center; }
.sl-cap.p-bl, .sl-cap.p-bc, .sl-cap.p-br { align-items: flex-end; }
.sl-cap.p-tl, .sl-cap.p-ml, .sl-cap.p-bl { justify-content: flex-start; text-align: left; }
.sl-cap.p-tc, .sl-cap.p-mc, .sl-cap.p-bc { justify-content: center; text-align: center; }
.sl-cap.p-tr, .sl-cap.p-mr, .sl-cap.p-br { justify-content: flex-end; text-align: right; }

.sl-box { max-width: 58%; }
.sl-cap.p-tc .sl-box, .sl-cap.p-mc .sl-box, .sl-cap.p-bc .sl-box { max-width: 76%; }
.sl-tit { margin: 0; padding: 0; border: 0; font-family: 'Montserrat', 'Open Sans', sans-serif; font-weight: 700;
  font-size: clamp(16px, 4.3cqw, 62px); line-height: 1.15; letter-spacing: -.02em; color: #2b3a48; text-transform: none; background: none; }
.sl-sub { margin: .45em 0 0; padding: 0; font-family: 'Open Sans', sans-serif; font-weight: 400;
  font-size: clamp(12px, 2.3cqw, 30px); line-height: 1.35; color: #7a8590; }
.sl-btn { pointer-events: auto; display: inline-block; margin-top: 1.1em; font-family: 'Open Sans', sans-serif; font-weight: 600;
  font-size: clamp(12px, 1.95cqw, 22px); line-height: 1.2; padding: .72em 1.35em; border-radius: 6px; text-decoration: none !important;
  color: #fff !important; background: #009ae1; box-shadow: 0 6px 18px rgba(0,0,0,.15); transition: transform .2s, box-shadow .2s, filter .2s; }
.sl-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.2); filter: brightness(1.06); }
.sl-btn.b-verde { background: #8cc63f; }
.sl-btn.b-scuro { background: #2b3a48; }
.sl-btn.b-bianco { background: #fff; color: #0a7fc0 !important; }
.sl-cap.solo-btn .sl-btn { margin-top: 0; }
.sl-box .sl-btn:first-child { margin-top: 0; }

/* stili del testo */
.sl-cap.s-bianco .sl-tit { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.sl-cap.s-bianco .sl-sub { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.sl-cap.s-box-scuro .sl-box { background: rgba(20,32,44,.68); padding: 1.1em 1.4em; border-radius: 10px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sl-cap.s-box-scuro .sl-tit { color: #fff; }
.sl-cap.s-box-scuro .sl-sub { color: #dbe4ec; }
.sl-cap.s-box-chiaro .sl-box { background: rgba(255,255,255,.88); padding: 1.1em 1.4em; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.sl-cap.s-box-chiaro .sl-tit { color: #0a6fa8; }
.sl-cap.s-box-chiaro .sl-sub { color: #4a5560; }

/* slide piccole (mobile): meno margini, sottotitolo piu' compatto */
@container (max-width: 520px) {
  .sl-cap { padding: 12px 14px; }
  .sl-box { max-width: 72%; }
  .sl-tit { font-size: 15px; }
  .sl-sub { font-size: 11px; margin-top: .3em; }
  .sl-btn { padding: .55em 1em; margin-top: .7em; }
  .sl-cap.s-box-scuro .sl-box, .sl-cap.s-box-chiaro .sl-box { padding: .7em .9em; }
}

/* Dimensioni scelte in admin (titolo / sottotitolo) */
.sl-tit.d-s  { font-size: clamp(14px, 3.3cqw, 48px); }
.sl-tit.d-l  { font-size: clamp(18px, 5.4cqw, 78px); }
.sl-tit.d-xl { font-size: clamp(20px, 6.8cqw, 96px); }
.sl-sub.d-s  { font-size: clamp(11px, 1.85cqw, 24px); }
.sl-sub.d-l  { font-size: clamp(13px, 2.9cqw, 38px); }
.sl-sub.d-xl { font-size: clamp(14px, 3.6cqw, 46px); }

/* Slider senza bordini/ombra, pallini moderni sotto l'immagine */
.flexslider { box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
.flexslider .slides img { border-radius: 0; }
.flex-container { margin-bottom: 30px; }
.flexslider .flex-control-nav { position: static; width: auto; margin: 16px 0 0; padding: 0; line-height: 0; display: flex; justify-content: center; gap: 8px; }
.flex-control-nav li { margin: 0; }
.flex-control-paging li a { width: 8px; height: 8px; margin: 0; border-radius: 99px; background: #cfd8df !important; background-image: none !important;
  box-shadow: none !important; transition: width .3s ease, background-color .3s ease; }
.flex-control-paging li a:hover { background: #9fb3c2 !important; }
.flex-control-paging li a.flex-active { width: 26px; background: #009ae1 !important; }
@container (max-width: 520px) {
  .sl-tit.d-s { font-size: 13px; } .sl-tit.d-l { font-size: 17px; } .sl-tit.d-xl { font-size: 19px; }
  .sl-sub.d-s { font-size: 10px; } .sl-sub.d-l { font-size: 12px; } .sl-sub.d-xl { font-size: 13px; }
}
