/**
 * HAIBO — Premium destination catalog cards
 * Dark cinematic cards with glass pills, price left, View Details right
 */

.destinations-catalog-grid,
#all-destinations.destinations-catalog-grid,
#home-destinations.destinations-catalog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
}

@media (min-width: 640px) {
  .destinations-catalog-grid,
  #all-destinations.destinations-catalog-grid,
  #home-destinations.destinations-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .destinations-catalog-grid,
  #all-destinations.destinations-catalog-grid,
  #home-destinations.destinations-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.destination-card.dest-card-catalog {
  position: relative;
  display: block;
  height: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--haibo-bg-secondary, #0d151a);
  border: 1px solid var(--haibo-border, rgba(255, 255, 255, 0.1));
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.36);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s ease,
    border-color 0.45s ease;
  -webkit-tap-highlight-color: transparent;
}

.destination-card.dest-card-catalog:focus-visible {
  outline: 2px solid rgba(245, 181, 27, 0.7);
  outline-offset: 3px;
}

.dest-card-catalog__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 18rem;
  overflow: hidden;
  background: #0a1014;
}

.dest-card-catalog__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.dest-card-catalog__media--empty {
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(245, 181, 27, 0.12), transparent 60%),
    linear-gradient(160deg, #152028, #080d11);
}

.dest-card-catalog__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.1) 35%,
    rgba(0, 0, 0, 0.65) 72%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

.dest-card-catalog__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  box-sizing: border-box;
}

.dest-card-catalog__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
}

.dest-card-catalog__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dest-card-catalog__pill svg {
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--haibo-gold, #f5b51b);
  stroke: currentColor;
  fill: none;
}

.dest-card-catalog__pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dest-card-catalog__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-top: auto;
  min-width: 0;
}

.dest-card-catalog__title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.dest-card-catalog__desc {
  margin: 0;
  max-width: 100%;
  font-size: clamp(0.84rem, 1.3vw, 0.98rem);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dest-card-catalog__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  min-width: 0;
}

.dest-card-catalog__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

.dest-card-catalog__price-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.dest-card-catalog__price-value {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--haibo-gold, #f5b51b);
}

.dest-card-catalog__price--empty .dest-card-catalog__price-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.dest-card-catalog__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
}

.dest-card-catalog__cta-arrow {
  display: inline-block;
  transition: transform 0.28s ease;
}

@media (min-width: 1024px) {
  .dest-card-catalog__media {
    min-height: 20rem;
  }

  .destination-card.dest-card-catalog:hover {
    transform: translateY(-3px);
    border-color: var(--haibo-border-hover, rgba(255, 255, 255, 0.16));
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.42),
      0 0 0 1px var(--haibo-gold-glow, rgba(245, 181, 27, 0.16));
  }

  .destination-card.dest-card-catalog:hover .dest-card-catalog__img {
    transform: scale(1.03);
  }

  .destination-card.dest-card-catalog:hover .dest-card-catalog__cta {
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
  }

  .destination-card.dest-card-catalog:hover .dest-card-catalog__cta-arrow {
    transform: translateX(4px);
  }
}

@media (max-width: 639px) {
  .dest-card-catalog__media {
    aspect-ratio: 5 / 4;
    min-height: 17.5rem;
  }

  .dest-card-catalog__pill {
    font-size: 0.74rem;
    min-height: 1.85rem;
    padding: 0.3rem 0.65rem;
  }

  .dest-card-catalog__title {
    font-size: clamp(1.3rem, 6vw, 1.55rem);
  }

  .dest-card-catalog__desc {
    font-size: 0.88rem;
  }

  .dest-card-catalog__bottom {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .dest-card-catalog__cta {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .destination-card.dest-card-catalog,
  .dest-card-catalog__img,
  .dest-card-catalog__cta,
  .dest-card-catalog__cta-arrow {
    transition: none;
  }

  .destination-card.dest-card-catalog:hover {
    transform: none;
  }

  .destination-card.dest-card-catalog:hover .dest-card-catalog__img {
    transform: none;
  }
}
