/* ─── Bestemming Grid ──────────────────────────────────────────────────────────
   3-column responsive grid of destination photo cards.
   Shortcode: [bestemming_grid]
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Grid ────────────────────────────────────────────────────────────────── */

.bdg-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.bdg-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    aspect-ratio: 430 / 564;
}

.bdg-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bdg-card__img-placeholder {
    position: absolute;
    inset: 0;
    background: #c8bfb3;
}

/* Default: flat dark tint */
.bdg-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
}

/* Hover: green-tinted gradient — cross-fades with the flat overlay */
.bdg-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(121, 168, 112, 0.5) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.bdg-card:hover .bdg-card__overlay {
    opacity: 0;
}

.bdg-card:hover .bdg-card__gradient {
    opacity: 1;
}

/* Destination name */
.bdg-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    font-weight: 400;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Skeleton placeholder cards ──────────────────────────────────────────── */

.bdg-card--skeleton {
    background: #c8bfb3;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.bdg-card--skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: bdg-shimmer 1.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes bdg-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.bdg-skel-title {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    height: 26px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    z-index: 0;
}

/* ── IntersectionObserver sentinel (sits below the grid) ─────────────────── */

.bdg-sentinel {
    grid-column: 1 / -1;
    height: 1px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .bdg-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bdg-track {
        grid-template-columns: 1fr;
    }

    .bdg-card__title {
        font-size: 24px;
    }
}
