/* ================================================================= */
/* WINDZERO DAY - GLOBAL SHARED STYLES */
/* ================================================================= */

/* ================================================================= */
/* 1. GLOBAL VARIABLES & FONTS */
/* ================================================================= */

:root {
    /* สีธีมหลัก (ส้ม-เหลือง) */
    --primary-orange: #f57c00;
    --secondary-orange: #ff9800;
    --bg-card-light: #fff9c4;  /* สีพื้นหลังการ์ด (เหลือง) */
    
    /* สีโหมดมืด */
    --bg-dark: #1c1c1e;
    --text-dark-mode: #e0e0e0;
    --card-dark: #2e2e33;
    
    /* ฟอนต์ */
    --font-main: 'Prompt', sans-serif;
}

/* บังคับใช้ฟอนต์ Prompt ทั้งเว็บ */
html, body, h1, h2, h3, h4, h5, h6, a, p, span, div, input, button {
    font-family: var(--font-main) !important;
}

/* ลบ margin/padding ที่ไม่จำเป็น */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* ================================================================= */
/* 2. LAYOUT GRID & RESPONSIVE */
/* ================================================================= */

/* Header Container */
.header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* หน้าจอ Desktop (กว้างกว่า 900px) */
@media screen and (min-width: 900px) {
    .main-grid-container {
        display: grid !important;
        grid-template-columns: 1fr 300px !important;
        gap: 40px !important;
        max-width: 1200px !important; /* ลดจาก 1400px เป็น 1200px */
        margin: 0 auto !important;
        padding: 0 20px !important;
        align-items: start;
        box-sizing: border-box !important;
    }

    .main {
        display: grid !important;
        grid-template-columns: 1fr 300px !important;
        gap: 40px !important;
        max-width: 1200px !important; /* ลดจาก 1400px เป็น 1200px */
        margin: 0 auto !important;
        padding: 0 20px !important;
        align-items: start;
        box-sizing: border-box !important;
    }

    .posts-area {
        min-width: 0;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        box-sizing: border-box !important;
    }

    .sidebar {
        position: sticky !important;
        top: 20px;
        width: 300px !important;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 12px; /* ลด gap จาก 20px เป็น 12px */
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        margin-top: 0 !important;
        padding-top: 0 !important;
        align-items: stretch; /* ให้ widgets มีความกว้างเท่ากัน */
    }
    
    /* ให้ entry-header กับ widget-title อยู่บรรทัดเดียวกัน */
    .posts-area .post-entry:first-child .entry-header {
        margin-top: 0 !important;
    }
    
    .sidebar .sidebar-widget:first-child {
        margin-top: 0 !important;
    }
    
    /* ให้ alignment ตรงกัน โดยดูจาก top ของ header */
    .posts-area {
        align-items: start;
    }
    
    .sidebar {
        align-items: start;
    }
}

/* หน้าจอใหญ่พิเศษ (Wide Screen) */
@media screen and (min-width: 1600px) {
    .main-grid-container,
    .main {
        max-width: 1300px !important; /* ลดจาก 1500px เป็น 1300px */
    }
    
    .nav {
        max-width: 1300px !important; /* ลดจาก 1500px เป็น 1300px */
        padding-right: 20px !important;
    }
}

/* หน้าจอมือถือ (ต่ำกว่า 900px) */
@media screen and (max-width: 899px) {
    .main-grid-container,
    .main {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 15px !important;
    }
    
    .sidebar {
        width: 100% !important;
        margin-top: 40px;
    }
}

