/* ==========================================================================
   Catalogue layer — tour destination grids and the visa country directory.
   Loaded after the design system but BEFORE responsive.css, which must stay
   last so its breakpoint fixes keep winning the cascade.
   ========================================================================== */

/* Hero call-to-action row (the base .page-hero had no actions row). */
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

/* Light-background variant of the dark .feature tile. */
.feature--light {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(11, 37, 69, .06);
}
.feature--light:hover {
  background: #fff;
  border-color: rgba(240, 165, 0, .55);
  box-shadow: 0 18px 46px rgba(11, 37, 69, .12);
}
.feature--light h3 { color: var(--heading); margin-bottom: .55rem; }
.feature--light p { color: var(--body); font-size: var(--fs-body); line-height: 1.7; margin: 0; }
.feature--light a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.feature--light a:hover { color: var(--gold-600); }

/* ------------------------------------------------- search + count row --- */
.dest-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dest-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1 1 280px;
  max-width: 420px;
  padding: .7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.dest-search:focus-within {
  border-color: var(--navy-400);
  box-shadow: 0 0 0 4px rgba(47, 95, 168, .12);
}
.dest-search svg { flex-shrink: 0; }
.dest-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 1rem; /* >=16px so iOS does not zoom on focus */
  color: var(--heading);
}
.dest-count { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.dest-count strong { color: var(--navy); font-size: 1.05rem; font-weight: 800; }

.dest-empty {
  margin: 1.5rem 0 0;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}
.dest-empty a { color: var(--navy); font-weight: 700; text-decoration: underline; }

/* ----------------------------------------------------- destination grid --- */
.dest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.dest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.4rem 1.3rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.dest-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.dest-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240, 165, 0, .5);
  box-shadow: 0 20px 46px rgba(11, 37, 69, .13);
}
.dest-card:hover::before { transform: scaleX(1); }
.dest-card__no {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--faint);
}
.dest-card__name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--heading);
}
.dest-card__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .65rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
}
.dest-card__cta svg { transition: transform .3s var(--ease); }
.dest-card:hover .dest-card__cta { color: var(--gold-600); }
.dest-card:hover .dest-card__cta svg { transform: translateX(4px); }

/* ---------------------------------------------------- country directory --- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.country-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem .95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--heading);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), color .25s var(--ease);
}
.country-item a svg { opacity: 0; flex-shrink: 0; transition: opacity .25s var(--ease); }
.country-item a:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}
.country-item a:hover svg { opacity: 1; }

/* The directory sits on .section--alt, so lift the cards off that tint. */
.section--alt .dest-card,
.section--alt .country-item a,
.section--alt .dest-search { background: #fff; }

/* ------------------------------------------------------------ form note --- */
.form-note {
  margin: .9rem 0 0;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------- breakpoints --- */
@media (max-width: 900px) {
  .dest-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
}

@media (max-width: 600px) {
  .dest-tools { flex-direction: column; align-items: stretch; }
  .dest-search { max-width: none; }
  .dest-count { text-align: right; }
  .dest-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .dest-card { padding: 1.05rem .95rem; border-radius: var(--radius); }
  .dest-card__name { font-size: 1.05rem; }
  .dest-card__cta { font-size: .78rem; }
  .country-grid { grid-template-columns: 1fr 1fr; }
  .country-item a { font-size: .85rem; padding: .6rem .7rem; }
  .page-hero__actions { gap: .6rem; }
  .page-hero__actions .btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .dest-grid, .country-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dest-card, .dest-card::before, .country-item a, .dest-card__cta svg { transition: none; }
}
