/* Vereinstabelle – clean, modern, ohne Bootstrap/DataTables */

/* =========================
   Page spacing / Layout
   ========================= */

.content-section{
  /* IMPORTANT: entferne inline style="padding-top: 96px" im HTML,
     sonst gewinnt das Inline-Style */
  padding-top: 140px;
  padding-bottom: clamp(4rem, 6vw, 7rem);
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
}

.section-head{
  text-align: center;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.section-head p{
  max-width: 70ch;
  margin: 0.75rem auto 0;
  color: var(--text-light);
  font-size: 24px;
}

/* =========================
   Utilities
   ========================= */

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* =========================
   Table shell
   ========================= */

.club-table{
  width: min(1320px, 100%);
  margin: 0 auto;

  background: var(--bg-light);
  border: 1px solid #eef2f7;
  border-radius: 28px;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.club-table__controls{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.club-search input{
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e7eef7;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.92);
  outline: none;
  transition: var(--transition);
}

.club-search input:focus{
  border-color: rgba(3,147,44,0.35);
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}

.club-filters{
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================
   Table wrapper + table
   ========================= */

.club-table__wrap{
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 20px;
  overflow: auto;
}

#vereineTable{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
}

#vereineTable thead th{
  position: sticky;
  top: 0;
  background: rgba(248,250,252,0.95);
  backdrop-filter: blur(8px);
  text-align: left;
  font-weight: 800;
  color: var(--text-dark);
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

#vereineTable tbody td{
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  vertical-align: top;
}

#vereineTable tbody tr{
  transition: background 0.2s ease;
}

#vereineTable tbody tr:hover{
  background: rgba(3,147,44,0.04);
}

/* =========================
   Row details toggle + details row
   ========================= */

.club-toggle{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.club-details td{
  padding: 0 !important;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

.club-details__card{
  padding: 1rem 1rem 1.1rem 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.club-details__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.75rem 1.25rem;
}

.kv{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.kv b{ color: var(--text-dark); }
.kv span{ color: var(--text-light); }

/* =========================
   Footer meta / pagination
   ========================= */

.club-table__meta{
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-light);
}

.club-pagination{
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.club-pagination button{
  border-radius: 999px;
  border: 1px solid #e7eef7;
  background: rgba(255,255,255,0.92);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
}

.club-pagination button:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================
   Custom Dropdown (RIV-Style)
   ========================= */

.cdd{
  position: relative;
  display: inline-flex;
  min-width: 240px;
}

.cdd__btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  border-radius: 999px;
  border: 1px solid #e7eef7;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248,250,252,0.92));
  padding: 0.75rem 1rem;

  font: 700 0.92rem/1.1 var(--font-stack);
  color: var(--text-dark);

  cursor: pointer;
  transition: var(--transition);
}

.cdd__btn:hover{
  border-color: rgba(3,147,44,0.25);
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

.cdd__btn:focus{
  outline: none;
  border-color: rgba(3,147,44,0.45);
  box-shadow: 0 12px 30px rgba(3,147,44,0.18);
}

.cdd.is-open .cdd__chev{
  transform: rotate(180deg);
  color: var(--primary);
}

.cdd__chev{
  transition: transform 0.2s ease, color 0.2s ease;
  color: var(--text-light);
  font-size: 0.75rem;
}

/* Default: Panel linksbündig */
.cdd__panel{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: auto;

  width: min(340px, 80vw);
  z-index: 50;

  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);

  box-shadow: 0 26px 60px rgba(15,23,42,0.12);
  overflow: hidden;

  /* verhindert Scroll-Weitergabe an die Seite */
  overscroll-behavior: contain;
}

/* Rechtsbündig öffnen (für "Alle Orte"):
   -> setze im HTML: <div class="cdd cdd--right" ...> */
.cdd--right .cdd__panel{
  left: auto;
  right: 0;
}

.cdd__searchWrap{
  padding: 0.75rem;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  background: rgba(248,250,252,0.85);
}

.cdd__search{
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e7eef7;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.92);
  outline: none;
  transition: var(--transition);
  font: 600 0.9rem/1.1 var(--font-stack);
  color: var(--text-dark);
}

.cdd__search:focus{
  border-color: rgba(3,147,44,0.35);
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}

.cdd__list{
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 320px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.cdd__opt{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  cursor: pointer;

  color: var(--text-dark);
  font: 650 0.92rem/1.15 var(--font-stack);
  transition: background 0.15s ease, transform 0.15s ease;
}

.cdd__opt:hover{
  background: rgba(3,147,44,0.06);
}

.cdd__opt[aria-selected="true"]{
  background: rgba(3,147,44,0.10);
  outline: 1px solid rgba(3,147,44,0.20);
}

.cdd__opt.is-active{
  background: rgba(15,23,42,0.05);
}

.cdd__tick{
  color: var(--primary);
  font-weight: 900;
  opacity: 0;
}

.cdd__opt[aria-selected="true"] .cdd__tick{
  opacity: 1;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px){
  .club-table__controls{
    grid-template-columns: 1fr;
  }
  .club-filters{
    justify-content: flex-start;
  }
  .club-details__grid{
    grid-template-columns: 1fr;
  }
  .kv{
    grid-template-columns: 120px 1fr;
  }

  .cdd{ min-width: 100%; }
  .cdd__panel{ width: 100%; }
}
