/*
 * ═══════════════════════════════════════════════════════════════════════════════
 * Lavisa Destinations Theme — ENHANCED HOME SECTIONS (E9)
 * ═══════════════════════════════════════════════════════════════════════════════
 *
 * @file        assets/css/ldt-enhanced-sections-home.css
 * @package     Lavisa_Destinations_Theme
 * @since       2.9.10  (E9 — Visual Enhancement Roadmap v2)
 * @depends     ldt-tokens-enhanced.css      (E1 — gradients, shadows, glass tokens)
 *              ldt-enhanced-base.css        (E2 — section-title gradient, eyebrow,
 *                                                 bg-shapes wrapper)
 *              ldt-enhanced-animations.css  (E3 — keyframes, hover-lift, hover-zoom,
 *                                                 glass utility classes)
 *
 *   Polishes the three "showcase" sections on the homepage:
 *
 *     section-featured.php       Featured destinations carousel (large cards)
 *     section-popular.php        Popular destinations grid (medium cards)
 *     section-region-browser.php Drill-down explore-by-region (continents → countries → cities)
 *
 *   PURE CSS LAYER — no PHP partial is touched. Hooks the existing class
 *   names emitted by these section files. Same approach as E4-E8.
 *
 *   SHARED SECTION HEADER:
 *     The `.ldt-section__title` and `.ldt-section__subtitle` classes are used
 *     by featured / popular / explore-types and many other sections. We add
 *     a global gradient-text + decoration treatment here so every section
 *     header reads consistently. (The full `.ldt-section-header` primitive
 *     from E2 is still available as an opt-in alternative.)
 *
 *   SPECIFICITY:
 *     Existing inline styles use plain class selectors (0,1,0). Our `body
 *     .selector` rules at 0,1,1 win cleanly. For multi-class selectors
 *     (e.g., .ldt-popular-card__featured-badge at 0,2,0), we land at 0,2,1.
 *
 * ═══════════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════════
 * 1. SHARED SECTION HEADER POLISH (.ldt-section__title / .ldt-section__subtitle)
 *
 * Used by featured / popular / explore-types and many other sections. The
 * existing inline CSS sets a flat color title. We layer the 3-stop gradient
 * fill (--ldt-gradient-text from E1) so every section reads with portal
 * polish. Keeps the existing fluid clamp() sizes from inline rules.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-section__title {
    background: var(--ldt-gradient-text,
                linear-gradient(135deg, #003580 0%, #0057b8 50%, #ff8c00 100%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--ldt-primary, #003580);  /* fallback */
    letter-spacing: -0.01em;
}

body .ldt-section__subtitle {
    color: var(--ldt-gray-600, #64748b);
    line-height: 1.6;
}

/* On `.ldt-section--alt` (Popular's lighter grey background), keep contrast
   identical — the gradient still reads against a soft off-white surface. */
body .ldt-section--alt .ldt-section__title,
body .ldt-section.ldt-section--alt .ldt-section__title {
    /* No change — gradient fills with brand colors that contrast against
       the grey background just as well as white. */
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 2. SECTION ALT BACKGROUND (Popular's softer surface)
 *
 * Existing rule applies a light grey background. We swap to the page-bg
 * gradient for a more polished feel + add subtle blob accents via pseudos.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-section--alt {
    background: var(--ldt-gradient-page-bg,
                linear-gradient(180deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%)) !important;
    position: relative;
    overflow: hidden;
}

/* Subtle accent blob top-right on alt sections — adds depth */
body .ldt-section--alt::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 140, 0, 0.06) 0%,
        rgba(255, 140, 0, 0) 70%
    );
    pointer-events: none;
    z-index: 0;
}

[dir="rtl"] body .ldt-section--alt::before,
.ldt-rtl body .ldt-section--alt::before {
    right: auto;
    left: -150px;
}

