/*
Theme Name: Stadiums Guide
Theme URI: https://stadiums.guide
Author: Albert
Description: Minimal, ultra-fast encyclopedia of stadiums
Version: 0.5
Text Domain: stadiums-guide
*/

/* Google Fonts: Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

/* Reset bàsic */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Compacta";
  src: url("assets/fonts/compacta.woff2") format("woff2"),
       url("assets/fonts/compacta.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Alçada base del header (per al fixed) */
:root {
  --header-height: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background-color: #f5f7fb;
  color: #111827;
}

/* Links base */
a {
  color: #0f4c81;
}

a:hover {
  color: #0b3760;
}

/* Contenidor base */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & footer */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem 0.6rem;
  background: linear-gradient(135deg, #0f4c81, #0066cc);
  color: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 30px rgba(15, 76, 129, 0.25);
}

/* Contenidor intern del header: menú esquerra, títol centrat, lupa dreta */
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1rem;
}

.site-footer {
  padding: 1rem 1.75rem;
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  margin-top: auto;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Contingut principal */
.site-main {
  padding: 1.75rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  /* desplaça el contingut cap avall perquè no quedi sota el header fixat */
  padding-top: calc(1.75rem + var(--header-height));
}

/* Branding */
.site-branding {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-title a {
  text-decoration: none;
  color: #ffffff;
  letter-spacing: 0.05em;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  gap: 0.3rem;
  text-transform: inherit;
  letter-spacing: inherit;
}

.site-logo,
.site-title,
.header-logo {
  font-family: "Compacta", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 46px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  word-spacing: 0.15em;
  line-height: 1;
}

/* Panell de cerca sota del header (ara també fixed) */
.header-search-panel {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  display: none;
  padding: 0 1.5rem;
  z-index: 999;
}

.header-search-panel .home-search-inner {
  max-width: 800px;
  margin: 0 auto 0.1rem;
}

.header-search-panel.is-active {
  display: block;
}

/* Menú principal */
.main-navigation {
  margin-top: 0.4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.main-navigation a {
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  color: rgba(243, 244, 246, 0.9);
  font-weight: 400;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  border-bottom-color: #ffffff;
  color: #ffffff;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  color: #6b7280;
}

.breadcrumbs a {
  text-decoration: none;
  color: #4b5563;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: #0f4c81;
}

.breadcrumbs-sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.breadcrumbs-current {
  font-weight: 500;
  color: #111827;
}

/* Llistat bàsic de posts / estadis */
.stadiums-loop,
.posts-loop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.post-card {
  padding: 1.1rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.04);
}

.post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: #111827;
}

.post-card a {
  text-decoration: none;
  color: inherit;
}

.post-card a:hover {
  text-decoration: underline;
}

.post-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

/* Títols genèrics */
.single-title {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #0f172a;
}

.single-meta {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---------------------------------------------------
   HOME HERO
--------------------------------------------------- */

.home-hero {
  margin-bottom: 1.75rem;
}

.home-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 1.9rem;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #f9fafb, #e5effa);
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 35px rgba(15, 76, 129, 0.08);
}

.home-hero-text {
  max-width: 70%;
}

.home-hero-title {
  font-size: 2rem;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.home-hero-subtitle {
  font-size: 0.95rem;
  color: #4b5563;
}

.home-hero-counter {
  min-width: 180px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.home-hero-counter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}

.home-hero-counter-number {
  font-size: 2.1rem;
  font-weight: 600;
  color: #0f4c81;
}

/* ---------------------------------------------------
   HOME SEARCH
--------------------------------------------------- */

.home-search {
  margin-bottom: 1rem;
}

.home-search-inner {
  padding: 1.2rem 1.4rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.06);
}

.home-search-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6b7280;
  margin-bottom: 0.4rem;
}

.home-search-control {
  position: relative;
}

.home-search-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-search-input:focus {
  border-color: #0f4c81;
  box-shadow: 0 0 0 1px rgba(15, 76, 129, 0.25);
}

/* Resultats AJAX */
.home-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  display: none;
}