/* ================================================================= */
/* 3. HEADER & NAVIGATION */
/* ================================================================= */
.header {
    background: #ffffff !important;
    border-bottom: 1px solid #e0e0e0;
    width: 100% !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

/* ลด padding ของ main content */
main.main {
    margin-top: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 0 !important;
}

/* Override padding จาก theme */
.main {
    padding: 20px var(--gap) var(--gap) var(--gap) !important;
}

@media screen and (min-width: 900px) {
    .main {
        padding-top: 20px !important;
    }
}

.nav {
    max-width: 1200px !important; /* ลดจาก 1400px เป็น 1200px */
    margin: 0 auto !important;
    padding: 12px 20px !important;
    line-height: normal !important; /* Override theme's 60px line-height */
    min-height: auto !important;
    height: auto !important;
    background: transparent !important;
    border-bottom: none !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    display: flex !important;
    box-sizing: border-box !important;
}

/* จัดตำแหน่งให้ menu "ค้นหา" align กับขอบซ้ายของ sidebar */
@media screen and (min-width: 900px) {
    .nav {
        /* กลับไปใช้ padding เดิม */
        padding-right: 20px !important;
    }
}

/* Logo Section */
.logo {
    margin: 0 !important; /* Override theme's margin: auto var(--gap) */
    display: flex;
    align-items: center;
}

.logo a {
    color: #000 !important;
    display: flex;
    flex-direction: column;
    line-height: 1.4 !important; /* Override line-height */
    text-decoration: none;
    font-size: 1.5rem !important;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

.logo a::after {
    content: "ข่าวสารเทคโนโลยี Cybersecurity และ System Programming";
    font-size: 0.813rem;
    font-weight: 400;
    color: #666;
    margin-top: 3px;
    display: block;
    line-height: 1.3;
}

/* Navigation Menu - Desktop (default) */
#menu {
    margin: 0 !important; /* Override theme's margin: auto var(--gap) */
    padding: 0 !important;
    border-top: none !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    line-height: normal !important;
}

#menu li {
    margin: 0 !important;
    margin-left: 16px !important; /* Spacing ระหว่าง menu items */
}

#menu li:first-child {
    margin-left: 0 !important;
}

#menu a {
    color: #333 !important;
    transition: color 0.2s ease;
    font-weight: 500;
    font-size: 0.938rem !important;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    line-height: normal !important;
    height: auto !important;
}

#menu a span {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: normal !important;
}

#menu a:hover {
    color: var(--primary-orange) !important;
    background-color: transparent;
}

#menu .active,
#menu a span.active {
    color: var(--primary-orange) !important;
    background-color: transparent;
    border-bottom: 2px solid var(--primary-orange) !important;
    padding-bottom: 2px;
}

#menu a .active {
    border-bottom: none !important;
    padding-bottom: 0;
}

/* ================================================================= */
/* MOBILE DROPDOWN MENU - เฉพาะโทรศัพท์เท่านั้น */
/* ================================================================= */

/* Hamburger Menu Toggle (ซ่อนใน desktop และ tablet) */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    z-index: 1001;
    order: 2;
}

.menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Dark mode สำหรับ hamburger */
body.dark .menu-icon span {
    background-color: #fff;
}

/* Tablet (481px - 768px) - ยังแสดง menu แนวนอน */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .header {
        padding: 20px 0 0 0 !important;
    }
    
    .nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .logo {
        width: 100%;
    }
    
    .logo a {
        font-size: 1.8rem;
    }
    
    .logo a::after {
        font-size: 0.813rem;
        margin-top: 6px;
    }
    
    #menu {
        width: 100%;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
        gap: 8px;
        display: flex !important;
        flex-wrap: wrap;
    }
    
    #menu a {
        padding: 8px 12px;
        border-radius: 6px;
    }
    
    #menu a:hover {
        background-color: #fff3e0;
    }
    
    #menu .active {
        background-color: #fff3e0;
        border-bottom: none !important;
    }
}

/* โทรศัพท์เท่านั้น (≤ 480px) - ใช้ Dropdown Menu */
@media screen and (max-width: 480px) {
    .header {
        padding: 15px 0 0 0 !important;
    }
    
    .nav {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative;
        padding: 12px 15px !important;
    }
    
    .logo {
        width: auto;
        flex: 1;
    }
    
    .logo a {
        font-size: 1.4rem !important;
    }
    
    .logo a::after {
        font-size: 0.7rem;
        margin-top: 3px;
        line-height: 1.2;
    }
    
    /* แสดง Hamburger Button */
    .menu-icon {
        display: flex;
    }
    
    /* ซ่อน Menu เริ่มต้น */
    #menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #f0f0f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 1000;
    }
    
    /* เมื่อเปิด Menu */
    .menu-toggle:checked ~ #menu {
        max-height: 600px;
        opacity: 1;
        padding: 8px 0;
    }
    
    #menu li {
        margin: 0 !important;
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
    }
    
    #menu li:last-child {
        border-bottom: none;
    }
    
    #menu a,
    #menu button {
        width: 100%;
        padding: 14px 20px !important;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        font-size: 0.95rem !important;
    }
    
    #menu a:hover,
    #menu a:focus {
        background-color: #fff3e0;
        color: var(--primary-orange) !important;
    }
    
    #menu .active {
        background-color: #fff3e0;
        border-bottom: none !important;
        color: var(--primary-orange) !important;
        font-weight: 600;
    }
    
    /* Animation สำหรับ Hamburger Icon */
    .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Dark Mode Support */
    body.dark #menu {
        background: var(--entry, #1e1e1e);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    body.dark #menu li {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    body.dark #menu a:hover,
    body.dark #menu a:focus {
        background-color: rgba(255, 152, 0, 0.1);
    }
    
    body.dark #menu .active {
        background-color: rgba(255, 152, 0, 0.15);
    }
}

