/* ── Loading Screen ── */
@keyframes ls-orb-drift {
    0%, 100% { transform: translate(0,0) scale(1); }
    40%       { transform: translate(40px,-25px) scale(1.08); }
    70%       { transform: translate(-25px,18px) scale(0.94); }
}

@keyframes ls-scan {
    0%   { top: -4px; opacity: 0.6; }
    80%  { opacity: 0.3; }
    100% { top: 100%; opacity: 0; }
}

@keyframes ls-bar-shine {
    0%   { transform: translateX(-220%) skewX(-18deg); }
    100% { transform: translateX(480%) skewX(-18deg); }
}

@keyframes ls-shimmer {
    0%   { background-position: -150% center; }
    100% { background-position: 250% center; }
}

#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at 50% 38%, #0d2240 0%, #050d1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.9s ease;
}

#loadingScreen.ls-out {
    opacity: 0;
    pointer-events: none;
}

.ls-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: ls-orb-drift 9s ease-in-out infinite;
    pointer-events: none;
}

.ls-orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(26,95,204,0.32) 0%, transparent 70%);
    top: -130px; left: -100px;
}

.ls-orb-2 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(74,158,255,0.22) 0%, transparent 70%);
    bottom: -90px; right: -70px;
    animation-delay: -4.5s;
}

.ls-corner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(74,158,255,0.55);
}

.ls-tl { top: 22px; left: 22px; border-right: none; border-bottom: none; }
.ls-tr { top: 22px; right: 22px; border-left: none; border-bottom: none; }
.ls-bl { bottom: 22px; left: 22px; border-right: none; border-top: none; }
.ls-br { bottom: 22px; right: 22px; border-left: none; border-top: none; }

.ls-scan {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(74,158,255,0.5), rgba(135,206,235,0.7), rgba(74,158,255,0.5), transparent);
    animation: ls-scan 5s linear infinite;
    pointer-events: none;
}

.ls-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.ls-logo-wrap {
    position: relative;
    display: inline-block;
    overflow: hidden;
    animation: logo-float 4.5s ease-in-out infinite;
    filter: drop-shadow(0 0 18px rgba(74,158,255,0.5)) drop-shadow(0 0 36px rgba(74,158,255,0.2));
}

.ls-logo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,0.15) 42%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.15) 58%, transparent 75%);
    background-size: 300% 100%;
    -webkit-mask-image: url('../../images/logo.png');
    mask-image: url('../../images/logo.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: ls-shimmer 3.2s ease-in-out infinite;
    pointer-events: none;
}

.ls-logo {
    display: block;
    max-width: 400px;
}

.ls-bar-track {
    width: 380px;
    height: 8px;
    background: rgba(135,206,235,0.08);
    border: 1px solid rgba(135,206,235,0.22);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(74,144,226,0.12);
}

.ls-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, #1246a8, #2e7fff, #87ceeb);
    box-shadow: 0 0 10px rgba(74,158,255,0.8), 0 0 22px rgba(74,158,255,0.35);
    transition: width 0.12s linear;
    position: relative;
    overflow: hidden;
}

.ls-bar-shine {
    position: absolute;
    top: 0; left: 0;
    width: 38%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    animation: ls-bar-shine 1.6s ease-in-out infinite;
}

.ls-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ls-percent {
    font-size: 26px;
    font-weight: 700;
    color: #87ceeb;
    text-shadow: 0 0 12px rgba(135,206,235,0.7);
    letter-spacing: 3px;
}

.ls-label {
    font-size: 13px;
    color: rgba(135,206,235,0.65);
    letter-spacing: 2px;
}

