/*
Theme Name: Trade Gold
Theme URI: https://tradegold.com
Author: Trade Gold Team
Author URI: https://tradegold.com
Description: Full Width WordPress Theme for Trade Gold - A professional trading platform theme with gold and silver modes
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tradegold
Tags: full-width, trading, gold, silver, custom-colors, theme-options
*/

:root {
    /* Gold Mode Colors */
    --gold-primary: #FFD700;
    --gold-light: #FFD700;
    --gold-dark: #121212;
    --gold-bg: #F7F2EC;
    
    /* Silver Mode Colors */
    --silver: #AEB6C2;
    --silver-dark: #4EA0B7;
    --silver-light: #4EA0B7;
    --silver-bg: #DCE1E8;
    
    /* Common Colors */
    --navy: #1E3A8A;
    --navy-dark: #172d69;
    --navy-medium: #1E40AF;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --text-dark: #2c3e50;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--gold-bg) !important;
    padding-top: 0;
    min-height: 100vh;
}

/* Default - Gold Mode Background */
html:not(.silver-mode) body {
    background: var(--gold-bg) !important;
    color: #2c3e50 !important;
}

/* Gold Mode - Background #F7F2EC */
html.gold-mode body,
body.gold-mode {
    background: var(--gold-bg) !important;
    color: #2c3e50 !important;
}

/* Silver Mode - Background #DCE1E8 */
html.silver-mode body,
body.silver-mode {
    background: var(--silver-bg) !important;
    color: #2c3e50 !important;
}

html.silver-mode .header,
body.silver-mode .header {
    background: var(--silver-dark) !important;
}

html.silver-mode .footer,
body.silver-mode .footer {
    background: var(--navy) !important;
}

html.silver-mode .switch-web-button,
body.silver-mode .switch-web-button {
    background: var(--silver);
    color: #000;
}

html.silver-mode .hamburger-menu span,
body.silver-mode .hamburger-menu span,
html.silver-mode .hamburger-menu:hover span,
body.silver-mode .hamburger-menu:hover span,
html.silver-mode .hamburger-menu.active span,
body.silver-mode .hamburger-menu.active span {
    background: var(--white) !important;
}

html.silver-mode .logo-trade,
body.silver-mode .logo-trade {
    color: #FFFFFF !important;
}

html.silver-mode .logo-gold,
body.silver-mode .logo-gold {
    color: var(--silver) !important;
}

html.silver-mode .signup-btn,
body.silver-mode .signup-btn {
    background: #EEF2F7 !important;
    color: #1E3A8A !important;
}

html.silver-mode .signup-btn:hover,
body.silver-mode .signup-btn:hover {
    background: #DCE5EF !important;
}

html.silver-mode iframe,
body.silver-mode iframe {
    background: #fff !important;
}

html.silver-mode .entry-content,
body.silver-mode .entry-content {
    background: transparent !important;
}

html.silver-mode .site-main,
body.silver-mode .site-main {
    color: var(--text-dark) !important;
}

html.silver-mode .mobile-menu-dropdown,
body.silver-mode .mobile-menu-dropdown {
    background: var(--silver-dark) !important;
}