/* สำหรับโทรศัพท์เล็กมาก (≤ 360px) */
@media screen and (max-width: 360px) {
    .logo a {
        font-size: 1.2rem !important;
    }
    
    .logo a::after {
        font-size: 0.65rem;
    }
    
    #menu a,
    #menu button {
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
    }
}

/* ================================================================= */
/* 4. SIDEBAR WIDGETS */
/* ================================================================= */
.sidebar-widget {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    margin-bottom: 0; /* ลบ margin-bottom เพื่อใช้ gap แทน */
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%; /* ให้มีความกว้างเท่ากัน */
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.widget-title {
    margin: 0 !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #00db84 0%, #00b872 100%);
}

.sidebar-widget ul {
    list-style: disc !important; /* เพิ่ม bullet */
    padding: 12px 16px 12px 32px !important; /* เพิ่ม padding-left เพื่อให้ bullet เห็นชัด */
    margin: 0 !important;
}

.sidebar-widget li {
    padding: 6px 0 !important; /* ลด padding */
    border-bottom: none !important; /* ลบเส้นใต้ */
    line-height: 1.6;
    list-style: disc;
    margin-left: 0;
}

.sidebar-widget li a {
    text-decoration: none !important;
    color: #333 !important;
    font-size: 0.875rem !important;
    display: block;
    transition: all 0.2s;
    padding: 4px 0;
}

.sidebar-widget li a:hover {
    color: var(--primary-orange) !important;
    padding-left: 6px;
}

.sidebar-widget p {
    color: #333;
    font-size: 0.875rem;
    padding: 12px 16px 12px 32px; /* เพิ่ม padding-left เพื่อให้มี bullet */
    margin: 0;
    line-height: 1.6;
    position: relative;
}

/* เพิ่ม bullet ให้กับ p ใน sidebar-widget */
.sidebar-widget p::before {
    content: "•";
    position: absolute;
    left: 16px;
    color: #333;
    font-size: 1.2em;
}

/* ================================================================= */
/* SIDEBAR WIDGET CONTENT STYLING */
/* ================================================================= */
/* Widget Content Styling */
.sidebar-widget .widget-content {
    padding: 12px 16px;
    color: #333;
    font-size: 0.875rem;
    line-height: 1.6;
}

.sidebar-widget .widget-content p {
    margin: 0 0 8px 0;
    padding: 0;
    position: relative;
    padding-left: 20px;
}

.sidebar-widget .widget-content p:last-child {
    margin-bottom: 0;
}

.sidebar-widget .widget-content p::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #333;
    font-size: 1.2em;
}

/* Tag Cloud Styling */
.sidebar-widget .tag-cloud {
    padding: 12px 16px;
}

.sidebar-widget .tag-cloud .tag-link {
    font-size: 11px;
    padding: 4px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    margin: 4px 2px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.sidebar-widget .tag-cloud .tag-link:hover {
    background: #c8e6c9 !important;
    transform: translateY(-1px);
    color: #1b5e20 !important;
}

/* Newsletter Form Styling */
.sidebar-widget .newsletter-form {
    margin-top: 10px;
}

.sidebar-widget .newsletter-form input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    box-sizing: border-box;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.sidebar-widget .newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-orange, #ff9800);
}

