/* ======================
   BASE (SCROLL DEL BROWSER)
====================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: #111827;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* layout: footer in fondo se la pagina è corta */
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* evita scrollbar orizzontale “fantasma” */
  overflow-x: hidden;
}

/* ======================
   HEADER tipo Mostra
====================== */
.mf-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 16px;
}

.mf-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mf-title {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.mf-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ======================
   MENU
====================== */
.mf-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  background: #f0f8ff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  font-weight: 600;
  font-size: 15px;
}

.mf-menu > li > a {
  display: inline-block;
  padding: 6px 8px;
  color: #111827;
  text-decoration: none;
}

.mf-menu > li > a:hover {
  text-decoration: underline;
}

.mf-menu > li.active > a {
  text-decoration: underline;
}

/* ======================
   CONTENUTO GENERALE
   (NESSUNO SCROLL INTERNO)
====================== */
.page-main{
  flex: 1 0 auto;       /* spinge il footer in basso */
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  overflow: visible;    /* ✅ NO scroll interno */
}

/* sicurezza: nessun main deve creare scrollbar interna */
main{
  overflow: visible;
}

/* ======================
   HOME – HERO
====================== */
.hero {
  max-width: 1100px;
  margin: 80px auto 20px;
  text-align: center;
}

.hero-img{
  width: 100%;
  max-width: 1100px;
  border-radius: 12px;
  display: block;
  margin: 0 auto;

  max-height: 62vh;        /* ⬅️ abbassa un minimo */
  object-fit: contain;     /* ⬅️ NON taglia, mantiene tutta la foto */
}

.mf-logo-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 6px;
}

.mf-logo-big {
  height: 60px;
  width: auto;
  opacity: 0.85;
}

/* ======================
   HEADER DI PAGINA (es. Chiese)
====================== */
.page-header {
  max-width: 1100px;
  margin: 10px auto 24px;
  text-align: center;
}

.page-header h1 {
  font-size: 1.8rem;
  margin: 0 0 10px;
}

.page-header .lead {
  max-width: 800px;
  margin: 0 auto;
  color: #444;
}

/* ======================
   GRIGLIA CHIESE (chiese.php)
====================== */
.chiese-grid {
  max-width: 1100px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.chiesa-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.chiesa-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.chiesa-subtitle {
  margin: 0 0 10px;
  color: #555;
  font-size: 0.94rem;
}

.chiesa-thumb-wrap {
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
}

.chiesa-thumb {
  display: block;
  width: 100%;
  height: auto;
}

/* ======================
   BOTTONI GENERICI
====================== */
.btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2563eb;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
  background: #ffffff;
  cursor: pointer;
}

.btn:hover {
  background: #2563eb;
  color: #ffffff;
}

.btn-disabled {
  border-color: #9ca3af;
  color: #9ca3af;
  cursor: default;
  pointer-events: none;
  background: #f9fafb;
}

.chiesa-disabled .btn-disabled:hover {
  background: #f9fafb;
  color: #9ca3af;
}

.btn-secondary {
  border-color: #9ca3af;
  color: #374151;
  background: #ffffff;
}

.btn-secondary:hover {
  background: #e5e7eb;
  color: #111827;
}

/* ======================
   PAGINA CHIESA (chiesa.php)
====================== */
.chiesa-scheda {
  max-width: 960px;
  margin: 20px auto 40px;
  text-align: center;
}

.chiesa-scheda h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.chiesa-scheda .chiesa-subtitle-main {
  margin: 0 0 18px;
  color: #4b5563;
}

.chiesa-hero-wrap {
  margin-bottom: 14px;
}

