/* Destinations index (/destinations). Theme tokens only; terraapath.css untouched. */

/* Region jump links under the page header */
.dg-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.dg-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease;
}

.dg-jump a:hover {
  border-color: var(--blue);
  background: var(--accent-soft);
}

.dg-jump a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.dg-jump span {
  color: var(--muted);
  font-weight: var(--fw-medium);
}

/* Region sections */
.dg-section {
  scroll-margin-top: 96px;
}

.page-block.dg-section + .page-block.dg-section {
  padding-top: 16px;
}

.dg-head {
  margin-bottom: 20px;
}

.dg-head h2 {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  color: var(--blue);
  line-height: var(--lh-heading);
}

.dg-head p {
  margin: 4px 0 0;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* Grid: 1 column on phones, 2 on tablets, 3 on desktop */
.dg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

/* Card */
.dg-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease;
}

a.dg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

a.dg-card:active {
  transform: translateY(-1px);
}

a.dg-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.dg-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--card-placeholder);
}

/* Absolutely placed so a photo's own size never decides the card height. */
.dg-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

a.dg-card:hover .dg-media img {
  transform: scale(1.04);
}

.dg-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px 20px;
}

.dg-name {
  margin: 0;
  font-size: var(--fs-card);
  font-weight: var(--fw-semibold);
  color: var(--blue);
  line-height: var(--lh-heading);
}

.dg-tag {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--muted);
}

.dg-summary {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  font-size: var(--fs-info);
  color: var(--muted);
  line-height: var(--lh-relaxed);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: auto 0 0;
  padding-top: 16px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.dg-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.dg-go svg {
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

a.dg-card:hover .dg-go svg {
  transform: translateX(3px);
}

@media (min-width: 640px) {
  .dg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .dg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dg-card,
  .dg-media img,
  .dg-go svg,
  .dg-jump a {
    transition: none;
  }

  a.dg-card:hover,
  a.dg-card:active,
  a.dg-card:hover .dg-media img,
  a.dg-card:hover .dg-go svg {
    transform: none;
  }
}
