/**
 * Destinations block — pastel card carousel rendered by DestinationsBlockCell.
 *
 * Cards are styled like the "For Couples / For Families / First Time in
 * Singapore?" promo blocks: pastel-tinted background per card, rounded
 * image area, and a bottom row with the destination name on the left and
 * a filled "Explore" pill on the right.
 *
 * Colours rotate via :nth-child so a list of any length still varies.
 * Theme values are exposed as CSS custom properties so the rotation logic
 * only sets two variables per card.
 */

.th2-destinations-block.th2-section { padding: 56px 0 24px; }

.th2-destinations-block .th2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.th2-destinations-block .th2-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
}
.th2-destinations-block .th2-section-link {
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.th2-destinations-block .th2-section-link:hover { color: #15803d; }

.th2-destinations-block .th2-carousel { position: relative; }

.th2-destinations-block .th2-carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.th2-destinations-block .th2-carousel-track.is-slide {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.th2-destinations-block .th2-carousel-track.is-slide::-webkit-scrollbar { display: none; }
.th2-destinations-block .th2-carousel-track.is-slide > * {
    flex: 0 0 calc((100% - 22px * 2) / 3);
    scroll-snap-align: start;
}

.th2-destinations-block .th2-carousel-nav {
    position: absolute;
    top: 35%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1a202c;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background .15s ease, transform .15s ease;
}
.th2-destinations-block .th2-carousel-nav:hover { background: #f1f5f9; transform: scale(1.05); }
.th2-destinations-block .th2-carousel-nav[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.th2-destinations-block .th2-carousel-nav-prev { left: -20px; }
.th2-destinations-block .th2-carousel-nav-next { right: -20px; }

/* --- Card ------------------------------------------------------------ */

.th2-destinations-block .th2-dest-card {
    --dest-bg: #fef2f2;
    --dest-accent: #ec4899;
    --dest-accent-hover: #db2777;

    display: flex;
    flex-direction: column;
    background: var(--dest-bg);
    border-radius: 18px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.th2-destinations-block .th2-dest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    color: inherit;
}

/* Rotating theme: pink -> green -> blue -> purple -> orange */
.th2-destinations-block .th2-dest-card:nth-child(5n+1) {
    --dest-bg: #fef2f2;
    --dest-accent: #ec4899;
    --dest-accent-hover: #db2777;
}
.th2-destinations-block .th2-dest-card:nth-child(5n+2) {
    --dest-bg: #f0fdf4;
    --dest-accent: #16a34a;
    --dest-accent-hover: #15803d;
}
.th2-destinations-block .th2-dest-card:nth-child(5n+3) {
    --dest-bg: #eff6ff;
    --dest-accent: #2563eb;
    --dest-accent-hover: #1d4ed8;
}
.th2-destinations-block .th2-dest-card:nth-child(5n+4) {
    --dest-bg: #faf5ff;
    --dest-accent: #9333ea;
    --dest-accent-hover: #7e22ce;
}
.th2-destinations-block .th2-dest-card:nth-child(5n+5) {
    --dest-bg: #fff7ed;
    --dest-accent: #ea580c;
    --dest-accent-hover: #c2410c;
}

/* --- Image ----------------------------------------------------------- */

.th2-destinations-block .th2-dest-img {
    position: relative;
    border-radius: 12px;
    background: #e5e7eb center/cover no-repeat;
    padding-top: 60%;
    margin-bottom: 16px;
}
.th2-destinations-block .th2-dest-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

/* --- Bottom row: name + Explore (inline) ----------------------------- */

.th2-destinations-block .th2-dest-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.th2-destinations-block .th2-dest-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dest-accent);
    line-height: 1.2;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.th2-destinations-block .th2-dest-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dest-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s ease;
    white-space: nowrap;
}
.th2-destinations-block .th2-dest-card:hover .th2-dest-btn {
    background: var(--dest-accent-hover);
}

/* --- Description (optional, shown below the inline row) -------------- */

.th2-destinations-block .th2-dest-desc {
    margin: 10px 0 0;
    color: #4b5563;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Responsive ------------------------------------------------------ */

@media (max-width: 1199.98px) {
    .th2-destinations-block .th2-carousel-track { grid-template-columns: repeat(3, 1fr); }
    .th2-destinations-block .th2-carousel-track.is-slide > * { flex: 0 0 calc((100% - 22px * 2) / 3); }
}
@media (max-width: 991.98px) {
    .th2-destinations-block .th2-carousel-track { grid-template-columns: repeat(2, 1fr); }
    .th2-destinations-block .th2-carousel-track > :nth-child(n+3) { display: none; }
    .th2-destinations-block .th2-carousel-track.is-slide > * { flex: 0 0 calc((100% - 22px) / 2); }
    .th2-destinations-block .th2-carousel-track.is-slide > :nth-child(n+3) { display: flex; }
    .th2-destinations-block .th2-carousel-nav-prev { left: 6px; }
    .th2-destinations-block .th2-carousel-nav-next { right: 6px; }
}
@media (max-width: 575.98px) {
    .th2-destinations-block .th2-carousel-track { grid-template-columns: 1fr; }
    .th2-destinations-block .th2-carousel-track > :nth-child(n+2) { display: none; }
    .th2-destinations-block .th2-carousel-track.is-slide > * { flex: 0 0 85%; }
    .th2-destinations-block .th2-carousel-track.is-slide > :nth-child(n+2) { display: flex; }
}
