/* Destination catalog cards — photo-forward cards for cities, neighborhoods,
   hotels, and places. Shared by the trip dashboard and the public Discover
   page. Component code lives in components/destinations/. */

.dest-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--light-grey);
    overflow: hidden;
    min-width: 0;
    text-decoration: none;
    /* Anchor text color to the theme, not the surrounding surface — these
       cards sit on dark marketing blades as well as app pages. */
    color: var(--black);
}

a.dest-card,
.dest-card.dest-clickable {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

a.dest-card:hover,
.dest-card.dest-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.45);
}

.dest-card.dest-selected {
    border-color: var(--green);
    box-shadow: 0 0 0 1.5px var(--green);
}

/* -- Photo ---------------------------------------------------------------- */

.dest-photo {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: color-mix(in srgb, var(--black) 8%, var(--white));
}

.dest-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.dest-card:hover .dest-photo img {
    transform: scale(1.045);
}

.dest-photo-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.66) 100%);
    pointer-events: none;
}

.dest-photo-title {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 11px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.dest-photo-topleft,
.dest-photo-topright {
    position: absolute;
    top: 10px;
    display: flex;
    gap: 6px;
}

.dest-photo-topleft { left: 10px; }
.dest-photo-topright { right: 10px; }

/* Frosted chip used over photos (star ratings, price anchors) */
.dest-glass {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-lg);
    background: rgba(12, 13, 16, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
}

.dest-credit {
    position: absolute;
    right: 9px;
    bottom: 5px;
    font-size: 9px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    pointer-events: auto;
}

.dest-credit:hover { color: rgba(255, 255, 255, 0.95); }

/* -- Text helpers ---------------------------------------------------------- */

.dest-clamp-1,
.dest-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dest-clamp-1 { -webkit-line-clamp: 1; }
.dest-clamp-2 { -webkit-line-clamp: 2; }

/* -- Layouts ---------------------------------------------------------------- */

.dest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

.dest-grid-lg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 18px;
    gap: 18px;
}

/* Horizontal scroll rail for in-dashboard recommendation strips */
.dest-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 240px;
    grid-gap: 14px;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.dest-rail > * { scroll-snap-align: start; }

/* -- Skeletons -------------------------------------------------------------- */

.dest-skeleton-block {
    border-radius: var(--radius-sm);
    background-color: color-mix(in srgb, var(--black) 7%, var(--white));
}

