/*
 * Destination detail page (/location/{slug}).
 * Brand colours come from rihla-brand.css; typography matches the Rihla
 * homepage (Syne display, DM Sans body).
 */

.rd-dest {
  --rd-dest-display: 'Syne', 'DM Sans', sans-serif;
  --rd-dest-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --rd-dest-line: #e6eaee;
  --rd-dest-shadow: 0 6px 20px rgba(22, 42, 68, .07);
  --rd-dest-shadow-hover: 0 14px 32px rgba(22, 42, 68, .12);
  --rd-dest-star: #f2a922;
  background: #fff;
  color: var(--rihla-ink);
  font-family: var(--rd-dest-body);
  padding-bottom: 72px;
}

.rd-dest *,
.rd-dest *::before,
.rd-dest *::after { box-sizing: border-box; }
.rd-dest img { display: block; max-width: 100%; }
.rd-dest svg { flex: none; }
.rd-dest p { margin: 0; }
.rd-dest ul,
.rd-dest ol,
.rd-dest dl,
.rd-dest dd { list-style: none; margin: 0; padding: 0; }
.rd-dest a { text-decoration: none; }
.rd-dest a:focus-visible,
.rd-dest button:focus-visible {
  outline: 3px solid var(--rihla-green);
  outline-offset: 3px;
}

/* Same box as the site header container, so content lines up with the logo. */
.rd-dest-shell {
  margin-inline: auto;
  max-width: 1560px;
  padding-inline: 30px;
  width: 100%;
}

/* ── Breadcrumb ── */
.rd-dest-crumbs {
  background: #fff;
  border-bottom: 1px solid var(--rd-dest-line);
  font-size: 13px;
}
.rd-dest-crumbs ol {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding-block: 12px;
}
.rd-dest-crumbs li { align-items: center; display: inline-flex; color: var(--rihla-muted); }
.rd-dest-crumbs li + li::before {
  color: #a3adb9;
  content: '›';
  font-size: 15px;
  padding-inline: 10px;
}
.rd-dest-crumbs a { align-items: center; color: var(--rihla-muted); display: inline-flex; gap: 6px; }
.rd-dest-crumbs a:hover { color: var(--rihla-red); }
.rd-dest-crumbs svg { color: var(--rihla-red); height: 15px; width: 15px; }
.rd-dest-crumbs [aria-current] { color: var(--rihla-ink); font-weight: 600; }