.home-search-results.is-visible {
  display: block;
}

.home-search-results-inner {
  background-color: #ffffff;
  border-radius: 0.8rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(15, 76, 129, 0.12);
  overflow: hidden;
}

.home-search-results-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.home-search-results-item a {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: #111827;
  font-size: 0.9rem;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-search-results-item a:hover {
  background-color: #f3f4f6;
}

.home-search-results-title {
  font-weight: 500;
}

.home-search-results-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.home-search-no-results {
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: #6b7280;
}

/* ---------------------------------------------------
   HOME SECTIONS (top viewed, biggest, etc.)
--------------------------------------------------- */

.home-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.home-section-card {
  padding: 1.2rem 1.3rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.06);
}

.home-section-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.35rem;
}

.home-section-intro {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.7rem;
}

.home-section-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-section-item + .home-section-item {
  margin-top: 0.45rem;
}

.home-section-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-section-item-rank {
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
  background-color: #f9fafb;
}

.home-section-item-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 0.45rem 0.4rem;
  border-radius: 0.55rem;
  transition: background-color 0.12s ease;
  flex: 1;
}

.home-section-item-link:hover {
  background-color: #f3f4f6;
}

.home-section-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.home-section-item-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ---------------------------------------------------
   HOME CONTINENTS ROW
--------------------------------------------------- */

.home-continents {
  margin-bottom: 1rem;
}

.home-continents-inner {
  padding: 0.4rem 0;
}

.home-continents-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
  margin-bottom: 0.6rem;
}

.home-continents-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.home-continents-row::-webkit-scrollbar {
  height: 6px;
}

.home-continents-row::-webkit-scrollbar-track {
  background: transparent;
}

.home-continents-row::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 999px;
}

.home-continent-card {
  flex: 0 0 140px;
  padding: 0.7rem 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.04);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease,
    background-color 0.12s ease;
}

.home-continent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 76, 129, 0.08);
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.home-continent-card.is-disabled {
  cursor: default;
  opacity: 0.65;
}

.home-continent-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.home-continent-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

@media (min-width: 1024px) {
  .home-continents-row {
    overflow-x: visible;
  }

  .home-continent-card {
    flex: 1 0 auto;
  }
}

/* ---------------------------------------------------
   COUNTRY / CONTINENT LISTS
--------------------------------------------------- */

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Country card = <a> clicable + bandera + text */
.country-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.04);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease,
    background-color 0.12s ease;
  color: #111827;
}

.country-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 76, 129, 0.08);
  border-color: #d1d5db;
  background-color: #f9fafb;
  color: #0f172a;
}

.country-flag {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

.country-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.country-card h2 {
  font-size: 1rem;
  font-weight: 500;
  color: inherit;
}

.country-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ---------------------------------------------------
   COUNTRY VIEW: filtres i taula d’estadis
--------------------------------------------------- */

.stadium-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.stadium-filters-label {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Botons Active / Inactive */
.stadium-filter-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stadium-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border-width: 1px;
  border-style: solid;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease, transform 0.05s ease;
}

/* Botó "Active stadiums" – verd */
.stadium-filter-btn--active {
  border-color: #16a34a;
  color: #166534;
  background-color: rgba(22, 163, 74, 0.06);
}

.stadium-filter-btn--active:hover {
  background-color: rgba(22, 163, 74, 0.13);
}

/* Quan està seleccionat: verd intens i efecte "enfonsat" */
.stadium-filter-btn--active.is-selected {
  background-color: #16a34a;
  color: #f9fafb;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(1px);
}

/* Botó "Inactive stadiums" – vermell */
.stadium-filter-btn--old {
  border-color: #dc2626;
  color: #b91c1c;
  background-color: rgba(220, 38, 38, 0.04);
}

.stadium-filter-btn--old:hover {
  background-color: rgba(220, 38, 38, 0.11);
}

/* Quan està seleccionat: vermell intens i efecte "enfonsat" */
.stadium-filter-btn--old.is-selected {
  background-color: #dc2626;
  color: #fef2f2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(1px);
}

/* Wrapper de la taula */
.stadium-table-wrapper {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 76, 129, 0.05);
  overflow: hidden;
}

