/* STF S.r.l. - personalizzazione tema Cassiopeia */
:root {
  --cassiopeia-color-primary: #094e82;
  --cassiopeia-color-link: #094e82;
  --cassiopeia-color-hover: #063a61;
  --stf-blu: #094e82;
}
body { color: #2b2b2b; }

/* Intestazione chiara con logo */
.container-header {
  background: #fff;
  background-image: none;
  border-bottom: 3px solid var(--stf-blu);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.container-header .navbar-brand { padding: .75rem 0; }
.container-header .brand-logo img { max-height: 72px; width: auto; }
.container-header .site-description { color: #555; }

/* Menu principale */
.container-header .mod-menu > li > a,
.container-header .metismenu > li > a,
.container-header .metismenu > li > button,
.container-header .navbar-toggler { color: var(--stf-blu); }
.container-header .metismenu > li > a:hover,
.container-header .metismenu > li.active > a,
.container-header .metismenu > li > a[aria-current] {
  color: var(--stf-blu);
  border-bottom: 2px solid var(--stf-blu);
}
.container-header .navbar-toggler { border-color: var(--stf-blu); }

/* Selettore lingua */
.container-header .mod-languages ul { margin: 0; }
.container-header .mod-languages img { width: 22px; height: auto; }

/* Pulsanti */
.btn-primary { background-color: var(--stf-blu); border-color: var(--stf-blu); }
.btn-primary:hover, .btn-primary:focus { background-color: #063a61; border-color: #063a61; }

/* Titoli */
.com-content-article h1, .page-header h1, .page-header h2 { color: var(--stf-blu); }

/* Griglia operazioni */
.stf-operazioni img {
  border: 1px solid #e3e7ec;
  border-radius: 4px;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stf-operazioni img:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(9,78,130,.15); }

/* Piè di pagina */
.container-footer { background: var(--stf-blu); background-image: none; }
.container-footer, .container-footer a { color: #fff; }
.container-footer .stf-footer { font-size: .9rem; line-height: 1.6; }
.container-footer .stf-footer a { text-decoration: underline; }

/* Immagini nei testi: su smartphone non flottano */
@media (max-width: 767px) {
  .com-content-article img[style*="float"] { float: none !important; display: block; margin: 0 auto 1rem !important; width: 80% !important; }
}

/* Slideshow home (solo CSS, nessuno script) */
.stf-slideshow { position: relative; width: 100%; aspect-ratio: 1400 / 420; max-height: 420px; overflow: hidden; background: #0b2f4e; }
.stf-slideshow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: stf-fade 50s infinite; }
.stf-slideshow img:nth-child(1)  { animation-delay: 0s; }
.stf-slideshow img:nth-child(2)  { animation-delay: 5s; }
.stf-slideshow img:nth-child(3)  { animation-delay: 10s; }
.stf-slideshow img:nth-child(4)  { animation-delay: 15s; }
.stf-slideshow img:nth-child(5)  { animation-delay: 20s; }
.stf-slideshow img:nth-child(6)  { animation-delay: 25s; }
.stf-slideshow img:nth-child(7)  { animation-delay: 30s; }
.stf-slideshow img:nth-child(8)  { animation-delay: 35s; }
.stf-slideshow img:nth-child(9)  { animation-delay: 40s; }
.stf-slideshow img:nth-child(10) { animation-delay: 45s; }
@keyframes stf-fade { 0% {opacity:0} 2% {opacity:1} 10% {opacity:1} 12% {opacity:0} 100% {opacity:0} }
@media (prefers-reduced-motion: reduce) {
  .stf-slideshow img { animation: none; }
  .stf-slideshow img:first-child { opacity: 1; }
}
.container-banner .stf-slideshow { margin-bottom: 1rem; }

/* Tombstones operazioni */
.stf-tomb-sez { font-size: 1.35rem; margin: 2rem 0 1rem; color: var(--stf-blu); }
.stf-tomb {
  height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1rem .9rem; background: #fff; border: 1px solid #d5dbe3; border-top: 4px solid var(--stf-blu);
  border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.05); font-size: .85rem; line-height: 1.4;
}
.stf-tomb-anno { font-weight: 700; color: var(--stf-blu); margin-bottom: .6rem; }
.stf-tomb-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; min-height: 60px; margin-bottom: .6rem; }
.stf-tomb-logos img { max-height: 56px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
.stf-tomb-nome { font-weight: 700; font-size: 1rem; margin: .3rem 0 .6rem; }
.stf-tomb p { margin: 0 0 .5rem; color: #333; }
.stf-tomb-importo { margin-top: auto; padding-top: .6rem; font-weight: 700; font-size: 1rem; color: var(--stf-blu); }

/* Contatti + mappa */
.stf-contatti h2 { color: var(--stf-blu); font-size: 1.4rem; }
.stf-map { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 280px; background: #eef2f6; border: 1px solid #d5dbe3; border-radius: 4px; overflow: hidden; }
.stf-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stf-map-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem 2rem; font-size: .9rem; }
.stf-map-ph p { margin-bottom: .75rem; }

/* Banner cookie */
#stf-cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2000;
  max-width: 760px; margin: 0 auto; padding: 1.1rem 3rem 1.1rem 1.25rem;
  background: #fff; color: #222; border-top: 4px solid var(--stf-blu); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .9rem; line-height: 1.45;
}
#stf-cookie-banner p { margin: 0 0 .75rem; }
#stf-cookie-banner .stf-cb-btns { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
#stf-cookie-banner .stf-cb-btns .btn { min-width: 120px; }
#stf-cookie-banner .stf-cb-x { position: absolute; top: .4rem; right: .6rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: #555; cursor: pointer; }