/* ── Hero ── */
.rd-dest-hero {
  background: var(--rihla-ink-deep);
  display: flex;
  isolation: isolate;
  min-height: clamp(340px, 34vw, 470px);
  overflow: hidden;
  position: relative;
}
.rd-dest-hero::after {
  background: linear-gradient(90deg, rgba(16, 32, 51, .8) 0%, rgba(16, 32, 51, .45) 45%, rgba(16, 32, 51, .05) 85%);
  content: '';
  inset: 0;
  position: absolute;
  z-index: -1;
}
.rd-dest-hero--plain { background: linear-gradient(120deg, var(--rihla-ink-deep), var(--rihla-ink) 60%, #23405f); }
.rd-dest-hero__img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: -2;
}
.rd-dest-hero__inner {
  align-self: center;
  color: #fff;
  padding-block: 56px;
}
.rd-dest-hero__parent {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 14px 6px 10px;
  transition: background .2s ease;
}
.rd-dest-hero__parent:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.rd-dest-hero__parent svg { height: 16px; width: 16px; }
.rd-dest-hero__title {
  color: #fff;
  font-family: var(--rd-dest-display);
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 0;
  max-width: 820px;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .3);
}
.rd-dest-hero__sub {
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
  line-height: 1.55;
  margin-top: 14px !important;
  max-width: 520px;
}
.rd-dest-hero__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 26px;
}
.rd-dest-hero__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-dest-hero__facts li,
.rd-dest-hero__facts a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.rd-dest-hero__facts li + li::before { content: '·'; margin-right: 8px; opacity: .7; }
.rd-dest-hero__facts a { border-bottom: 1px solid rgba(255, 255, 255, .5); }
.rd-dest-hero__facts a:hover { border-color: #fff; }

.rd-dest-btn {
  align-items: center;
  background: var(--rihla-red);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 600;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  transition: background .2s ease, transform .2s ease;
}
.rd-dest-btn:hover { background: var(--rihla-red-hover); color: #fff; transform: translateY(-1px); }
.rd-dest-btn svg { height: 20px; width: 20px; }

/* ── Section scaffolding ── */
.rd-dest-sec { padding-top: 56px; }
.rd-dest-head {
  align-items: flex-end;
  display: flex;
  gap: 16px 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.rd-dest-title {
  color: var(--rihla-ink);
  font-family: var(--rd-dest-display);
  font-size: clamp(24px, 2.3vw, 30px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 0;
}
.rd-dest-title::after {
  background: var(--rihla-red);
  border-radius: 3px;
  content: '';
  display: block;
  height: 3px;
  margin-top: 10px;
  width: 44px;
}
.rd-dest-sub { color: var(--rihla-muted); font-size: 15px; line-height: 1.55; margin-top: 10px !important; }
.rd-dest-link-more {
  align-items: center;
  color: var(--rihla-red);
  display: inline-flex;
  flex: none;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  white-space: nowrap;
}
.rd-dest-link-more:hover { color: var(--rihla-red-hover); }
.rd-dest-link-more svg { height: 16px; transition: transform .2s ease; width: 16px; }
.rd-dest-link-more:hover svg { transform: translateX(3px); }

.rd-dest-arrow {
  align-items: center;
  background: var(--rihla-red-soft);
  border-radius: 50%;
  color: var(--rihla-red);
  display: inline-flex;
  flex: none;
  height: 32px;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
  width: 32px;
}
.rd-dest-arrow svg { height: 16px; width: 16px; }
a.rd-dest-arrow:hover,
.rd-dest-place:hover .rd-dest-arrow { background: var(--rihla-red); color: #fff; }

/* ── Overview + general info ── */
.rd-dest-overview {
  align-items: start;
  display: grid;
  gap: 40px 56px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}
.rd-dest-overview--single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.rd-dest-prose {
  color: #3d4b5c;
  font-size: 16px;
  line-height: 1.75;
  margin-top: 22px;
}
.rd-dest-prose p + p { margin-top: 14px; }
.rd-dest-prose a { color: var(--rihla-red); text-decoration: underline; }
.rd-dest-banner-slot:not(:empty) { margin-top: 24px; }

.rd-dest-info__title {
  color: var(--rihla-ink);
  font-family: var(--rd-dest-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 16px;
}
.rd-dest-info__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rd-dest-info__item {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rd-dest-line);
  border-radius: 14px;
  box-shadow: var(--rd-dest-shadow);
  display: flex;
  gap: 14px;
  padding: 18px 16px;
}
.rd-dest-info__icon {
  align-items: center;
  background: var(--rihla-green-soft);
  border-radius: 12px;
  color: var(--rihla-green);
  display: inline-flex;
  flex: none;
  height: 44px;
  justify-content: center;
  width: 44px;
}
/* Checkerboard of green / red tiles, as on the homepage service cards. */
.rd-dest-info__item:nth-child(4n+2) .rd-dest-info__icon,
.rd-dest-info__item:nth-child(4n+3) .rd-dest-info__icon { background: var(--rihla-red-soft); color: var(--rihla-red); }
.rd-dest-info__icon svg { height: 22px; width: 22px; }
.rd-dest-info__item dt {
  color: var(--rihla-green);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.rd-dest-info__item:nth-child(4n+2) dt,
.rd-dest-info__item:nth-child(4n+3) dt { color: var(--rihla-red); }
.rd-dest-info__item dd strong { color: var(--rihla-ink); display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.rd-dest-info__item dd span { color: var(--rihla-muted); display: block; font-size: 13px; line-height: 1.45; margin-top: 4px; }

/* ── Child destinations ── */
.rd-dest-places {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.rd-dest-place {
  background: #fff;
  border: 1px solid var(--rd-dest-line);
  border-radius: 14px;
  box-shadow: var(--rd-dest-shadow);
  color: var(--rihla-ink);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.rd-dest-place:hover { border-color: #d6dde3; box-shadow: var(--rd-dest-shadow-hover); color: var(--rihla-ink); transform: translateY(-3px); }
.rd-dest-place__media { aspect-ratio: 4 / 3; background: var(--rihla-red-wash); display: block; overflow: hidden; }
.rd-dest-place__media img { height: 100%; object-fit: cover; transition: transform .4s ease; width: 100%; }
.rd-dest-place:hover .rd-dest-place__media img { transform: scale(1.05); }
.rd-dest-place__body {
  align-items: center;
  display: grid;
  flex: 1;
  gap: 2px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 12px 14px 14px;
}
.rd-dest-place__name {
  font-family: var(--rd-dest-display);
  font-size: 15px;
  font-weight: 700;
  grid-column: 1;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.rd-dest-place__meta { color: var(--rihla-muted); font-size: 12.5px; grid-column: 1; }
.rd-dest-place .rd-dest-arrow { grid-column: 2; grid-row: 1 / span 2; }

.rd-dest-links__title {
  color: var(--rihla-ink);
  font-family: var(--rd-dest-display);
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 14px;
}
.rd-dest-links { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-dest-links li { display: block; }
.rd-dest-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--rd-dest-line);
  border-radius: 999px;
  color: var(--rihla-ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 500;
  gap: 7px;
  min-height: 40px;
  padding: 6px 10px 6px 12px;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.rd-dest-link:hover { background: var(--rihla-red-wash); border-color: var(--rihla-border); color: var(--rihla-red-hover); }
.rd-dest-link svg { color: var(--rihla-green); height: 16px; width: 16px; }
.rd-dest-link small {
  background: var(--rihla-green-soft);
  border-radius: 999px;
  color: var(--rihla-green);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
}

.rd-dest-more-item { display: none !important; }
.is-expanded .rd-dest-more-item { display: block !important; }

.rd-dest-more {
  align-items: center;
  background: #fff;
  border: 1px solid var(--rihla-border);
  border-radius: 999px;
  color: var(--rihla-red-hover);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  margin-top: 22px;
  min-height: 44px;
  padding: 0 20px;
  transition: background .2s ease, border-color .2s ease;
}
.rd-dest-more:hover { background: var(--rihla-red-wash); border-color: var(--rihla-red); }
.rd-dest-more svg { height: 16px; transform: rotate(90deg); transition: transform .2s ease; width: 16px; }
.rd-dest-more[aria-expanded="true"] svg { transform: rotate(-90deg); }

/* ── Map ── */
.rd-dest-map {
  border: 1px solid var(--rd-dest-line);
  border-radius: 16px;
  box-shadow: var(--rd-dest-shadow);
  overflow: hidden;
}
.rd-dest-map #map_content { height: 360px; z-index: 0; }

/* ── Bookable cards ── */
.rd-dest-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rd-dest-card {
  background: #fff;
  border: 1px solid var(--rd-dest-line);
  border-radius: 14px;
  box-shadow: var(--rd-dest-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.rd-dest-card:hover { border-color: #d6dde3; box-shadow: var(--rd-dest-shadow-hover); transform: translateY(-3px); }
.rd-dest-card__media { aspect-ratio: 3 / 2; background: var(--rihla-red-wash); overflow: hidden; position: relative; }
.rd-dest-card__media img { height: 100%; object-fit: cover; transition: transform .4s ease; width: 100%; }
.rd-dest-card:hover .rd-dest-card__media img { transform: scale(1.04); }
.rd-dest-card__no-photo {
  align-items: center;
  color: var(--rihla-muted);
  display: flex;
  font-size: 13px;
  height: 100%;
  justify-content: center;
}
.rd-dest-card__wish { position: absolute; right: 12px; top: 12px; z-index: 2; }
.rd-dest-card__wish .button {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(16, 32, 51, .18);
  color: var(--rihla-red);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  transition: background .2s ease, color .2s ease;
  width: 34px;
}
.rd-dest-card__wish .button i { font-size: 13px; }
.rd-dest-card__wish .service-wishlist.active .button,
.rd-dest-card__wish .button:hover { background: var(--rihla-red); color: #fff; }
.rd-dest-card__wish .service-wishlist.loading .button { opacity: .6; }
.rd-dest-card__body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.rd-dest-card__title {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  font-family: var(--rd-dest-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
}
.rd-dest-card__link { color: var(--rihla-ink); }
.rd-dest-card__link::after { content: ''; inset: 0; position: absolute; z-index: 1; }
.rd-dest-card__link:hover { color: var(--rihla-red-hover); }
.rd-dest-card__loc {
  align-items: center;
  color: var(--rihla-muted);
  display: flex;
  font-size: 13px;
  gap: 4px;
  margin-top: 6px !important;
}
.rd-dest-card__loc svg { color: var(--rihla-red); height: 14px; width: 14px; }
.rd-dest-card__foot {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
}
.rd-dest-card__rating { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rd-dest-card__stars { color: var(--rd-dest-star); display: inline-flex; font-size: 12px; gap: 2px; }
.rd-dest-card__score { color: var(--rihla-muted); font-size: 12px; }
.rd-dest-card__score b { color: var(--rihla-ink); }
.rd-dest-card__price { flex: none; text-align: right; }
.rd-dest-card__price small { color: var(--rihla-muted); display: block; font-size: 11px; }
.rd-dest-card__price b { color: var(--rihla-red); font-family: var(--rd-dest-display); font-size: 18px; font-weight: 700; white-space: nowrap; }
.rd-dest-card__price .rd-dest-card__price--ask { color: var(--rihla-ink); font-family: var(--rd-dest-body); font-size: 13px; font-weight: 600; }

/* ── Trip ideas ── */
.rd-dest-ideas {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rd-dest-idea {
  background: #fff;
  border: 1px solid var(--rd-dest-line);
  border-radius: 14px;
  box-shadow: var(--rd-dest-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rd-dest-idea__media { aspect-ratio: 16 / 10; background: var(--rihla-red-wash); margin: 0; overflow: hidden; position: relative; }
.rd-dest-idea__media img { height: 100%; object-fit: cover; width: 100%; }
.rd-dest-idea__body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.rd-dest-idea__title {
  color: var(--rihla-ink);
  font-family: var(--rd-dest-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 0;
}
.rd-dest-idea__text {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--rihla-muted);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px !important;
  overflow: hidden;
}
.rd-dest-idea__text.is-expanded { -webkit-line-clamp: unset; display: block; }
.rd-dest-idea__actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
}
.rd-dest-idea__more {
  background: none;
  border: 0;
  color: var(--rihla-red-hover);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
}
.rd-dest-idea__more:hover { text-decoration: underline; }
.rd-dest-idea__actions .rd-dest-arrow { margin-left: auto; }

/* Photo credits required by the Creative Commons licences. */
.rd-dest-credit {
  background: rgba(16, 32, 51, .55);
  border-radius: 4px;
  bottom: 6px;
  color: rgba(255, 255, 255, .92);
  font-size: 10px;
  line-height: 1.4;
  max-width: calc(100% - 12px);
  overflow: hidden;
  padding: 1px 6px;
  position: absolute;
  right: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rd-dest-credit--hero { bottom: 10px; max-width: min(60%, 420px); right: 12px; z-index: 1; }

/* ── Responsive ── */
@media (max-width: 1199px) {
  .rd-dest-overview { grid-template-columns: minmax(0, 1fr); }
  .rd-dest-info__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rd-dest-places { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rd-dest-cards,
  .rd-dest-ideas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .rd-dest-info__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-dest-places { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rd-dest-cards,
  .rd-dest-ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .rd-dest { padding-bottom: 48px; }
  .rd-dest-shell { padding-inline: 16px; }
  .rd-dest-hero__inner { padding-block: 44px; }
  .rd-dest-hero__sub { font-size: 15px; }
  .rd-dest-sec { padding-top: 40px; }
  .rd-dest-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .rd-dest-info__grid { grid-template-columns: minmax(0, 1fr); }
  .rd-dest-places { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Hotels and sights become swipeable rows instead of a long single column;
     the next card peeks in to show there is more. */
  .rd-dest-cards,
  .rd-dest-ideas {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 16px 14px;
    scroll-padding-inline: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .rd-dest-cards::-webkit-scrollbar,
  .rd-dest-ideas::-webkit-scrollbar { display: none; }
  .rd-dest-card,
  .rd-dest-idea { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
  .rd-dest-card:hover,
  .rd-dest-place:hover { transform: none; }
  .rd-dest-map #map_content { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .rd-dest *,
  .rd-dest *::before,
  .rd-dest *::after { transition: none !important; }
}
