/* Elenco espositori della Fiera: filtri a sinistra, schede a griglia. Tutto sotto .fdcx per non toccare il resto del sito. */
.fdcx {
  --fdcx-ink: #1d1b2b;
  --fdcx-muted: #5b5870;
  --fdcx-line: #e2e0ea;
  --fdcx-soft: #f5f4f9;
  --fdcx-accent: #c72f60;
  --fdcx-sticky-top: 0px;
  color: var(--fdcx-ink);
  text-align: left;
  max-width: 1240px;
  margin: 0 auto;
}
.fdcx *, .fdcx *::before, .fdcx *::after { box-sizing: border-box; }
.fdcx [hidden] { display: none !important; }

/* Barra: ricerca, pulsante filtri (mobile) e contatore */
.fdcx-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 10px 0 14px; background: #fff;
}
.fdcx-search { flex: 1 1 320px; min-width: 0; }
.fdcx-search input {
  width: 100%; height: 46px; padding: 0 16px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--fdcx-line); border-radius: 12px; background: #fff; color: var(--fdcx-ink);
}
.fdcx-search input:focus { outline: 3px solid rgba(199, 47, 96, .25); border-color: var(--fdcx-accent); }
.fdcx-count {
  display: flex; align-items: center; height: 46px; margin-top: 0 !important; margin-bottom: 0 !important; padding: 0; line-height: 1;
  gap: .3em; font-weight: 700; font-size: 15px; color: var(--fdcx-muted); white-space: nowrap;
}
.fdcx-search input[type="search"] { margin: 0 !important; }
.fdcx-toggle {
  display: none; align-items: center; gap: 8px; height: 46px; padding: 0 18px; font: inherit; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--fdcx-ink); border-radius: 12px; background: #fff; color: var(--fdcx-ink); cursor: pointer;
}
.fdcx-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--fdcx-accent); color: #fff; font-size: 12px;
}