.chiesa-hero-img {
  display: block;
  margin: 0 auto;
  max-width: min(960px, 100%);
  max-height: 65vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.chiesa-buttons {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.chiesa-back {
  margin-top: 24px;
  text-align: center;
}

/* ======================
   PAGINA STORIA (storia.php)
====================== */
.storia-layout {
  max-width: 960px;
  margin: 20px auto 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.storia-thumb-wrap {
  flex: 0 0 220px;
}

.storia-thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.storia-content {
  flex: 1 1 auto;
}

.storia-content h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.storia-content h2 {
  font-size: 1.1rem;
  margin: 0 0 14px;
  color: #4b5563;
}

.chiesa-text {
  line-height: 1.6;
}

@media (max-width: 768px) {
  .storia-layout {
    flex-direction: column;
    align-items: center;
  }

  .storia-thumb-wrap {
    width: 60%;
  }

  .storia-content {
    width: 100%;
  }
}

/* ======================
   FOOTER (full width)
====================== */
.site-footer{
  flex-shrink: 0;
  padding: 16px 0;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: #555;

  /* <<< FULL WIDTH anche se dentro container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* contenuto centrato */
.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}


/* === Scheda singola chiesa: foto edificio === */
.chiesa-big {
  max-width: 1100px;
  margin: 20px auto 40px;
  text-align: center;
}

.chiesa-figure {
  margin: 0 auto 20px;
}

.chiesa-img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.chiesa-actions {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ======================
   HOTSPOT / TAG PERSONE
====================== */
.image-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.image-container img {
  display: block;
  width: 100%;
  height: auto;
}

.hotspot {
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: #e6004c;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
  cursor: default;
  transition: transform 0.2s;
}

.hotspot:hover {
  transform: scale(1.2);
  z-index: 10;
}

.hotspot .tooltip {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);

  min-width: 120px;
  background: #333;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;

  transition: opacity 0.25s;
}

.hotspot .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.hotspot:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ======================
   CURSORI: NO LENTE SULLE CARD
====================== */
.chiesa-card a { cursor: pointer; }
.chiesa-thumb { cursor: default; }

.archivio-card a { cursor: pointer; }
.archivio-card img { cursor: default; }

.chiese-grid a img,
.page-main a img { cursor: default; }

.big-zoomable { cursor: zoom-in; }
.big-stage.is-zoom .big-zoomable { cursor: zoom-out; }

/* ======================
   BIG – NAVIGAZIONE
====================== */
.mf-nav 
{ margin-top: 10px; } 

.big-nav{
    margin: 18px auto 0;
    max-width: 960px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* gruppo centrale */
.big-back{
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* bottone cerchiato */
.big-btn{
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #2563eb;
    color: #2563eb;
    text-decoration: none;
    font-size: .9rem;
    background: #fff;
    white-space: nowrap;
}

.big-btn:hover{
    background: #2563eb;
    color: #fff;
}

/* ======================
   FOTO – NAVIGAZIONE (alias stile Ricordi)
   NON tocca ciò che già funziona
====================== */
.foto-nav{
  margin: 18px auto 0;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.foto-nav a{
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #2563eb;
  color: #2563eb;
  text-decoration: none;
  font-size: .9rem;
  background: #fff;
  white-space: nowrap;
}

.foto-nav a:hover{
  background: #2563eb;
  color: #fff;
}
.nav-pill{
  display:inline-block;
  padding:6px 14px;
  border-radius:999px;
  border:1px solid #2563eb;
  color:#2563eb;
  text-decoration:none;
  font-size:.9rem;
  background:#fff;
  white-space:nowrap;
}
.nav-pill:hover{
  background:#2563eb;
  color:#fff;
}
/* =========================
   NAV FULL-WIDTH (sfondo + riga colorata)
   Se la nav è dentro un wrapper max-width, la faccio "uscire" a 100vw
========================= */

/* Wrapper della nav (quello che contiene .mf-nav-grid) */
.mf-nav{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  /* qui metti la "riga colorata" e lo sfondo */
  background: #eef6ff;              /* oppure il tuo colore */
  border-top: 4px solid #2563eb;    /* riga colorata full width */
  border-bottom: 1px solid #dbeafe; /* facoltativo */
}

/* Contenuto centrato, come sempre */
.mf-nav-grid{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* ======================
   FOOTER (Archivio) — FULL WIDTH
====================== */
.mf-footer{
  width:100%;
  background:#f3f4f6;
  border-top:1px solid #e5e7eb;
  padding: 14px 0 18px 0;
}

.mf-footer-inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
  text-align:center;
  font-size:0.9rem;
  color:#555;
}

.mf-footer-links{ margin-bottom:6px; line-height:1.6; }
.mf-footer-links a{ color:#2563eb; text-decoration:none; }
.mf-footer-links a:hover{ text-decoration:underline; }

.mf-sep{ margin:0 8px; color:#9ca3af; }

.mf-footer-copy{ margin-top:4px; }
.mf-footer-project{ font-size:0.8rem; }

@media (max-width: 900px){
  .mf-nav-grid{ grid-template-columns: 1fr; gap:10px; }
  .mf-menu{ grid-column:auto; flex-wrap:wrap; justify-content:center; white-space:normal; }
  .mf-tools{ grid-column:auto; justify-self:center; flex-wrap:wrap; white-space:normal; }
  .mf-search-form input[type="search"]{ width: 180px; }
}
/* =========================
   NAV + FOOTER — STILE UNIFICATO
========================= */

/* NAV full-width */
.mf-nav{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: #eef6ff;
  border-top: 4px solid #2563eb;
  border-bottom: 1px solid #dbeafe;
}

.mf-nav-grid{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* FOOTER full-width, stesso colore della nav */
.mf-footer{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: #eef6ff;
  border-top: 1px solid #dbeafe;
}

.mf-footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 16px 16px;
  text-align: center;
}
/* =========================
   NAV: MENU SEMPRE SU UNA RIGA
========================= */

/* Impedisce al menu di andare a capo */
.mf-menu{
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Impedisce al contenitore nav di spezzarsi */
.mf-nav-grid{
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
}

/* Evita che singole voci vadano a capo */
.mf-menu > li,
.mf-menu a{
  white-space: nowrap;
}

/* Riduce leggermente lo spazio se serve */
.mf-menu{
  gap: 14px; /* prima era 18px */
}

/* Tools sempre su una riga */
.mf-tools{
  flex-wrap: nowrap;
  white-space: nowrap;
}
/* KILL SWITCH — elimina la riga blu ovunque venga generata */
.mf-nav,
.mf-nav * ,
header,
header * ,
.mf-header,
.mf-header * ,
.site-header,
.site-header * {
  border-top: 0 !important;
  box-shadow: none !important;
}

.mf-nav::before,
.mf-nav::after,
header::before,
header::after,
.mf-header::before,
.mf-header::after,
.site-header::before,
.site-header::after {
  content: none !important;
  display: none !important;
  height: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
