/* Loy Krathong & Yi Peng Lanna — High-Craft Editorial Festival Edition (Site-Wide NLX.Web.Server) */

/* ==========================================================================
   1. Site-Wide Header & Navbar Brand Krathong
   ========================================================================== */

body > header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(30, 27, 75, 0.25) 0%,
        rgba(99, 102, 241, 0.65) 22%,
        rgba(217, 119, 6, 0.88) 50%,
        rgba(99, 102, 241, 0.65) 78%,
        rgba(30, 27, 75, 0.25) 100%
    );
    pointer-events: none;
}

body > header .sk-navbar-brand.lk-brand-host {
    position: relative;
}

body > header .lk-nav-krathong {
    position: absolute;
    left: calc(100% + 5px);
    bottom: 4px;
    width: 31px;
    height: 28px;
    pointer-events: none;
    user-select: none;
}

/* ==========================================================================
   2. Top Carousel Night Panorama (Homepage #carousel) & Auth Night Scene
   ========================================================================== */

body.home #carousel .lk-doodle-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

main.sk-layout-blank .lk-doodle-layer.lk-auth-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.lk-doodle-layer *,
.lk-subhero-layer *,
.lk-cta-layer *,
.lk-footer-layer * {
    pointer-events: none;
}

body.home #carousel .lk-twilight-wash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(48% 36% at 88% 16%, rgba(254, 240, 138, 0.24) 0%, transparent 72%),
        linear-gradient(
            180deg,
            rgba(12, 16, 48, 0.62) 0%,
            rgba(23, 21, 59, 0.34) 26%,
            rgba(23, 21, 59, 0.04) 46%,
            rgba(12, 19, 44, 0.16) 76%,
            rgba(10, 16, 40, 0.44) 100%
        );
}

main.sk-layout-blank .lk-auth-scene .lk-twilight-wash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(42% 38% at 88% 14%, rgba(254, 240, 138, 0.22) 0%, transparent 70%),
        linear-gradient(
            165deg,
            rgba(13, 12, 36, 0.78) 0%,
            rgba(30, 27, 75, 0.64) 48%,
            rgba(15, 23, 42, 0.84) 100%
        );
}

/* Architectural Lanna corner filigree */
.lk-doodle-layer .lk-banner-corner {
    position: absolute;
    top: 10px;
    width: clamp(44px, 6.2vw, 88px);
    height: auto;
}

.lk-doodle-layer .lk-banner-corner--tl {
    left: 12px;
}

.lk-doodle-layer .lk-banner-corner--tr {
    right: 12px;
}

/* Crisp starlight */
.lk-doodle-layer .lk-star {
    position: absolute;
    width: 4.5px;
    height: 4.5px;
    border-radius: 50%;
    background: #fef9c3;
    box-shadow: 0 0 8px rgba(254, 240, 138, 0.92);
    animation: lk-twinkle 3.8s ease-in-out infinite;
}

.lk-doodle-layer .lk-star--1 { left: 10.5%; top: 9%; animation-delay: -0.4s; }
.lk-doodle-layer .lk-star--2 { left: 22%; top: 6.5%; width: 3.5px; height: 3.5px; animation-delay: -1.7s; }
.lk-doodle-layer .lk-star--3 { left: 37%; top: 7.5%; width: 4px; height: 4px; animation-delay: -2.8s; }
.lk-doodle-layer .lk-star--4 { left: 49%; top: 5.5%; width: 3.5px; height: 3.5px; animation-delay: -1.2s; }
.lk-doodle-layer .lk-star--5 { left: 61%; top: 7%; width: 4px; height: 4px; animation-delay: -0.9s; }
.lk-doodle-layer .lk-star--6 { left: 73%; top: 6%; width: 4.5px; height: 4.5px; animation-delay: -2.1s; }
.lk-doodle-layer .lk-star--7 { left: 82.5%; top: 16%; width: 3.5px; height: 3.5px; animation-delay: -3.2s; }

/* Hanging Lanna Yi Peng lanterns (top-left) */
.lk-doodle-layer .lk-hang-lantern {
    position: absolute;
    top: 0;
    height: auto;
    transform-origin: top center;
    will-change: transform;
}

.lk-doodle-layer .lk-hang-lantern--1 {
    left: 2.8%;
    width: clamp(22px, 3.2vw, 46px);
    animation: lk-lantern-sway 5.8s ease-in-out infinite;
}

.lk-doodle-layer .lk-hang-lantern--2 {
    left: 6.4%;
    width: clamp(18px, 2.5vw, 36px);
    animation: lk-lantern-sway 6.6s ease-in-out -2.4s infinite;
}

