/* Sferic Athletic Modernism — estils compartits per totes les pàgines */

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

/* Tall diagonal a la vora inferior d'una secció (hero, etc.) */
.diagonal-accent {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 92%);
}

/* Textura de ratlles diagonals molt subtil, inspirada en la geometria de pista */
.diagonal-stripe {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.06) 75%, transparent 75%, transparent);
  background-size: 28px 28px;
}

.diagonal-stripe-dark {
  background-image: linear-gradient(45deg, rgba(0, 92, 67, 0.05) 25%, transparent 25%, transparent 50%, rgba(0, 92, 67, 0.05) 50%, rgba(0, 92, 67, 0.05) 75%, transparent 75%, transparent);
  background-size: 28px 28px;
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border-color: #005c43;
}

.zebra-row:nth-child(even) {
  background-color: #f4f4f2;
}

.accent-line::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: #005c43;
  margin-top: 16px;
}

/* ---- Filtre d'equips per categoria ---- */
.filter-chip {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-chip.active {
  background-color: #005c43;
  color: #ffffff;
  border-color: #005c43;
}

/* Nav actiu */
.nav-link-active {
  color: #005c43;
  border-bottom: 2px solid #005c43;
  padding-bottom: 4px;
}

/* Timeline horitzontal */
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #005c43;
  border: 3px solid #f9f9f7;
  outline: 1px solid #bdc9c2;
}

/* Menú mòbil */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  max-height: 400px;
}

html {
  scroll-behavior: smooth;
}

/* ---- Hero video ----
   Nota: la mida/cover del vídeo es via utilitats de Tailwind directament al HTML
   (w-full h-full object-cover), NO aquí — les utilitats de Tailwind tenen garantida
   prioritat sobre el seu propi preflight (video{height:auto}); una classe pròpia
   en aquest fitxer competia en especificitat i la perdia intermitentment. */

/* ---- Carrusel genèric (Instagram) ----
   Alçada fixa per a totes les fotos, amplada segons la proporció real de
   cada imatge (object-contain) — es veuen senceres, mai retallades. */
.ig-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ig-track::-webkit-scrollbar {
  display: none;
}
.ig-slide {
  flex: 0 0 auto;
  height: 220px;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .ig-slide { height: 280px; }
}
@media (min-width: 1024px) {
  .ig-slide { height: 340px; }
}

/* ---- Instagram lightbox ---- */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 21, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.lightbox-backdrop.open {
  display: flex;
}
@media (max-width: 639px) {
  .lightbox-backdrop {
    padding: 12px;
  }
}

/* ---- Google reviews scroll ----
   Mòbil/tablet: com sempre, una fila, targes al 85%/32%.
   PC (≥1024px): graella de 2 files — pagina de 6 en 6 en desplaçar. */
.reviews-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.reviews-row::-webkit-scrollbar { display: none; }
.review-card {
  scroll-snap-align: start;
  flex: 0 0 85%;
}
@media (min-width: 768px) {
  .review-card { flex: 0 0 32%; }
}
@media (min-width: 1024px) {
  .reviews-row {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-columns: 31.5%;
    column-gap: 24px;
    row-gap: 24px;
  }
  .review-card {
    flex: none;
  }
}

/* ---- Aparició suau en fer scroll (Intersection Observer, veure main.js) ----
   Estat inicial ocult + desplaçat; JS afegeix .is-visible quan l'element
   entra al viewport. El retard esglaonat entre elements germans (per a
   graelles com Equips o Patrocinadors) es calcula també des de JS. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Targetes de partits (Últims resultats / Calendari, Home) ----
   Generades en temps d'execucio per update-resultats.js/update-calendari.js
   — com que aquest HTML mai apareix a src/*.html quan es compila
   tailwind.css, una utilitat de Tailwind usada nomes aqui pot quedar
   purgada i no fer re (va passar de veritat: px-3, min-w-0, break-words,
   md:text-base, gap-x-12, border-b-2, md:grid-cols-2 i altres no
   existien al build compilat). Per aixo aquest component fa servir CSS
   a ma, igual que el bloc de cookies — veure memoria
   "metodologia-construccion-web" §8. */
.match-card {
  background: #f4f4f2;
  border: 1px solid #bdc9c2;
  padding: 20px;
}
.match-card-daytag {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.match-card-daytag span {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3e4943;
  background: #ffffff;
  border: 1px solid #bdc9c2;
  padding: 4px 8px;
}
.match-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
}
.match-card-team {
  flex: 1 1 0;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: break-word;
  color: #1a1c1b;
}
.match-card-team--right {
  text-align: right;
}
.match-card-badge {
  display: inline-block;
  color: #ffffff;
  padding: 10px 18px;
  font-size: 24px;
  line-height: 1.3;
  flex-shrink: 0;
  white-space: nowrap;
}
.match-card-badge--home {
  background: #005c43;
}
.match-card-badge--away {
  background: #7d5700;
}
@media (min-width: 768px) {
  .match-card-team {
    font-size: 16px;
  }
}

