/* Hamakom Blog Design: destinations layer */

/* Self-contained tokens so components also work outside magazine pages (e.g. the homepage shortcode). */
.hbd-dest-home,
.hbd-dest-directory,
.hbd-dest-box,
.hbd-dest-filter {
  --hbd-deep: #0c6671;
  --hbd-ink: #123f42;
  --hbd-teal: #61b3a4;
  --hbd-mint: #7adbca;
  --hbd-soft: #f2faf8;
  --hbd-soft-2: #e9f7f4;
  --hbd-muted: #6f8183;
  --hbd-line: rgba(18, 63, 66, 0.11);
  --hbd-shadow-sm: 0 10px 26px rgba(18, 63, 66, 0.07);
  --hbd-shadow: 0 20px 55px rgba(18, 63, 66, 0.10);
  --hbd-radius: 22px;
}

/* Homepage / shortcode section */
.hbd-dest-home {
  width: min(1180px, calc(100% - 40px));
  margin: 72px auto;
  direction: rtl;
  text-align: right;
}
.hbd-dest-home__head {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.hbd-dest-home__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hbd-teal);
  font-size: 13px;
  font-weight: 800;
}
.hbd-dest-home__kicker::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
}
.hbd-dest-home__title {
  margin: 5px 0 0 !important;
  color: var(--hbd-ink) !important;
  font-size: clamp(30px, 3.4vw, 44px) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em;
}
.hbd-dest-home__text {
  max-width: 680px;
  margin: 8px 0 0 !important;
  color: var(--hbd-muted);
  font-size: 17px;
  line-height: 1.7;
}
.hbd-dest-home__all {
  flex: 0 0 auto;
  color: var(--hbd-deep) !important;
  font-weight: 800;
  text-decoration: none !important;
}
.hbd-dest-home .hbd-dest-grid,
.hbd-dest-hm .hbd-dest-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
/* Inside the homepage (.hm-home) the heading comes from the homepage's own .hm-section-head. */
.hbd-dest-hm .hbd-dest-card__title strong { color: #fff; }
.hbd-dest-hm .hbd-dest-card { box-shadow: 0 12px 34px rgba(16,63,69,.06); }

/* Destination hero with a soft photo behind the existing gradient */
.hbd-dest-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .28;
  pointer-events: none;
}
.hbd-dest-hero__bg img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  filter: saturate(.9);
}
.hbd-dest-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(8,47,52,.55) 0%, rgba(8,47,52,.85) 100%);
  pointer-events: none;
}

.hbd-destination .hbd-dest-jump {
  position: relative;
  z-index: 4;
  justify-content: center;
  flex-wrap: wrap;
  overflow: visible;
  margin: 26px 0 40px;
  padding: 12px 16px;
}
.hbd-dest-section { scroll-margin-top: 110px; }

/* Chip lists (cities, nearby) */
.hbd-dest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hbd-dest-chips a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--hbd-line);
  border-radius: 13px;
  background: #fff;
  color: var(--hbd-ink) !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: var(--hbd-shadow-sm);
  transition: background .18s ease, border-color .18s ease;
}
.hbd-dest-chips a:hover { background: var(--hbd-soft-2); border-color: rgba(97,179,164,.35); }
.hbd-dest-chips small,
.hbd-dest-card__cities small,
.hbd-dest-filter small {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--hbd-soft);
  color: var(--hbd-teal);
  font-size: 11px;
  font-weight: 800;
}

