/* ============================================================
   eventi.css — FederMobilità Event Page
   ============================================================ */

/* Rimuove il <br> che wordpress inserisce tra un blocco e l'altro dopo il modal del blocco Registrazioni Video*/
#videoModal + br {
display: none;
}
  
/* ── RESET BASE ─────────────────────────────────────────────── */
.fm-event-page {
  color: #222;
  line-height: 1.65;
}

/* ── LOGO ───────────────────────────────────────────────────── */
.fm-event-page .fm-logo-top {
  text-align: center;
  margin: 0 0 18px 0;
}
.fm-event-page .fm-logo-top img {
  max-width: 170px;
  width: 100%;
  height: auto;
}

/* ── BANNER ─────────────────────────────────────────────────── */
.fm-event-page .fm-banner {
  background: #004a8f;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}
.fm-event-page .fm-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
}
.fm-event-page .fm-banner-text {
  flex: 1 1 auto;
  min-width: 0;
}
.fm-event-page .fm-banner-title {
  margin: 0 0 10px 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  font-style: italic;
  color: #7ec3ff;
}
.fm-event-page .fm-banner-subtitle {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  color: #ffffff;
}
.fm-event-page .fm-banner-poster {
  flex: 0 0 150px;
  text-align: right;
}
.fm-event-page .fm-banner-poster img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  background: #fff;
}

/* ── SECTION TITLE ──────────────────────────────────────────── */
.fm-event-page .fm-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #004080;
  border-left: 4px solid #004080;
  padding-left: 12px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── DESCRIPTION BOX ────────────────────────────────────────── */
.fm-event-page .fm-description-box {
  background: #fff;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  padding: 24px 26px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fm-event-page .fm-description-box p {
  margin: 0 0 14px 0;
  text-align: justify;
}
.fm-event-page .fm-description-box p:last-child {
  margin-bottom: 0;
}

/* Nasconde i <br> che wpautop inserisce dentro i modal */
#videoModal br,
#fbkModal br,
#galModal br,
#pgmModal br { display: none !important; }

/* Azzera i <p> vuoti che WordPress inserisce tra gli shortcode */
#content-page .content-column > p:empty,
#content-page .content-column > p:blank { margin: 0; line-height: 0; height: 0; }

/* ── SEZIONE VIDEO (fmv-wrap) ────────────────────────────────── */
.fmv-wrap {
  margin-top: 25px;
  border: 1px solid #c8d8ec;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.07);
}
.fmv-header {
  background: #0f4c8a;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: .5px;
  padding: 14px 18px;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  line-height: 1;
}
.fmv-header svg {
  display: block;
  flex-shrink: 0;
}
.fmv-header span {
  display: block;
  line-height: 1;
}
.fmv-list {
  background: #fff;
}

/* ── FMV-CARD ────────────────────────────────────────────────── */

/* Contenitore card — overflow:hidden per contenere i float */
#content-page .fmv-card {
  overflow: hidden;
  border-bottom: 1px solid #e8eef5;
  cursor: pointer;
  background: #fff;
  padding: 16px 20px;
  box-sizing: border-box;
  transition: background .2s;
}
#content-page .fmv-card:last-child {
  border-bottom: none;
}
#content-page .fmv-card:hover {
  background: #f0f5fb;
}

/* Icona — float sinistro (condiviso tra fmv-card, fbk-card, gal-card) */
#content-page .fmv-card .fmv-ico,
#content-page .fbk-card .fmv-ico,
#content-page .gal-card .fmv-ico { float: left; width: 44px; margin-right: 16px; margin-top: 2px; }

#content-page .fmv-card .fmv-ico img,
#content-page .fbk-card .fmv-ico img,
#content-page .gal-card .fmv-ico img { display: block; width: 44px; height: 44px; }

/* Testo — block che si affianca all'icona in float */
#content-page .fmv-card .fmv-txt,
#content-page .fbk-card .fmv-txt,
#content-page .gal-card .fmv-txt { overflow: hidden; }