/* ── Back To Top ── */
@keyframes btt-appear {
    from { opacity: 0; transform: translateY(16px) scale(0.85); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes btt-ripple {
    0%   { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
}

@keyframes btt-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

/* ── Floating action buttons (FB / Discord / Back to top) ── */
:root {
    --fab-size: 48px;
    --fab-right: 28px;
    --fab-gap: 12px;
    --fab-bottom: 36px;
}

#backToTop {
    position: fixed;
    bottom: var(--fab-bottom);
    right: var(--fab-right);
    z-index: 8888;
    width: var(--fab-size);
    height: var(--fab-size);
    box-sizing: border-box;
    border-radius: 50%;
    border: 1.5px solid rgba(74,158,255,0.55);
    background: rgba(5,13,26,0.82);
    color: #87ceeb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url('../../images/activec.png') 6 2, pointer;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 14px rgba(74,158,255,0.2), inset 0 0 8px rgba(74,158,255,0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    overflow: visible;
}

#backToTop svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#backToTop.btt-visible {
    opacity: 1;
    pointer-events: auto;
    animation: btt-appear 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

#backToTop::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1.5px solid rgba(74,158,255,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#backToTop:hover {
    background: rgba(18,70,168,0.75);
    border-color: rgba(135,206,235,0.85);
    box-shadow: 0 0 22px rgba(74,158,255,0.55), 0 0 40px rgba(74,158,255,0.25), inset 0 0 12px rgba(74,158,255,0.15);
}

#backToTop:hover svg {
    animation: btt-arrow-bounce 0.7s ease infinite;
    stroke: #ffffff;
    filter: drop-shadow(0 0 6px rgba(135,206,235,0.9));
}

#backToTop:hover::before {
    opacity: 1;
    animation: btt-ripple 1s ease-out infinite;
}

/* Base reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Sans Thai', sans-serif;
}


/* Custom cursors */
html, body {
    cursor: url('../../images/cursor.png') 6 2, auto;
}

a, button, [role="button"], .btn,
.nav-list a, .social-btn,
input[type="button"], input[type="submit"], input[type="reset"],
label, select, summary {
    cursor: url('../../images/activec.png') 6 2, pointer;
}

/* Section 1 - Navbar */
.hero-1 {
    width: 100%;
    min-width: 1300px;
    height: 118px;
    background-image: url("../../images/bg/bg_01.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
}

/* Navigation Bar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 15px;
    text-decoration: none;
    color: #ffffff;
    background-color: transparent;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #87ceeb, transparent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-list a .main-text {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.nav-list a .sub-text {
    font-size: 14px;
    font-weight: 400;
    color: #87ceeb;
    margin-top: 2px;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(3px); }
}

.nav-list a .arrow {
    font-size: 10px;
    color: #87ceeb;
    margin-top: 2px;
    display: block;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow {
    animation: bounce-arrow 0.7s ease infinite;
}

.nav-list > li > a:hover {
    background-color: transparent;
    transform: translateY(-5px) scale(1.08);
    box-shadow: none;
}

.nav-list > li > a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-list > li > a:hover .main-text {
    color: #87ceeb;
    text-shadow: 0 0 14px rgba(135, 206, 235, 0.8), 0 2px 6px rgba(135, 206, 235, 0.4);
}

.nav-list > li > a:hover .sub-text {
    color: #b0e0ff;
    text-shadow: 0 0 8px rgba(176, 224, 255, 0.6);
}

/* Dropdown */
.dropdown-toggle {
    position: relative;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    background: linear-gradient(180deg, #19202c 0%, #081834 100%);
    min-width: 200px;
    display: none;
    z-index: 1000;
    border-radius: 0 0 10px 10px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    background-color: transparent;
    border-radius: 0;
    padding: 12px 15px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.3) 0%, transparent 100%);
    color: #87ceeb;
    padding-left: 20px;
}

/* Logo */
@keyframes logo-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25%       { transform: translateY(-12px) rotate(-0.5deg); }
    75%       { transform: translateY(-6px) rotate(0.5deg); }
}

@keyframes logo-shimmer {
    0%   { background-position: -150% center; }
    100% { background-position: 250% center; }
}