/* Taula subtil */
.stadium-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  table-layout: fixed;
}

/* Amplades de les columnes (nom, ciutat, ús, capacitat) */
.stadium-table th:nth-child(1),
.stadium-table td:nth-child(1) {
  width: 50%;
}

.stadium-table th:nth-child(2),
.stadium-table td:nth-child(2) {
  width: 10%;
}

.stadium-table th:nth-child(3),
.stadium-table td:nth-child(3) {
  width: 20%;
}

.stadium-table th:nth-child(4),
.stadium-table td:nth-child(4) {
  width: 20%;
}

/* Totes les columnes: una sola línia i text tallat */
.stadium-table td {
  white-space: nowrap;   /* només una línia */
  overflow: hidden;      /* amaga el que sobra */
  position: relative;    /* necessari per al ::after */
}

/* Degradat a la dreta a totes les cel·les */
.stadium-table td::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;          /* ample del degradat */
  height: 100%;
  pointer-events: none;
  /* Substitueix #ffffff pel color de fons de les files */
  background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
}

/* Versió mòbil: amplades 40/15/25/20 + degradat excepte col 2 */
@media (max-width: 768px) {

  .stadium-table th:nth-child(1),
  .stadium-table td:nth-child(1) { width: 45%; }

  .stadium-table th:nth-child(2),
  .stadium-table td:nth-child(2) { width: 10%; }

  .stadium-table th:nth-child(3),
  .stadium-table td:nth-child(3) { width: 25%; }

  .stadium-table th:nth-child(4),
  .stadium-table td:nth-child(4) { width: 20%; }

  /* Una sola línia i degradat a totes les cel·les */
  .stadium-table td {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
  }

  .stadium-table td::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;         /* ample del degradat */
    height: 100%;
    pointer-events: none;
    /* Canvia #ffffff pel color de fons de la fila/cel·la */
    background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
  }

  /* A la columna 2 NO apliquem degradat */
  .stadium-table td:nth-child(2)::after {
    content: none;
  }
}

.stadium-table thead {
  background-color: #f9fafb;
}

.stadium-table th,
.stadium-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.stadium-table th {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.stadium-table tbody tr {
  border-bottom: 1px solid #f1f3f7;
}

.stadium-table tbody tr:last-child {
  border-bottom: none;
}

/* En lloc de dues cel·les clicables, fem una cel·la amb un <a> que ocupa tota la fila */
.stadium-table td {
  padding: 0;
}

/* Enllaç que ocupa tota la fila */
.stadium-table-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  color: #111827;
  transition: background-color 0.08s ease;
}

.stadium-table-link:hover {
  background-color: #f9fafb;
}

/* Nom de l’estadi – ~70% */
.stadium-table-link-name {
  font-weight: 500;
  flex: 0 0 70%;
}

/* Capacitat – ~30%, alineada a l’esquerra dins la seva columna */
.stadium-table-link-capacity {
  flex: 0 0 30%;
  text-align: left;
  padding-left: 0.2rem;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

/* Capçaleres (sense canvis visuals) */
.stadium-table-col-name {
  width: 70%;
}

.stadium-table-col-capacity {
  width: 30%;
  text-align: right;
}

/* ---------------------------------------------------
   SINGLE STADIUM – dues columnes
--------------------------------------------------- */

.stadium-single {
  width: 100%;
}

.stadium-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.stadium-main-col,
.stadium-side-col {
  min-width: 0;
}

.stadium-info-card,
.stadium-content-card,
.stadium-photos-card,
.stadium-map-card,
.stadium-nearby-card {
  padding: 1.2rem 1.3rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.06);
  margin-top: 1.5rem; /* separació entre "Stadium data" i "Map" */
}

.stadium-info-title,
.stadium-content-title,
.stadium-photos-title,
.stadium-map-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.6rem;
}

.stadium-info-list {
  margin: 0;
}

.stadium-info-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.stadium-info-row .country-flag {
  width: 18px;
  height: 18px;
}