/* Titolo */
#content-page .fmv-card .fmv-ttl,
#content-page .fbk-card .fmv-ttl,
#content-page .gal-card .fmv-ttl {
  display: block; font-size: 17px; font-weight: 700;
  color: #1a2a3a; line-height: 1.35; margin: 0 0 6px 0; text-align: left;
}

/* Descrizione */
#content-page .fmv-card .fmv-dsc,
#content-page .fbk-card .fmv-dsc,
#content-page .gal-card .fmv-dsc {
  display: block; font-size: 15px; font-weight: 400;
  color: #5a6a7a; line-height: 1.5; margin: 0 0 12px 0; text-align: left;
}

/* Pulsante video (.fmv-btn — solo fmv-card, triangolo leggermente più piccolo) */
#content-page .fmv-card .fmv-btn {
  display: inline-block;
  background: #0f4c8a; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px 7px 30px;
  border-radius: 5px; text-decoration: none;
  line-height: 1.4; cursor: pointer; position: relative;
}
#content-page .fmv-card .fmv-btn::before {
  content: ''; position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #fff;
}
#content-page .fmv-card .fmv-btn:hover { background: #003d6b; color: #fff; text-decoration: none; }

/* Pulsante apri (.fbk-btn — fbk-card e gal-card) */
#content-page .fbk-card .fbk-btn,
#content-page .gal-card .fbk-btn {
  display: inline-block;
  background: #0f4c8a; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px 7px 30px;
  border-radius: 5px; text-decoration: none;
  line-height: 1.4; cursor: pointer; position: relative;
}
#content-page .fbk-card .fbk-btn::before,
#content-page .gal-card .fbk-btn::before {
  content: ''; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
}
#content-page .fbk-card .fbk-btn:hover,
#content-page .gal-card .fbk-btn:hover { background: #003d6b; color: #fff; text-decoration: none; }

/* ── MODAL VIDEO ────────────────────────────────────────────── */
#videoModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 999999;
  flex-direction: column;
}
#videoModal.open {
  display: flex;
}

/* Topbar nascosta di default: si mostra via JS quando si esce dal fullscreen */
#videoTopbar {
  flex: 0 0 auto;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(11,18,32,0.60);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: max-height .35s ease, opacity .35s ease, padding .35s ease;
}
#videoTopbar.bar-visible,
#videoTopbar[style*="display: flex"] {
  max-height: 56px;
  opacity: 1;
  pointer-events: auto;
  padding: 14px 24px;
}
#fmModalTitle {
  font-size: 15px;
  font-weight: 600;
}
#fmCloseBtn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px;
  font-size: 20px; line-height: 1;
  color: #fff; cursor: pointer;
  background: rgba(200,30,30,0.25);
  border: 1px solid rgba(255,100,100,0.3);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  flex-shrink: 0; margin-left: 6px;
  transition: background .15s, transform .1s;
  user-select: none;
}
#fmCloseBtn:hover { background: rgba(200,30,30,0.55); transform: translateY(-1px); }
#fmCloseBtn:active { transform: scale(.96); }
#videoModal .modal-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
#videoModal video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

/* ── OVERRIDE MARGIN RIGA PRINCIPALE ────────────────────────── */
.fm-main-row .fmv-wrap { margin-top: 10px; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .fm-event-page .fm-banner-inner {
    flex-direction: column;
    align-items: center;
  }
  .fm-event-page .fm-banner-text {
    text-align: center;
  }
  .fm-event-page .fm-banner-title {
    font-size: 26px;
    text-align: center;
  }
  .fm-event-page .fm-banner-subtitle {
    font-size: 17px;
    text-align: center;
  }
  .fm-event-page .fm-banner-poster {
    flex: 0 0 auto;
    text-align: center;
  }
  .fmv-thumb {
    display: none !important;
  }
  #content-page .fmv-card .fmv-ttl,
  #content-page .fbk-card .fmv-ttl,
  #content-page .gal-card .fmv-ttl { font-size: 15px; }
  #content-page .fmv-card .fmv-dsc,
  #content-page .fbk-card .fmv-dsc,
  #content-page .gal-card .fmv-dsc { font-size: 13px; }
}