html.silver-mode .mobile-signup,
body.silver-mode .mobile-signup {
    background: #EEF2F7 !important;
    color: #1E3A8A !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

html.silver-mode .mobile-signup:hover,
body.silver-mode .mobile-signup:hover {
    background: #DCE5EF !important;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
}

html.silver-mode .mobile-menu a,
body.silver-mode .mobile-menu a {
    color: var(--white);
}

html.silver-mode .mobile-menu a:hover,
html.silver-mode .mobile-menu a.active,
body.silver-mode .mobile-menu a:hover,
body.silver-mode .mobile-menu a.active {
    color: var(--white);
}

html.silver-mode .mobile-menu a::before,
body.silver-mode .mobile-menu a::before {
    background: rgba(255, 255, 255, 0.15);
}

html.silver-mode .mobile-menu li,
body.silver-mode .mobile-menu li {
    border-bottom: none;
}

html.silver-mode .mobile-menu-close,
body.silver-mode .mobile-menu-close {
    color: var(--white);
}

html.silver-mode .nav-menu a,
body.silver-mode .nav-menu a {
    color: var(--white);
}

html.silver-mode .nav-menu a:hover,
html.silver-mode .nav-menu a.active,
html.silver-mode .nav-menu li.current-menu-item > a,
html.silver-mode .nav-menu li.current_page_item > a,
body.silver-mode .nav-menu a:hover,
body.silver-mode .nav-menu a.active,
body.silver-mode .nav-menu li.current-menu-item > a,
body.silver-mode .nav-menu li.current_page_item > a {
    color: #FFFFFF;
    border-bottom-color: #FFFFFF;
}

html.silver-mode .search-result-category,
body.silver-mode .search-result-category {
    background: var(--silver);
    color: #1E3A8A;
}

/* Silver Mode - Desktop Search Bar (Tablet/Desktop) */
html.silver-mode .desktop-search .search-bar input,
body.silver-mode .desktop-search .search-bar input {
    background: white;
    border: none;
}

html.silver-mode .desktop-search .search-bar input:focus,
body.silver-mode .desktop-search .search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(174, 182, 194, 0.3), 0 4px 12px rgba(0,0,0,0.15);
}

/* Silver Mode - Mobile Search Bar */
html.silver-mode .mobile-search .search-bar input,
body.silver-mode .mobile-search .search-bar input {
    background: white;
    border: none;
}

