:root {
  --bg: #fafafa;
  --panel: #ffffff;
  --panel-soft: #f4f4f5;
  --line: rgba(24, 24, 27, 0.08);
  --line-strong: rgba(24, 24, 27, 0.14);
  --text: #09090b;
  --text-soft: #52525b;
  --text-muted: #71717a;
  --shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.font-headline,
.hero-title,
.section-title,
.card-title,
.team-name {
  font-family: 'Manrope', sans-serif;
}

.hero-shell {
  background: #09090b;
}

.hero-mesh {
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(249, 115, 22, 0.14), transparent 24%),
    radial-gradient(circle at 62% 78%, rgba(244, 244, 245, 0.1), transparent 26%);
}

.hero-subtitle {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.hero-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  color: white;
  text-wrap: balance;
}

.hero-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  max-width: 760px;
  padding: 0.75rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.hero-search-input,
.filter-select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--text);
}

.hero-search-input::placeholder {
  color: #71717a;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.main-nav {
  position: relative;
}

.nav-link,
.nav-link-active {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: #3f3f46;
  transition: color 0.2s ease;
  padding: 0.4rem 0;
}

.nav-link:hover,
.nav-link-active {
  color: #09090b;
}

.nav-indicator {
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  border-radius: 9999px;
  background: #09090b;
  transition: left 0.25s ease, width 0.25s ease, background-color 0.2s ease;
}

.btn-primary,
.btn-secondary,
.btn-dark,
.filter-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.9rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-dark:hover,
.filter-reset-btn:hover,
.filter-btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-dark {
  background: #09090b;
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.filter-reset-btn {
  background: white;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  text-wrap: balance;
}

.section-desc {
  color: var(--text-soft);
  line-height: 1.75;
}

.card-tag,
.filter-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.filter-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.72rem;
}

.quick-card,
.detail-card,
.filter-panel,
.gallery-card,
.event-card {
  border-radius: 1.5rem;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.quick-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.2rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 24, 27, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.quick-card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: var(--panel-soft);
}

.quick-card-label {
  font-weight: 700;
  color: var(--text);
}