.match-empty-card {
  background: #f4f4f2;
  border: 1px solid #bdc9c2;
  padding: 20px;
  text-align: center;
}
.match-empty-card span {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #3e4943;
}

.match-empty-state {
  background: #f4f4f2;
  border: 1px solid #bdc9c2;
  padding: 40px 24px;
  text-align: center;
}
@media (min-width: 768px) {
  .match-empty-state {
    padding: 56px;
  }
}
.match-empty-state p:first-of-type {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #1a1c1b;
  margin-bottom: 8px;
}
.match-empty-state p:last-of-type {
  font-family: "Inter", sans-serif;
  color: #3e4943;
  max-width: 420px;
  margin: 0 auto;
}
.match-empty-state a {
  color: #005c43;
  font-weight: 700;
}
.match-empty-state a:hover {
  text-decoration: underline;
}

.match-columns {
  display: grid;
  gap: 40px;
}
@media (min-width: 768px) {
  .match-columns {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    row-gap: 40px;
  }
}
.match-column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
}
.match-column-header--home {
  border-bottom-color: #005c43;
}
.match-column-header--away {
  border-bottom-color: #7d5700;
}
.match-column-header h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #1a1c1b;
}
.match-column-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.match-day-divider:first-child {
  margin-top: 0;
}
.match-day-divider .line {
  height: 1px;
  flex: 1;
  background: #bdc9c2;
}
.match-day-divider .label {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3e4943;
  white-space: nowrap;
}

/* ---- FAQ accordion (details/summary natiu) ---- */
details.faq-item {
  border-bottom: 1px solid #bdc9c2;
}
details.faq-item summary {
  cursor: pointer;
  list-style: none;
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item .faq-icon {
  transition: transform 0.25s ease;
}
details.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

/* ---- Consentiment de cookies (veure assets/cookie-consent.js) ----
   CSS a mà (no utilitats de Tailwind): aquest bloc s'injecta igual a totes
   les pàgines des de partials/footer.html, i algunes pàgines fan servir
   assets/tailwind.css (build purgat) en lloc del CDN, així que una classe
   nova de Tailwind podria no existir al CSS compilat. */
.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: #ffffff;
  border-top: 1px solid #bdc9c2;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 20px 16px;
  display: none;
}
.cc-banner.open {
  display: block;
}
.cc-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.cc-banner-text {
  flex: 1 1 380px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #3e4943;
}
.cc-banner-text a {
  color: #005c43;
  font-weight: 700;
  text-decoration: underline;
}
.cc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.cc-btn {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 20px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.cc-btn-primary {
  background: #005c43;
  color: #ffffff;
}
.cc-btn-primary:hover {
  opacity: 0.85;
}
.cc-btn-outline {
  background: transparent;
  color: #005c43;
  border-color: #005c43;
}
.cc-btn-outline:hover {
  background: rgba(0, 92, 67, 0.06);
}
.cc-btn-ghost {
  background: transparent;
  color: #3e4943;
  border-color: #bdc9c2;
}
.cc-btn-ghost:hover {
  background: #f4f4f2;
}
.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 21, 0.55);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cc-modal-backdrop.open {
  display: flex;
}
.cc-modal {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 4px;
}
.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}
.cc-modal-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1c1b;
}
.cc-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #3e4943;
  line-height: 1;
  padding: 4px;
}
.cc-modal-intro {
  padding: 12px 24px 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #3e4943;
}
.cc-modal-body {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-cat {
  border-top: 1px solid #e2e3e1;
  padding: 16px 0;
}
.cc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cc-cat-header strong {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1c1b;
}
.cc-cat p {
  margin-top: 6px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #3e4943;
}
.cc-cat-locked {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6e7a73;
}
.cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-slider {
  position: absolute;
  inset: 0;
  background-color: #bdc9c2;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.cc-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  border-radius: 999px;
  transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-slider {
  background-color: #005c43;
}
.cc-switch input:checked + .cc-slider::before {
  transform: translateX(18px);
}
.cc-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 24px 24px;
}
.cc-modal-footer .cc-btn {
  flex: 1 1 auto;
  text-align: center;
}
.cc-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #005c43;
  color: #ffffff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.cc-fab.visible {
  display: flex;
}
.cc-fab:hover {
  transform: scale(1.08);
}
@media (max-width: 640px) {
  .cc-banner-actions {
    width: 100%;
  }
  .cc-banner-actions .cc-btn {
    flex: 1 1 auto;
  }
}
