/* ============================================================
   FitExpress — Archivio Sedi
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --y:     #FFD600;
  --yd:    rgba(255,214,0,.1);
  --black: #111;
  --white: #fff;
  --light: #F5F5F7;
  --border:#E5E5EA;
  --text:  #1d1d1f;
  --muted: #86868b;
  --ease:  cubic-bezier(.16,1,.3,1);
}

.clubs-page {
  font-family: 'Poppins', sans-serif;
  background: #EFEFF2;
  min-height: 100vh;
  color: var(--text);
}

/* ── HERO ── */
.clubs-hero {
  background: #000;
  padding: calc(108px + 4rem) 6vw 4rem;
  position: relative;
  overflow: hidden;
  margin-top: -108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Glow — sotto il titolo, sinistra */
.clubs-hero::before {
  content: '';
  position: absolute;
  bottom: -20%; left: -5%;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(245,196,0,.16) 0%, rgba(0,0,0,0) 55%);
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}

/* Grain texture */
.clubs-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .4;
  z-index: 0;
}

/* Eyebrow pill */
.clubs-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,214,0,.7);
  border: 1px solid rgba(255,214,0,.15);
  border-radius: 50px;
  padding: .5rem 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  background: rgba(255,214,0,.04);
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) both;
}
.clubs-hero__eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--y);
  border-radius: 50%;
  animation: heroPulse 2s infinite;
}
@keyframes heroPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.7); }
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.clubs-hero__tag { display: none; }

.clubs-hero__title {
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -.045em;
  margin-bottom: .5rem;
  position: relative; z-index: 1;
  animation: fadeUp .9s .1s cubic-bezier(.16,1,.3,1) both;
}
.clubs-hero__title span { color: var(--y); display: block; }
.clubs-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,.45);
  font-weight: 300;
  max-width: 46ch;
  position: relative; z-index: 1;
  line-height: 1.75;
  animation: fadeUp .9s .2s cubic-bezier(.16,1,.3,1) both;
  letter-spacing: .01em;
}


/* ── TOPBAR RICERCA + CONTATORE ── */
.clubs-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: .75rem 4vw;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.clubs-topbar__search {
  display: flex; align-items: center; gap: .5rem;
  flex: 1; max-width: 440px;
  background: #F2F2F5;
  border-radius: 10px;
  padding: .45rem .85rem;
  border: 1px solid transparent;
  transition: border-color .25s, background .25s, box-shadow .25s;
  cursor: text;
}
.clubs-topbar__search:focus-within {
  border-color: var(--y);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,214,0,.1);
}
.clubs-topbar__search > svg { color: #b0b0b8; flex-shrink: 0; }

#clubs-search {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem; color: var(--text);
  min-width: 0; font-weight: 400;
}
#clubs-search::placeholder { color: #c4c4cc; font-weight: 300; }

.clubs-topbar__clear {
  background: rgba(0,0,0,.06); border: none; cursor: pointer;
  color: var(--muted); padding: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  transition: background .15s, color .15s;
}
.clubs-topbar__clear:hover { background: rgba(0,0,0,.12); color: var(--black); }

.clubs-topbar__count {
  font-family: 'Poppins', sans-serif;
  font-size: .78rem; color: var(--muted);
  white-space: nowrap; margin-left: auto;
  font-weight: 400;
}
.clubs-topbar__count strong { color: var(--black); font-weight: 700; font-size: .88rem; }

/* ── GRID ── */
.clubs-main {
  padding: 2rem 4vw 5rem;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.875rem;
}

/* ── CARD ── */
.club-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.club-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,.12);
  border-color: rgba(255,214,0,.2);
}

.club-card__img {
  height: 220px;
  background: #1a1a1a;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.club-card__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .6s var(--ease);
  filter: brightness(.9);
}
.club-card:hover .club-card__img img { transform: scale(1.05); }
.club-card__img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex; align-items: center; justify-content: center;
}
.club-card__img-placeholder svg { opacity: .15; }

.club-card__badge {
  position: absolute; top: .85rem; right: .85rem;
  background: var(--y); color: var(--black);
  font-size: .6rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 50px;
  box-shadow: 0 2px 8px rgba(255,214,0,.4);
}

.club-card__promo {
  position: absolute; top: .85rem; left: .85rem;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(8px);
  color: var(--y);
  font-size: .62rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 50px;
  letter-spacing: .04em;
  border: 1px solid rgba(255,214,0,.2);
}

.club-card__body {
  padding: 1.25rem 1.25rem;
  flex: 1; display: flex; flex-direction: column; gap: .5rem;
}