@keyframes logo-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(135, 206, 235, 0.4)) drop-shadow(0 0 12px rgba(74, 144, 226, 0.2)); }
    50%       { filter: drop-shadow(0 0 16px rgba(135, 206, 235, 0.8)) drop-shadow(0 0 32px rgba(74, 144, 226, 0.5)); }
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    animation: logo-float 5s ease-in-out infinite, logo-glow-pulse 3s ease-in-out infinite;
    border-radius: 8px;
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 44%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.15) 56%,
        transparent 70%
    );
    background-size: 300% 100%;
    -webkit-mask-image: url('../../images/logo.png');
    mask-image: url('../../images/logo.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    z-index: 10;
    animation: logo-shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

.logo-img {
    display: block;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.logo-lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
}

/* Hero-2 background canvas */
.hero2-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Section 2 */
.hero-2 {
    width: 100%;
    min-width: 1300px;
    height: 1400px;
    background-image: url("../../images/bg/bg_02.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
}

@keyframes hero3-header-float {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    30%       { transform: translateX(-50%) translateY(-10px) scale(1.018); }
    60%       { transform: translateX(-50%) translateY(-5px) scale(1.010); }
    80%       { transform: translateX(-50%) translateY(-12px) scale(1.022); }
}

@keyframes hero3-header-glow {
    0%, 100% { filter: drop-shadow(0 4px 18px rgba(80,140,255,0.35)) drop-shadow(0 0 8px rgba(255,200,50,0.20)); }
    50%       { filter: drop-shadow(0 8px 32px rgba(80,140,255,0.65)) drop-shadow(0 0 18px rgba(255,200,50,0.45)); }
}

/* Section 3 */
.hero-3 {
    width: 100%;
    min-width: 1300px;
    min-height: 2155px;
    background-image: url("../../images/bg/bg_03.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    gap: 0;
    padding-top: 80px;
    padding-bottom: 100px;
}

/* ── News Tabs Section ── */
.news-tabs-section {
    width: 1300px;
    margin-top: 48px;
}

.news-tab-btns {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    margin-bottom: 28px;
}

.news-tab-btn {
    background: none;
    border: none;
    padding: 0;
    opacity: 0.6;
    cursor: url('../../images/activec.png') 6 2, pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.news-tab-btn img {
    display: block;
    height: auto;
}

.news-tab-btn:hover {
    opacity: 0.85;
    transform: translateY(-3px);
}

.news-tab-btn.active {
    opacity: 1;
    filter: drop-shadow(0 4px 14px rgba(80,160,255,0.55));
    transform: translateY(-2px);
}

@keyframes btn-bounce {
    0%, 100% { transform: translateY(0); }
    40%       { transform: translateY(-8px); }
    70%       { transform: translateY(-4px); }
}

.news-tab-readall {
    display: inline-block;
    text-decoration: none;
    animation: btn-bounce 1.8s ease-in-out infinite;
}

.news-tab-readall:hover,
.news-tab-readall:focus {
    filter: none;      /* ไม่มีแสง */
    opacity: 1;
    animation: btn-bounce 0.7s ease-in-out infinite; /* bounce เร็วขึ้นเมื่อ hover */
}

.news-tab-panel {
    display: none;
}

.news-tab-panel.active {
    display: block;
    animation: ntab-fadein 0.35s ease;
}

@keyframes ntab-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    min-height: 200px;
}

/* ── Empty / Loading state ── */
.news-empty,
.news-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 52px 40px;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    text-align: center;

    background: linear-gradient(160deg,
        rgba(8, 22, 48, 0.88) 0%,
        rgba(10, 30, 65, 0.92) 60%,
        rgba(5, 18, 42, 0.95) 100%);
    border: 1px solid rgba(80, 160, 240, 0.30);
    border-radius: 14px;
    box-shadow:
        0 0 0 1px rgba(60, 140, 220, 0.10),
        inset 0 1px 0 rgba(120, 200, 255, 0.08),
        0 4px 40px rgba(20, 80, 180, 0.25),
        0 1px 0 rgba(255,255,255,0.04);

    position: relative;
    overflow: hidden;
}

/* แสงเรืองด้านบน */
.news-empty::before,
.news-loading::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(100, 180, 255, 0.5), transparent);
}

/* เส้นมุมกรอบ */
.news-empty::after,
.news-loading::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(80, 160, 240, 0.12);
    border-radius: 8px;
    pointer-events: none;
}

.news-empty .empty-icon,
.news-loading .empty-icon {
    font-size: 2.4rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(80, 160, 255, 0.5));
}

.news-empty .empty-title,
.news-loading .empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: #7ec8f8;
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(80, 160, 255, 0.4), 0 1px 3px rgba(0,0,0,0.7);
}

