/* Study destinations: align cards, hero and filters with ANB design system and home page standards */

/* Responsive container safe-margin system */
.dest-container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 640px) {
  .dest-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
@media (min-width: 1024px) {
  .dest-container {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* Editorial styles borrowed from home page (index.html) */
.anb-kicker { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.anb-grid-fade { background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 48px 48px; }
.anb-card-lift { transition: border-color .3s ease, transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s cubic-bezier(.16,1,.3,1); }
.anb-card-lift:hover { border-color: rgba(13,125,150,.55); }

/* Background & color tokens matching index.html */
.bg-ink-dark { background-color: #040d15; }
.text-white { color: #fff; }
.text-white\/75 { color: rgba(255,255,255,.75); }
.text-white\/80 { color: rgba(255,255,255,.80); }
.text-\[\#42d2e7\] { color: #42d2e7; }
.text-\[\#8ce5f2\] { color: #8ce5f2; }
.bg-\[\#42d2e7\] { background-color: #42d2e7; }
.bg-white\/5 { background-color: rgba(255,255,255,.05); }
.border-white\/10 { border-color: rgba(255,255,255,.10); }
.border-white\/20 { border-color: rgba(255,255,255,.20); }
.border-white\/25 { border-color: rgba(255,255,255,.25); }
.border-white\/30 { border-color: rgba(255,255,255,.30); }

/* Hero section tokens */
.dest-hero {
  position: relative;
  background-color: #040d15;
  padding-top: 9rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 640px) {
  .dest-hero {
    padding-top: 9.75rem;
    padding-bottom: 4rem;
  }
}
@media (min-width: 1024px) {
  .dest-hero {
    padding-top: 10.5rem;
    padding-bottom: 5rem;
  }
}
.dest-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4,13,21,.95) 0%, rgba(4,13,21,.82) 48%, rgba(4,13,21,.40) 100%);
}
@media (max-width: 767px) {
  .dest-hero-overlay {
    background: linear-gradient(180deg, rgba(4,13,21,.88) 0%, rgba(4,13,21,.96) 100%);
  }
}
.dest-hero-vignette {
  background: linear-gradient(to top, #040d15, transparent);
}
.dest-hero-title {
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  word-break: break-word;
  overflow-wrap: break-word;
}
.dest-hero-desc {
  font-family: Inter, sans-serif;
  color: rgba(255, 255, 255, .82);
  line-height: 1.6;
}

/* Catalog hierarchy */
.destinations-catalog {
  scroll-margin-top: 5rem;
}
.dest-section-intro {
  max-width: 46rem;
  margin-bottom: 2rem;
}
.dest-catalog-title {
  letter-spacing: -.02em;
  line-height: 1.18;
}
.dest-catalog-desc {
  line-height: 1.65;
}

/* Filter panel */
.dest-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid #d8e4e8 !important;
  background: linear-gradient(180deg, #fff 0%, #f8fbfc 100%);
  box-shadow: 0 18px 48px rgba(7, 58, 72, .08) !important;
  padding: 1.25rem;
}
@media (min-width: 768px) {
  .dest-filter-panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
  }
}
.dest-filter-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #0d7d96;
}

/* Filter search bar */
.dest-search-wrap {
  position: relative;
  width: 100%;
}
@media (min-width: 768px) {
  .dest-search-wrap {
    width: 20rem;
    flex-shrink: 0;
  }
}
.dest-filter-panel .dest-search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}
.dest-filter-panel input#dest-search {
  width: 100%;
  min-height: 48px;
  padding-left: 2.75rem !important;
  padding-right: 1.25rem;
  border-radius: 12px !important;
  border: 1px solid #c7d8de !important;
  background: #ffffff;
  font-size: 0.875rem;
  color: #191c1e;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dest-filter-panel input#dest-search:focus {
  border-color: #0d7d96 !important;
  box-shadow: 0 0 0 3px rgba(13, 125, 150, 0.14) !important;
}
.dest-filter-panel input#dest-search::placeholder {
  color: #64748b;
  opacity: 1;
}

.dest-filter-panel [role="group"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dest-filter-panel .region-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #c7d8de;
  border-radius: 999px !important;
  padding: .45rem 1rem;
  background: #fff;
  color: #38515b;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: all .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.dest-filter-panel .region-btn:hover,
.dest-filter-panel .region-btn.active {
  border-color: #0d7d96;
  background: #0d7d96;
  color: #fff;
  box-shadow: 0 5px 14px rgba(13, 125, 150, .16);
}
.dest-filter-panel .region-btn:focus-visible,
.dest-card:focus-visible,
.dest-banner a:focus-visible {
  outline: 3px solid rgba(13, 125, 150, .28);
  outline-offset: 3px;
}
.dest-filter-panel .region-btn:focus-visible,
.dest-filter-panel input#dest-search:focus-visible,
.dest-banner a:focus-visible {
  outline: 3px solid #42d2e7;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .dest-filter-panel { border-radius: 14px !important; }
  .dest-filter-panel [role="group"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    width: 100%;
  }
  .dest-filter-panel .region-btn {
    width: 100%;
    min-height: 40px;
    padding: .4rem .5rem;
    font-size: .7rem;
    text-align: center;
    white-space: normal;
  }
}

/* Destination Cards Grid */
#dest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  #dest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  #dest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Destination Cards */
#dest-grid .dest-card {
  min-width: 0;
  border-radius: 18px !important;
  border-color: #d8e4e8;
  box-shadow: 0 10px 32px rgba(7, 24, 39, .035);
  background-color: #ffffff;
}
#dest-grid .dest-card[hidden] {
  display: none !important;
}
#dest-grid .dest-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 125, 150, .55);
  box-shadow: 0 18px 46px rgba(7, 24, 39, .08);
}