.stadium-info-row:last-child {
  border-bottom: none;
}

.stadium-info-row dt {
  min-width: 110px;
  font-weight: 500;
  color: #4b5563;
}

.stadium-info-row dd {
  margin: 0;
  color: #111827;
}

.stadium-content-card .stadium-content {
  font-size: 0.95rem;
  color: #111827;
}

.stadium-content-card .stadium-content p {
  margin-bottom: 0.7rem;
}

.stadium-content-card .stadium-content ul,
.stadium-content-card .stadium-content ol {
  margin-left: 1.2rem;
  margin-bottom: 0.7rem;
}

.stadium-photo-main {
  margin-bottom: 0.9rem;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.stadium-photo-main img {
  display: block;
  width: 100%;
  height: auto;
}

.stadium-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.4rem;
}

.stadium-photo-item {
  margin: 0;
  border-radius: 0.7rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.stadium-photo-thumb {
  display: block;
  width: 100%;
  height: auto;
}

.stadium-photos-empty {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Mapa Leaflet dins la card, coherent amb les fotos */
.stadium-map {
  width: 100%;
  height: 280px;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

@media (max-width: 768px) {
  .stadium-map {
    height: 220px;  /* redueix encara més a mòbil */
  }
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */

/* Tablets / pantalles mitjanes */
@media (max-width: 900px) {
  .stadium-layout {
    grid-template-columns: 1fr;
  }

  .stadium-table-link {
    padding: 0.55rem 0.7rem;
  }

  .site-main {
    padding: 1.5rem;
    padding-top: calc(1.5rem + var(--header-height));
  }
}

/* Mòbil general */
@media (max-width: 768px) {

  .site-main {
    padding: 1.25rem;
    padding-top: calc(1.25rem + var(--header-height));
  }

  .main-navigation ul {
    gap: 0.6rem;
  }

  .main-navigation a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .home-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.35rem 1.25rem;
  }

  .home-hero-text {
    max-width: 100%;
  }

  .home-hero-title {
    font-size: 1.6rem;
  }

  .home-hero-subtitle {
    font-size: 0.9rem;
  }

  .home-hero-counter {
    align-items: flex-start;
    text-align: left;
    min-width: 0;
  }

  .home-hero-counter-number {
    font-size: 1.7rem;
  }

  .home-search-inner {
    padding: 1rem 1.1rem;
  }

  .home-sections {
    grid-template-columns: 1fr;
  }

  .home-section-card {
    padding: 1rem 1.1rem;
  }

  .home-continents-inner {
    padding: 0.2rem 0;
  }

  .country-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .stadium-filters {
    align-items: flex-start;
  }

  .single-title {
    font-size: 1.5rem;
  }

  .stadium-info-card,
  .stadium-content-card,
  .stadium-photos-card,
  .stadium-map-card {
    padding: 1rem 1.05rem;
  }

  .stadium-info-row {
    font-size: 0.88rem;
  }

  .stadium-table th {
    font-size: 0.8rem;
  }

  .stadium-table {
    font-size: 0.88rem;
  }

  .header-search-panel {
    padding: 0 1rem;
  }
}

/* Mòbil estret (phones petits) */
@media (max-width: 600px) {
  .site-main {
    padding: 1rem;
    padding-top: calc(1rem + var(--header-height));
  }

  .home-hero-title {
    font-size: 1.45rem;
  }

  .home-hero-subtitle {
    font-size: 0.86rem;
  }

  .home-hero-inner {
    padding: 1.1rem 1rem;
  }

  .home-section-card {
    padding: 0.9rem 1rem;
  }

  .stadium-filters {
    gap: 0.4rem;
  }

  .stadium-filter-toggle {
    width: 100%;
  }

  .stadium-filter-btn {
    flex: 1;
    justify-content: center;
    padding: 0.35rem 0.5rem;
  }

  .stadium-table th,
  .stadium-table td {
    padding: 0.5rem 0.7rem;
  }

  .stadium-table-link {
    padding: 0.5rem 0.7rem;
  }

  .stadium-table-link-name {
    flex-basis: 65%;
  }

  .stadium-table-link-capacity {
    flex-basis: 35%;
    padding-left: 0.5rem;
  }

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

/* Mòbil molt estret (tipus 320px) */
@media (max-width: 480px) {
    .home-hero-title {
    font-size: 1.35rem;
  }

  .home-hero-subtitle {
    font-size: 0.82rem;
  }

  .home-hero-counter-number {
    font-size: 1.5rem;
  }

  .breadcrumbs {
    font-size: 0.75rem;
  }

  .stadium-table {
    font-size: 0.84rem;
  }

  .stadium-table-link {
    padding: 0.45rem 0.6rem;
  }

  .stadium-table-link-name {
    flex-basis: 100%;
  }

  .stadium-table-link-capacity {
    flex-basis: auto;
    padding-left: 0;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    opacity: 0.9;
  }

  .stadium-table tbody tr {
    border-bottom-color: #e5e7eb;
  }

  /* Botons de filtre en una sola fila ocupant tot l'ample */
  .stadium-filter-toggle {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .stadium-filter-btn {
    flex: 1;
    width: auto;
  }

  .country-card {
    padding: 0.95rem 1rem;
  }
}

/* Capacitat destacada a la fitxa de l'estadi */
.stadium-capacity-highlight {
  font-size: 1.1rem;   /* una mica més gran que la resta (0.9rem) */
  font-weight: 500;
}

/* ---------------------------------------------------
   SINGLE STADIUM – Nearby stadiums
--------------------------------------------------- */

.stadium-nearby-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stadium-nearby-item {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f3f4f6;
}

.stadium-nearby-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.stadium-nearby-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: #111827;
  border-radius: 0.75rem;
  padding: 0.25rem 0.25rem;
  transition: background-color 0.12s ease;
}

.stadium-nearby-link:hover {
  background-color: #f9fafb;
}

.stadium-nearby-thumb {
  width: 64px;
  height: 48px;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #f3f4f6;
  flex: 0 0 auto;
}

.stadium-nearby-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stadium-nearby-thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.stadium-nearby-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.stadium-nearby-name {
  font-weight: 600;
  line-height: 1.15;
}

.stadium-nearby-capacity {
  font-size: 0.88rem;
  color: #374151;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stadium-nearby-location {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #6b7280;
  min-width: 0;
}

.stadium-nearby-city {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Flag small (used in Nearby) */
.country-flag.country-flag--sm {
  width: 18px;
  height: 18px;
}

/* Generic badge (used for distance) */
.stadium-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  width: fit-content;
}

.stadium-badge--blue {
  background-color: #0f4c81;
  color: #f9fafb;
}

.stadium-nearby-distance-badge {
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
/* Ajustar espai entre títol d'estadi i contingut */
.stadium-single .single-title,
.stadium-single h1 {
  margin-top: 0;           /* elimina el marge superior del títol */
  margin-bottom: 0;  /* pots pujar o baixar aquest valor al gust */
}

/* Assegura que el layout no afegeix espai extra a dalt */
.stadium-layout {
  margin-top: 0;
  padding-top: 0;
}

/* Per si algun primer bloc dins del layout té marge a dalt */
.stadium-layout > *:first-child {
  margin-top: 0;
}

@media (max-width: 768px) {
  .stadium-side-col {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Per si el primer bloc de dins té marge superior */
  .stadium-side-col > *:first-child {
    margin-top: 0 !important;
  }
}

/* --- Galeria de fotos a la fitxa d'estadi --- */

.stadium-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.stadium-gallery-main {
  margin: 0;
  border-radius: 0.7rem;
  overflow: hidden;
  background-color: #f3f4f6;
}

.stadium-gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.stadium-gallery-main-link {
  display: block;
  height: 100%;
}

/* Thumbs + fletxes */

.stadium-gallery-thumbs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stadium-gallery-arrow {
  border: none;
  background-color: #e5e7eb;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.stadium-gallery-arrow:hover {
  background-color: #d1d5db;
}

.stadium-gallery-thumbs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.1rem 0.15rem;
  scroll-behavior: smooth;
}

.stadium-gallery-thumb {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0.45rem;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.stadium-gallery-thumb img {
  display: block;
  width: 64px;
  height: 48px;
  object-fit: cover;
}

.stadium-gallery-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #0f4c81;
  transform: translateY(-1px);
}

/* Lightbox */

.stadium-lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.stadium-lightbox.is-open {
  display: flex;
}

.stadium-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background-color: #000;
  border-radius: 0.75rem;
  overflow: hidden;
}

.stadium-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
}

.stadium-lightbox-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  color: #f9fafb;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Ajustos mòbil: thumbs una mica més petits */

@media (max-width: 768px) {
  .stadium-gallery-thumb img {
    width: 56px;
    height: 42px;
  }

  .stadium-gallery-arrow {
    width: 26px;
    height: 26px;
    font-size: 1rem;
  }
}

/* Foto gran del slider amb alçada fixa */
.stadium-gallery-main {
  margin: 0;
  border-radius: 0.7rem;
  overflow: hidden;
  background-color: #f3f4f6;

  /* alçada fixa */
  height: 260px;              /* ajusta al gust per desktop */
}

.stadium-gallery-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* important per retallar i mantenir alçada */
}

/* mòbil: una mica més baixa */
@media (max-width: 768px) {
  .stadium-gallery-main {
    height: 200px;            /* ajusta al gust per mòbil */
  }
}

.stadium-gallery-thumbs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stadium-gallery-thumbs {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.1rem 0.15rem;
  scroll-behavior: smooth;
}

/* 4 per fila: 25% cadascuna */
.stadium-gallery-thumb {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0.45rem;
  overflow: hidden;
  flex: 0 0 25%;     /* clau -> 4 per fila */
  max-width: 25%;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.stadium-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;   /* opcional, per uniformitat */
  object-fit: cover;
}

.stadium-gallery-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #0f4c81;
  transform: translateY(-1px);
}

/* Desktop: foto gran més alta */
@media (min-width: 769px) {
  .stadium-gallery-main {
    height: 380px;  /* abans 260px, ajusta al gust: 320, 360... */
  }
}

/* Caixes de la fitxa d'estadi: deixem espai per sota del títol flotant */
.stadium-info-card,
.stadium-photos-card,
.stadium-map-card,
.stadium-nearby-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.25rem; /* top una mica gran perquè el títol "entra" a dins */
}