.news-empty .empty-sub,
.news-loading .empty-sub {
    font-size: 0.78rem;
    color: #4a7aaa;
    margin-top: -4px;
}

/* Loading dots animation */
.news-loading .loading-dots span {
    display: inline-block;
    width: 6px; height: 6px;
    background: #4aa8e8;
    border-radius: 50%;
    margin: 0 3px;
    box-shadow: 0 0 6px rgba(80, 168, 232, 0.6);
    animation: dotBounce 1.2s infinite ease-in-out;
}
.news-loading .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.news-loading .loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40%           { transform: scale(1);   opacity: 1;    }
}

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid rgba(120, 180, 255, 0.45);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.65) inset,
        0 4px 20px rgba(30, 90, 180, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: url('../../images/activec.png') 6 2, pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    z-index: 2;
    pointer-events: none;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(80, 160, 255, 0.65);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        0 10px 28px rgba(30, 100, 200, 0.22),
        0 0 20px rgba(120, 190, 255, 0.25);
}

.news-card-thumb {
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid rgba(120, 180, 255, 0.25);
    position: relative;
}

.news-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(238, 246, 255, 0.92) 100%);
    pointer-events: none;
}

.news-card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.05);
    filter: brightness(1.03) saturate(1.04);
}

.news-card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    padding: 14px 16px 13px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f2d52;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-desc {
    font-size: 13px;
    color: #4a6888;
    margin: 0 0 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(120, 180, 255, 0.22);
}

.news-card-author {
    font-size: 11px;
    color: #6b8fb5;
    white-space: nowrap;
}

.news-card-tag {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

/* ── Tag สีแยกตามหมวด (c.name จาก product_categories) ── */
.news-card-tag.tag-all,
.tag-all {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.news-card-tag.tag-notice,
.tag-notice {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.38);
}

.news-card-tag.tag-activities,
.news-card-tag.tag-event,
.tag-activities,
.tag-event {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.38);
}

.news-card-tag.tag-update,
.tag-update {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.news-card-tag.tag-promotion,
.news-card-tag.tag-promo,
.tag-promotion,
.tag-promo {
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

.news-card-tag.tag-gameguide,
.news-card-tag.tag-hotweek,
.tag-gameguide,
.tag-hotweek {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

/* หมวดที่ไม่รู้จัก */
.news-card-tag.tag-default,
.tag-default {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.30);
}


.hero3-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-top: -60px;         /* ← ปรับขึ้น/ลง ที่นี่ */
}

.hero3-carousel {
    position: relative;
    display: inline-block;
    width: 1300px;
    height: 715px;
    background: url('../../images/bg_slider.png') no-repeat center / 100% 100%;
}

.hero3-slides-wrap {
    width: 1135px;
    position: absolute;
    top: 29px;
    left: 81px;
    bottom: 30px;
    overflow: hidden;
    border-radius: 5px;
}

.hero3-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero3-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s ease;
    pointer-events: none;
}

.hero3-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero3-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero3-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Empty/fallback slide */
.hero3-slide-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(8,22,48,0.90) 0%, rgba(10,30,65,0.95) 100%);
}
.hero3-slide-empty span {
    font-size: 1rem;
    color: #4a7aaa;
    letter-spacing: 0.05em;
}

/* Nav arrows */
.hero3-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(5,13,26,0.65);
    border: 1px solid rgba(74,158,255,0.45);
    color: #87ceeb;
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
    backdrop-filter: blur(4px);
}

.hero3-nav:hover {
    background: rgba(18,70,168,0.80);
    border-color: rgba(135,206,235,0.8);
    box-shadow: 0 0 14px rgba(74,158,255,0.55);
}

.hero3-prev { left: 10px; }
.hero3-next { right: 10px; }