.quick-card-text {
  margin-top: 0.3rem;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.filter-panel {
  padding: 1rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border-radius: 9999px;
  background: white;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.filter-btn.active,
.agenda-chip.active,
.favorite-active {
  background: #09090b;
  color: white;
  border-color: #09090b;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9999px;
  background: white;
  border: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.gallery-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-card:hover,
.event-card:hover,
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(24, 24, 27, 0.12);
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-card:hover .card-media img,
.featured-gallery-card:hover .card-media img {
  transform: scale(1.035);
}

.card-title {
  margin-top: 0.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.card-summary {
  color: var(--text-soft);
  line-height: 1.7;
}

.gallery-topbar,
.event-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.favorite-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.favorite-icon-btn:hover {
  transform: translateY(-1px);
}

.favorite-icon-btn.active {
  background: #09090b;
  color: white;
}

.gallery-metadata,
.event-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.metadata-chip,
.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9999px;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  color: #27272a;
}

.link-underlined {
  color: #18181b;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

.map-shell {
  height: 540px;
  border-radius: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #e4e4e7;
}

.nearby-item,
.related-event-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.event-card {
  padding: 1.25rem;
}

.event-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.event-category {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--panel-soft);
  color: var(--text-muted);
}

.detail-card {
  padding: 1.25rem;
}

.detail-card h2 {
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-card p,
.detail-card li,
.detail-card a,
.detail-card div {
  color: #27272a;
}

.detail-properties-item {
  border-radius: 1rem;
  border: 1px solid var(--line);
  padding: 0.95rem;
}

.detail-properties-item .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.detail-properties-item .value {
  margin-top: 0.45rem;
  font-size: 0.98rem;
  color: var(--text);
}

.hidden-view {
  display: none !important;
}

.mobile-nav-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.mobile-nav-item.active {
  color: var(--text);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-link {
  display: block;
  padding: 0.95rem 0;
  font-weight: 600;
  color: #18181b;
  border-bottom: 1px solid rgba(24, 24, 27, 0.06);
}

.team-card {
  text-align: left;
}

.team-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-soft);
  font-family: 'Manrope', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.team-name {
  margin-top: 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.team-role {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.team-desc {
  margin-top: 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.map-popup-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.no-results {
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: white;
  border: 1px solid var(--line);
  color: var(--text-soft);
}

@media (max-width: 1023px) {
  .map-shell {
    height: 430px;
  }
}

@media (max-width: 767px) {
  .hero-search-panel {
    grid-template-columns: 1fr;
  }

  .hero-search-button,
  .btn-dark,
  .filter-reset-btn,
  .filter-btn {
    width: 100%;
  }

  .map-shell {
    height: 370px;
  }
}


.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.language-switcher {
  min-width: 0;
}

.language-select {
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  background: white;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.mobile-language-block {
  padding: 1rem 0 0.5rem;
}

.site-footer {
  position: relative;
}

.footer-brand {
  font-family: 'Manrope', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.footer-title {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a,
.footer-link-button,
.footer-text {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.footer-links a,
.footer-link-button {
  width: fit-content;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-link-button:hover {
  color: var(--text);
}

.footer-link-button {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 1.75rem;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-body {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 0.98rem;
}

.modal-body p + p,
.modal-body h3 + p,
.modal-body ul + p,
.modal-body p + ul,
.modal-body ul + ul {
  margin-top: 0.9rem;
}

.modal-body h3 {
  margin-top: 1.4rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  color: var(--text);
}

.modal-body ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 1.5rem;
  background: rgba(9, 9, 11, 0.94);
  color: white;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.cookie-banner-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.cookie-banner-text {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  font-size: 0.93rem;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-banner .filter-reset-btn {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
    width: min(620px, calc(100vw - 3rem));
  }
}

@media (max-width: 767px) {
  .language-select {
    min-height: 3rem;
    border-radius: 1rem;
  }

  .modal-panel {
    padding: 1.15rem;
    max-height: 85vh;
  }

  .cookie-banner {
    bottom: 5.75rem;
  }
}


/* Accessibilitat: mode d'alt contrast */
body.high-contrast {
  --bg: #000000;
  --panel: #000000;
  --panel-soft: #111111;
  --line: #ffffff;
  --line-strong: #ffffff;
  --text: #ffffff;
  --text-soft: #f5f5f5;
  --text-muted: #ffff00;
  --shadow: none;
  --shadow-soft: none;
  background: #000000 !important;
  color: #ffffff !important;
}

body.high-contrast nav,
body.high-contrast footer,
body.high-contrast section,
body.high-contrast .quick-card,
body.high-contrast .detail-card,
body.high-contrast .filter-panel,
body.high-contrast .gallery-card,
body.high-contrast .event-card,
body.high-contrast .mobile-menu,
body.high-contrast .cookie-banner-content,
body.high-contrast .modal-panel,
body.high-contrast .featured-carousel,
body.high-contrast .carousel-content {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
}

body.high-contrast .hero-shell,
body.high-contrast .hero-mesh {
  background: #000000 !important;
}

body.high-contrast .hero-mesh,
body.high-contrast .absolute.bg-black\/40 {
  display: none !important;
}

body.high-contrast p,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast li,
body.high-contrast a,
body.high-contrast span,
body.high-contrast div,
body.high-contrast .section-title,
body.high-contrast .section-desc,
body.high-contrast .card-title,
body.high-contrast .card-summary,
body.high-contrast .nav-link,
body.high-contrast .nav-link-active,
body.high-contrast .detail-card p,
body.high-contrast .detail-card li,
body.high-contrast .detail-card a,
body.high-contrast .detail-card div {
  color: #ffffff !important;
}

body.high-contrast .card-tag,
body.high-contrast .filter-label,
body.high-contrast .event-category,
body.high-contrast .metadata-chip,
body.high-contrast .detail-chip {
  color: #ffff00 !important;
  background: #000000 !important;
  border-color: #ffff00 !important;
}

body.high-contrast .btn-primary,
body.high-contrast .btn-dark,
body.high-contrast .filter-btn.active,
body.high-contrast .agenda-chip.active,
body.high-contrast .favorite-active,
body.high-contrast .favorite-icon-btn.active {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffff00 !important;
}

body.high-contrast .filter-reset-btn,
body.high-contrast .filter-btn,
body.high-contrast .icon-btn,
body.high-contrast .hero-search-input,
body.high-contrast .filter-select,
body.high-contrast .language-select {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast .nav-indicator {
  background: #ffff00 !important;
  height: 3px;
}

body.high-contrast img {
  filter: contrast(1.15) saturate(0.95);
}

/* Carrusel de recorreguts d'entrada */
.featured-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow-soft);
}

.carousel-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0;
  min-height: 430px;
}

.carousel-media {
  min-height: 360px;
  background: var(--panel-soft);
}

.carousel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.carousel-controls {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.carousel-control-group,
.carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
}

.carousel-arrow,
.carousel-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-arrow {
  width: 2.75rem;
  height: 2.75rem;
}

.carousel-dot {
  width: 0.78rem;
  height: 0.78rem;
  padding: 0;
}

.carousel-arrow:hover,
.carousel-dot:hover {
  transform: translateY(-1px);
}

.carousel-dot.active {
  background: var(--text);
}

.calendar-btn {
  gap: 0.45rem;
}

@media (max-width: 768px) {
  .carousel-slide {
    grid-template-columns: 1fr;
  }

  .carousel-content {
    padding: 1.25rem 1.25rem 4.8rem;
  }
}

/* Menú per afegir esdeveniments al calendari amb serveis externs */
.calendar-menu-shell {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.calendar-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(4px);
}

.calendar-menu-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  border-radius: 1.5rem;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.calendar-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-menu-header h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.calendar-menu-actions {
  display: grid;
  gap: 0.75rem;
}

.calendar-provider-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.calendar-provider-btn:hover {
  transform: translateY(-1px);
  border-color: #09090b;
  background: var(--panel-soft);
}

/* Accessibilitat: qualsevol text damunt fons groc ha de ser negre */
body.high-contrast .btn-primary *,
body.high-contrast .btn-dark *,
body.high-contrast .filter-btn.active *,
body.high-contrast .agenda-chip.active *,
body.high-contrast .favorite-active *,
body.high-contrast .favorite-icon-btn.active *,
body.high-contrast .btn-primary,
body.high-contrast .btn-dark,
body.high-contrast .filter-btn.active,
body.high-contrast .agenda-chip.active,
body.high-contrast .favorite-active,
body.high-contrast .favorite-icon-btn.active {
  color: #000000 !important;
}

body.high-contrast .calendar-menu-panel,
body.high-contrast .calendar-provider-btn {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast .calendar-provider-btn *,
body.high-contrast .calendar-menu-header h2 {
  color: #ffffff !important;
}


/* Correcció de capes: OpenStreetMap / Leaflet mai ha de quedar per damunt del header */
header nav {
  z-index: 3000 !important;
}

.mobile-nav-item,
nav.fixed.bottom-0 {
  z-index: 3000 !important;
}

.map-shell,
.leaflet-container {
  position: relative;
  z-index: 0 !important;
  isolation: isolate;
}

.leaflet-control-container {
  position: relative;
  z-index: 500 !important;
}

.calendar-menu-shell,
.modal-shell,
.cookie-banner {
  z-index: 3500 !important;
}

/* Dades multimèdia dels museus */
.media-resource-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

@media (max-width: 640px) {
  .media-resource-item {
    flex-direction: column;
  }
}

/* Accessibilitat: si un botó o element té fons groc, el text sempre ha de ser negre */
body.high-contrast .btn-primary,
body.high-contrast .btn-dark,
body.high-contrast .filter-btn.active,
body.high-contrast .agenda-chip.active,
body.high-contrast .favorite-active,
body.high-contrast .favorite-icon-btn.active,
.yellow-action,
.bg-yellow-50,
.bg-yellow-100,
.bg-yellow-200,
.bg-yellow-300,
.bg-yellow-400,
.bg-yellow-500,
.bg-amber-50,
.bg-amber-100,
.bg-amber-200,
.bg-amber-300,
.bg-amber-400,
.bg-amber-500 {
  color: #000000 !important;
}

body.high-contrast .btn-primary *,
body.high-contrast .btn-dark *,
body.high-contrast .filter-btn.active *,
body.high-contrast .agenda-chip.active *,
body.high-contrast .favorite-active *,
body.high-contrast .favorite-icon-btn.active *,
.yellow-action *,
.bg-yellow-50 *,
.bg-yellow-100 *,
.bg-yellow-200 *,
.bg-yellow-300 *,
.bg-yellow-400 *,
.bg-yellow-500 *,
.bg-amber-50 *,
.bg-amber-100 *,
.bg-amber-200 *,
.bg-amber-300 *,
.bg-amber-400 *,
.bg-amber-500 * {
  color: #000000 !important;
}
body.high-contrast .favorite-icon-btn,
body.high-contrast .carousel-arrow,
body.high-contrast .carousel-dot {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast .carousel-dot.active {
  background: #ffff00 !important;
  border-color: #ffff00 !important;
}