/* Commanding Full Moon (top-right sky) */
.lk-doodle-layer .lk-moon {
    position: absolute;
    top: 3.5%;
    right: 4.8%;
    width: clamp(48px, 8vw, 116px);
    height: auto;
}

.lk-doodle-layer .lk-moon svg,
.lk-doodle-layer .lk-hang-lantern svg,
.lk-doodle-layer .lk-lantern svg,
.lk-doodle-layer .lk-krathong svg,
body > header .lk-nav-krathong svg,
.lk-festival-bar svg,
.lk-hero-layer svg,
.lk-cta-layer svg,
.lk-subhero-layer svg,
.lk-auth-bar svg,
body > footer .lk-footer-layer svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.lk-doodle-layer .lk-moon-halo,
.lk-cta-layer .lk-moon-halo,
.lk-subhero-layer .lk-moon-halo {
    transform-box: fill-box;
    transform-origin: center;
    animation: lk-moon-breathe 6.5s ease-in-out infinite;
}

/* 6 Lanna sky lanterns (Khom Loi) */
.lk-doodle-layer .lk-lantern {
    position: absolute;
    height: auto;
    will-change: transform, opacity;
}

.lk-doodle-layer .lk-lantern--1 {
    left: 15%;
    top: 13.5%;
    width: clamp(18px, 2.5vw, 36px);
    animation: lk-lantern-rise-1 16s ease-in-out -4s infinite;
}

.lk-doodle-layer .lk-lantern--2 {
    left: 75%;
    top: 10.5%;
    width: clamp(16px, 2.1vw, 30px);
    animation: lk-lantern-rise-2 20s ease-in-out -9s infinite;
}

.lk-doodle-layer .lk-lantern--3 {
    left: 25.5%;
    top: 11%;
    width: clamp(13px, 1.6vw, 23px);
    animation: lk-lantern-rise-2 18s ease-in-out -6s infinite;
}

.lk-doodle-layer .lk-lantern--4 {
    left: 66.5%;
    top: 13%;
    width: clamp(12px, 1.45vw, 21px);
    animation: lk-lantern-rise-1 21s ease-in-out -11s infinite;
}

.lk-doodle-layer .lk-lantern--5 {
    left: 33%;
    top: 8.5%;
    width: clamp(10px, 1.1vw, 16px);
    animation: lk-lantern-rise-1 23s ease-in-out -14s infinite;
}

.lk-doodle-layer .lk-lantern--6 {
    left: 59%;
    top: 9.5%;
    width: clamp(10px, 1.05vw, 15px);
    animation: lk-lantern-rise-2 19s ease-in-out -7s infinite;
}

/* 4 Lotus & Banana-Leaf Krathongs on the Ponds */
.lk-doodle-layer .lk-krathong {
    position: absolute;
    height: auto;
    will-change: transform;
}

.lk-doodle-layer .lk-krathong--1 {
    left: 6.8%;
    bottom: 13.5%;
    width: clamp(30px, 5vw, 74px);
    animation: lk-krathong-float-a 9.5s ease-in-out infinite;
}

.lk-doodle-layer .lk-krathong--2 {
    left: 47.2%;
    bottom: 9.5%;
    width: clamp(34px, 5.6vw, 82px);
    animation: lk-krathong-float-b 11.5s ease-in-out -3s infinite;
}

.lk-doodle-layer .lk-krathong--3 {
    left: 55%;
    bottom: 13.5%;
    width: clamp(26px, 4.3vw, 62px);
    animation: lk-krathong-float-a 10.5s ease-in-out -6s infinite;
}

.lk-doodle-layer .lk-krathong--4 {
    left: 13.8%;
    bottom: 20%;
    width: clamp(20px, 3.1vw, 45px);
    animation: lk-krathong-float-b 12.5s ease-in-out -4.5s infinite;
}

main.sk-layout-blank .lk-auth-scene .lk-krathong--1 {
    left: 5%;
    bottom: 5%;
}

main.sk-layout-blank .lk-auth-scene .lk-krathong--2 {
    left: auto;
    right: 6%;
    bottom: 4.5%;
}

main.sk-layout-blank .lk-auth-scene .lk-krathong--3 {
    left: auto;
    right: 14%;
    bottom: 7.5%;
}

main.sk-layout-blank .lk-auth-scene .lk-krathong--4 {
    left: 13%;
    bottom: 9%;
}

/* Flames, water ripples & candlelight reflections */
.lk-doodle-layer .lk-flame,
body > header .lk-nav-krathong .lk-flame,
.lk-cta-layer .lk-flame,
.lk-subhero-layer .lk-flame,
body > footer .lk-footer-layer .lk-flame {
    transform-box: fill-box;
    transform-origin: 50% 85%;
    animation: lk-flame-flicker 2.4s ease-in-out infinite;
}