/* Dot indicators */
.hero3-dots {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero3-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(135,206,235,0.35);
    border: 1px solid rgba(135,206,235,0.5);
    padding: 0;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.hero3-dot.active {
    background: #87ceeb;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(135,206,235,0.8);
}

.hero3-header {
    position: absolute;
    top: -160px;               /* ← ปรับขึ้น/ลง สำหรับ ribbon */
    left: 50%;
    width: auto;              /* ← ขนาดตามจริงของภาพ */
    height: auto;
    z-index: 2;
    animation:
        hero3-header-float 3.8s ease-in-out infinite,
        hero3-header-glow  3.8s ease-in-out infinite;
    transform-origin: center bottom;
}

/* ── Guild War Modal ── */
.gwar-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.gwar-modal.is-open {
    display: flex;
}
.gwar-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(3px);
}
.gwar-dialog {
    position: relative;
    width: 420px;
    background: linear-gradient(160deg, #0d1e35 0%, #0a1628 100%);
    border: 2px solid #c8960a;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(200,150,10,0.35), 0 8px 32px rgba(0,0,0,0.6);
    animation: gwarIn 0.25s ease;
    overflow: hidden;
}
@keyframes gwarIn {
    from { opacity:0; transform: scale(0.88) translateY(-16px); }
    to   { opacity:1; transform: scale(1)    translateY(0);     }
}
.gwar-dialog::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e8b020, transparent);
}
.gwar-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    color: #a08040;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}
.gwar-close:hover { color: #f0c040; }
.gwar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 14px;
    border-bottom: 1px solid rgba(200,150,10,0.25);
}
.gwar-icon { font-size: 1.4rem; }
.gwar-title {
    margin: 0;
    font-size: 1.05rem;
    color: #e8c060;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(232,192,96,0.4);
}
.gwar-body {
    padding: 22px 24px 26px;
    text-align: center;
}
.gwar-rank-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7a4a00, #c8820a);
    color: #fff8e0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(200,130,10,0.4);
}
.gwar-guild-name {
    margin: 0 0 20px;
    font-size: 1.35rem;
    color: #f5e8b0;
    text-shadow: 0 0 12px rgba(255,220,80,0.3);
}
.gwar-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.gwar-stat {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(200,150,10,0.2);
    border-radius: 8px;
    padding: 12px 8px;
}
.gwar-stat-label {
    display: block;
    font-size: 0.72rem;
    color: #8899aa;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}
.gwar-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}
.gwar-score { color: #e8c060; }
.gwar-win   { color: #50d890; }
.gwar-lose  { color: #e05060; }

/* ── No-data state ── */
.greg-nodata {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
}
.greg-nodata-icon {
    font-size: 2.6rem;
    line-height: 1;
    filter: grayscale(0.4) opacity(0.7);
}
.greg-nodata-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #7ec8f8;
    margin: 0;
    text-shadow: 0 0 10px rgba(80,160,255,0.3);
}
.greg-nodata-sub {
    font-size: 0.76rem;
    color: #4a7aaa;
    margin: 0;
}

.greg-emblem-wrap {
    margin-bottom: 14px;
}
.greg-emblem {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid rgba(80,160,240,0.35);
    object-fit: cover;
    background: #0d1a2e;
}
.greg-info {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(200,150,10,0.2);
    border-radius: 8px;
    padding: 14px 20px;
    text-align: left;
}
.greg-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.greg-info-label {
    font-size: 0.8rem;
    color: #8899aa;
}
.greg-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e8c060;
}

.hero4-flag {
    cursor: url('../../images/activec.png') 6 2, pointer;
    pointer-events: auto;
    transition: transform 0.15s ease;
    position: relative;
}
.hero4-flag:hover { transform: scale(1.08); }
.hero4-flags-overlay { pointer-events: none; }

.hero4-flag > img:not(.hero4-flag-emblem) {
    display: block;
    width: auto;
    height: auto;
}

.hero4-flag-emblem {
    position: absolute;
    top: 38px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px !important;
    height: 36px !important;
    max-width: 36px;
    max-height: 36px;
    min-width: 36px;
    min-height: 36px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    pointer-events: none;
    border-radius: 4px;
    z-index: 2;
}

/* Section 4 */
.hero-4 {
    width: 100%;
    min-width: 1300px;
    height: 1305px;
    background-image: url("../../images/bg/bg_04.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.hero4-report-wrapper {
    margin-top: 16px;   /* ← ระยะห่างจาก war wrapper */
    position: relative;
    display: inline-block;
}

.hero4-report-img {
    display: block;
    width: auto;
    height: auto;
}

.hero4-flags-overlay {
    position: absolute;
    top: 50px;          /* ← inset จากขอบบน */
    left: 10px;         /* ← inset จากขอบซ้าย */
    right: 14px;        /* ← inset จากขอบขวา */
    bottom: 18px;       /* ← inset จากขอบล่าง */
    display: flex;
    gap: 14px;
    pointer-events: none;
}

.hero4-flags-left {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 15px 20px;
    align-content: start;
    justify-content: center;
    width: 30%;
    flex-shrink: 0;
}

.hero4-flags-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 8px;
    align-content: start;
    flex: 1;
    overflow-y: auto;
    margin-left: 15px;
}

/* ── War-card style flags (right panel) ── */
.hero4-flag--card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(210, 220, 230, 0.14);
    border: 1px solid rgba(210, 220, 230, 0.18);
    border-radius: 6px;
    padding: 4px 8px 4px 4px;
    cursor: default !important;
    transition: background 0.15s;
    margin-top: 5px;
}
.hero4-flag--card:hover {
    background: rgba(210, 220, 230, 0.22);
    transform: none;
}
.hero4-flag-banner {
    position: relative;
    flex-shrink: 0;
}