html.silver-mode .mobile-search .search-bar input:focus,
body.silver-mode .mobile-search .search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(174, 182, 194, 0.3), 0 4px 12px rgba(0,0,0,0.15);
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.full-width {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

/* Header & Navigation */
.header {
    background: #121212;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* Right Section: Search + Hamburger */
.nav-right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Logo Styles */
.logo-link {
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.logo-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-trade {
    color: #FFFFFF;
    transition: color 0.3s;
}

.logo-gold {
    color: #FFD700;
    transition: color 0.3s;
}

.logo-link:hover .logo-gold {
    color: #FFD700;
}

/* Search Bar Styles */
.search-bar-container {
    position: relative;
    flex: 1 1 auto;
    max-width: none;
    min-width: 200px;
    margin: 0 1rem;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: #666;
    pointer-events: none;
    z-index: 2;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(237, 191, 67, 0.3), 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.search-bar input::placeholder {
    color: #999;
}

/* Clear Search Button */
.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 102, 102, 0.15);
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    font-weight: 600;
    line-height: 1;
}

.clear-search:hover {
    background: rgba(102, 102, 102, 0.25);
    color: #333;
    transform: translateY(-50%) scale(1.15);
}

.clear-search:active {
    transform: translateY(-50%) scale(0.9);
}

/* ซ่อน default clear button ของ browser */
.search-bar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-bar input[type="search"]::-ms-clear {
    display: none;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 600px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-dropdown:empty {
    display: none !important;
}

/* Search Results Header */
.search-results-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--gray-medium);
    background: var(--gray-light);
}

/* Search Results */
.search-results {
    padding: 0;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
    border-bottom: 1px solid var(--gray-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-thumb {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.search-result-icon {
    width: 100px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--gray-light);
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--gold-primary);
}

/* Category Colors - ทุกหมวดใช้สีเดียวกัน */
.search-result-category.พื้นฐาน,
.search-result-category.basic,
.search-result-category.การลงทุน,
.search-result-category.investment,
.search-result-category.พิเศษ,
.search-result-category.special,
.search-result-category.ข่าวสาร,
.search-result-category.news,
.search-result-category.วิเคราะห์,
.search-result-category.analysis,
.search-result-category.เทคนิค,
.search-result-category.technique,
.search-result-category.ทั่วไป,
.search-result-category.general {
    background: var(--gold-primary);
    color: var(--navy);
}

.search-result-date {
    font-size: 0.8rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-result-date::before {
    content: "•";
    margin-right: 0.25rem;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: #6B7280;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Search States */
.search-loading,
.search-no-results,
.search-error {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.search-loading {
    color: var(--navy);
}

.search-error {
    color: #dc2626;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-menu a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0.4rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

/* Sign Up Button */
.signup-btn {
    background: #D2B054;
    color: #FFFFFF;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(210, 176, 84, 0.3);
    flex-shrink: 0;
    margin-left: 0;
}

.signup-btn:hover {
    background: #C2A044;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 176, 84, 0.5);
}

/* Footer */
.footer {
    background: #1E3A8A;
    color: #FFFFFF;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Switch Button */
.switch-web-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gold-primary);
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 999;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.switch-web-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        flex-wrap: wrap;
    }
    
    .search-bar-container {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 1rem 0 0 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .search-bar-container {
        max-width: 100%;
        margin: 0.5rem 0;
    }
    
    .search-bar input {
        font-size: 0.9rem;
        padding: 0.6rem 2.5rem;
    }
    
    .search-result-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .search-result-thumb {
        width: 50px;
        height: 50px;
    }
}

/* Footer Styles (Updated to match index.html) */
.footer {
    background: #1E3A8A;
    color: #FFFFFF;
    padding: 1rem 0;
    margin-top: 4rem;
    width: 100%;
}

.footer-content {
    max-width: 100%;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.footer-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

.footer-item {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.footer-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-icon svg {
    width: 18px;
    height: 18px;
    fill: #1a2332;
}

.footer-text {
    font-size: 0.75rem;
    line-height: 1.4;
}

.footer-bottom {
    text-align: right;
}

.footer-bottom div {
    font-size: 0.7rem;
}

/* Switch Web Button (Updated to match index.html) */
.switch-web-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(237, 191, 67, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 1rem;
    font-weight: 500;
    user-select: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Silver Mode: ปุ่มเป็นสีทอง (ตรงข้าม) */
html.silver-mode .switch-web-button,
body.silver-mode .switch-web-button {
    background: linear-gradient(135deg, #EDBF43 0%, #B8860B 100%);
    box-shadow: 0 8px 25px rgba(237, 191, 67, 0.4);
}

/* Gold Mode: ปุ่มเป็นสีเงิน (ตรงข้าม) */
html.gold-mode .switch-web-button,
body.gold-mode .switch-web-button {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.4);
}

.switch-web-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(237, 191, 67, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

html.silver-mode .switch-web-button:hover,
body.silver-mode .switch-web-button:hover {
    box-shadow: 0 12px 35px rgba(237, 191, 67, 0.6);
}

html.gold-mode .switch-web-button:hover,
body.gold-mode .switch-web-button:hover {
    box-shadow: 0 12px 35px rgba(192, 192, 192, 0.6);
}

.switch-web-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(237, 191, 67, 0.5);
}

.switch-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 4px;
}

.switch-icon svg {
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.switch-text {
    font-family: 'Kanit', sans-serif;
    letter-spacing: 0.3px;
}

.switch-text strong {
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    position: relative;
    margin-top: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--white) !important;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-menu:hover span,
.hamburger-menu.active span {
    background: var(--white) !important;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #121212;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 999;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 2rem 0;
    border-radius: 12px;
    max-width: 600px;
    width: calc(100% - 30px);
}

.mobile-menu-dropdown.active {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close Button for Mobile Menu - Hidden */
.mobile-menu-close {
    display: none !important;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(3px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Search Bar */
.mobile-search {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.mobile-search .search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search .search-icon {
    position: absolute;
    left: 1rem;
    color: #666;
    pointer-events: none;
    z-index: 2;
    width: 20px;
    height: 20px;
}

.mobile-search .search-bar input {
    width: 100%;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-search .search-bar input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(237, 191, 67, 0.3), 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.mobile-search .search-bar input::placeholder {
    color: #999;
}

.mobile-search .search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 1rem;
    right: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 480px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

/* Mobile Navigation */
.mobile-navigation {
    display: block;
    margin: 0.5rem 0;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-menu li {
    border-bottom: none;
}

.mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-menu a {
    display: block;
    padding: 1rem 0;
    margin: 0 1rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
}

.mobile-menu a::before {
    content: '';
    position: absolute;
    left: -1rem;
    right: -1rem;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 8px;
    z-index: -1;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--white);
}

.mobile-menu a:hover::before,
.mobile-menu a.active::before {
    transform: scaleX(1);
}

/* Mobile Signup Button */
.mobile-signup {
    display: block;
    margin: 1.5rem 1.5rem 0.5rem;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: #D2B054;
    color: #FFFFFF;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(210, 176, 84, 0.3);
}

.mobile-signup:hover {
    background: #C2A044;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(210, 176, 84, 0.4);
}

/* Desktop/Mobile Visibility Controls */
.desktop-menu,
.desktop-search,
.desktop-signup {
    display: flex;
}

.mobile-menu-dropdown,
.hamburger-menu {
    display: none;
}

/* Desktop Large (1013px ขึ้นไป) - แสดงเมนูแนวนอนปกติ */
@media (min-width: 1013px) {
    .hamburger-menu {
        display: none !important;
    }
    
    /* Remove margin-left auto from nav-right-section on desktop */
    .nav-right-section {
        margin-left: 0 !important;
        flex: 1 1 auto;
    }
    
    .desktop-menu,
    .desktop-search,
    .desktop-signup {
        display: flex !important;
    }
    
    .mobile-menu-dropdown {
        display: none !important;
    }
    
    /* Search bar uses full available space */
    .search-bar-container {
        max-width: none;
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .search-bar-container {
        max-width: none;
    }
}

/* Extra Large Desktop (1800px+) */
@media (min-width: 1800px) {
    .nav-container {
        max-width: 1800px;
    }
    
    .search-bar-container {
        max-width: none;
    }
}

/* Tablet (769px - 1012px) - Hamburger + Dropdown 600px */
@media (min-width: 769px) and (max-width: 1012px) {
    /* Hide desktop menu, show hamburger */
    .desktop-menu,
    .desktop-signup {
        display: none !important;
    }
    
    .nav-container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.75rem;
        justify-content: space-between;
        padding: 0 1.5rem;
    }
    
    .logo-link {
        flex: 0 0 auto;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .desktop-search {
        display: flex !important;
        flex: 1 1 auto;
        max-width: none;
        margin: 0 0.5rem;
        min-width: 0;
    }
    
    .search-bar-container {
        max-width: none;
        margin: 0;
        min-width: 150px;
    }
    
    .hamburger-menu {
        display: flex !important;
        flex: 0 0 auto;
        margin-left: 0;
    }
    
    .hamburger-menu span {
        background: var(--white) !important;
    }
    
    .hamburger-menu:hover span,
    .hamburger-menu.active span {
        background: var(--white) !important;
    }
    
    /* Silver Mode - Ensure hamburger is white */
    html.silver-mode .hamburger-menu span,
    body.silver-mode .hamburger-menu span {
        background: var(--white) !important;
    }
    
    html.silver-mode .hamburger-menu:hover span,
    html.silver-mode .hamburger-menu.active span,
    body.silver-mode .hamburger-menu:hover span,
    body.silver-mode .hamburger-menu.active span {
        background: var(--white) !important;
    }
    
    /* Tablet dropdown style - top positioned */
    .mobile-menu-dropdown {
        max-width: 600px;
        width: calc(100% - 60px);
        max-height: calc(100vh - 100px);
        top: 80px;
    }
    
    .mobile-search {
        padding: 0 1rem;
    }
    
    .mobile-menu a {
        font-size: 18px;
        padding: 20px 30px;
    }
}

/* Mobile (768px ลงไป) - Hamburger + Dropdown เต็มจอ */
@media (max-width: 768px) {
    /* Show hamburger, hide desktop menu */
    .hamburger-menu {
        display: flex !important;
    }
    
    .desktop-menu,
    .desktop-search,
    .desktop-signup {
        display: none !important;
    }
    
    .mobile-menu-dropdown {
        display: none;
        width: calc(100% - 30px);
        max-width: 500px;
        padding: 1.5rem 0;
        max-height: calc(100vh - 100px);
        top: 80px;
    }
    
    .mobile-menu-dropdown.active {
        display: block;
    }
    
    .mobile-search {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }
    
    .mobile-menu a {
        font-size: 16px;
        padding: 18px 15px;
    }
    
    .mobile-signup {
        margin: 1.5rem 1rem 0.5rem;
    }
    
    /* Adjust header padding */
    .header {
        padding: 0.875rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }
    
    /* Logo size adjustment */
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
    }
    
    /* Desktop Search Bar Styles (for reference - hidden on mobile) */
    .desktop-search .search-bar input {
        font-size: 0.9rem;
        padding: 0.6rem 2.5rem 0.6rem 2.8rem;
    }
    
    /* Search Results Responsive */
    .search-dropdown {
        max-height: 540px;
    }
    
    .search-result-item {
        padding: 0.875rem;
        gap: 0.875rem;
    }
    
    .search-result-thumb {
        width: 55px;
        height: 55px;
    }
    
    .search-result-title {
        font-size: 0.92rem;
    }
    
    .search-result-excerpt {
        font-size: 0.82rem;
    }
    
    /* Footer Responsive */
    .footer {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .footer-grid {
        flex-direction: column;
        width: 100%;
        gap: 1.25rem;
        align-items: flex-start;
    }
    
    .footer-item {
        width: 100%;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .footer-icon {
        margin-top: 0.15rem;
    }
    
    .footer-text {
        text-align: left;
        flex: 1;
    }
    
    .footer-bottom {
        text-align: left;
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    /* Switch Button Responsive */
    .switch-web-button {
        bottom: 20px;
        right: 20px;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .switch-icon {
        width: 24px;
        height: 24px;
    }

    .switch-text {
        font-size: 0.85rem;
    }
    
    /* Smooth scroll for mobile */
    .mobile-menu-dropdown {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(237, 191, 67, 0.3) transparent;
    }
    
    .mobile-menu-dropdown::-webkit-scrollbar {
        width: 4px;
    }
    
    .mobile-menu-dropdown::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .mobile-menu-dropdown::-webkit-scrollbar-thumb {
        background: rgba(237, 191, 67, 0.3);
        border-radius: 2px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-image {
        width: 36px;
        height: 36px;
    }
    
    .hamburger-menu {
        width: 26px;
        height: 18px;
    }
    
    .hamburger-menu span {
        height: 2.5px;
    }
    
    .mobile-menu-dropdown {
        width: calc(100% - 20px);
        max-width: 400px;
        padding: 1.25rem 0;
        max-height: calc(100vh - 90px);
        top: 75px;
    }
    
    .mobile-search {
        padding: 0 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-menu a {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .mobile-signup {
        margin: 1.5rem 1rem 0.5rem;
        padding: 0.7rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .mobile-search {
        padding: 0 1rem;
    }
    
    .mobile-search .search-bar input {
        font-size: 0.9rem;
        padding: 0.65rem 1.5rem 0.65rem 2.75rem;
    }
    
    .mobile-search .search-icon {
        width: 18px;
        height: 18px;
        left: 0.85rem;
    }
    
    .mobile-search .search-dropdown {
        left: 1rem;
        right: 1rem;
        max-height: 420px;
    }
    
    /* Footer for Small Mobile */
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-item {
        gap: 0.5rem;
    }
    
    .footer-icon {
        width: 28px;
        height: 28px;
    }
    
    .footer-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-text {
        font-size: 0.7rem;
    }
    
    .footer-bottom div {
        font-size: 0.65rem;
    }
    
    .switch-web-button {
        bottom: 15px;
        right: 15px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

    .switch-text {
        display: none;
    }

    .switch-icon {
        margin: 0;
    }
}

/* Landscape Mobile Fix */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-menu-dropdown {
        max-height: calc(100vh - 80px);
        padding: 0.75rem 0;
        top: 70px;
    }
    
    .mobile-search {
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-menu a {
        padding: 0.65rem 1.5rem;
    }
}