.club-card__regione {
  font-size: .6rem; font-weight: 700;
  color: var(--y); text-transform: uppercase;
  letter-spacing: .14em;
}

.club-card__nome {
  font-size: 1.1rem; font-weight: 700;
  color: var(--black); line-height: 1.2;
  letter-spacing: -.02em;
}

.club-card__addr {
  font-size: .88rem; color: var(--muted);
  display: flex; align-items: flex-start; gap: .4rem;
  line-height: 1.5;
}
.club-card__addr svg { flex-shrink: 0; margin-top: 2px; color: var(--y); }

.club-card__tel {
  font-size: .88rem; color: var(--muted);
  display: flex; align-items: center; gap: .4rem;
  text-decoration: none; transition: color .2s;
}
.club-card__tel:hover { color: var(--black); }
.club-card__tel svg { flex-shrink: 0; color: var(--y); }

.club-card__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0,0,0,.05);
  display: flex; gap: .6rem;
}

.club-card__btn {
  flex: 1; text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 600;
  padding: .72rem .75rem; border-radius: 12px;
  text-decoration: none; transition: all .22s;
  cursor: pointer; border: none;
  letter-spacing: .01em;
}
.club-card__btn--primary {
  background: var(--y); color: var(--black);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(255,214,0,.3);
}
.club-card__btn--primary:hover {
  background: var(--black); color: var(--y);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.club-card__btn--secondary {
  background: #F2F2F5; color: var(--black);
  border: 1.5px solid #E5E5EA;
}
.club-card__btn--secondary:hover {
  background: var(--black); color: var(--white);
  border-color: var(--black);
}

.clubs-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 4rem 2rem;
  color: var(--muted); font-size: .9rem;
}
.clubs-empty strong { display: block; font-size: 1.1rem; color: var(--black); margin-bottom: .5rem; }


/* ============================================================
   SEZIONE MAPPA — FULL WIDTH stile McFIT
   ============================================================ */
.clubs-map-section {
  position: relative;
  width: 100%;
  background: var(--black);
}

.clubs-map-title-bar {
  padding: 2.5rem 6vw 1.5rem;
}
.clubs-map-title-bar__tag {
  font-size: .6rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--y); margin-bottom: .5rem;
  display: flex; align-items: center; gap: .5rem;
}
.clubs-map-title-bar__tag::before {
  content: ''; width: 1.5rem; height: 2px; background: var(--y);
}
.clubs-map-title-bar__h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 800; color: var(--white);
  line-height: 1.1; letter-spacing: -.02em;
}
.clubs-map-title-bar__h2 span { color: var(--y); }

/* Contenitore mappa full-width */
.clubs-map-wrap {
  position: relative;
  width: 100%;
  height: 620px;
}

#clubs-leaflet-map {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: #EAEAEA;
  z-index: 1;
}