/* Títols com a etiqueta sobre el borde superior de la caixa */
.stadium-info-title,
.stadium-photos-title,
.stadium-map-title,
.stadium-nearby-title {
  position: absolute;
  top: 0;                      /* alineat amb el borde superior */
  left: 1.5rem;                /* alineat amb el padding de la caixa */
  transform: translateY(-50%); /* mig per sobre, mig per dins de la caixa */
  margin: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  line-height: 1.2;
  color: #6b7280;
  background: #e5e7eb;        /* posa aquí el mateix color de fons de la pàgina */
  border-radius: 999px;       /* opcional: forma de píndola */
  z-index: 1;
}

.stadium-use-filters {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.stadium-use-filter-button {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.stadium-use-filter-button:hover {
  background-color: #eef2ff;
  border-color: #c7d2fe;
}

.stadium-use-filter-button.is-active {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #f9fafb;
  transform: translateY(-1px);
}

.stadium-table-cell-name {
  text-align: left;
}

.stadium-table-cell-city {
  text-align: left;
  white-space: nowrap;
}

.stadium-table-cell-capacity {
  text-align: right;
  white-space: nowrap;
}

.stadium-row:hover {
  background-color: #f9fafb;
}

/* Files de la taula d'estadis (pàgina de país) */
.stadium-table tbody .stadium-row td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Nom: més destacat */
.stadium-table-cell-name .stadium-table-link-name {
  display: block;
  font-weight: 600;
  color: #111827;
}

/* Ciutat: secundari */
.stadium-table-cell-city .stadium-table-link-city {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Capacitat: alineada a la dreta */
.stadium-table-cell-capacity {
  text-align: right;
}

.stadium-table-cell-capacity .stadium-table-link-capacity {
  display: block;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

/* Efecte "fila clicable" com abans */
.stadium-row {
  transition: background-color 0.12s ease, transform 0.06s ease;
}

.stadium-row:hover {
  background-color: #f9fafb;
}

.stadium-table-cell-use {
  text-align: center;
  white-space: nowrap;
}

.stadium-table-cell-use .stadium-table-link-use {
  display: inline-block;
  font-size: 0.85rem;
  color: #374151;
}

/* Ciutat: lletra més fina i una mica més petita (3a columna) */
.stadium-table-cell-city .stadium-table-link-city {
  font-weight: 300;
  font-size: 0.8rem; /* una mica més petit que abans */
}

@media (max-width: 768px) {
  .stadium-table-cell-city .stadium-table-link-city {
    font-size: 0.78rem;  /* encara una mica més petit a mòbil */
  }
}

html, body {
    height: 100%;
}

.world-stadium-map-page {
    width: 100%;
    height: 100%;
}

.world-map-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.world-map-title {
    margin: 0 0 0.75rem;
}

/* El mapa ocupa la resta de la pantalla sota el header */
.world-stadium-map {
    width: 100%;
    height: calc(100vh - 160px);
    background: #111; /* només per provar */
}

/* Evitar marges típics del contenidor només en aquesta plantilla */
.page-template-page-world-stadium-map #primary,
.page-template-page-world-stadium-map .site-content {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Que el mapa hereti la tipografia del site (Roboto) */
.world-stadium-map .leaflet-container {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: inherit; /* mateix color de text que el cos de la web */
}

/* Caixa del popup amb un estil més integrat */
.world-stadium-map .leaflet-popup-content-wrapper {
  border-radius: 10px;
  border: 1px solid rgba(15, 76, 129, 0.12); /* suau amb el color principal */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Punta del popup amb el mateix fons */
.world-stadium-map .leaflet-popup-tip {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.world-map-popup {
  font-size: 0.9rem;
  line-height: 1.4;
}

.world-map-popup strong {
  font-weight: 600;
}

.world-map-popup-meta {
  color: #6b7280; /* gris suau */
  font-size: 0.8rem;
}

.world-map-popup-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: #0f4c81; /* color principal de la web */
  text-decoration: none;
  font-weight: 500;
}

.world-map-popup-link:hover {
  text-decoration: underline;
}

/* Botons del header com a cercles blaus amb icona blanca */
.header-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background-color: #0f4c81;   /* blau del header */
  color: #ffffff;              /* fa les icones blanques amb fill:currentColor */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.08s ease;
}

.header-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;          /* agafa el color de .header-icon (blanc) */
}

/* Hover: lleugerament més fosc i una mica de "pop" */
.header-icon:hover {
  background-color: #0c3b63;   /* blau una mica més fosc */
  transform: translateY(-1px);
}

/* Mòbil: cercles un pèl més petits */
@media (max-width: 768px) {
  .header-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }
  .header-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* Assegurar icones blanques en tots els estats del botó del header */
.header-icon,
.header-icon:link,
.header-icon:visited,
.header-icon:hover,
.header-icon:active,
.header-icon:focus {
  color: #ffffff !important;
}

/* L'SVG segueix usant el color del botó */
.header-icon svg {
  fill: currentColor;
}

/* ---------------------------------------------------
   HOME POPULAR COUNTRIES (row sota continents)
--------------------------------------------------- */

.home-countries {
  margin-bottom: 1.5rem;
}

.home-country-card {
  flex: 0 0 auto;          /* <-- abans: 0 0 140px */
  width: fit-content;       /* s'ajusta al contingut */
  white-space: nowrap;      /* evita salts */

  padding: 0.7rem 0.8rem;   /* mantén el padding simètric */
  border-radius: 0.8rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.04);
  text-decoration: none;

  display: flex;
  align-items: center;
  gap: 0.6rem;

  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease,
    background-color 0.12s ease;
  color: #111827;
}


.home-country-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 76, 129, 0.08);
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.home-country-card.is-disabled {
  cursor: default;
  opacity: 0.65;
}

.home-country-flag {
  width: 20px;
  height: 20px;
}

.home-country-code {
  font-size: 0.8rem;
  font-weight: 500;
}

.home-country-card,
.home-country-card:visited,
.home-country-card:hover,
.home-country-card:focus,
.home-country-card:active {
  color: #111827;
  text-decoration: none;
}

.home-country-card:hover .home-country-code,
.home-country-card:focus .home-country-code,
.home-country-card:active .home-country-code {
  color: #111827;
}

/* ---------------------------------------------------
   HOME POPULAR COUNTRIES ROW
--------------------------------------------------- */

.home-countries-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.home-countries-row::-webkit-scrollbar {
  height: 6px;
}

.home-countries-row::-webkit-scrollbar-track {
  background: transparent;
}

.home-countries-row::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 999px;
}

.home-countries-row {
  cursor: grab;
  user-select: none;
}

.home-countries-row.is-dragging {
  cursor: grabbing;
}

.home-countries-row.is-dragging a {
  pointer-events: none; /* només mentre arrossegues */
}

/* FIX header mòbil: altura correcta i sense padding extra */
@media (max-width: 768px) {
  :root { --header-height: 40px; } /* prova 64–70 segons gust */

  .site-header { 
    padding: 0 !important;
  }

  .site-header-inner {
    min-height: var(--header-height) !important;
    padding: 0 1rem !important;
    align-items: center;
  }

  /* Evita que el títol faci créixer el header */
  .site-title {
    font-size: 32px !important;   /* ajusta 26–32 */
    line-height: 1 !important;
  }

  .site-title a {
    font-size: inherit !important;
    line-height: 1 !important;
  }

  /* Si tens descripció, suma altura */
  .site-header .site-description { display: none !important; }

  /* Ajust del “offset” del contingut segons la nova altura */
  .site-main {
    padding-top: calc(1.25rem + var(--header-height)) !important;
  }
}

/* ---------------------------------------------------
   HOME RANDOM STADIUMS
--------------------------------------------------- */

.home-random-stadiums {
  margin-bottom: 1.5rem;
}

.home-stadiums-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.home-stadium-card {
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.04);
  text-decoration: none;
  color: #111827;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.home-stadium-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 76, 129, 0.08);
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.home-stadium-image {
  display: block;
  width: 100%;
  height: 128px;
  background-color: #f3f4f6;
  background-size: cover;
  background-position: center;
}

.home-stadium-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem 0.95rem;
}

