/* ============================================================
   HOMEPAGE — โหลดเฉพาะ index.php (ผ่าน $extraCss ใน <head>)
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   HERO SLIDER — flush with navbar, full-cover image
───────────────────────────────────────────────────────────── */
.slider-hero { position: relative; overflow: hidden; margin-top: 0; }

.slides-wrap {
    position: relative;
    height: clamp(400px, 58vh, 680px);
    overflow: hidden;
    background: #0d0c18;   /* fallback when no image */
}

.slide {
    position: absolute; inset: 0;
    display: flex; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity .8s cubic-bezier(.4,0,.2,1);
    z-index: 0;
}
.slide.active { opacity: 1; pointer-events: auto; z-index: 1; }

/* ภาพพื้นหลังเป็น <img> (ใช้ srcset/WebP ได้ + preload ได้) */
.slide-img {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%; max-width: none;
    object-fit: cover; object-position: center;
}
.slide.active .slide-img { animation: kenBurns 12s ease-out both; }
@keyframes kenBurns { from { transform: scale(1.06); } to { transform: scale(1); } }

.slide-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(to top, rgba(13,12,24,.55) 0%, transparent 40%),
        rgba(13,12,24, var(--ov, .55));
}

.slide-content {
    position: relative; z-index: 2;
    max-width: 680px;
}
.slide.active .slide-content { animation: slideIn .7s cubic-bezier(.4,0,.2,1) both; }

.slide-content h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.4rem);
    color: #fff; line-height: 1.15; margin-bottom: 18px;
    text-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.slide-title-logo { margin-bottom: 6px; }
.slide-title-logo img { filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.slide-align-right .slide-title-logo img { margin-left: auto; }
.slide-align-center .slide-title-logo img { margin: 0 auto; }
.slide-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 16px; margin-bottom: 18px;
    background: rgba(108,99,255,.22);
    border: 1px solid rgba(108,99,255,.4);
    border-radius: 999px;
    color: #c8c2ff; font-size: 0.867rem; font-weight: 600;
    letter-spacing: .02em; backdrop-filter: blur(8px);
}
.slide-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.slide-btn-light {
    color: #fff !important;
    border-color: rgba(255,255,255,.42) !important;
    background: rgba(255,255,255,.06) !important;
    backdrop-filter: blur(8px);
}
.slide-btn-light:hover { background: rgba(255,255,255,.16) !important; border-color: rgba(255,255,255,.7) !important; }
.slide-dark .slide-content h1 { color: var(--dark); text-shadow: none; }
.slide-dark .slide-badge { background: rgba(0,0,0,.08); border-color: rgba(0,0,0,.15); color: var(--dark); }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

.slide-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 20; width: 50px; height: 50px;
    background: rgba(255,255,255,.10); color: #fff;
    border: 1.5px solid rgba(255,255,255,.22); border-radius: 50%;
    font-size: 1.8rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .22s; backdrop-filter: blur(10px);
}
.slide-arrow:hover {
    background: var(--primary); border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(108,99,255,.5);
}
.slide-prev { left: 22px; }
.slide-next { right: 22px; }

.slide-dots {
    position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 20; align-items: center;
}
.slide-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.3); border: none; cursor: pointer;
    transition: all .3s ease; padding: 0;
}
.slide-dot.active { width: 28px; border-radius: 4px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); }
.slide-dot:hover { background: rgba(255,255,255,.65); }

.slide .container { display: flex; width: 100%; }
.slide-align-left   { margin-right: auto; text-align: left; }
.slide-align-center { margin-left: auto; margin-right: auto; text-align: center; }
.slide-align-right  { margin-left: auto; text-align: right; }
.slide-align-center .slide-actions { justify-content: center; }
.slide-align-right  .slide-actions { justify-content: flex-end; }

@media (max-width: 768px) {
    .slides-wrap { height: clamp(320px, 50vw, 480px); }
    .slide-arrow { width: 38px; height: 38px; font-size: 1.3rem; }
    .slide-prev { left: 12px; }
    .slide-next { right: 12px; }
}