/* Card media container */
.dest-card-media {
  position: relative;
  width: 100%;
  height: 12.5rem;
  overflow: hidden;
  background-color: #040d15;
}
.dest-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}
.dest-card:hover .dest-card-media img {
  transform: scale(1.04);
}

/* Card country badge */
.dest-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(4, 13, 21, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(4, 13, 21, 0.35);
  pointer-events: none;
}
.dest-card-badge svg {
  display: inline-block;
  vertical-align: middle;
}

#dest-grid .dest-card h3 { line-height: 1.35; }
#dest-grid .dest-card p {
  line-height: 1.55;
}
#dest-grid .dest-card span[data-i18n="dest.link_explore"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .65rem .85rem;
  border: 1px solid rgba(13, 125, 150, .32);
  border-radius: 9px;
  color: #0d7d96;
  background: #fff;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: all .2s ease;
}
#dest-grid .dest-card:hover span[data-i18n="dest.link_explore"] {
  background: #0d7d96;
  color: #fff;
  border-color: #0d7d96;
}

@media (min-width: 1024px) {
  #dest-grid .dest-card > div:last-child { padding: 1.25rem; }
  #dest-grid .dest-card h3 { font-size: 1rem; }
  #dest-grid .dest-card p { font-size: .78rem; }
  #dest-grid .dest-card > div:last-child > div:last-child { display: grid; grid-template-columns: 1fr; gap: .75rem; }
  #dest-grid .dest-card span[data-i18n="dest.link_explore"] { width: 100%; }
}
@media (max-width: 767px) {
  #dest-grid .dest-card > div:last-child > div:last-child { display: grid; grid-template-columns: 1fr; gap: .625rem; }
  #dest-grid .dest-card span[data-i18n="dest.link_explore"] { width: 100%; }
}

/* Empty state */
.dest-empty-state {
  display: block;
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: #ffffff;
  border-radius: 18px;
  border: 1px dashed #c7d8de;
}
.dest-empty-state.is-visible {
  display: block;
}
.dest-empty-state[hidden] {
  display: none !important;
}

/* Bottom banner */
.dest-banner {
  position: relative;
  overflow: hidden;
  background-color: #040d15;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 48px rgba(4, 13, 21, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
@media (min-width: 640px) {
  .dest-banner {
    border-radius: 1.5rem;
    padding: 2.75rem 2.25rem;
  }
}
@media (min-width: 1024px) {
  .dest-banner {
    flex-direction: row;
    padding: 3.25rem 3.5rem;
    gap: 3rem;
  }
}
.dest-banner-content {
  position: relative;
  z-index: 10;
  max-width: 40rem;
}
.dest-banner-actions {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .dest-banner-actions {
    flex-direction: row;
    width: auto;
  }
}
.dest-banner-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background-color: #0d7d96;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color .2s ease;
  box-shadow: 0 4px 14px rgba(13, 125, 150, 0.35);
  text-decoration: none;
}
.dest-banner-btn-primary:hover {
  background-color: #0a687e;
}
.dest-banner-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all .2s ease;
  text-decoration: none;
}
.dest-banner-btn-secondary:hover {
  background-color: #ffffff;
  color: #040d15;
}

@media (max-width: 639px) {
  .dest-hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  .dest-card-media {
    height: 11.5rem;
  }
  .dest-banner-actions a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .destinations-page *,
  .destinations-catalog * {
    scroll-behavior: auto !important;
  }
  #dest-grid .dest-card,
  #dest-grid .dest-card img,
  .dest-filter-panel .region-btn,
  .anb-card-lift,
  .dest-banner a,
  .dest-filter-panel input#dest-search {
    transition: none !important;
  }
  #dest-grid .dest-card:hover { transform: none; }
  #dest-grid .dest-card:hover img { transform: none; }
}
