
/*
 * Walkborder v9.0 — Destinations WordPress bridge.
 * Keeps the approved destination prototype visual language while using ACF fields.
 */

.destination-card,
.destination-card * {
  text-decoration: none !important;
}

.tax-destination .site-main,
.page-template-template-destinations-builder .site-main {
  background: #f5f1ea;
}

.wb-destination-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  padding: .5rem 1rem;
  color: #fff;
}

.tax-destination details summary::-webkit-details-marker,
.page-template-template-destinations-builder details summary::-webkit-details-marker {
  display: none;
}

.tax-destination details summary::before,
.page-template-template-destinations-builder details summary::before {
  content: "›";
  display: inline-block;
  margin-right: .5rem;
  color: #c8a23a;
}

.tax-destination details[open] summary::before,
.page-template-template-destinations-builder details[open] summary::before {
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .destination-card {
    min-height: 340px !important;
  }
}


/*
 * 9.0.1 — Destinations prototype fidelity fixes.
 */

.page-template-template-destinations-builder .destinations-overlay,
.destinations-overlay {
  background: linear-gradient(90deg, #0a0a0af0, #0a0a0ab8 52%, #0a0a0a3d) !important;
}

.tax-destination .destination-overlay,
.destination-overlay {
  background: linear-gradient(90deg, #0a0a0aeb, #0a0a0aa3 48%, #0a0a0a2e) !important;
}

.destination-card[hidden],
.tour-card[hidden] {
  display: none !important;
}

.highlight-swiper {
  overflow: visible !important;
}

.highlight-swiper .swiper-slide {
  height: auto !important;
}

.highlight-card {
  min-height: 480px !important;
}

.highlight-card:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0a0a0a0f 12%, #0a0a0adb);
}

.highlight-pagination .swiper-pagination-bullet {
  background: #b5952f;
  opacity: .35;
}

.highlight-pagination .swiper-pagination-bullet-active {
  background: #0a0a0a;
  opacity: 1;
}

.region-button.active,
.view-button.active,
.interest-button.active {
  border-color: #0a0a0a !important;
  background: #0a0a0a !important;
  color: #ffffff !important;
}

#destination-grid.view-list {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (min-width: 768px) {
  #destination-grid.view-list .destination-card > a {
    display: grid !important;
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr) !important;
  }

  #destination-grid.view-list .destination-card > a > div:first-child {
    height: 100% !important;
    min-height: 280px !important;
  }

  #destination-grid.view-list .destination-card h3 {
    font-size: 2.25rem !important;
  }
}

.filter-drawer {
  transform: translateX(-100%);
  transition: transform .3s ease;
}

.filter-drawer.open {
  transform: translateX(0);
}

.destination-card a,
.tour-card a,
.highlight-card {
  color: inherit;
  text-decoration: none !important;
}

.wb-destination-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  padding: .5rem 1rem;
  color: #fff;
  backdrop-filter: blur(4px);
}


/*
 * 9.0.2 — Destinations fidelity/error fix.
 */

.pagination-button.active {
  border-color: #0a0a0a !important;
  background: #0a0a0a !important;
  color: #fff !important;
}

.pagination-button:disabled {
  cursor: not-allowed !important;
  opacity: .35 !important;
}

.page-template-template-destinations-builder .text-brand-goldDark,
.tax-destination .text-brand-goldDark {
  color: #715b18 !important;
}

.page-template-template-destinations-builder .region-button.active .float-right {
  color: #fff !important;
  opacity: 1 !important;
}

.page-template-template-destinations-builder .highlight-pagination .swiper-pagination-bullet {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin: 0 !important;
  place-items: center;
  background: transparent !important;
  opacity: 1;
}

.page-template-template-destinations-builder .highlight-pagination .swiper-pagination-bullet::after {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b5952f;
  content: "";
  opacity: .35;
}

.page-template-template-destinations-builder .highlight-pagination .swiper-pagination-bullet-active::after {
  background: #0a0a0a;
  opacity: 1;
}

.page-template-template-destinations-builder footer .text-white\/45,
.tax-destination footer .text-white\/45 {
  color: rgba(255, 255, 255, .5) !important;
}

.destination-card .wb-icon,
.tour-card .wb-icon {
  display: inline-block;
  vertical-align: -0.12em;
}

#sintra-tours .tour-card > a {
  text-decoration: none !important;
}

#sintra-tours .tour-card[hidden] {
  display: none !important;
}

#sintra-tours .interest-button.active {
  border-color: #0a0a0a !important;
  background: #0a0a0a !important;
  color: #ffffff !important;
}

@media (min-width: 1024px) {
  .tax-destination #sintra-tours .tour-card {
    min-height: 320px;
  }
}


/*
 * 9.0.3 — ACF sync + destination hero visibility fix.
 */