/* Layout: filtri a sinistra, schede a destra */
.fdcx-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 18px; }
.fdcx-filters { text-align: left; }
.fdcx-group { border-top: 1px solid var(--fdcx-line); }
.fdcx-group__head {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 2px;
  font: inherit; font-weight: 800; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; text-align: left;
  background: none; border: 0; color: var(--fdcx-ink); cursor: pointer;
}
.fdcx-group__head::after {
  content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.fdcx-group__head[aria-expanded="false"]::after { transform: rotate(-45deg); }
.fdcx-group__head[aria-expanded="false"] + .fdcx-group__body { display: none; }
.fdcx-group__body { padding: 0 2px 14px; display: grid; gap: 4px; }
.fdcx-check {
  display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 8px; font-size: 15px; line-height: 1.3; cursor: pointer; text-align: left;
}
.fdcx-check:hover { background: var(--fdcx-soft); }
.fdcx-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--fdcx-accent); flex: none; }
.fdcx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #4a5568); flex: none; }
.fdcx-reset {
  margin-top: 6px; padding: 10px 18px; font: inherit; font-weight: 700; font-size: 14px; border: 1.5px solid var(--fdcx-accent);
  border-radius: 10px; background: #fff; color: var(--fdcx-accent); cursor: pointer;
}
.fdcx-reset:hover { background: var(--fdcx-accent); color: #fff; }

/* Schede */
.fdcx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.fdcx-card { margin: 0; min-width: 0; }
.fdcx-card__in {
  display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px; color: inherit; text-decoration: none;
  background: #fff; border: 1px solid var(--fdcx-line); border-radius: 16px; transition: box-shadow .2s, transform .2s;
}
a.fdcx-card__in:hover { box-shadow: 0 6px 20px rgba(29, 27, 43, .12); transform: translateY(-2px); }
a.fdcx-card__in:focus-visible { outline: 3px solid var(--fdcx-accent); outline-offset: 2px; }
.fdcx-card__thumb { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--fdcx-soft); }
.fdcx-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fdcx-card__ph { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 26px; color: var(--fdcx-muted); letter-spacing: .04em; }
.fdcx-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.fdcx-chip {
  display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--c, #4a5568); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}
.fdcx-card__title {
  font-family: "Figtree", inherit; font-weight: 800; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fdcx-none { margin: 24px 0; font-size: 16px; color: var(--fdcx-muted); }

/* Versione per telefono e tablet: la barra resta fissa in alto e i filtri si aprono sotto */
@media (max-width: 899px) {
  .fdcx-bar { position: sticky; top: var(--fdcx-sticky-top); z-index: 30; border-bottom: 1px solid var(--fdcx-line); }
  .fdcx-search { flex: 1 1 100%; order: 1; }
  .fdcx-toggle { display: inline-flex; order: 2; }
  .fdcx-count { order: 3; margin-left: auto; }
  .fdcx-layout { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .fdcx.is-js .fdcx-filters { display: none; padding: 4px 4px 14px; border: 1px solid var(--fdcx-line); border-radius: 14px; background: #fff; }
  .fdcx.is-js.is-open .fdcx-filters { display: block; }
  .fdcx-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fdcx-card__in, .fdcx-group__head::after { transition: none; }
  a.fdcx-card__in:hover { transform: none; }
}

/* Pulsante "Torna all'elenco" della scheda: bordo e testo rosa su bianco, invertito al passaggio del mouse.
   I colori sono forzati perché il tema colora da solo i link al passaggio del mouse. */
a.fdcx-back, a.fdcx-back:visited {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; margin: 0 0 14px; font-weight: 700; font-size: 15px;
  line-height: 1.2; text-decoration: none !important; border: 1.5px solid #D9125F !important; border-radius: 12px;
  background: #fff !important; color: #D9125F !important; transition: background-color .15s, color .15s;
}
a.fdcx-back:hover, a.fdcx-back:focus-visible, a.fdcx-back:active {
  background: #D9125F !important; color: #fff !important; border-color: #D9125F !important; text-decoration: none !important;
}
a.fdcx-back:focus-visible { outline: 3px solid rgba(217, 18, 95, .35); outline-offset: 2px; }

/* ---- Scheda singola: stessa sidebar dell'elenco, a destra la scheda ---- */
.fdcx-check.is-current > span:last-child { font-weight: 800; }
.fdcx-check.is-current .fdcx-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c, #4a5568); }
.fdcx--single .fdcx-bar { padding-bottom: 8px; }
.fdcx-detail { min-width: 0; }
.fdcx-detail__head { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 28px; }
.fdcx-detail__head:not(:has(.fdcx-detail__media)) { grid-template-columns: minmax(0, 1fr); }
.fdcx-detail__media { border-radius: 16px; overflow: hidden; border: 1px solid var(--fdcx-line); background: var(--fdcx-soft); }
.fdcx-detail__img { display: block; width: 100%; height: auto; }
.fdcx-detail__title { margin: 10px 0 6px; font-family: "Figtree", inherit; font-weight: 900; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.1; overflow-wrap: anywhere; }
.fdcx-detail__sub { font-size: 17px; line-height: 1.5; color: var(--fdcx-muted); }
.fdcx-detail__sub p { margin: 0 0 8px; }
.fdcx-where { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: var(--fdcx-soft); line-height: 1.45; }
.fdcx-where > i { margin-top: 3px; color: #D9125F; font-size: 18px; }
.fdcx-where__tbd { color: var(--fdcx-muted); }
.fdcx-where__shared { font-size: 14px; color: var(--fdcx-muted); }
.fdcx-where__shared a { color: inherit; text-decoration: underline; }
.fdcx-visit { margin: 0 0 14px; }
a.fdcx-btn, a.fdcx-btn:visited {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; font-weight: 800; font-size: 16px; text-decoration: none !important;
  border: 1.5px solid #D9125F !important; border-radius: 12px; background: #D9125F !important; color: #fff !important; transition: background-color .15s, color .15s;
}
a.fdcx-btn:hover, a.fdcx-btn:focus-visible { background: #fff !important; color: #D9125F !important; }
.fdcx-socials { display: flex; flex-wrap: wrap; gap: 10px; }
a.fdcx-social, a.fdcx-social:visited {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; font-size: 17px; text-decoration: none !important;
  border: 1.5px solid var(--fdcx-ink) !important; background: #fff !important; color: var(--fdcx-ink) !important; transition: background-color .15s, color .15s;
}
a.fdcx-social:hover, a.fdcx-social:focus-visible { background: var(--fdcx-ink) !important; color: #fff !important; }
.fdcx-detail__content { font-size: 17px; line-height: 1.65; max-width: 780px; }
.fdcx-detail__content img { max-width: 100%; height: auto; border-radius: 12px; }
.fdcx-partners { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--fdcx-line); }
.fdcx-partners h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.fdcx-partners ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.fdcx-partners a { display: inline-block; padding: 8px 14px; border: 1px solid var(--fdcx-line); border-radius: 999px; color: inherit; text-decoration: none; font-weight: 700; }
.fdcx-partners a:hover { border-color: #D9125F; color: #D9125F; }
@media (max-width: 899px) {
  .fdcx-detail__head { grid-template-columns: 1fr; gap: 18px; }
}

/* Desktop: barra di ricerca e filtri fissi sotto l'header; scorrono solo le schede.
   --fdcx-sticky-top e --fdcx-bar-h li imposta fdcx.js; senza JavaScript la pagina scorre normalmente. */
@media (min-width: 900px) {
  .fdcx.is-js .fdcx-bar, .fdcx--single .fdcx-bar { position: sticky; top: var(--fdcx-sticky-top); z-index: 30; padding-top: 24px; }
  .fdcx.is-js .fdcx-filters, .fdcx--single .fdcx-filters {
    position: sticky; top: calc(var(--fdcx-sticky-top) + var(--fdcx-bar-h, 70px) + 12px);
    max-height: calc(100vh - var(--fdcx-sticky-top) - var(--fdcx-bar-h, 70px) - 24px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px;
  }
}

/* Espositore senza immagine: logo della Fiera al suo posto, intero e senza ritaglio */
.fdcx-card__fb { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--fdcx-line); }
.fdcx-card__fb img { width: 100%; height: auto; max-height: 100%; object-fit: contain; padding: 6px; }
.fdcx-detail__media--fb { background: #fff; padding: 22px 18px; }
.fdcx-detail__media--fb .fdcx-detail__img { display: block; width: 60%; max-width: 220px; height: auto; margin: 0 auto; }