.hero4-flag-banner > img {
    display: block;
    width: auto;
    height: auto;
}
.hero4-flag-ranknum {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

/* emblem image ใน ranknum — แทนตัวเลข */
.hero4-flag-emblem-card {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px;
    max-height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(80, 160, 240, 0.45);
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #0d1a2e;
    display: block;
}
.hero4-flag-cardinfo {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hero4-flag-cardinfo span {
    font-size: 16px;
    color: #fff;
    white-space: nowrap;
    line-height: 1.3;
}
.hero4-flag-cardinfo b {
    color: #fff;
    font-weight: 600;
}

.hero4-war-wrapper {
    position: relative;
    display: inline-block;
    margin-top: -5px;       /* ← ปรับขึ้น/ลง */
}

.hero4-war-img {
    display: none; /* hidden — canvas replaces it */
}

.hero4-war-canvas {
    display: block;
    width: auto;
    height: auto;
}

/* ── Downloads Section ── */
.hero-dl {
    background: linear-gradient(180deg, #060d1a 0%, #0a1628 100%);
    padding: 40px 0 60px;
    text-align: center;
}
.dl-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.dl-header-img {
    max-width: 420px;
    width: 100%;
    margin-bottom: 32px;
}
.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    text-align: left;
}
.dl-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #0e1d35 0%, #0a1525 100%);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dl-card:hover {
    border-color: rgba(59,130,246,0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.15);
}
.dl-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.12);
    border-radius: 10px;
}
.dl-card-body {
    flex: 1;
    min-width: 0;
}
.dl-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-card-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.dl-card-type {
    font-size: 11px;
    background: rgba(59,130,246,0.2);
    color: #93c5fd;
    border-radius: 4px;
    padding: 1px 7px;
}
.dl-card-size {
    font-size: 11px;
    color: #475569;
}
.dl-card-arrow {
    color: #3b82f6;
    font-size: 16px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.dl-card:hover .dl-card-arrow {
    opacity: 1;
}

/* ── Site footer (from admin settings) ── */
.site-footer {
    text-align: center;
    padding: 20px 16px 28px;
    color: #64748b;
    font-size: 13px;
    background: #0a1628;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.site-footer p {
    margin: 0;
}

/* ── Floating social buttons ── */
.site-fab {
    position: fixed;
    right: var(--fab-right);
    z-index: 900;
    width: var(--fab-size);
    height: var(--fab-size);
    box-sizing: border-box;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, opacity 0.2s;
}
.site-fab:hover {
    transform: translateY(-2px);
    color: #fff;
}
.site-fab-fb {
    bottom: calc(var(--fab-bottom) + var(--fab-size) + var(--fab-gap));
    background: #1877f2;
}
.site-fab-discord {
    bottom: calc(var(--fab-bottom) + (var(--fab-size) + var(--fab-gap)) * 2);
    background: #5865f2;
}