.tax-destination .destination-overlay,
.destination-overlay {
  background:
    linear-gradient(90deg, rgba(10,10,10,.78) 0%, rgba(10,10,10,.58) 42%, rgba(10,10,10,.22) 100%) !important;
}

.tax-destination section[class*="min-h"][class*="text-white"] {
  color: #ffffff !important;
}

.tax-destination section[class*="min-h"][class*="text-white"] h1,
.tax-destination section[class*="min-h"][class*="text-white"] h2,
.tax-destination section[class*="min-h"][class*="text-white"] p,
.tax-destination section[class*="min-h"][class*="text-white"] span,
.tax-destination section[class*="min-h"][class*="text-white"] a {
  color: inherit;
}

.tax-destination section[class*="min-h"][class*="text-white"] h1 {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 18px 55px rgba(0,0,0,.45);
}

.tax-destination section[class*="min-h"][class*="text-white"] p {
  opacity: 1 !important;
}

.tax-destination section[class*="min-h"][class*="text-white"] a.bg-brand-gold {
  color: #0a0a0a !important;
}

.tax-destination .wb-destination-hero-breadcrumb {
  color: rgba(255,255,255,.65) !important;
}

.tax-destination .wb-destination-hero-breadcrumb a {
  color: inherit !important;
}

.tax-destination .wb-destination-hero-breadcrumb a:hover {
  color: #d4af37 !important;
}

.tax-destination .wb-destination-hero-breadcrumb__current {
  color: #fff !important;
}

.tax-destination .wb-destination-hero-eyebrow {
  color: #d4af37 !important;
}

.tax-destination .wb-destination-hero-text {
  color: rgba(255,255,255,.82) !important;
}

.tax-destination .wb-destination-meta-pill {
  background: rgba(0,0,0,.36) !important;
  border-color: rgba(255,255,255,.28) !important;
}

.tax-destination .wb-destination-meta-pill span {
  color: rgba(255,255,255,.72) !important;
}

.tax-destination .wb-destination-meta-pill__icon {
  color: #d4af37 !important;
}


/*
 * 9.0.5 — Destination taxonomy dark overlay leak fix.
 *
 * Previous versions used a global `.highlight-card:after` pseudo-element.
 * On `/destinations/sintra/`, destination highlight cards also used the
 * `highlight-card` class, so the pseudo-element escaped visually and dimmed
 * the whole page below the hero. The overlay is now scoped to the carousel only.
 */

/* Neutralize any legacy/global overlay on destination taxonomy pages. */
.tax-destination .highlight-card::after,
.tax-destination .destination-highlight-card::after {
  content: none !important;
  display: none !important;
}

/* Term highlight cards are normal white cards, not dark overlay cards. */
.tax-destination .destination-highlight-card {
  position: relative !important;
  min-height: 0 !important;
  background: #f5f1ea !important;
  color: #0a0a0a !important;
}

.tax-destination .destination-highlight-card--cta {
  background: #0a0a0a !important;
  color: #ffffff !important;
}

.tax-destination #highlights .destination-highlight-card--cta .text-brand-gold {
  color: #d4af37 !important;
}

.tax-destination #highlights .destination-highlight-card--cta .text-white\/65 {
  color: rgba(255, 255, 255, .72) !important;
}

.tax-destination .destination-empty-state__primary {
  padding-right: 2.25rem !important;
  padding-left: 2.25rem !important;
}

/* The dark gradient overlay belongs only to the featured carousel on /destinations/. */
.page-template-template-destinations-builder .highlight-swiper .highlight-card {
  position: relative !important;
  min-height: 480px !important;
  overflow: hidden !important;
}

.page-template-template-destinations-builder .highlight-swiper .highlight-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, rgba(10,10,10,.06) 12%, rgba(10,10,10,.86)) !important;
}

.page-template-template-destinations-builder .highlight-swiper .highlight-card > img,
.page-template-template-destinations-builder .highlight-swiper .highlight-card > picture {
  z-index: 0 !important;
}

.page-template-template-destinations-builder .highlight-swiper .highlight-card > div {
  position: relative !important;
  z-index: 2 !important;
}

/* Make Sintra taxonomy sections readable after the leak fix. */
.tax-destination #highlights {
  background: #ffffff !important;
}

.tax-destination #highlights .destination-highlight-card img {
  opacity: 1 !important;
  filter: none !important;
}

.tax-destination #highlights .destination-highlight-card h3,
.tax-destination #highlights .destination-highlight-card p {
  color: inherit !important;
  opacity: 1 !important;
}

/* Keep the hero overlay only inside the hero section. */
.tax-destination .destination-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

.tax-destination .destination-overlay + .relative {
  z-index: 1 !important;
}

/* Keep the final CTA boundary identical to the approved destination prototype. */
.tax-destination .wb-destination-cta-panel {
  overflow: hidden;
  border-radius: .75rem;
}