.lk-doodle-layer .lk-krathong--2 .lk-flame {
    animation-duration: 2.8s;
    animation-delay: -0.9s;
}

.lk-doodle-layer .lk-krathong--3 .lk-flame {
    animation-duration: 2.1s;
    animation-delay: -1.5s;
}

.lk-doodle-layer .lk-ripple,
.lk-cta-layer .lk-ripple,
.lk-subhero-layer .lk-ripple,
body > footer .lk-footer-layer .lk-ripple {
    transform-box: fill-box;
    transform-origin: center;
    animation: lk-ripple-pulse 4.5s ease-in-out infinite;
}

.lk-doodle-layer .lk-reflection,
.lk-subhero-layer .lk-reflection {
    transform-box: fill-box;
    transform-origin: center top;
    animation: lk-reflection-shimmer 3.4s ease-in-out infinite;
}

/* ==========================================================================
   3. Full-Width Commemorative Festival Bar (.lk-festival-bar across ALL pages)
   ========================================================================== */

.lk-festival-bar {
    position: relative;
    z-index: 3;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background:
        radial-gradient(50% 120% at 50% 50%, rgba(217, 119, 6, 0.16) 0%, transparent 75%),
        linear-gradient(90deg, #13112e 0%, #1e1b4b 28%, #2e1065 50%, #1e1b4b 72%, #13112e 100%);
    border-top: 1px solid rgba(251, 191, 36, 0.48);
    border-bottom: 1px solid rgba(251, 191, 36, 0.42);
    box-shadow: 0 6px 20px -6px rgba(19, 17, 46, 0.25);
    padding: 0.6rem 0;
    pointer-events: none;
    user-select: none;
}

.lk-festival-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.lk-festival-bar-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lk-festival-bar-emblem {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.lk-festival-bar-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.48);
    color: #fde68a;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.lk-festival-bar-title {
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.lk-festival-bar-sub {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-right: 5.75rem;
    color: #fde68a;
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.92;
}

.lk-festival-bar-diamond {
    width: 6px;
    height: 6px;
    background: #fbbf24;
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ==========================================================================
   4. Hero Section (Homepage NLXHero)
   ========================================================================== */

body.home .nlx-hero-section {
    background:
        radial-gradient(540px 380px at 80% 46%, rgba(217, 119, 6, 0.10), transparent 70%),
        radial-gradient(900px 480px at 78% 42%, rgba(99, 102, 241, 0.10), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #faf8ff 58%, #f3effd 100%) !important;
    border-bottom: 1px solid rgba(217, 119, 6, 0.28) !important;
}

body.home .nlx-hero-section .lk-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.95rem 0.35rem 0.65rem;
    margin-left: 0.6rem;
    margin-bottom: 1.5rem;
    vertical-align: middle;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(30, 27, 75, 0.12);
    color: #fde68a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    pointer-events: none;
    user-select: none;
}

body.home .nlx-hero-section .lk-hero-pill svg,
.lk-subhero-pill svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

body.home .nlx-hero-section .lk-hero-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
}

body.home .nlx-hero-section .lk-hero-mandala {
    width: min(92%, 440px);
    height: auto;
}

/* ==========================================================================
   5. Subpage Royal-Indigo Heroes (Courses, Course Detail, Checkout, Learning Path, Generic)
   ========================================================================== */

.courses-page-hero,
.course-detail-hero,
.checkout-hero,
.learning-path-detail-hero {
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid rgba(251, 191, 36, 0.42) !important;
    box-shadow:
        0 10px 28px rgba(19, 17, 46, 0.16),
        inset 0 2px 0 rgba(251, 191, 36, 0.48) !important;
}

.lk-generic-hero {
    margin-top: 1.5rem;
    margin-bottom: 1.75rem;
}

.courses-page-hero-inner,
.course-detail-hero-inner,
.checkout-hero-inner,
.learning-path-detail-hero > .container {
    position: relative !important;
    z-index: 2 !important;
}

.lk-subhero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.34rem 0.9rem 0.34rem 0.62rem;
    background: linear-gradient(135deg, rgba(19, 17, 46, 0.72) 0%, rgba(49, 46, 129, 0.72) 100%);
    border: 1px solid rgba(251, 191, 36, 0.58);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(19, 17, 46, 0.25);
    color: #fde68a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    pointer-events: none;
    user-select: none;
}

.courses-page-hero .lk-subhero-pill,
.checkout-hero .lk-subhero-pill,
.learning-path-detail-hero .lk-subhero-pill {
    margin-left: 0.5rem;
    margin-bottom: 0.85rem;
    vertical-align: middle;
}