@media (max-width: 768px) {
    body .ldt-section--alt::before {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 3. FEATURED DESTINATIONS CAROUSEL
 *
 * Existing: large image cards in a track-based carousel with arrows + dots.
 * We polish: card hover-lift, image hover-zoom, badge polish, gradient
 * overlay, accent-gradient CTA chip, glass-dark arrows.
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Card surface — rounded corners, polish at-rest shadow */
body .ldt-featured-card {
    border-radius: var(--ldt-radius-card, 1.25rem);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 53, 128, 0.10);
    transition:
        transform 350ms var(--ldt-ease-portal, ease),
        box-shadow 350ms var(--ldt-ease-portal, ease);
    position: relative;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-featured-card:hover {
        transform: translateY(-8px);
        box-shadow:
            0 25px 50px -10px rgba(0, 53, 128, 0.25),
            0 0 0 1px rgba(255, 140, 0, 0.06);
    }
}

/* Card image — hover zoom (image scales while parent stays anchored) */
body .ldt-featured-card__img {
    transition: transform 700ms var(--ldt-ease-portal, ease);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-featured-card:hover .ldt-featured-card__img {
        transform: scale(1.08);
    }
}

/* Card overlay — gradient that sits at bottom for text contrast */
body .ldt-featured-card__overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.10) 40%,
        rgba(0, 30, 80, 0.85) 100%
    );
    transition: background 350ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-featured-card:hover .ldt-featured-card__overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.15) 35%,
            rgba(0, 53, 128, 0.92) 100%
        );
    }
}

/* Type badge — preserves PHP-injected dynamic background-color, adds polish */
body .ldt-featured-card__badge {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.20);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Destination name — chiseled text shadow */
body .ldt-featured-card__name {
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.45),
        0 4px 16px rgba(0, 20, 60, 0.40);
    letter-spacing: -0.01em;
}

/* Tags inside card — glass-light pills */
body .ldt-featured-card__tag {
    background: rgba(255, 255, 255, 0.18) !important;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
}

