/* =========================
   SAFE FIX VERSION - LAYOUT PROTECTED
========================= */

/* ===== FIX LOGO AREA ===== */
header,
.header,
.topbar {
    position: relative;
    z-index: 5;
}
/* ป้องกัน background ทับ */
body {
    background-color: #0c0f18;
    color: #e6e6e6;
    position: relative; /* เพิ่มตัวนี้ */
    z-index: 1;
}

/* เอฟเฟกต์แสงทับด้านบนแบบไม่ลบภาพ */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at 50% -10%,
        rgba(255,140,0,0.15),
        transparent 60%
    );
    z-index: 0;
}

background: radial-gradient(
    circle at 50% -10%,
    rgba(212,175,55,0.25),
    rgba(255,140,0,0.15),
    transparent 60%
);

/* ===== FIX NEWS LAYOUT BACK TO NORMAL ===== */

.news_box {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: linear-gradient(145deg,#0f1522,#0b0f18);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(212,175,55,0.25);
    box-shadow: 0 8px 25px rgba(0,0,0,.6);
    transition: .3s ease;
}

.news_box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(212,175,55,.25);
}

/* คืนตำแหน่งภาพซ้าย */
.news_box dt {
    flex: 0 0 220px;
}

.news_box dt img {
    border-radius: 8px;
}

/* คืนข้อความขวา */
.news_box dd {
    flex: 1;
}

.news_box h3 {
    margin-top: 0;
}

.news_box h3 a {
    color: #ffcc66;
    font-weight: 600;
    font-size: 18px;
}

.news_box p {
    color: #c8c8c8;
    font-size: 14px;
}

/* สีประเภทข่าว */
.type-tab {
    color: #d4af37;
    font-weight: 500;
}

/* วันที่ */
.date-tab {
    color: #888;
}

/* ===== GOLD FRAME EFFECT ===== */

.news_box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(45deg,#d4af37,#ffcc66,#d4af37);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* ต้องมี position relative */
.news_box {
    position: relative;
}

/* ===== TITLE NEWS ===== */

.title-news {
    font-size: 22px;
    font-weight: bold;
    color: #ffcc66;
    letter-spacing: 1px;
}

/* ===== TABS ===== */

.tabs ul li a {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 18px;
    border-radius: 6px;
    color: #ccc;
    transition: .3s ease;
}

.tabs ul li a.active,
.tabs ul li a:hover {
    background: linear-gradient(90deg,#ff9800,#ff5722);
    color: #000;
    box-shadow: 0 0 12px rgba(255,140,0,.4);
}

/* ===== PARTICLES FIX ===== */

#particles-js {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* ===== FIX LEFT MENU OVERLAP ===== */
.quickLinksleft ul li {
    margin-bottom: 10px;
}

.quickLinksleft ul li a {
    display: block;
    padding: 14px 16px 14px 70px; /* 👈 เพิ่ม padding-left */
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,140,0,0.08);
    transition: all .3s ease;
    position: relative; /* 👈 สำคัญ */
}

/* ขยับ icon ให้อยู่ตำแหน่งคงที่ */
.quickLinksleft ul li a img {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
}

/* hover ของเดิม */
.quickLinksleft ul li a:hover {
    background: linear-gradient(90deg,#ff9800,#ff5722);
    color: #000;
    box-shadow: 0 0 15px rgba(255,140,0,.4);
}

/* =========================================
   SLIDE FRAME - THREE KINGDOMS ANCIENT STYLE
========================================= */

#slides {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    padding: 0;
    background: #000;

    /* กรอบทองหลัก */
    border: 2px solid #caa84a;

    /* ขอบเรือง + มิติ */
    box-shadow:
        inset 0 0 0 2px rgba(255,220,120,0.6),
        0 0 25px rgba(212,175,55,0.45),
        0 0 60px rgba(255,140,0,0.25);
}

/* รูปด้านใน */
#slides img {
    width: 100%;
    display: block;
}

/* ชั้นลายโบราณด้านใน */
#slides::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 10px;
    pointer-events: none;

    /* เส้นทองบางด้านใน */
    border: 1px solid rgba(255, 215, 120, 0.5);
}

/* ลายมุมโบราณ (เอฟเฟกต์มุมทอง) */
#slides::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;

    background:
        radial-gradient(circle at top left, rgba(255,215,120,0.35) 0%, transparent 15%),
        radial-gradient(circle at top right, rgba(255,215,120,0.35) 0%, transparent 15%),
        radial-gradient(circle at bottom left, rgba(255,215,120,0.35) 0%, transparent 15%),
        radial-gradient(circle at bottom right, rgba(255,215,120,0.35) 0%, transparent 15%);
}

#slides:hover {
    box-shadow:
        inset 0 0 0 2px rgba(255,220,120,0.7),
        0 0 40px rgba(255,200,80,0.6),
        0 0 80px rgba(255,120,0,0.4);
}



.tabs ul li a {
    background: linear-gradient(145deg,#111827,#0c0f18);
    border: 1px solid rgba(212,175,55,0.2);
    color: #ccc;
    font-weight: 600;
}

.tabs ul li a.active {
    background: linear-gradient(90deg,#d4af37,#ffcc66);
    color: #000;
    box-shadow: 0 0 15px rgba(212,175,55,0.5);
}

.news_box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg,#d4af37,#ffcc66,#d4af37);
}

.news_box img {
    transition: transform .4s ease;
}

.news_box:hover img {
    transform: scale(1.05);
}

header {
    border-bottom: 2px solid #d4af37;
}