.lk-subhero-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
}

.lk-subhero-wash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(38% 65% at 88% 24%, rgba(254, 240, 138, 0.22) 0%, transparent 70%),
        radial-gradient(32% 55% at 74% 85%, rgba(217, 119, 6, 0.16) 0%, transparent 72%);
}

/* Specific 2-class selector (.lk-subhero-layer .lk-subhero-corner) so width wins over .lk-subhero-layer svg */
.lk-subhero-layer .lk-subhero-corner {
    position: absolute;
    top: 8px;
    width: 68px;
    height: auto;
}

.lk-subhero-layer .lk-subhero-corner--tl {
    left: 10px;
}

.lk-subhero-layer .lk-subhero-corner--tr {
    right: 10px;
}

.lk-subhero-star {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fef9c3;
    box-shadow: 0 0 8px rgba(254, 240, 138, 0.92);
    animation: lk-twinkle 3.8s ease-in-out infinite;
}

.lk-subhero-star--1 { right: 16%; top: 16%; animation-delay: -0.4s; }
.lk-subhero-star--2 { right: 24%; top: 26%; width: 3px; height: 3px; animation-delay: -1.6s; }
.lk-subhero-star--3 { right: 12%; top: 46%; width: 3.5px; height: 3.5px; animation-delay: -2.7s; }
.lk-subhero-star--4 { right: 34%; top: 18%; width: 3px; height: 3px; animation-delay: -1.1s; }
.lk-subhero-star--5 { right: 29%; top: 42%; width: 3.5px; height: 3.5px; animation-delay: -2.2s; }

/* Hanging Lanna Yi Peng lanterns in subpage hero */
.lk-subhero-layer .lk-subhero-hang {
    position: absolute;
    top: 0;
    height: auto;
    transform-origin: top center;
    will-change: transform;
}

.lk-subhero-layer .lk-subhero-hang--1 {
    right: 28%;
    width: 34px;
    animation: lk-lantern-sway 5.8s ease-in-out infinite;
}

.lk-subhero-layer .lk-subhero-hang--2 {
    right: 32.5%;
    width: 26px;
    animation: lk-lantern-sway 6.6s ease-in-out -2.4s infinite;
}

/* Commanding Full Moon in subpage hero */
.lk-subhero-layer .lk-subhero-moon {
    position: absolute;
    right: 3.8%;
    top: 8%;
    width: 86px;
}

/* Rising Lanna Sky Lanterns in subpage hero */
.lk-subhero-layer .lk-subhero-lantern {
    position: absolute;
    will-change: transform, opacity;
}

.lk-subhero-layer .lk-subhero-lantern--1 {
    right: 14.5%;
    top: 22%;
    width: 26px;
    animation: lk-lantern-rise-1 16s ease-in-out -4s infinite;
}

.lk-subhero-layer .lk-subhero-lantern--2 {
    right: 21.5%;
    top: 34%;
    width: 20px;
    animation: lk-lantern-rise-2 20s ease-in-out -9s infinite;
}

.lk-subhero-layer .lk-subhero-lantern--3 {
    right: 11.5%;
    top: 44%;
    width: 17px;
    animation: lk-lantern-rise-1 18s ease-in-out -12s infinite;
}

.lk-subhero-layer .lk-subhero-lantern--4 {
    right: 36.5%;
    top: 28%;
    width: 15px;
    animation: lk-lantern-rise-2 21s ease-in-out -6s infinite;
}

/* Soft water reflection band & floating Lotus Krathongs in subpage hero */
.lk-subhero-layer .lk-subhero-water {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 52%;
    height: 38px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0) 0%, rgba(15, 23, 42, 0.36) 55%, rgba(251, 191, 36, 0.18) 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.85) 32%, rgba(0, 0, 0, 0.95) 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.85) 32%, rgba(0, 0, 0, 0.95) 85%, transparent 100%);
}

.lk-subhero-layer .lk-subhero-krathong {
    position: absolute;
    bottom: 4px;
    will-change: transform;
}

.lk-subhero-layer .lk-subhero-krathong--1 {
    right: 6.5%;
    width: 48px;
    animation: lk-krathong-float-a 9.5s ease-in-out infinite;
}

.lk-subhero-layer .lk-subhero-krathong--2 {
    right: 17.5%;
    bottom: 8px;
    width: 38px;
    animation: lk-krathong-float-b 11.5s ease-in-out -3.5s infinite;
}

/* ==========================================================================
   6. Subpage & Site-Wide Content Polish (Same Visual Direction as Homepage)
   ========================================================================== */

