/* ============================================================
   TABLE PAGE — SLIEMA WOLVES FC
   ============================================================ */

/* Active nav link */
.nav-link--active {
  color: #fff !important;
  opacity: 1 !important;
}
.nav-link--active::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: #fff;
  margin-top: 2px;
}

/* ---- PAGE HEADER ------------------------------------------ */
.table-header {
  padding: 160px 5% 80px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

.table-tag {
  display: inline-block;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(16px);
  animation: tblFadeUp 0.6s ease 0.3s forwards;
}

.table-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 14vw, 14rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 2rem;
  overflow: hidden;
}

.table-hl-line {
  display: block;
  opacity: 0;
  transform: translateY(60px);
}

.thl-1 { animation: tblFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.45s forwards; }
.thl-2 {
  font-style: italic;
  animation: tblFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.6s forwards;
}

.table-season {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  animation: tblFadeUp 0.6s ease 0.8s forwards;
}

@keyframes tblFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- MAIN CONTENT ----------------------------------------- */
.table-main {
  padding: 0 0 120px;
}

/* ---- LEGEND ----------------------------------------------- */
.table-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.legend-item {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-item::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-champion::before  { background: rgba(255,255,255,0.9); }
.legend-promoted::before  { background: rgba(100,180,120,0.7); }
.legend-relegation::before { background: rgba(200,80,80,0.7); }

/* ---- TABLE WRAPPER ---------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
}

/* ---- TABLE ------------------------------------------------ */
.league-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
}

/* Head */
.table-head-row {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.table-head-row th {
  padding: 1rem 1.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
  text-align: center;
}

.table-head-row .col-club {
  text-align: left;
}

/* Rows */
.table-row {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: default;

  /* entrance animation state */
  opacity: 0;
  transform: translateX(30px);
}

.table-row.row-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1),
              background 0.3s ease;
}

.table-row:hover {
  background: rgba(255,255,255,0.04);
  transform: translateX(4px);
}

/* Champion row */
.table-row--champion {
  background: rgba(255,255,255,0.03);
}

.table-row--champion td:first-child {
  box-shadow: inset 3px 0 0 #fff;
}

.table-row--champion:hover {
  background: rgba(255,255,255,0.06);
  transform: translateX(4px);
}

/* Promotion / relegation row accents */
.table-row--promotion td:first-child .pos-num {
  color: rgba(100,200,130,0.9);
}

.table-row--relegation td:first-child .pos-num {
  color: rgba(210,80,80,0.9);
}

/* Cells */
.table-row td {
  padding: 1.1rem 1.2rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  vertical-align: middle;
}

/* Position cell */
.col-pos {
  width: 48px;
}

.pos-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.5);
  display: block;
}

.table-row--champion .pos-num {
  color: #fff;
}

/* Club cell */
.col-club {
  text-align: left;
}

.club-cell-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.club-badge-wrap {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.club-badge {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  display: block;
  object-fit: contain;
}

.club-badge-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}

.club-name {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.table-row--champion .club-name {
  color: #fff;
  font-weight: 500;
}

/* Champions pill */
.champ-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00131D;
  background: #fff;
  padding: 0.2em 0.6em;
  border-radius: 20px;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* Stat columns */
.col-stat {
  width: 48px;
}

.col-stat--wide {
  width: 56px;
}

.stat-w { color: rgba(255,255,255,0.9); }
.stat-l { color: rgba(255,255,255,0.35); }

.gd-pos { color: rgba(120,210,140,0.85); }
.gd-neg { color: rgba(210,100,100,0.8); }

/* Points column */
.col-pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff !important;
  width: 64px;
}


/* ---- FORM SECTION ----------------------------------------- */
.form-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.form-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2rem;
}

.form-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.form-row:hover {
  background: rgba(255,255,255,0.03);
}

.form-row--champ {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.02);
}

.form-club-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  min-width: 170px;
}

.form-row--champ .form-club-name {
  color: #fff;
}

.form-results {
  display: flex;
  gap: 0.4rem;
}

.form-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
  cursor: default;
}

.form-pill:hover {
  transform: scale(1.2);
}

.form-w { background: rgba(255,255,255,0.9); color: #00131D; }
.form-d { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
.form-l { background: rgba(200,70,70,0.5);  color: rgba(255,255,255,0.7); }

/* ---- MOTTO ----------------------------------------------- */
.table-motto {
  margin-top: 6rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 7rem);
  color: rgba(255,255,255,0.08);
  letter-spacing: -0.02em;
  line-height: 1;
}

.table-motto .motto-dot {
  color: rgba(255,255,255,0.05);
  font-size: 0.5em;
}

.table-motto .motto-italic {
  font-style: italic;
}

/* ---- PTS BAR (injected by JS) ----------------------------- */
.pts-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.pts-bar-fill {
  height: 100%;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  width: 0%;
}

.table-row--champion .pts-bar-fill {
  background: #fff;
}

/* ---- RESPONSIVE ------------------------------------------ */
@media (max-width: 768px) {
  .table-header {
    padding: 130px 5% 60px;
  }

  /* Hide GF, GA, GD on tablet — keep P W D L Pts */
  .col-stat--wide {
    display: none;
  }

  .table-wrapper {
    overflow-x: visible;
  }

  .table-row td {
    padding: 0.9rem 0.6rem;
    font-size: 0.82rem;
  }

  .table-head-row th {
    padding: 0.9rem 0.6rem;
    font-size: 0.65rem;
  }

  .club-name {
    font-size: 0.82rem;
  }

  .club-badge-wrap,
  .club-badge-placeholder {
    display: none;
  }

  .form-club-name {
    min-width: 120px;
    font-size: 0.78rem;
  }

  .table-motto {
    font-size: clamp(2rem, 10vw, 5rem);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  /* On small phones also hide D column */
  .col-stat:nth-child(5) {
    display: none;
  }

  .table-head-row th:nth-child(5) {
    display: none;
  }

  .table-row td {
    padding: 0.8rem 0.4rem;
    font-size: 0.78rem;
  }

  .col-pts {
    font-size: 1rem !important;
  }

  .form-row {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
}