.sidebar-widget .newsletter-form button[type="submit"] {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-widget .newsletter-form button[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Dark Mode Support for Widget Content */
body.dark .sidebar-widget .widget-content {
    color: var(--secondary, #b0b0b0);
}

body.dark .sidebar-widget .widget-content p::before {
    color: var(--secondary, #b0b0b0);
}

body.dark .sidebar-widget .tag-cloud .tag-link {
    background: rgba(76, 175, 80, 0.2) !important;
    color: #81c784 !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

body.dark .sidebar-widget .tag-cloud .tag-link:hover {
    background: rgba(76, 175, 80, 0.3) !important;
    color: #a5d6a7 !important;
}

body.dark .sidebar-widget .newsletter-form input[type="email"] {
    background: var(--entry, #1e1e1e);
    border-color: var(--border, rgba(255, 255, 255, 0.1));
    color: var(--primary, #fff);
}

body.dark .sidebar-widget .newsletter-form input[type="email"]:focus {
    border-color: var(--primary-orange, #ff9800);
}

/* ================================================================= */
/* 5. FOOTER */
/* ================================================================= */
@media screen and (min-width: 900px) {
    .main,
    .main-grid-container {
        padding-bottom: 100px !important;
    }
}

.footer, footer.page-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    margin-top: 60px !important;
    padding: 40px 20px !important;
    text-align: center;
    background-color: transparent;
    clear: both;
    border-top: 1px solid #eee;
}

.footer span, footer.page-footer span {
    color: #888;
    font-size: 13px;
    display: block;
    margin-top: 5px;
}

.footer a, footer.page-footer a {
    color: #666;
    text-decoration: none;
}

.footer a:hover, footer.page-footer a:hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

/* ================================================================= */
/* 6. SOCIAL ICONS */
/* ================================================================= */
.social-icons {
    position: fixed !important;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background-color: rgba(46, 46, 51, 0.9);
    backdrop-filter: blur(5px);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.social-icons:hover {
    transform: translateY(-5px);
}

.social-icons a svg {
    width: 24px;
    height: 24px;
    color: #fff;
    transition: all 0.2s ease;
}

.social-icons a:hover svg {
    color: var(--primary-orange);
    transform: scale(1.1);
}

@media screen and (min-width: 900px) {
    .social-icons {
        right: 20px !important;
        bottom: 20px !important;
    }
}

@media screen and (max-width: 600px) {
    .social-icons {
        bottom: 20px;
        right: 20px;
        padding: 8px 12px;
        gap: 10px;
    }
    
    .social-icons a svg {
        width: 20px;
        height: 20px;
    }
}

/* ================================================================= */
/* 6.5. TOP LINK (Go to Top Button) */
/* ================================================================= */
.top-link {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: rgba(46, 46, 51, 0.9) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9998 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    visibility: hidden !important;
    opacity: 0 !important;
    text-decoration: none !important;
    color: #fff !important;
}

.top-link:hover {
    transform: translateY(-5px) !important;
    background-color: var(--primary-orange) !important;
}

.top-link svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor !important;
}

body.dark .top-link {
    background-color: rgba(46, 46, 51, 0.9) !important;
}

body.dark .top-link:hover {
    background-color: var(--primary-orange) !important;
}

/* ================================================================= */
/* 7. DARK MODE - GLOBAL */
/* ================================================================= */
body.dark {
    background-color: var(--bg-dark) !important;
}

body.dark .header {
    background: #1c1c1e !important;
    border-bottom: 1px solid #333;
}

body.dark .nav {
    background: transparent !important;
    border-bottom: none !important;
}

body.dark .logo a {
    color: #fff !important;
}

body.dark .logo a::after {
    color: #aaa !important;
}

body.dark #menu a {
    color: #ccc !important;
}

body.dark #menu a:hover {
    color: #fff !important;
}

/* Sidebar โหมดมืด */
body.dark .sidebar-widget {
    background-color: var(--card-dark);
    border-color: #333;
}

body.dark .sidebar-widget li {
    border-color: #444;
}

body.dark .sidebar-widget li a {
    color: #e0e0e0 !important;
}

body.dark .sidebar-widget li a:hover {
    color: #ffcc80 !important;
}

/* ข้อความใน Sidebar Widget (เช่น Recent Updates) */
body.dark .sidebar-widget p {
    color: #e0e0e0 !important;
}

body.dark .sidebar-widget {
    color: #e0e0e0 !important;
}

/* Footer โหมดมืด */
body.dark .footer span, body.dark footer.page-footer span {
    color: #aaa;
}

body.dark .footer a, body.dark footer.page-footer a {
    color: #ccc;
}

body.dark .footer a:hover, body.dark footer.page-footer a:hover {
    color: var(--secondary-orange);
}

/* ================================================================= */
/* 9. SEARCH PAGE STYLING */
/* ================================================================= */

/* Search Page Layout - ให้อยู่ตรงกลาง */
main.main {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 60vh !important;
}

/* Search Container - อยู่ตรงกลาง */
#searchbox.search-container {
    max-width: 700px !important;
    width: 100% !important;
    margin: 60px auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Page Header - อยู่ตรงกลาง */
.page-header {
    text-align: center !important;
    max-width: 700px !important;
    margin: 40px auto 20px !important;
    width: 100% !important;
}

/* Search Input Wrapper - แบบ Flexbox, อยู่ตรงกลาง */
.search-input-wrapper {
    display: flex !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto 20px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid #e0e0e0 !important;
    transition: all 0.3s ease !important;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-orange) !important;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.2) !important;
}

/* Search Input */
#searchInput {
    flex: 1 !important;
    padding: 16px 20px !important;
    font-size: 1rem !important;
    border: none !important;
    outline: none !important;
    background-color: #ffffff !important;
    color: #333 !important;
    font-family: var(--font-main) !important;
}

#searchInput::placeholder {
    color: #999 !important;
}

#searchInput:focus {
    outline: none !important;
}