/* Warm golden-indigo atmospheric top wash across subpages (matching NLXHero) */
body:not(.home) main#main-content:not(.sk-layout-blank) {
    background:
        radial-gradient(900px 420px at 85% 6%, rgba(251, 191, 36, 0.07) 0%, transparent 70%),
        radial-gradient(900px 480px at 15% 12%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}

/* Filter Sidebar on /pages/courses — Royal-Indigo & Antique-Gold Festival Header */
#nlx-courses-page .courses-filter-panel {
    border: 1px solid rgba(217, 119, 6, 0.28) !important;
    box-shadow: 0 8px 24px rgba(19, 17, 46, 0.06) !important;
}

#nlx-courses-page .courses-filter-panel .list-group-item:first-child {
    background:
        radial-gradient(80% 120% at 90% 20%, rgba(251, 191, 36, 0.22) 0%, transparent 70%),
        linear-gradient(135deg, #13112e 0%, #1e1b4b 52%, #312e81 100%) !important;
    border-bottom: 2px solid rgba(251, 191, 36, 0.55) !important;
}

#nlx-courses-page .courses-filter-panel .list-group-item:first-child h4 i {
    color: #fde047 !important;
}

#nlx-courses-page .courses-filter-panel h5::before,
#nlx-courses-page .offcanvas .courses-filter-panel h6::before {
    background: linear-gradient(180deg, #6366f1 0%, #f59e0b 100%) !important;
}

#nlx-courses-page .courses-filter-toolbar,
#nlx-courses-page .courses-group-header {
    border-color: rgba(217, 119, 6, 0.24) !important;
}

/* Course Detail Page (/pages/course_detail/[id]) — Cohesive Royal-Indigo & Gold Trim */
.course-detail-page .course-breadcrumb {
    border: 1px solid rgba(217, 119, 6, 0.25) !important;
    border-left: 3px solid #d97706 !important;
}

.course-detail-page .course-content-card,
.course-detail-page .course-sidebar,
.course-detail-page .teacher-card {
    border-color: rgba(217, 119, 6, 0.24) !important;
    border-top: 3px solid rgba(217, 119, 6, 0.55) !important;
}

.course-detail-page .related-courses-section {
    border-top: 1px solid rgba(217, 119, 6, 0.25) !important;
    background:
        radial-gradient(600px 300px at 85% 20%, rgba(251, 191, 36, 0.07), transparent 70%),
        linear-gradient(180deg, #faf8ff 0%, #f8fafc 100%) !important;
}

/* Checkout Page (/pages/checkout) — Cohesive Royal-Indigo & Gold Trim */
.nlx-checkout-page .checkout-steps,
.nlx-checkout-page .checkout-card,
.nlx-checkout-page .checkout-empty-state,
.nlx-checkout-page .checkout-summary-card {
    border-color: rgba(217, 119, 6, 0.26) !important;
    border-top: 3px solid rgba(217, 119, 6, 0.55) !important;
}

/* Site-Wide Card Hover & Accent Polish */
.category-browse-card:hover,
.recommended-course-card:hover,
.top-course-rich-card:hover,
.news-card:hover,
.course-card:hover {
    border-color: rgba(217, 119, 6, 0.48) !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(217, 119, 6, 0.2) !important;
}

.course-category-list-item:hover {
    border-color: rgba(217, 119, 6, 0.42) !important;
}

.top-course-rich-card.rank-1 {
    border-color: rgba(217, 119, 6, 0.45) !important;
}

.brand-story-section .brand-quote {
    border-top: 3px solid rgba(217, 119, 6, 0.55) !important;
}

.nlx-counters-section {
    border-bottom: 1px solid rgba(217, 119, 6, 0.25) !important;
}

.nlx-counter-card::before {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 52%, #f59e0b 100%) !important;
}

.nlx-counter-card:hover {
    border-color: rgba(217, 119, 6, 0.42) !important;
}

/* ==========================================================================
   7. Auth / Blank Layout Pages (Sign In, Registration, Password Reset)
   ========================================================================== */

main.sk-layout-blank {
    position: relative;
}

main.sk-layout-blank .sk-signin-container {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(251, 191, 36, 0.42) !important;
    box-shadow:
        0 20px 50px rgba(13, 12, 36, 0.42),
        0 0 0 1px rgba(251, 191, 36, 0.18) !important;
}

main.sk-layout-blank .lk-auth-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    background:
        radial-gradient(50% 120% at 50% 50%, rgba(217, 119, 6, 0.18) 0%, transparent 75%),
        linear-gradient(90deg, #13112e 0%, #1e1b4b 55%, #2e1065 100%);
    border-bottom: 2px solid rgba(251, 191, 36, 0.52);
    border-radius: 11px 11px 0 0;
    color: #ffffff;
    pointer-events: none;
    user-select: none;
}

main.sk-layout-blank .lk-auth-bar-emblem {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

main.sk-layout-blank .lk-auth-bar-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fef3c7;
    margin-right: auto;
}

main.sk-layout-blank .lk-auth-bar-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.48);
    color: #fde68a;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   8. Bottom CTA Card (Homepage .bottom-cta-card) Night Festival Scene
   ========================================================================== */

