/* Elementos compartidos del portal público de cada club. */
body.home-public.mm-home-landing {
  background-color: #dce4dc;
  background-image: linear-gradient(rgba(220, 228, 220, .72), rgba(220, 228, 220, .78)), url("../assets/padel-portada-techada.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
}
body.mm-has-sponsor-dock { padding-bottom: 136px !important; }
body.mm-sponsor-dock-two-rows { padding-bottom: 236px !important; }
.mm-sponsor-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1025;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 11px clamp(14px, calc((100vw - 1240px) / 2), 48px);
  border-top: 1px solid #c5d6cb;
  background: rgba(233, 238, 229, .98);
  box-shadow: 0 -7px 22px rgba(24, 51, 44, .1);
  backdrop-filter: blur(10px);
}
.mm-sponsor-dock[hidden] { display: none !important; }
.mm-sponsor-items {
  display: grid;
  flex: 0 1 auto;
  grid-template-columns: repeat(5, 96px);
  grid-auto-rows: 96px;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  max-width: 516px;
  margin-inline: auto;
  max-height: 201px;
  overflow: auto;
  padding: 2px 3px;
  scrollbar-width: none;
}
.mm-sponsor-items::-webkit-scrollbar { display: none; }
.mm-sponsor-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 1px solid #c7d7cd;
  border-radius: 13px;
  background: #f8faf6;
  box-shadow: 0 2px 7px rgba(24, 51, 44, .06);
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.mm-sponsor-item:hover,.mm-sponsor-item:focus-visible {
  border-color: #91b2a0;
  background: #fff;
  box-shadow: 0 5px 14px rgba(24, 51, 44, .13);
  transform: translateY(-1px);
}
.mm-sponsor-thumb {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}
.mm-sponsor-modal { background: #e9eee5 !important; color: #18332c !important; }
.mm-sponsor-modal .modal-title { color: #18332c; font-weight: 750; }
.mm-sponsor-modal .modal-sponsor-img { max-height: min(68vh, 620px); object-fit: contain; }
.clubes-home-section {
  padding: 0 0 38px;
  border: 0;
  background: transparent;
}
.home-public main.main-home { padding-top: 18px !important; padding-bottom: 28px; }
.home-public .hero-home { padding: 0 0 12px; }
.home-public .mm-home-logo-motion { width: 310px; margin-bottom: 4px; }
.mm-home-session-actions { position: fixed; left: 50%; bottom: 14px; z-index: 1050; display: flex; flex-wrap:wrap; align-items: center; justify-content: center; gap: 8px; width:max-content; max-width:calc(100vw - 24px); transform: translateX(-50%); }
.home-public .mm-home-session-actions #btnAbrirLogin,
.home-public .mm-home-session-actions #btnAdminHome,
.home-public .mm-home-session-actions #btnLogoutHome { position: static !important; display: inline-block !important; margin: 0 !important; opacity: 1 !important; text-decoration:none; }
.mm-home-session-actions [hidden] { display: none !important; }
.home-public .mm-home-session-actions #btnAdminHome[hidden],
.home-public .mm-home-session-actions #btnLogoutHome[hidden] { display:none !important; }
.home-public .platform-intro { display: block; max-width: 760px; padding: 0; margin: 0 auto; border: 0; text-align: center; }
.home-public .mm-home-club-prompt { max-width: 650px; margin: 0 auto; color: #29483d; font-size: clamp(1.08rem, 2vw, 1.35rem); font-weight: 700; line-height: 1.45; text-wrap: balance; }
.clubes-home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 190px)); justify-content: center; gap: 16px; max-width: 820px; margin: 0 auto; }
.clubes-home-card {
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-color: #c7d6cc;
  border-radius: 18px;
  background: #e9eee5;
  box-shadow: 0 4px 12px rgba(24, 51, 44, .08);
  text-align: center;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.clubes-home-card:hover,.clubes-home-card:focus-visible { color: #18332c; border-color: #94b5a3; box-shadow: 0 8px 18px rgba(24, 51, 44, .13); transform: translateY(-2px); }
.clubes-home-card img,.clubes-home-monogram { width: 112px; height: 112px; flex: 0 0 112px; border-radius: 15px; }
.clubes-home-card img { display: block; border: 0; background: transparent; object-fit: contain; }
.clubes-home-monogram { display: grid; place-items: center; border: 1px solid #c3d5cb; background: #dce9e4; color: #14678a; font-size: 2.3rem; font-weight: 850; }
.clubes-home-card h3 { margin: 0; color: #18332c; font-size: 1rem; font-weight: 750; overflow-wrap: anywhere; }
.clubes-home-empty { grid-column: 1 / -1; margin: 0; color: #586c64; }
.mm-public-club-context {
  max-width: 200px;
  overflow: hidden;
  padding: 7px 11px;
  border: 1px solid #c5d7cc;
  border-radius: 999px;
  background: #e1ebe2;
  color: #245b41;
  font-size: .78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mm-public-page-title { margin: 0 0 5px; color: #18332c; font-size: clamp(1.3rem, 2.3vw, 1.85rem); font-weight: 780; letter-spacing: -.035em; }
@media (max-width: 640px) {
  body.mm-has-sponsor-dock { padding-bottom: 106px !important; }
  body.mm-sponsor-dock-two-rows { padding-bottom: 106px !important; }
  .mm-sponsor-dock { min-height: 0; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); }
  .mm-sponsor-items {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: 68px;
    grid-auto-columns: 68px;
    justify-content: start;
    width: 100%;
    margin-inline: auto;
    max-height: 76px;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 1px 6px;
    -webkit-overflow-scrolling: touch;
  }
  .mm-sponsor-item { width: 68px; height: 68px; }
  .clubes-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
  .home-public main.main-home { padding-top: 12px !important; }
  .home-public .mm-home-logo-motion { width: 220px; }
  .mm-home-session-actions { bottom: max(10px, env(safe-area-inset-bottom)); }
  .home-public .mm-home-prompt-break { display: none; }
  .clubes-home-card { gap: 8px; padding: 12px; border-radius: 15px; }
  .clubes-home-card img,.clubes-home-monogram { width: min(88px, 62vw); height: min(88px, 62vw); flex-basis: min(88px, 62vw); border-radius: 12px; }
  .clubes-home-card h3 { font-size: .9rem; }
  .mm-public-club-context { max-width: 115px; font-size: .7rem; }
}

/* Portada: cabecera y pie fijos; el directorio de clubes es el único scroll. */
body.home-public.mm-home-landing {
  --mm-home-footer-height: 96px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 0 !important;
  background-attachment: fixed;
}
.mm-home-landing main.main-home {
  position: fixed;
  inset: 0 0 var(--mm-home-footer-height);
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0 !important;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}
.mm-home-landing .hero-home {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 16px 10px !important;
}
.mm-home-landing .mm-home-logo-motion { width: 220px; margin: 0 auto 2px; }
.mm-home-landing .platform-intro { flex: 0 0 auto; width: 100%; }
.mm-home-landing .mm-home-club-prompt { font-size: clamp(1rem, 1.8vw, 1.2rem); line-height: 1.35; }
.mm-home-landing #clubes-home {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 8px 0 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #829b8e transparent;
  scrollbar-width: thin;
}
.mm-home-landing #clubes-home > .container { max-width: 1240px; }
.mm-home-landing .mm-home-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  height: var(--mm-home-footer-height);
  margin: 0;
  padding: 7px 12px 6px;
  border-top: 2px solid #a6bac2;
  background: rgba(220, 228, 220, .97);
  box-shadow: 0 -5px 18px rgba(24, 51, 44, .09);
  backdrop-filter: blur(10px);
  text-align: center;
}
.mm-home-landing .mm-home-session-actions {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  transform: none;
}
.mm-home-landing .mm-home-session-actions #btnAbrirLogin,
.mm-home-landing .mm-home-session-actions #btnAdminHome,
.mm-home-landing .mm-home-session-actions #btnLogoutHome {
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
}
.mm-home-landing .mm-home-footer > p { margin: 0; color: #536b64; font-size: .68rem; line-height: 1.2; }

@media (max-width: 640px) {
  body.home-public.mm-home-landing { --mm-home-footer-height: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .mm-home-landing .hero-home { padding: 5px 12px 8px !important; }
  .mm-home-landing .mm-home-logo-motion { width: 148px; margin-bottom: 0; }
  .mm-home-landing .mm-home-club-prompt { max-width: 380px; font-size: .96rem; line-height: 1.32; }
  .mm-home-landing #clubes-home { padding: 6px 0 14px; }
  .mm-home-landing .mm-home-footer { padding: 7px 8px max(6px, env(safe-area-inset-bottom, 0px)); gap: 5px; }
  .mm-home-landing .mm-home-session-actions { gap: 6px; }
  .mm-home-landing .mm-home-session-actions #btnAbrirLogin,
  .mm-home-landing .mm-home-session-actions #btnAdminHome,
  .mm-home-landing .mm-home-session-actions #btnLogoutHome { min-height: 38px; padding: 7px clamp(8px, 2.8vw, 14px); font-size: clamp(.7rem, 3.1vw, .8rem); }
}
@media (max-height: 650px) and (min-width: 641px) {
  .mm-home-landing .mm-home-logo-motion { width: 160px; }
  .mm-home-landing .hero-home { padding-block: 4px 6px !important; }
}