.home-stadium-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.home-stadium-capacity {
  font-size: 0.82rem;
  color: #6b7280;
}

.home-stadium-country {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #111827;
}

.home-stadium-country .country-flag {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 900px) {
  .home-stadiums-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .home-stadiums-grid {
    grid-template-columns: 1fr;
  }
  .home-stadium-image {
    height: 170px;
  }
}

@media (max-width: 768px) {
  .home-stadiums-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .home-stadium-card {
    flex: 0 0 44%;
  }
}

@media (max-width: 768px) {
  .home-stadium-image {
    height: 110px; /* prova 110–150 */
    background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  }
}

/* ---------------------------------------------------
   Nearby stadiums – tweaks (smaller text + bigger thumb)
--------------------------------------------------- */

/* Slightly smaller text for the whole widget */
.stadium-nearby-card { font-size: 0.84rem; }

/* Stadium name: a touch smaller but still prominent */
.stadium-nearby-name { font-size: 0.95rem; line-height: 1.15; }

/* Secondary lines */
.stadium-nearby-location,
.stadium-nearby-capacity { font-size: 0.82rem; line-height: 1.1;}

/* Distance badge slightly smaller */
.stadium-nearby-distance-badge { font-size: 0.7rem; }

/* Photo a bit bigger */
.stadium-nearby-thumb {
  width: 100px;
  height: 75px;
  flex: 0 0 auto;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.stadium-nearby-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