body.home .bottom-cta-card {
    border-color: rgba(251, 191, 36, 0.35) !important;
}

body.home .bottom-cta-card .lk-cta-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
}

body.home .bottom-cta-card .lk-cta-star {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fef9c3;
    box-shadow: 0 0 8px rgba(254, 240, 138, 0.9);
    animation: lk-twinkle 3.6s ease-in-out infinite;
}

body.home .bottom-cta-card .lk-cta-star--1 { left: 52%; top: 16%; animation-delay: -0.3s; }
body.home .bottom-cta-card .lk-cta-star--2 { left: 60%; top: 10%; width: 3px; height: 3px; animation-delay: -1.4s; }
body.home .bottom-cta-card .lk-cta-star--3 { left: 73%; top: 24%; animation-delay: -2.2s; }
body.home .bottom-cta-card .lk-cta-star--4 { left: 82%; top: 12%; width: 3px; height: 3px; animation-delay: -3.1s; }

body.home .bottom-cta-card .lk-cta-moon {
    position: absolute;
    left: 65%;
    top: 8%;
    width: 68px;
}

body.home .bottom-cta-card .lk-cta-lantern {
    position: absolute;
    will-change: transform, opacity;
}

body.home .bottom-cta-card .lk-cta-lantern--1 {
    left: 55%;
    top: 26%;
    width: 24px;
    animation: lk-lantern-rise-1 15s ease-in-out -3s infinite;
}

body.home .bottom-cta-card .lk-cta-lantern--2 {
    left: 61%;
    top: 18%;
    width: 19px;
    animation: lk-lantern-rise-2 19s ease-in-out -8s infinite;
}

body.home .bottom-cta-card .lk-cta-lantern--3 {
    left: 73%;
    top: 32%;
    width: 16px;
    animation: lk-lantern-rise-1 17s ease-in-out -11s infinite;
}

body.home .bottom-cta-card .lk-cta-water {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0) 0%, rgba(15, 23, 42, 0.34) 55%, rgba(251, 191, 36, 0.16) 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.85) 38%, rgba(0, 0, 0, 0.95) 75%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.85) 38%, rgba(0, 0, 0, 0.95) 75%, transparent 100%);
}

body.home .bottom-cta-card .lk-cta-krathong {
    position: absolute;
    bottom: 6px;
    will-change: transform;
}

body.home .bottom-cta-card .lk-cta-krathong--1 {
    left: 54%;
    width: 44px;
    animation: lk-krathong-float-a 9s ease-in-out infinite;
}

body.home .bottom-cta-card .lk-cta-krathong--2 {
    left: 67%;
    bottom: 10px;
    width: 38px;
    animation: lk-krathong-float-b 11s ease-in-out -4s infinite;
}

/* ==========================================================================
   9. Site-Wide Footer Festival Accent
   ========================================================================== */

body > footer {
    border-top: 2px solid rgba(251, 191, 36, 0.48) !important;
}

body > footer > .sk-section {
    position: relative;
    z-index: 1;
}

body > footer .lk-footer-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

body > footer .lk-footer-star {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fef08a;
    box-shadow: 0 0 8px rgba(254, 240, 138, 0.85);
    animation: lk-twinkle 4s ease-in-out infinite;
}

body > footer .lk-footer-star--1 { right: 16%; top: 18%; animation-delay: -0.6s; }
body > footer .lk-footer-star--2 { right: 8%; top: 34%; width: 3px; height: 3px; animation-delay: -1.8s; }
body > footer .lk-footer-star--3 { right: 24%; top: 28%; width: 3px; height: 3px; animation-delay: -2.9s; }
body > footer .lk-footer-star--4 { right: 32%; top: 16%; width: 3.5px; height: 3.5px; animation-delay: -1.2s; }

body > footer .lk-footer-lantern {
    position: absolute;
    will-change: transform, opacity;
}

body > footer .lk-footer-lantern--1 {
    right: 6%;
    top: 22%;
    width: 28px;
    animation: lk-lantern-rise-1 18s ease-in-out -5s infinite;
}

body > footer .lk-footer-lantern--2 {
    right: 12%;
    top: 40%;
    width: 21px;
    animation: lk-lantern-rise-2 22s ease-in-out -11s infinite;
}