/* ─────────────────────────────────────────────────────────────
   TRUST STRIP (ใต้ hero)
───────────────────────────────────────────────────────────── */
.hp-trust {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: #fff;
}
.hp-trust-inner {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 10px 34px; padding-top: 13px; padding-bottom: 13px;
}
.hp-trust-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 600; white-space: nowrap;
}
.hp-trust-item i { font-size: 1rem; opacity: .85; line-height: 1; display: flex; }

/* ─────────────────────────────────────────────────────────────
   FEATURES (ใช้ .feature-card เดิม)
───────────────────────────────────────────────────────────── */
.hp-features { background: var(--white); }
.hp-features .feature-icon i { color: var(--primary); display: flex; }
.hp-features .feature-card:hover .feature-icon i { color: #fff; }

/* ─────────────────────────────────────────────────────────────
   CATEGORIES (เสริม .category-card เดิม)
───────────────────────────────────────────────────────────── */
.hp-cats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.hp-cats .category-card { display: flex; flex-direction: column; align-items: center; }
.hp-cat-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 8px; }
.hp-cats .category-count {
    margin-top: auto; padding: 2px 12px; border-radius: var(--radius-full);
    background: var(--bg); font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   HOW IT WORKS
───────────────────────────────────────────────────────────── */
.hp-steps-section { background: var(--white); }
.hp-steps {
    position: relative;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
/* เส้นเชื่อมระหว่างขั้นตอน */
.hp-steps::before {
    content: ''; position: absolute; top: 44px; left: 12.5%; right: 12.5%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--primary) 0 8px, transparent 8px 16px);
    opacity: .35;
}
.hp-step { position: relative; text-align: center; padding: 0 8px; }
.hp-step-icon {
    position: relative; z-index: 1;
    width: 88px; height: 88px; margin: 0 auto 18px;
    border-radius: 28px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 32px -8px var(--primary);
    transition: transform var(--transition);
}
.hp-step-icon i { display: flex; }
.hp-step:hover .hp-step-icon { transform: translateY(-4px) rotate(-4deg); }
.hp-step-num {
    position: absolute; z-index: 2; top: -8px; left: calc(50% + 26px);
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--white); color: var(--primary);
    border: 2px solid var(--primary); font-weight: 800; font-size: 0.85rem;
}
.hp-step-title { font-weight: 700; font-size: 1.05rem; color: var(--dark); margin-bottom: 6px; }
.hp-step-desc  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ─────────────────────────────────────────────────────────────
   FAQ + HELP
───────────────────────────────────────────────────────────── */
.hp-faq-grid {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 40px; align-items: start;
}
.section-title.hp-left { text-align: left; margin-bottom: 28px; }
.hp-faq-grid--solo { grid-template-columns: minmax(0, 720px); justify-content: center; }
.hp-faq-grid--solo .hp-help { position: static; }
.hp-faq { display: flex; flex-direction: column; gap: 12px; }
.hp-faq-item {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.hp-faq-item[open] { border-color: rgba(108,99,255,.35); box-shadow: var(--shadow-sm); }
.hp-faq-item summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 22px; font-weight: 700; color: var(--dark);
}
.hp-faq-item summary::-webkit-details-marker { display: none; }
.hp-faq-item summary i {
    display: flex; flex-shrink: 0; font-size: 1.2rem; color: var(--primary);
    width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--primary-light); transition: transform var(--transition);
}
.hp-faq-item[open] summary i { transform: rotate(180deg); }
.hp-faq-a { padding: 0 22px 20px; color: var(--text-muted); line-height: 1.8; font-size: 0.95rem; }

