/* =======================================================================
   seasons-list.css — SEASONS LIST PAGE
   =======================================================================
   PURPOSE
   -----------------------------------------------------------------------
   - Styles the Seasons listing page
   - Handles header layout, filters, grid cards, pagination
   - Supports desktop + mobile with toggle search

   FILE RELATIONSHIP
   -----------------------------------------------------------------------
   global.css            → grid, cards, typography
   header.css            → site header
   footer.css            → site footer
   seasons-list.css      → seasons list ONLY (this file)

   IMPORTANT RULES
   -----------------------------------------------------------------------
   - ❌ Do NOT style header or footer here
   - ❌ Do NOT redefine global grid/card system
   - ✔ Scope EVERYTHING to `.seasons-page`
   ======================================================================= */


/* =======================================================================
   PAGE WRAPPER
   ======================================================================= */

.seasons-page {
  padding-top: 14px;
}


/* =======================================================================
   HEADER BAR (TITLE + FILTERS)
   ======================================================================= */

.seasons-page .seasons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  position: relative; /* required for mobile search icon */
}


/* =======================================================================
   FILTER BAR (DESKTOP)
   ======================================================================= */

.seasons-page .seasons-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.seasons-page .seasons-filters input,
.seasons-page .seasons-filters select,
.seasons-page .seasons-filters button {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font-size: 14px;
  background: #fff;
}

.seasons-page .seasons-filters input[type="search"] {
  min-width: 220px;
}

/* Clear button */
.seasons-page .seasons-clear-btn {
  background: #fff;
  color: var(--accent, #7c3aed);
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
}

.seasons-page .seasons-clear-btn:hover {
  background: rgba(124,58,237,0.06);
}


/* =======================================================================
   MOBILE SEARCH TOGGLE ICON
   ======================================================================= */

.seasons-page .search-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}


/* =======================================================================
   SEASONS GRID
   -----------------------------------------------------------------------
   NOTE:
   - Uses local grid instead of global `.grid`
   - Fixed max cards per row for visual consistency
   ======================================================================= */

.seasons-page .seasons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}


/* =======================================================================
   SEASON CARD (LIGHT THEME DEFAULT)
   ======================================================================= */

.seasons-page .season-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,0.08);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.seasons-page .season-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.14);
}

.seasons-page .season-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.seasons-page .season-body {
  padding: 10px 12px 12px;
}

.seasons-page .season-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seasons-page .season-meta {
  font-size: 13px;
  color: rgba(15,23,42,0.75);
}


/* =======================================================================
   DARK THEME FIX — SEASON CARDS
   -----------------------------------------------------------------------
   Fixes white cards appearing in dark mode.
   Scoped ONLY to seasons list page.
   ======================================================================= */

[data-theme="dark"] .seasons-page .season-card {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}

[data-theme="dark"] .seasons-page .season-title {
  color: var(--text);
}

[data-theme="dark"] .seasons-page .season-meta {
  color: var(--muted);
}


/* =======================================================================
   CLIENT-SIDE PAGINATION
   ======================================================================= */

.seasons-page #seasons-pagination.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0;
  flex-wrap: wrap;
}

.seasons-page #seasons-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.seasons-page #seasons-pagination button:hover {
  background: rgba(124,58,237,.08);
  border-color: var(--accent, #7c3aed);
}

.seasons-page #seasons-pagination button.active {
  background: var(--accent, #7c3aed);
  color: #fff;
  border-color: var(--accent, #7c3aed);
  cursor: default;
}

.seasons-page #seasons-pagination button.nav {
  font-weight: 700;
}


/* =======================================================================
   RESPONSIVE GRID & MOBILE FILTERS
   ======================================================================= */

@media (max-width: 1024px) {
  .seasons-page .seasons-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {

  .seasons-page .seasons-header {
    flex-direction: column;
    align-items: stretch;
  }

  .seasons-page .search-toggle {
    display: block;
    position: absolute;
    top: 6px;
    right: 0;
  }

  .seasons-page .seasons-filters {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
    display: none;
    flex-direction: column;
  }

  .seasons-page .seasons-filters.mobile-active {
    display: flex;
    gap: 10px;
  }

  .seasons-page .seasons-filters input,
  .seasons-page .seasons-filters select,
  .seasons-page .seasons-filters button {
    width: 100%;
  }

  .seasons-page .seasons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seasons-page #seasons-pagination {
    margin: 20px 0;
  }

  .seasons-page #seasons-pagination button {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* Very small phones: still force 2 per row */
@media (max-width: 480px) {
  .seasons-page .seasons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