/* Directory (index page, guides hub, shortcode) */
.hbd-dest-directory { direction: rtl; }
.hbd-dest-search {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 560px;
  margin: 0 0 26px;
  padding: 0 18px;
  border: 1px solid var(--hbd-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--hbd-shadow-sm);
}
.hbd-dest-search svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--hbd-teal); stroke-width: 2; }
.hbd-dest-search input {
  width: 100%;
  min-height: 54px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hbd-ink);
  font: inherit;
  font-size: 17px;
}
.hbd-dest-empty { color: var(--hbd-muted); }
.hbd-dest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.hbd-dest-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hbd-line);
  border-radius: var(--hbd-radius);
  background: #fff;
  box-shadow: var(--hbd-shadow-sm);
}
.hbd-dest-card[hidden] { display: none; }
.hbd-dest-card__head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  height: 150px;
  background: linear-gradient(135deg, var(--hbd-deep), var(--hbd-ink));
  color: #fff !important;
  text-decoration: none !important;
}
.hbd-dest-card__media { position: absolute; inset: 0; }
.hbd-dest-card__media img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .35s ease; }
.hbd-dest-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,47,52,.05) 20%, rgba(8,47,52,.82) 100%); }
.hbd-dest-card__head:hover .hbd-dest-card__media img { transform: scale(1.04); }
.hbd-dest-card__title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 0 20px 16px;
}
.hbd-dest-card__title strong {
  overflow: hidden;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.hbd-dest-card__title small { color: var(--hbd-mint); font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.hbd-dest-card__cities {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  margin: 0;
  padding: 14px 16px 16px;
  list-style: none;
}
.hbd-dest-card__cities a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--hbd-soft-2);
  color: var(--hbd-deep) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.hbd-dest-card__cities a:hover { background: var(--hbd-soft); }
.hbd-dest-card__cities small { background: #fff; }
.hbd-dest-directory__more { margin-top: 26px; text-align: center; }
.hbd-dest-directory__more a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 22px;
  border: 1px solid var(--hbd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hbd-ink) !important;
  font-weight: 800;
  text-decoration: none !important;
}
.hbd-dest-directory__more a:hover { background: var(--hbd-soft); border-color: rgba(97,179,164,.45); }

/* In-article "continue planning" box */
.hbd-dest-box {
  margin: 40px 0;
  padding: 24px 26px;
  border: 1px solid rgba(97,179,164,.28);
  border-radius: var(--hbd-radius, 22px);
  background: var(--hbd-soft, #f2faf8);
}
.hbd-dest-box__title {
  margin: 4px 0 14px !important;
  color: var(--hbd-ink, #123f42);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}
.hbd-dest-box__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 26px;
}
.hbd-dest-box__label {
  display: block;
  margin-bottom: 6px;
  color: var(--hbd-teal, #61b3a4);
  font-size: 13px;
  font-weight: 800;
}
.hbd-dest-box ul,
.hbd-article__content .hbd-dest-box ul { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; list-style: none !important; }
.hbd-dest-box li { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; line-height: 1.5; }
.hbd-dest-box li::before { content: none !important; }
.hbd-dest-box li a { color: var(--hbd-deep, #0c6671) !important; font-weight: 700; }
.hbd-dest-box__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hbd-line, rgba(18,63,66,.11));
}
.hbd-dest-box__links a { color: var(--hbd-ink, #123f42) !important; font-weight: 800; }
.hbd-dest-box__all { color: var(--hbd-deep, #0c6671) !important; }

/* Category archive: destination filter */
.hbd-dest-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: -30px 0 40px;
}
.hbd-dest-filter__label { color: var(--hbd-muted); font-size: 14px; font-weight: 700; }
.hbd-dest-filter a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--hbd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hbd-ink) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.hbd-dest-filter a.is-active { border-color: var(--hbd-deep); background: var(--hbd-deep); color: #fff !important; }
.hbd-dest-filter a.is-active small { background: rgba(255,255,255,.18); color: #fff; }

/* Guides hub section */
.hbd-hub-destinations .hbd-dest-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

@media (max-width: 767px) {
  .hbd-dest-home { margin: 48px auto; }
  .hbd-dest-home__head { flex-direction: column; align-items: flex-start; }
  /* Homepage + guides hub: swipeable row instead of a long stack. */
  .hbd-dest-home .hbd-dest-grid,
  .hbd-dest-hm .hbd-dest-grid,
  .hbd-hub-destinations .hbd-dest-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  .hbd-dest-home .hbd-dest-grid::-webkit-scrollbar,
  .hbd-dest-hm .hbd-dest-grid::-webkit-scrollbar,
  .hbd-hub-destinations .hbd-dest-grid::-webkit-scrollbar { display: none; }
  .hbd-dest-home .hbd-dest-card,
  .hbd-dest-hm .hbd-dest-card,
  .hbd-hub-destinations .hbd-dest-card { scroll-snap-align: start; }
  .hbd-dest-box { padding: 20px 18px; }
  .hbd-dest-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: -20px 0 32px; padding-bottom: 4px; }
  .hbd-dest-filter a, .hbd-dest-filter__label { flex: 0 0 auto; }
}