.hp-help {
    position: sticky; top: calc(var(--header-h) + 20px);
    background: linear-gradient(160deg, var(--dark-2) 0%, var(--dark-3) 100%);
    color: rgba(255,255,255,.75);
    border-radius: var(--radius-xl); padding: 34px 30px;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.hp-help::after {
    content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
    right: -80px; top: -80px; background: var(--primary); opacity: .25; filter: blur(10px);
    pointer-events: none;
}
.hp-help-icon {
    width: 56px; height: 56px; border-radius: 18px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    background: var(--primary); color: #fff;
}
.hp-help-icon i { display: flex; }
.hp-help h3 { color: #fff; margin-bottom: 8px; font-size: 1.3rem; }
.hp-help p  { font-size: 0.93rem; line-height: 1.7; margin-bottom: 18px; }
.hp-help-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.hp-help-list li { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; }
.hp-help-list i { display: flex; color: #c8c2ff; }
.hp-help-list a { color: #fff; font-weight: 600; }
.hp-help-list a:hover { color: #c8c2ff; }
.hp-pay { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; }
.hp-pay-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.hp-pay-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hp-pay-logos img {
    height: 38px; width: auto; max-width: 110px; object-fit: contain;
    background: #fff; border-radius: 10px; padding: 5px 10px;
}
.hp-pay-pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 14px; border-radius: 10px;
    background: rgba(255,255,255,.1); color: #fff; font-size: 0.85rem; font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   CTA BANNER
───────────────────────────────────────────────────────────── */
.hp-cta-wrap { padding: 0 0 80px; background: var(--bg); }
.section-alt + .hp-cta-wrap { background: linear-gradient(180deg, #f7f6fe 0%, var(--bg) 100%); }
.hp-cta {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
    padding: 48px 52px; border-radius: var(--radius-xl);
    background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 24px 60px -18px var(--primary);
}
.hp-cta::before, .hp-cta::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
    border: 40px solid rgba(255,255,255,.07);
}
.hp-cta::before { width: 320px; height: 320px; right: -80px; top: -140px; }
.hp-cta::after  { width: 220px; height: 220px; left: 30%; bottom: -150px; }
.hp-cta-text { position: relative; z-index: 1; max-width: 620px; }
.hp-cta-text h2 { color: #fff; margin-bottom: 8px; }
.hp-cta-text p  { color: rgba(255,255,255,.8); font-size: 1.02rem; }
.hp-cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; }
.hp-cta-btn-light, .hp-cta-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    border-radius: var(--radius-full); font-weight: 700;
    transition: all var(--transition); white-space: nowrap;
}
.hp-cta-btn-light { background: #fff; color: var(--primary-dark); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.hp-cta-btn-light:hover { color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.hp-cta-btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.hp-cta-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); border-color: #fff; }
.hp-cta-actions i { display: flex; }

/* ─────────────────────────────────────────────────────────────
   REVEAL ON SCROLL (class js-reveal ใส่โดย JS — ถ้า JS ไม่ทำงาน เนื้อหายังแสดงปกติ)
───────────────────────────────────────────────────────────── */
.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(24px); }
.js-reveal .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .6s cubic-bezier(.4,0,.2,1) var(--d, 0ms), transform .6s cubic-bezier(.4,0,.2,1) var(--d, 0ms);
}
/* card ที่มี hover-transform ของตัวเอง → หลัง reveal เสร็จให้ transition เดิมกลับมา */
.js-reveal .feature-card.reveal.in,
.js-reveal .category-card.reveal.in { transition: all var(--transition); }

@media (prefers-reduced-motion: reduce) {
    .slide.active .slide-img, .slide.active .slide-content { animation: none; }
}

/* ═════════════════════════════════════════════════════════════
   SOFTWARE SHOWCASE HERO — โทนเทค: พื้นเข้ม + เส้นกริด + แสงสีธีม,
   หน้าต่างแอปจำลองโชว์หน้าจอจริง, การ์ดลอย (License key / ราคา / แจ้งเตือน)
═════════════════════════════════════════════════════════════ */
.sw-mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

.sw-hero {
    --ink: color-mix(in srgb, var(--primary) 10%, #06070d);
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--ink); color: rgba(255,255,255,.72);
    padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px);
}
.sw-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sw-hero-bg::before {       /* เส้นกริด จางออกที่ขอบ */
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 60% 40%, #000 30%, transparent 78%);
            mask-image: radial-gradient(ellipse 75% 70% at 60% 40%, #000 30%, transparent 78%);
}
.sw-hero-bg::after {        /* แสงสีธีม */
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(40% 50% at 72% 42%, color-mix(in srgb, var(--primary) 55%, transparent) 0%, transparent 70%),
        radial-gradient(30% 40% at 12% 90%, color-mix(in srgb, var(--primary) 30%, transparent) 0%, transparent 70%);
    filter: blur(20px); opacity: .75;
}
.sw-hero-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: clamp(32px, 5vw, 72px); align-items: center;
}

/* ── Copy ── */
.sw-eyebrow {
    display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
    padding: 5px 12px 5px 5px; margin-bottom: 26px;
    border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04); color: rgba(255,255,255,.8);
    font-size: 0.8rem; font-weight: 500; transition: border-color var(--transition), background var(--transition);
}
.sw-eyebrow:hover { color: #fff; border-color: color-mix(in srgb, var(--primary) 70%, #fff); background: rgba(255,255,255,.07); }
.sw-eyebrow-tag {
    padding: 2px 9px; border-radius: var(--radius-full);
    background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: .08em;
}
.sw-eyebrow .sw-mono { color: #fff; font-weight: 600; }
.sw-eyebrow b.sw-mono { margin-right: 2px; }
.sw-eyebrow-text { opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sw-eyebrow i { display: flex; opacity: .6; }

.sw-title {
    color: #fff; font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.12;
    letter-spacing: -.025em; font-weight: 800; margin-bottom: 22px;
}
.sw-grad {
    background: linear-gradient(100deg,
        color-mix(in srgb, var(--primary) 45%, #fff) 0%,
        color-mix(in srgb, var(--primary) 85%, #fff) 45%,
        color-mix(in srgb, var(--primary) 55%, #5eead4) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sw-sub { font-size: 1.08rem; line-height: 1.8; max-width: 540px; margin-bottom: 34px; }

/* ── หน้าต่างแอป ── */
.sw-dots { display: flex; gap: 7px; flex-shrink: 0; }
.sw-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.sw-dots i:nth-child(2) { background: #febc2e; }
.sw-dots i:nth-child(3) { background: #28c840; }
.sw-url {
    flex: 1; min-width: 0; max-width: 340px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    height: 24px; padding: 0 12px; border-radius: 7px;
    background: rgba(255,255,255,.06); color: rgba(255,255,255,.55);
    font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-url i { display: flex; font-size: 0.65rem; color: #28c840; }
.sw-live {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.65rem; font-weight: 600;
    color: #4ade80; letter-spacing: .1em;
}
.sw-live i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: swBlink 1.6s ease-in-out infinite; }
@keyframes swBlink { 50% { opacity: .25; } }


/* ═════════════════════════════════════════════════════════════
   HUB HERO — หน้าต่างแอปหมุนโชว์ทีละระบบ + การ์ดข้อมูล + Dock ไอคอนทุกระบบ
═════════════════════════════════════════════════════════════ */
.hub-hero { padding-bottom: clamp(88px, 10vw, 132px); }
.hub-hero .sw-title { font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.32; letter-spacing: -.01em; }
.hub-hero .sw-grad { padding-bottom: .08em; }   /* กันสระล่างถูกตัดใน background-clip:text */

/* ช่องค้นหาใหญ่ */
.hub-search {
    display: flex; align-items: center; gap: 10px; max-width: 540px;
    padding: 7px 7px 7px 20px; margin-bottom: 18px; border-radius: var(--radius-full);
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(8px); transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.hub-search:focus-within {
    border-color: color-mix(in srgb, var(--primary) 70%, #fff); background: rgba(255,255,255,.09);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent);
}
.hub-search > i { display: flex; color: rgba(255,255,255,.5); }
.hub-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    color: #fff; font: inherit; font-size: 1rem; padding: 8px 0;
}
.hub-search input::placeholder { color: rgba(255,255,255,.4); }
.hub-search .btn-primary { flex-shrink: 0; padding: 11px 24px; }

.hub-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 34px; }
.hub-quick-label { font-size: 0.82rem; color: rgba(255,255,255,.45); margin-right: 2px; }
.hub-quick-chip {
    padding: 5px 13px; border-radius: var(--radius-full); font-size: 0.82rem; font-weight: 500;
    color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03);
    transition: all var(--transition);
}
.hub-quick-chip:hover { color: #fff; border-color: var(--primary); background: color-mix(in srgb, var(--primary) 25%, transparent); }

.hub-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.hub-stats div {
    display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px;
    border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
}
.hub-stats i {
    display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 30%, transparent); color: #fff; font-size: 0.9rem;
}
.hub-stats b { font-size: 1.35rem; font-weight: 600; color: #fff; line-height: 1; }
.hub-stats span { font-size: 0.82rem; color: rgba(255,255,255,.55); }

/* Stage: หน้าต่างแบบเรียบ (ไม่เอียง) + แสงด้านหลัง */
.hub-stage { position: relative; animation: swIn 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
.hub-stage::before {
    content: ''; position: absolute; inset: 8% 6% 18%; z-index: -1; border-radius: 40px;
    background: var(--primary); filter: blur(70px); opacity: .45;
}
.hub-window {
    position: relative; border-radius: 16px; overflow: hidden;
    background: #0d0e17; border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.3);
}
.hub-window-bar {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px;
    background: #141522; border-bottom: 1px solid rgba(255,255,255,.07);
}
.hub-screen { position: relative; display: block; aspect-ratio: 16 / 10; background: #0b0c14; overflow: hidden; }
.hub-screen img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: top left;
    opacity: 0; transform: scale(1.03); transition: opacity .9s ease, transform 5s ease-out;
}
.hub-screen img.on { opacity: 1; transform: none; }
.hub-screen img.is-cover { object-position: center; }

/* แถบข้อมูลด้านล่างของหน้าต่าง — ไล่เข้มจากล่าง อ่านง่ายทุกภาพ */
.hub-caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
    padding: 64px 22px 18px;
    background: linear-gradient(to top, rgba(6,7,13,.94) 0%, rgba(6,7,13,.78) 45%, transparent 100%);
    pointer-events: none;
}
.hub-caption.swap .hub-cap-text, .hub-caption.swap .hub-cap-side { animation: hubSwap .55s cubic-bezier(.2,.7,.2,1); }
@keyframes hubSwap { from { opacity: 0; transform: translateY(8px); } }
.hub-cap-text { display: flex; flex-direction: column; min-width: 0; }
.hub-card-cat { font-size: 0.75rem; font-weight: 600; color: color-mix(in srgb, var(--primary) 50%, #fff); }
.hub-card-name { font-size: 1.3rem; font-weight: 800; color: #fff; line-height: 1.35; }
.hub-card-desc { font-size: 0.82rem; color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-cap-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.hub-card-price { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; font-size: 0.9rem; font-weight: 700; color: #fff; }
.hub-card-price s { font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,.45); }
.hub-card-flash {
    display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: var(--radius-full);
    background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; font-size: 0.72rem;
}
.hub-card-flash[hidden] { display: none; }
.hub-card-flash i { display: flex; }
.hub-cap-btn {
    pointer-events: auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-full); background: #fff; color: #0b0c14;
    font-size: 0.85rem; font-weight: 700; transition: transform var(--transition), box-shadow var(--transition);
}
.hub-cap-btn:hover { color: #0b0c14; transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(255,255,255,.4); }
.hub-cap-btn i { display: flex; }

/* ตัวเลือกระบบ: ไอคอนสว่างเต็ม + ชื่อใต้ไอคอน */
.hub-dock {
    display: flex; justify-content: center; gap: 6px; margin-top: 6px;
    /* overflow-x:auto ตัดส่วนล้นแนวตั้งด้วย → เผื่อระยะให้วงแหวน active (4px) + ยกตัว (3px) ไม่ถูกตัด */
    overflow-x: auto; scrollbar-width: none; padding: 12px 10px 6px;
}
.hub-dock::-webkit-scrollbar { display: none; }
.hub-dock-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; width: 78px;
    padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
}
.hub-dock-tile {
    position: relative; width: 58px; height: 58px; padding: 8px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; background: #fff; color: #0b0c14;
    box-shadow: 0 8px 18px -8px rgba(0,0,0,.7);
    transition: transform var(--transition), box-shadow var(--transition);
}
.hub-dock-tile img { width: 100%; height: 100%; object-fit: contain; }
.hub-dock-item:hover .hub-dock-tile { transform: translateY(-3px); }
.hub-dock-item.active .hub-dock-tile {
    transform: translateY(-3px);
    box-shadow: 0 0 0 2px #0b0c14, 0 0 0 4px var(--primary), 0 12px 24px -8px var(--primary);
}
.hub-dock-name {
    max-width: 100%; font-size: 0.72rem; line-height: 1.3; color: rgba(255,255,255,.55);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--transition);
}
.hub-dock-item:hover .hub-dock-name, .hub-dock-item.active .hub-dock-name { color: #fff; }
.hub-dock-initial {
    width: 100%; height: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-weight: 800; font-size: 1.35rem;
}
.hub-dock-all .hub-dock-tile { background: rgba(255,255,255,.08); color: #fff; font-size: 1.3rem; border: 1px solid rgba(255,255,255,.14); box-shadow: none; }
.hub-dock-all .hub-dock-tile i { display: flex; }
.hub-dock-all:hover .hub-dock-tile { background: var(--primary); border-color: var(--primary); }
/* แถบเวลาของระบบที่กำลังโชว์ */
.hub-dock-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; opacity: 0; }
.hub-dock-bar::after { content: ''; position: absolute; inset: 0; background: var(--primary); transform-origin: left; transform: scaleX(0); }
.hub-stage.playing .hub-dock-item.active .hub-dock-bar { opacity: 1; }
.hub-stage.playing .hub-dock-item.active .hub-dock-bar::after { animation: hubBar 4.5s linear forwards; }
@keyframes hubBar { to { transform: scaleX(1); } }

/* Load-in ของข้อความ hero */
.sw-hero-copy > * { animation: swUp .8s cubic-bezier(.2,.7,.2,1) both; }
.sw-hero-copy > :nth-child(2) { animation-delay: .06s; }
.sw-hero-copy > :nth-child(3) { animation-delay: .12s; }
.sw-hero-copy > :nth-child(4) { animation-delay: .18s; }
.sw-hero-copy > :nth-child(5) { animation-delay: .24s; }
.sw-hero-copy > :nth-child(6) { animation-delay: .3s; }
@keyframes swUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes swIn { from { opacity: 0; transform: translateX(40px) scale(.97); } }

/* ═════════════════════════════════════════════════════════════
   SYSTEMS — การ์ดระบบในฮับ (ภาพหน้าจอในกรอบหน้าต่าง + ไอคอน + ราคาเริ่มต้น)
═════════════════════════════════════════════════════════════ */
.sys-section { background: var(--bg); }
.sys-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.sys-head .section-title { margin-bottom: 0; }
.sys-head .section-title p { margin: 0; }
.sys-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.sys-filter button {
    padding: 8px 16px; border-radius: var(--radius-full); cursor: pointer;
    border: 1px solid var(--border); background: var(--white); color: var(--text-muted);
    font: inherit; font-size: 0.87rem; font-weight: 600; transition: all var(--transition);
}
.sys-filter button:hover { color: var(--primary); border-color: var(--primary); }
.sys-filter button.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px var(--primary); }

.sys-empty { text-align: center; padding: 40px 0; color: var(--text-muted); }
.sys-more { text-align: center; margin-top: 38px; }

.hub-card-price { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hub-card-price s { font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,.45); }
.hub-card-flash {
    display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: var(--radius-full);
    background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; font-size: 0.72rem;
}
.hub-card-flash[hidden] { display: none; }
.hub-card-flash i { display: flex; }

/* ─────────────────────────────────────────────────────────────
   DARK THEME
───────────────────────────────────────────────────────────── */
.theme-dark .hp-cats .category-count { background: #1e1d30; }
.theme-dark .hp-help { background: linear-gradient(160deg, #1e1d30 0%, #13121f 100%); border: 1px solid var(--border); }
.theme-dark .section-alt + .hp-cta-wrap { background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
    .sw-live i, .sw-hero-copy > *, .hub-stage, .hub-caption.swap .hub-cap-text, .hub-caption.swap .hub-cap-side { animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .hp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
    .hp-steps::before { display: none; }
    .hp-faq-grid { grid-template-columns: 1fr; }
    .hp-help { position: static; }
    .sw-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .sw-hero-copy { text-align: center; }
    .sw-sub, .hub-search { margin-left: auto; margin-right: auto; }
    .hub-quick, .hub-stats { justify-content: center; }
    .hub-stage { max-width: 680px; margin: 8px auto 0; width: 100%; }
    .hub-dock { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .hp-trust-inner { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 24px; }
    .hp-trust-inner::-webkit-scrollbar { display: none; }
    .hp-features .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hp-features .feature-card { padding: 18px 16px; border-radius: var(--radius-md); }
    .hp-features .feature-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
    .hp-features .feature-icon { width: 42px; height: 42px; font-size: 1.15rem; }
    .hp-features .feature-title { font-size: 0.93rem; line-height: 1.4; }
    .hp-features .feature-desc { font-size: 0.8rem; line-height: 1.6; }
    .hp-steps { grid-template-columns: 1fr; }
    .hp-step { display: grid; grid-template-columns: 72px 1fr; column-gap: 16px; text-align: left; align-items: center; }
    .hp-step-icon { width: 64px; height: 64px; border-radius: 20px; font-size: 1.5rem; margin: 0; grid-row: span 2; }
    .hp-step-num { left: 46px; top: -6px; width: 26px; height: 26px; }
    .hp-step-title { margin: 0; align-self: end; }
    .hp-step-desc { align-self: start; }
    .hp-cta { padding: 34px 24px; }
    .hp-cta-actions, .hp-cta-actions a { width: 100%; justify-content: center; }
    .hp-cta-wrap { padding-bottom: 56px; }
    .hp-faq-item summary { padding: 16px 18px; }
    .hp-faq-a { padding: 0 18px 18px; }

    .hub-search { padding-left: 16px; }
    .hub-search .btn-primary { padding: 10px 16px; }
    .hub-stats { justify-content: center; }
    .hub-stats div { padding: 7px 12px 7px 8px; }
    .sw-live { display: none; }
    .hub-caption { padding: 40px 14px 12px; gap: 10px; }
    .hub-card-name { font-size: 1.05rem; }
    .hub-card-desc { display: none; }
    .hub-cap-btn { padding: 6px 12px; font-size: 0.78rem; }
    .hub-card-price { font-size: 0.78rem; }
    .hub-dock-item { width: 64px; }
    .hub-dock-tile { width: 50px; height: 50px; border-radius: 14px; }
    .sys-head { align-items: flex-start; }
    .sys-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
    .sys-filter::-webkit-scrollbar { display: none; }
    .sys-filter button { flex-shrink: 0; }
}