/* CTA pill at bottom — accent gradient that brightens on parent hover */
body .ldt-featured-card__cta {
    background: var(--ldt-gradient-accent,
                linear-gradient(135deg, #ff8c00 0%, #e07a00 100%));
    box-shadow: var(--ldt-shadow-accent-soft,
                0 4px 15px rgba(255, 140, 0, 0.20));
    color: #ffffff !important;
    font-weight: 700;
    transition:
        background 250ms var(--ldt-ease-portal, ease),
        box-shadow 250ms var(--ldt-ease-portal, ease),
        transform 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-featured-card:hover .ldt-featured-card__cta {
        background: linear-gradient(135deg, #ffa133 0%, #ff8c00 100%);
        box-shadow: 0 8px 24px rgba(255, 140, 0, 0.40);
        transform: translateX(2px);
    }
}

[dir="rtl"] body .ldt-featured-card:hover .ldt-featured-card__cta,
.ldt-rtl body .ldt-featured-card:hover .ldt-featured-card__cta {
    transform: translateX(-2px);
}

/* Carousel arrows — glass-dark circles (matches E6 hero arrows) */
body .ldt-featured-carousel__arrow {
    background: var(--ldt-glass-dark, rgba(15, 23, 42, 0.55)) !important;
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20);
    transition:
        background 250ms var(--ldt-ease-portal, ease),
        border-color 250ms var(--ldt-ease-portal, ease),
        transform 250ms var(--ldt-ease-portal, ease),
        box-shadow 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-featured-carousel__arrow:hover {
        background: var(--ldt-gradient-accent,
                    linear-gradient(135deg, #ff8c00, #e07a00)) !important;
        border-color: transparent !important;
        box-shadow: 0 8px 22px rgba(255, 140, 0, 0.45);
        transform: scale(1.05) translateY(-50%);
    }
}

/* Carousel dots — gradient on active */
body .ldt-featured-carousel__dot {
    transition:
        background 250ms var(--ldt-ease-portal, ease),
        width 350ms var(--ldt-ease-portal, ease);
}

body .ldt-featured-carousel__dot--active {
    background: var(--ldt-gradient-accent,
                linear-gradient(90deg, #ff8c00, #e07a00)) !important;
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.50);
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 4. POPULAR DESTINATIONS GRID
 *
 * Existing: responsive grid of cards with image + body. Polish: card hover-lift,
 * image hover-zoom, featured-badge accent gradient, type-badge polish, accent
 * popularity counter, accent-arrow nudge on explore link.
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Card surface */
body .ldt-popular-card {
    border-radius: var(--ldt-radius-card, 1.25rem);
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 53, 128, 0.08);
    transition:
        transform 350ms var(--ldt-ease-portal, ease),
        box-shadow 350ms var(--ldt-ease-portal, ease);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card:hover {
        transform: translateY(-8px);
        box-shadow:
            0 22px 44px -10px rgba(0, 53, 128, 0.22),
            0 0 0 1px rgba(255, 140, 0, 0.08);
    }
}

/* Image wrap — overflow hidden so zoom clips cleanly */
body .ldt-popular-card__image-wrap {
    overflow: hidden;
    position: relative;
}

body .ldt-popular-card__img {
    transition: transform 600ms var(--ldt-ease-portal, ease);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card:hover .ldt-popular-card__img {
        transform: scale(1.08);
    }
}

/* Featured badge — accent gradient pill with continuous glow pulse */
body .ldt-popular-card__featured-badge {
    background: var(--ldt-gradient-accent,
                linear-gradient(135deg, #ff8c00 0%, #e07a00 100%)) !important;
    box-shadow: var(--ldt-shadow-offer,
                0 4px 15px rgba(255, 140, 0, 0.40));
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.20);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    animation: ldt-badge-pulse 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    body .ldt-popular-card__featured-badge {
        animation: none;
    }
}

/* Type badge — preserves PHP-injected color, adds polish */
body .ldt-popular-card__type-badge {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Body content */
body .ldt-popular-card__body {
    transition: transform 350ms var(--ldt-ease-portal, ease);
}

/* Name — typography polish + accent icon */
body .ldt-popular-card__name {
    color: var(--ldt-dark, #1e293b);
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card:hover .ldt-popular-card__name {
        color: var(--ldt-primary, #003580);
    }
}

body .ldt-popular-card__icon {
    color: var(--ldt-accent, #ff8c00);
    transition: transform 350ms var(--ldt-ease-portal, ease);
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card:hover .ldt-popular-card__icon {
        transform: scale(1.15);
    }
}

/* Tags row — glass-light micro pills */
body .ldt-popular-card__tag {
    background: rgba(0, 53, 128, 0.06) !important;
    border: 1px solid rgba(0, 53, 128, 0.10) !important;
    color: var(--ldt-primary, #003580);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--ldt-radius-pill, 9999px);
    padding: 3px 10px !important;
    transition:
        background-color 250ms var(--ldt-ease-portal, ease),
        color 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card .ldt-popular-card__tag:hover {
        background: rgba(255, 140, 0, 0.12) !important;
        color: var(--ldt-accent, #ff8c00);
    }
}

/* Meta row — popularity + explore */
body .ldt-popular-card__popularity {
    color: var(--ldt-accent, #ff8c00);
    font-weight: 700;
    font-size: 12px;
}

/* Explore link — accent arrow that nudges on hover */
body .ldt-popular-card__explore {
    color: var(--ldt-primary, #003580);
    font-weight: 700;
    font-size: 13px;
    transition:
        color 250ms var(--ldt-ease-portal, ease),
        transform 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-popular-card:hover .ldt-popular-card__explore {
        color: var(--ldt-accent, #ff8c00);
        transform: translateX(3px);
    }
}

[dir="rtl"] body .ldt-popular-card:hover .ldt-popular-card__explore,
.ldt-rtl body .ldt-popular-card:hover .ldt-popular-card__explore {
    transform: translateX(-3px);
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 5. REGION BROWSER (continents → countries → cities drill-down)
 *
 * Existing: tile grid that swaps content via JS as the user drills in.
 * Polish: title gradient, glass-pill crumbs, glass-light continent tiles
 * with floating emoji glyph + accent-on-hover arrow nudge, gradient hover bg.
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Section title — same gradient text treatment as other section headers */
body .ldt-rb__title {
    background: var(--ldt-gradient-text,
                linear-gradient(135deg, #003580 0%, #0057b8 50%, #ff8c00 100%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--ldt-primary, #003580);  /* fallback */
    letter-spacing: -0.01em;
}

body .ldt-rb__subtitle {
    color: var(--ldt-gray-600, #64748b);
}

/* Crumbs row — glass-light pill row */
body .ldt-rb__crumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 6px 14px;
    background: rgba(0, 53, 128, 0.06);
    border: 1px solid rgba(0, 53, 128, 0.10);
    border-radius: var(--ldt-radius-pill, 9999px);
    font-size: 13px;
    list-style: none;
    margin: 0 auto 24px;
    gap: 6px;
}

body .ldt-rb__crumb {
    background: transparent;
    border: none;
    color: var(--ldt-primary-light, #0057b8);
    cursor: pointer;
    font-weight: 600;
    padding: 0 4px;
    transition: color 200ms var(--ldt-ease-portal, ease);
}

body .ldt-rb__crumb:hover {
    color: var(--ldt-accent, #ff8c00);
}

body .ldt-rb__crumb-sep {
    color: var(--ldt-gray-400, #94a3b8);
    margin: 0 2px;
}

/* Last crumb (current) — accent + bold */
body .ldt-rb__crumb[aria-current="page"] {
    color: var(--ldt-accent, #ff8c00);
    font-weight: 700;
}

/* Continent / country / city grids — ensure a clean layout */
body .ldt-rb__continent-grid,
body .ldt-rb__country-grid,
body .ldt-rb__city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Continent tile (and country/city share visual treatment) */
body .ldt-rb__continent,
body .ldt-rb__country-grid > *,
body .ldt-rb__city-grid > * {
    background: var(--ldt-glass-light, rgba(255, 255, 255, 0.65));
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 53, 128, 0.08);
    border-radius: var(--ldt-radius-input, 0.75rem);
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0, 53, 128, 0.06);
    cursor: pointer;
    transition:
        transform 300ms var(--ldt-ease-portal, ease),
        box-shadow 300ms var(--ldt-ease-portal, ease),
        border-color 300ms var(--ldt-ease-portal, ease),
        background 300ms var(--ldt-ease-portal, ease);
    position: relative;
    overflow: hidden;
}

/* Hover state — gradient background, brand-tinted border + shadow */
@media (hover: hover) and (pointer: fine) {
    body .ldt-rb__continent:hover,
    body .ldt-rb__country-grid > *:hover,
    body .ldt-rb__city-grid > *:hover {
        transform: translateY(-3px);
        background: linear-gradient(
            135deg,
            rgba(0, 53, 128, 0.04) 0%,
            rgba(255, 140, 0, 0.06) 100%
        );
        border-color: rgba(255, 140, 0, 0.30);
        box-shadow: 0 14px 30px rgba(0, 53, 128, 0.12);
    }
}

/* Continent glyph (emoji) — large, gentle float */
body .ldt-rb__continent-glyph {
    font-size: 2.5rem;
    line-height: 1;
    display: inline-block;
    margin-right: 12px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.10));
    animation: ldt-float-icon 7s ease-in-out infinite;
    animation-play-state: paused;
    will-change: transform;
}

[dir="rtl"] body .ldt-rb__continent-glyph,
.ldt-rtl body .ldt-rb__continent-glyph {
    margin-right: 0;
    margin-left: 12px;
}

/* Animate continent glyph on hover */
@media (hover: hover) and (pointer: fine) {
    body .ldt-rb__continent:hover .ldt-rb__continent-glyph {
        animation-play-state: running;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .ldt-rb__continent-glyph {
        animation: none;
    }
}

/* Continent body (name + count) */
body .ldt-rb__continent-body {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
}

body .ldt-rb__continent-name {
    color: var(--ldt-dark, #1e293b);
    font-weight: 700;
    font-size: 16px;
    transition: color 250ms var(--ldt-ease-portal, ease);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-rb__continent:hover .ldt-rb__continent-name {
        color: var(--ldt-primary, #003580);
    }
}

body .ldt-rb__continent-count {
    color: var(--ldt-gray-500, #94a3b8);
    font-size: 12px;
    font-weight: 500;
}

/* Continent arrow — slides on hover */
body .ldt-rb__continent-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ldt-gray-400, #94a3b8);
    font-size: 18px;
    font-weight: 700;
    transition:
        color 250ms var(--ldt-ease-portal, ease),
        transform 250ms var(--ldt-ease-portal, ease);
}

[dir="rtl"] body .ldt-rb__continent-arrow,
.ldt-rtl body .ldt-rb__continent-arrow {
    right: auto;
    left: 16px;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-rb__continent:hover .ldt-rb__continent-arrow {
        color: var(--ldt-accent, #ff8c00);
        transform: translateY(-50%) translateX(4px);
    }

    [dir="rtl"] body .ldt-rb__continent:hover .ldt-rb__continent-arrow,
    .ldt-rtl body .ldt-rb__continent:hover .ldt-rb__continent-arrow {
        transform: translateY(-50%) translateX(-4px);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 6. RESPONSIVE — tighter spacing on mobile
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Featured: smaller arrow buttons on mobile */
    body .ldt-featured-carousel__arrow {
        width: 36px;
        height: 36px;
    }

    /* Popular: tighter card body padding handled by existing inline CSS */

    /* Region browser: smaller continent emoji on mobile */
    body .ldt-rb__continent-glyph {
        font-size: 2rem;
    }

    /* Region browser tiles: tighter padding */
    body .ldt-rb__continent,
    body .ldt-rb__country-grid > *,
    body .ldt-rb__city-grid > * {
        padding: 14px;
    }

    /* Crumbs: more compact on mobile */
    body .ldt-rb__crumbs {
        padding: 4px 10px;
        font-size: 12px;
    }
}


/* ─── END OF ldt-enhanced-sections-home.css ───────────────────────────────── */