/* Barra ricerca sovrapposta sulla mappa — stile McFIT */
.clubs-map-search {
  position: absolute;
  top: 1.25rem; left: 1.25rem;
  z-index: 1000;
  background: var(--white);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  width: 340px;
  max-width: calc(100% - 2.5rem);
  overflow: hidden;
}
.clubs-map-search__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
}
.clubs-map-search__bar svg { color: var(--muted); flex-shrink: 0; }
.clubs-map-search__bar input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; color: var(--text);
}
.clubs-map-search__bar input::placeholder { color: #c7c7c7; }

.clubs-map-search__geo {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 0; display: flex;
  align-items: center; transition: color .2s;
  flex-shrink: 0;
}
.clubs-map-search__geo:hover { color: var(--black); }

/* Lista risultati dentro la search box */
.clubs-map-search__results {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.clubs-map-search__results.open {
  max-height: 340px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.clubs-map-search__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.clubs-map-search__item:last-child { border-bottom: none; }
.clubs-map-search__item:hover { background: rgba(255,214,0,.06); }
.clubs-map-search__item-name {
  font-size: .82rem; font-weight: 600; color: var(--black);
  line-height: 1.2;
}
.clubs-map-search__item-addr {
  font-size: .7rem; color: var(--muted); margin-top: 1px;
}
.clubs-map-search__item-arrow {
  margin-left: auto; color: var(--y); flex-shrink: 0;
}


/* ── Popup Leaflet personalizzato ── */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,.18) !important;
  border: none !important;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 280px !important;
  font-family: 'Poppins', sans-serif;
}
.leaflet-popup-close-button {
  color: #fff !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 10;
  font-size: 18px !important;
}

.map-popup { display: flex; flex-direction: column; background: #fff; }
.map-popup__img {
  height: 140px; width: 100%;
  background-size: cover; background-position: center;
  background-color: #1a1a1a;
}
.map-popup__body { padding: .85rem 1rem; }
.map-popup__tag {
  font-size: .55rem; font-weight: 800; color: var(--y);
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 5px; display: block;
}
.map-popup__name {
  font-size: .95rem; font-weight: 800; color: var(--black);
  line-height: 1.15; margin-bottom: 3px; letter-spacing: -.02em;
}
.map-popup__addr {
  font-size: .72rem; color: var(--muted);
  line-height: 1.4; margin-bottom: .85rem;
}
.map-popup__btns { display: flex; gap: .5rem; }
.map-popup__btn {
  flex: 1; text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: .72rem; font-weight: 700;
  padding: .55rem .75rem; border-radius: 8px;
  text-decoration: none; transition: all .2s;
  cursor: pointer; border: none; display: block;
}
.map-popup__btn--scopri {
  background: var(--light); color: var(--black);
  border: 1px solid var(--border);
}
.map-popup__btn--scopri:hover {
  background: var(--black); color: var(--white);
  border-color: var(--black);
}
.map-popup__btn--iscriviti {
  background: var(--y); color: var(--black);
}
.map-popup__btn--iscriviti:hover {
  background: var(--black); color: var(--y);
}

/* Marker dot — identico alla home */
.fx-map-dot {
  width: 20px; height: 20px;
  background: #FFD600;
  border-radius: 50%;
  border: 2.5px solid #111;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transition: transform .2s;
  cursor: pointer;
}
.fx-map-dot:hover { transform: scale(1.3); }

/* Leaflet zoom controls — scuro */
.leaflet-control-zoom a {
  background: #111 !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
}
.leaflet-control-zoom a:hover {
  background: #FFD600 !important;
  color: #111 !important;
}
.leaflet-control-zoom {
  border: none !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.15) !important;
}


/* ── ANIMAZIONI ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
.club-card {
  animation: fadeUp .4s var(--ease) both;
}

/* ── RESPONSIVE ── */
/* ── Tablet ── */
@media (max-width: 1200px) {
  .clubs-grid { grid-template-columns: repeat(3, 1fr); }
  .clubs-hero { padding: calc(108px + 3rem) 5vw 3rem; }
}
@media (max-width: 1024px) {
  .clubs-hero { padding: calc(72px + 3rem) 5vw 3rem; margin-top: -72px; }
  .clubs-topbar { padding: .7rem 4vw; }
  .clubs-main { padding: 1.75rem 4vw 4rem; }
}
@media (max-width: 860px) {
  .clubs-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .clubs-hero__title { font-size: clamp(2rem, 7vw, 3.5rem); }
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .clubs-hero {
    padding: calc(72px + 2rem) 1.25rem 2.5rem;
    margin-top: -72px;
  }
  .clubs-hero__title { font-size: clamp(2.2rem, 10vw, 3rem); letter-spacing: -.035em; }
  .clubs-hero__sub { font-size: .9rem; }
  .clubs-hero__eyebrow { font-size: .55rem; padding: .4rem 1rem; }

  .clubs-topbar { padding: .6rem 1.25rem; gap: .75rem; }
  .clubs-topbar__search { max-width: 100%; flex: 1; }
  .clubs-topbar__count { font-size: .72rem; }

  .clubs-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .clubs-main { padding: 1.25rem 1.25rem 3rem; }
  .club-card__img { height: 130px; }
  .club-card__body { padding: .85rem 1rem; gap: .35rem; }
  .club-card__nome { font-size: .95rem; }
  .club-card__addr, .club-card__tel { font-size: .75rem; }
  .club-card__footer { padding: .7rem 1rem; gap: .5rem; }
  .club-card__btn { font-size: .75rem; padding: .6rem .5rem; border-radius: 10px; }

  .clubs-map-wrap { height: 400px; }
  .clubs-map-title-bar { padding: 2rem 1.25rem 1rem; }
  .clubs-map-search { width: calc(100% - 2.5rem); }
}

/* ── Small mobile ── */
@media (max-width: 380px) {
  .clubs-grid { grid-template-columns: 1fr; gap: 1rem; }
  .clubs-hero { padding: calc(72px + 1.5rem) 1rem 2rem; }
  .clubs-main { padding: 1rem 1rem 3rem; }
  .clubs-map-wrap { height: 350px; }
}