body > footer .lk-footer-krathong {
    position: absolute;
    right: 8.5%;
    bottom: 10px;
    width: 42px;
    opacity: 0.82;
    will-change: transform;
    animation: lk-krathong-float-a 10s ease-in-out infinite;
}

/* ==========================================================================
   10. Keyframes (transform + opacity only)
   ========================================================================== */

@keyframes lk-moon-breathe {
    0%, 100% {
        opacity: 0.84;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

@keyframes lk-twinkle {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes lk-lantern-sway {
    0%, 100% {
        transform: rotate(-1.5deg);
    }
    50% {
        transform: rotate(1.5deg);
    }
}

@keyframes lk-lantern-rise-1 {
    0% {
        opacity: 0;
        transform: translate3d(-2px, 10px, 0) rotate(-1.5deg);
    }
    10% {
        opacity: 0.96;
    }
    50% {
        opacity: 1;
        transform: translate3d(3px, -5px, 0) rotate(1.2deg);
    }
    84% {
        opacity: 0.95;
    }
    96%, 100% {
        opacity: 0;
        transform: translate3d(-1px, -19px, 0) rotate(-1deg);
    }
}

@keyframes lk-lantern-rise-2 {
    0% {
        opacity: 0;
        transform: translate3d(2px, 8px, 0) rotate(1.5deg);
    }
    10% {
        opacity: 0.92;
    }
    50% {
        opacity: 0.98;
        transform: translate3d(-3px, -4px, 0) rotate(-1.2deg);
    }
    84% {
        opacity: 0.9;
    }
    96%, 100% {
        opacity: 0;
        transform: translate3d(1px, -16px, 0) rotate(1deg);
    }
}

@keyframes lk-krathong-float-a {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    35% {
        transform: translate3d(6px, -2px, 0) rotate(1.2deg);
    }
    70% {
        transform: translate3d(-4px, 1px, 0) rotate(-1deg);
    }
}

@keyframes lk-krathong-float-b {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    40% {
        transform: translate3d(-6px, -2px, 0) rotate(-1.2deg);
    }
    75% {
        transform: translate3d(4px, 1px, 0) rotate(1deg);
    }
}

@keyframes lk-flame-flicker {
    0%, 100% {
        opacity: 0.92;
        transform: scale(1, 1) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: scale(0.95, 1.08) rotate(-2deg);
    }
    50% {
        opacity: 0.86;
        transform: scale(1.04, 0.94) rotate(1.5deg);
    }
    75% {
        opacity: 1;
        transform: scale(0.97, 1.05) rotate(-1deg);
    }
}

@keyframes lk-ripple-pulse {
    0%, 100% {
        opacity: 0.45;
        transform: scaleX(0.96);
    }
    50% {
        opacity: 0.78;
        transform: scaleX(1.06);
    }
}

@keyframes lk-reflection-shimmer {
    0%, 100% {
        opacity: 0.5;
        transform: scaleY(0.92);
    }
    50% {
        opacity: 0.92;
        transform: scaleY(1.08);
    }
}

/* ==========================================================================
   11. Responsive Adjustments
   ========================================================================== */

@media (max-width: 1199.98px) {
    body > header .lk-nav-krathong {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .lk-festival-bar-sub {
        display: none !important;
    }

    .lk-subhero-layer .lk-subhero-hang,
    .lk-subhero-layer .lk-subhero-krathong--2 {
        display: none !important;
    }

    body.home .bottom-cta-card .lk-cta-krathong,
    body.home .bottom-cta-card .lk-cta-water {
        display: none !important;
    }

    body.home .bottom-cta-card .lk-cta-moon {
        left: 1.5rem;
        right: auto;
        top: auto;
        bottom: 2.2rem;
        width: 46px;
    }

    body.home .bottom-cta-card .lk-cta-lantern--1 {
        left: 5.5rem;
        right: auto;
        top: auto;
        bottom: 4.6rem;
    }

    body.home .bottom-cta-card .lk-cta-lantern--2 {
        left: 8.2rem;
        right: auto;
        top: auto;
        bottom: 2.6rem;
    }

    body.home .bottom-cta-card .lk-cta-lantern--3 {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .lk-doodle-layer .lk-banner-corner,
    .lk-subhero-layer .lk-subhero-corner {
        display: none !important;
    }

    .lk-doodle-layer .lk-moon {
        top: 5%;
        right: 4.5%;
    }

    .lk-doodle-layer .lk-lantern--4,
    .lk-doodle-layer .lk-lantern--5,
    .lk-doodle-layer .lk-lantern--6,
    .lk-doodle-layer .lk-krathong--4 {
        display: none !important;
    }

    body.home #carousel .lk-krathong--1 {
        left: 6.5%;
        bottom: 15.5%;
    }

    body.home #carousel .lk-krathong--2 {
        left: 47%;
        bottom: 17%;
    }

    body.home #carousel .lk-krathong--3 {
        left: 55.2%;
        bottom: 19.5%;
    }

    .lk-festival-bar {
        padding: 0.5rem 0;
    }

    .lk-festival-bar-tag {
        display: none !important;
    }

    .lk-festival-bar-title {
        font-size: 0.8125rem;
    }

    .lk-subhero-layer .lk-subhero-moon {
        width: 52px;
        right: 3.5%;
        top: 10%;
        opacity: 0.78;
    }

    .lk-subhero-layer .lk-subhero-lantern--2,
    .lk-subhero-layer .lk-subhero-lantern--3,
    .lk-subhero-layer .lk-subhero-lantern--4,
    .lk-subhero-layer .lk-subhero-krathong,
    .lk-subhero-layer .lk-subhero-water {
        display: none !important;
    }

    .lk-subhero-layer .lk-subhero-lantern--1 {
        right: 17%;
        top: 18%;
        width: 18px;
        opacity: 0.75;
    }

    .courses-page-hero .lk-subhero-pill,
    .checkout-hero .lk-subhero-pill,
    .learning-path-detail-hero .lk-subhero-pill {
        margin-left: 0.35rem;
        font-size: 0.75rem;
    }

    main.sk-layout-blank .lk-auth-bar-tag {
        display: none !important;
    }

    main.sk-layout-blank .lk-auth-bar-text {
        font-size: 0.8125rem;
    }

    body > footer .lk-footer-layer {
        opacity: 0.65;
    }
}

@media (max-width: 575.98px) {
    body.home .nlx-hero-section .lk-hero-pill {
        margin-left: 0;
        margin-top: -0.75rem;
        margin-bottom: 1.15rem;
    }
}

/* ==========================================================================
   12. Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lk-doodle-layer .lk-moon-halo,
    .lk-doodle-layer .lk-star,
    .lk-doodle-layer .lk-hang-lantern,
    .lk-doodle-layer .lk-lantern,
    .lk-doodle-layer .lk-krathong,
    .lk-doodle-layer .lk-flame,
    .lk-doodle-layer .lk-ripple,
    .lk-doodle-layer .lk-reflection,
    body > header .lk-nav-krathong .lk-flame,
    body.home .bottom-cta-card .lk-moon-halo,
    body.home .bottom-cta-card .lk-cta-star,
    body.home .bottom-cta-card .lk-cta-lantern,
    body.home .bottom-cta-card .lk-cta-krathong,
    body.home .bottom-cta-card .lk-flame,
    body.home .bottom-cta-card .lk-ripple,
    .lk-subhero-layer .lk-moon-halo,
    .lk-subhero-layer .lk-subhero-star,
    .lk-subhero-layer .lk-subhero-hang,
    .lk-subhero-layer .lk-subhero-lantern,
    .lk-subhero-layer .lk-subhero-krathong,
    .lk-subhero-layer .lk-flame,
    .lk-subhero-layer .lk-ripple,
    .lk-subhero-layer .lk-reflection,
    body > footer .lk-footer-star,
    body > footer .lk-footer-lantern,
    body > footer .lk-footer-krathong,
    body > footer .lk-flame,
    body > footer .lk-ripple {
        animation: none !important;
        transform: none !important;
    }

    .lk-doodle-layer .lk-moon-halo,
    body.home .bottom-cta-card .lk-moon-halo,
    .lk-subhero-layer .lk-moon-halo {
        opacity: 0.88 !important;
    }

    .lk-doodle-layer .lk-lantern,
    body.home .bottom-cta-card .lk-cta-lantern,
    .lk-subhero-layer .lk-subhero-lantern,
    body > footer .lk-footer-lantern {
        opacity: 0.94 !important;
    }

    .lk-doodle-layer .lk-star,
    body.home .bottom-cta-card .lk-cta-star,
    .lk-subhero-layer .lk-subhero-star,
    body > footer .lk-footer-star {
        opacity: 0.78 !important;
    }

    .lk-doodle-layer .lk-flame,
    body.home .bottom-cta-card .lk-flame,
    .lk-subhero-layer .lk-flame,
    body > footer .lk-flame {
        opacity: 1 !important;
    }

    .lk-doodle-layer .lk-ripple,
    body.home .bottom-cta-card .lk-ripple,
    .lk-subhero-layer .lk-ripple,
    body > footer .lk-ripple {
        opacity: 0.58 !important;
    }
}