/* Search Button */
.search-button {
    padding: 16px 24px !important;
    background: linear-gradient(135deg, var(--secondary-orange) 0%, var(--primary-orange) 100%) !important;
    border: none !important;
    cursor: pointer !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    min-width: 60px !important;
}

.search-button:hover {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #e65100 100%) !important;
    transform: scale(1.05);
}

.search-button:active {
    transform: scale(0.98);
}

.search-button svg {
    width: 20px !important;
    height: 20px !important;
}

/* Search Results - อยู่ตรงกลาง */
#searchResults {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 600px !important;
}

#searchResults li {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

#searchResults li:hover {
    background-color: #fff9c4 !important;
    border-color: var(--primary-orange) !important;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.15) !important;
}

#searchResults li.focus {
    background-color: #fff9c4 !important;
    border-color: var(--primary-orange) !important;
    border-width: 2px !important;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.2) !important;
}

#searchResults .entry-header {
    color: #333 !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#searchResults a {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

/* Search Page Header */
.page-header h1 {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: var(--primary-orange) !important;
    font-size: 2rem !important;
    margin-bottom: 10px !important;
}

.page-header h1 svg {
    color: var(--primary-orange) !important;
}

/* Dark Mode - Search Page */
body.dark .search-input-wrapper {
    border-color: #444 !important;
    background-color: var(--card-dark) !important;
}

body.dark .search-input-wrapper:focus-within {
    border-color: #ff9800 !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
}

body.dark #searchInput {
    background-color: var(--card-dark) !important;
    color: #e0e0e0 !important;
}

body.dark #searchInput::placeholder {
    color: #888 !important;
}

body.dark .search-button {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
}

body.dark .search-button:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%) !important;
}

body.dark #searchResults li {
    background-color: var(--card-dark) !important;
    border-color: #444 !important;
}

body.dark #searchResults li:hover {
    background-color: rgba(255, 152, 0, 0.1) !important;
    border-color: #ff9800 !important;
}

body.dark #searchResults li.focus {
    background-color: rgba(255, 152, 0, 0.15) !important;
    border-color: #ff9800 !important;
}

body.dark #searchResults .entry-header {
    color: #e0e0e0 !important;
}

/* Responsive */
@media screen and (max-width: 600px) {
    #searchbox.search-container {
        margin: 30px auto !important;
        padding: 0 15px !important;
        width: 100% !important;
    }
    
    .page-header {
        margin: 20px auto 15px !important;
        padding: 0 15px !important;
    }
    
    .search-input-wrapper {
        flex-direction: row !important; /* เก็บเป็นแนวนอนเพื่อความสวยงาม */
        border-radius: 8px !important;
        max-width: 100% !important;
    }
    
    #searchInput {
        border-radius: 0 !important;
        padding: 14px 16px !important;
        font-size: 0.95rem !important;
    }
    
    .search-button {
        border-radius: 0 8px 8px 0 !important;
        padding: 14px 18px !important;
        min-width: 50px !important;
    }
    
    .search-button svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    #searchResults {
        max-width: 100% !important;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }
}

/* ================================================================= */
/* 10. PAGINATION STYLING */
/* ================================================================= */
.pagination a {
    color: var(--primary-orange) !important;
    background: #ffffff !important;
    border: 1px solid var(--primary-orange) !important;
    transition: all 0.2s ease !important;
}

.pagination a:hover {
    color: #ffffff !important;
    background: var(--primary-orange) !important;
    border-color: var(--primary-orange) !important;
}

body.dark .pagination a {
    color: #ffcc80 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid #ffcc80 !important;
}

body.dark .pagination a:hover {
    color: #2e2e33 !important;
    background: #ffcc80 !important;
    border-color: #ffcc80 !important;
}

/* ================================================================= */
/* END OF CUSTOM.CSS */
/* ================================================================= */
