/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-dark);
    background-image:
        radial-gradient(circle at 15% 20%, rgba(201, 164, 92, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', 'Poppins', sans-serif;
    color: var(--color-heading);
    line-height: 1.2;
}

h1 { font-size: 2em; }
h2 { font-size: 1.7em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ===== CSS Variables ===== */
:root {
    --color-primary: #c9a45c;
    --color-secondary: #f2e8d5;
    --color-heading: #dcd0ba;
    --color-text: #eae0c8;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-bg-light: #1e1e1e;
    --color-bg-dark: #121212;
    --color-bg-card: #1e1e1e;
    --color-white: #faf9f6;
    --color-text-muted: #cbbba1;
    --color-text-light: #a49781;
    --color-gold: #c9a45c;
    --color-gold-light: #d8bb7d;
    --color-gold-dark: #b08c45;
    --color-facebook: #3b5998;
    --color-twitter: #1da1f2;
    --color-linkedin: #0077b5;
    --color-whatsapp: #25d366;
    --color-youtube: #cd201f;
    --color-email: #ea4335;
    --color-print: #555555;
    --footer-bg: #0a0a0a;
    --footer-text: #cbbba1;
}

/* ===== HEADER (Desktop) ===== */
.header-desktop {
    background: var(--color-bg-dark);
    border-top: none;
    border-bottom: 1px solid rgba(201, 164, 92, 0.15);
}

.header-top {
    padding: 22px 0;
    background: var(--color-bg-dark);
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header-logo {
    flex: 0 0 auto;
}

.logo-img {
    max-height: 90px;
    width: auto;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    color: var(--color-gold);
    font-size: 5em;
    font-weight: bold;
    white-space: nowrap;
    letter-spacing: 0.08em;
}

.header-search {
    flex: 0 0 auto;
}

.search-form .search-container {
    display: flex;
    align-items: center;
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(30, 30, 30, 0.8);
}

.search-input {
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    width: 180px;
    font-family: inherit;
    background: transparent;
    color: var(--color-text);
}

.search-input::placeholder {
    color: var(--color-text-light);
}

.search-btn {
    background: var(--color-gold);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--color-bg-dark);
    font-size: 15px;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--color-gold-dark);
}

.header-share {
    flex: 0 0 auto;
    text-align: center;
}

.header-share h4 {
    color: var(--color-gold-light);
    font-size: 12px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* ===== Share Buttons ===== */
.share-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.85;
    color: #fff;
}

.share-buttons--icon-only .share-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
    border-radius: 4px !important;
}

.share-btn--facebook { background: #3b5998; }
.share-btn--twitter { background: #1da1f2; }
.share-btn--youtube { background: #cd201f; display: none; }
.share-btn--linkedin { background: var(--color-linkedin); }
.share-btn--whatsapp { background: var(--color-whatsapp); }
.share-btn--email { background: #cc0000; }
.share-btn--line { background: #06C755; }
.share-btn--print { background: #888888; }

.share-buttons--with-text .share-btn--facebook { background: #3b5998; }
.share-buttons--with-text .share-btn--twitter { background: #1da1f2; }
.share-buttons--with-text .share-btn--linkedin { background: #0077b5; }
.share-buttons--with-text .share-btn--whatsapp { background: transparent; color: #25d366; border: 1px solid #25d366; }
.share-buttons--with-text .share-btn--whatsapp i,
.share-buttons--with-text .share-btn--whatsapp span { color: #25d366; }
.share-buttons--with-text .share-btn--email { background: #cc0000; }
.share-buttons--with-text .share-btn--line { background: #06C755; }

/* Share with text (article bottom) */
.share-buttons--with-text {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.share-buttons--with-text .share-btn {
    border-radius: 0;
    padding: 8px 14px;
    font-size: 14px;
    gap: 8px;
}

.share-buttons--with-text .share-btn span {
    font-size: 13px;
}

/* ===== NAVIGATION ===== */
.header-nav {
    background: var(--color-bg-card);
    border-top: none;
    border-bottom: 1px solid rgba(201, 164, 92, 0.3);
}

.main-nav {
    position: relative;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-menu > li > a:hover,
.nav-menu > li:hover > a {
    color: var(--color-gold);
}

.nav-menu > li > a .fa-caret-down {
    font-size: 11px;
    margin-left: 3px;
    color: var(--color-text-muted);
}

/* Sub Menu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #1e1e1e;
    border: 1px solid rgba(201, 164, 92, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s ease;
    padding: 5px 0;
}

.has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 10px 24px;
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sub-menu li a:hover {
    background: rgba(201, 164, 92, 0.15);
    color: var(--color-gold);
    text-decoration: none;
}

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

.nav-divider {
    display: none;
}

/* ===== Mobile Header ===== */
.header-mobile {
    display: none;
    background: var(--color-bg-dark) !important;
    border-top: none;
}

.header-mobile-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 10px;
    background: var(--color-bg-dark);
}

.mobile-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
}

.mobile-search {
    flex: 1;
}

.mobile-search .search-input {
    width: 100%;
}

.mobile-share-area h4 {
    color: var(--color-gold-light);
    font-size: 12px;
    margin-bottom: 4px;
}

.mobile-share-area .share-buttons--icon-only .share-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
    border-radius: 4px !important;
}

.mobile-nav-wrapper {
    background: var(--color-bg-card);
    border-top: none;
    border-bottom: 2px solid var(--color-gold);
    position: relative;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 10px 0;
    color: var(--color-secondary);
}

.mobile-nav .nav-menu {
    display: block;
}

.mobile-nav .nav-menu > li > a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(201, 164, 92, 0.2);
    color: var(--color-gold);
}

.mobile-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 20px;
    background: rgba(0,0,0,0.2);
}

.mobile-nav .sub-menu li a {
    color: var(--color-gold-light);
    border-bottom-color: rgba(201, 164, 92, 0.1);
}

.mobile-nav .sub-menu.open {
    display: block;
}

.arrow-toggle {
    cursor: pointer;
    padding: 5px 10px;
    float: right;
    color: var(--color-gold);
}

/* ===== ARTICLE TITLE BANNER (thin dark strip) ===== */
.article-title-banner {
    background: linear-gradient(135deg, rgba(201, 164, 92, 0.15), rgba(30, 30, 30, 0.8));
    border-left: 4px solid var(--color-gold);
    padding: 10px 20px;
    margin-bottom: 25px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 20px);
    padding-right: calc(50vw - 50% + 20px);
}

.article-title-banner .article-title-small {
    color: var(--color-secondary) !important;
    font-size: 0.95em;
    font-weight: 400;
}

/* ===== ARTICLE LAYOUT ===== */
.article-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding-bottom: 40px;
}

/* Article Main */
.article-content-wrapper {
    background: var(--color-bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.article-title {
    font-size: 1.6em;
    color: var(--color-heading);
    margin-bottom: 20px;
    line-height: 1.4;
    font-weight: 400;
}

.article-body p {
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 15px;
    color: var(--color-text);
}

.article-subtitle {
    font-size: 1.15em;
    color: var(--color-secondary);
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-featured-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin-bottom: 10px;
}

.article-body a {
    color: var(--color-primary);
}

.article-body a:hover {
    text-decoration: underline;
}

/* ===== RELATED POSTS (3-column thumbnails) ===== */
.related-posts-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.related-posts-headline {
    font-size: 1.1em;
    color: var(--color-gold);
    margin-bottom: 15px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--color-gold);
    display: inline-block;
}

.related-posts-headline em {
    font-style: italic;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-post-card {
    display: block;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.related-post-card:hover {
    color: var(--color-gold);
    background: rgba(201, 164, 92, 0.08);
    border-color: rgba(201, 164, 92, 0.2);
}

.related-post-thumb {
    display: none;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date {
    font-size: 11px;
    color: var(--color-text-light);
    display: block;
}

.related-post-cat {
    font-size: 11px;
    color: var(--color-text-light);
    background: none;
    padding: 0;
    border-radius: 0;
    display: block;
    margin-top: 2px;
}

/* ===== POST NAVIGATION ===== */
.post-navigation {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(201, 164, 92, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(30, 30, 30, 0.5);
    margin-bottom: 25px;
}

.post-nav-prev,
.post-nav-next {
    flex: 1;
}

.post-nav-prev a,
.post-nav-next a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

.post-nav-prev a:hover,
.post-nav-next a:hover {
    color: var(--color-primary);
}

.post-nav-next a {
    justify-content: flex-end;
    text-align: right;
}

.nav-arrow {
    font-size: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.nav-link-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-heading);
}

.nav-title {
    font-size: 13px;
    line-height: 1.4;
}

.post-nav-separator {
    width: 1px;
    background: var(--color-border);
    flex-shrink: 0;
}

.share-heading {
    font-size: 1.8em;
    color: var(--color-gold);
    margin-bottom: 20px;
    margin-top: 30px;
    text-align: center;
    font-weight: 700;
}

/* ===== MORE NEWS (in main column) ===== */
.more-news-section {
    margin-top: 30px;
}

.news-grid {
    display: flex;
    flex-direction: column;
}

.news-card {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-card:first-child {
    padding-top: 0;
}

.news-card h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
}

.news-card h3 a {
    color: var(--color-secondary);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.news-date {
    font-size: 12px;
    color: var(--color-text-light);
}

.news-category {
    display: inline-block;
    font-size: 11px;
    color: var(--color-bg-dark);
    background: var(--color-gold);
    padding: 1px 8px;
    border-radius: 50px;
    margin-left: 5px;
    font-weight: 600;
}

/* ===== SIDEBAR ===== */
.article-sidebar {
    min-width: 0;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 15px;
    color: var(--color-gold);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-gold);
    margin-bottom: 15px;
    font-weight: 600;
}

.ad-placeholder-box {
    background: rgba(30, 30, 30, 0.6);
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

/* Placeholder grid (external links / ad slots) */
.sidebar-placeholder-grid {
    display: grid;
    gap: 10px;
}

.sidebar-placeholder-grid--2col {
    grid-template-columns: 1fr 1fr;
}

.placeholder-square {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

/* Sidebar video embed */
.sidebar-video {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-thumb-link {
    display: block;
    position: relative;
}

.video-thumb-link img {
    width: 100%;
    height: auto;
    display: block;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 42px;
    background: rgba(205, 32, 31, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    transition: background 0.3s ease;
}

.video-thumb-link:hover .video-play-btn {
    background: #cc0000;
}

/* Sidebar ad banner (運彩) */
.sidebar-ad-banner {
    margin-bottom: 0;
}

.sidebar-ad-img {
    width: 100%;
    height: auto;
    display: block;
}

.yuncai-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--color-gold);
    color: var(--color-bg-dark) !important;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--color-gold-dark);
    border-radius: 6px;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.yuncai-btn:hover {
    background: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
}

.sidebar-ad-links p {
    margin-bottom: 8px;
}

.sidebar-ad-links a {
    color: var(--color-primary);
    font-size: 14px;
    text-decoration: none;
}

.sidebar-ad-links a:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 40px;
    border-top: 1px solid rgba(201, 164, 92, 0.2);
}

.footer-heading {
    color: var(--color-secondary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201, 164, 92, 0.2);
}

/* Footer Nav */
.footer-nav-section {
    padding: 30px 0;
    border-bottom: 1px solid rgba(201, 164, 92, 0.15);
}

.footer-nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.footer-nav-menu > li {
    position: relative;
}

.footer-nav-menu > li > a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--footer-text);
    transition: color 0.3s ease;
}

.footer-nav-menu > li > a:hover {
    color: var(--color-primary);
}

.footer-nav .sub-menu {
    position: absolute;
    top: auto;
    bottom: 100%;
    left: 0;
    min-width: 200px;
    background: #1a1a1a;
    border: 1px solid rgba(201, 164, 92, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.footer-nav .has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.footer-nav .sub-menu li a {
    display: block;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--color-text-muted);
    border-bottom: none;
}

.footer-nav .sub-menu li a:hover {
    background: rgba(201, 164, 92, 0.15);
    color: var(--color-gold);
}

/* Footer Bottom */
.footer-bottom {
    padding: 30px 0;
    border-bottom: 1px solid rgba(201, 164, 92, 0.15);
}

.footer-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links li a,
.footer-links li {
    font-size: 13px;
    color: var(--footer-text);
}

.footer-links li a:hover {
    color: var(--color-primary);
}

.footer-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--footer-text);
}

/* Footer Tags */
.footer-tags {
    padding: 20px 0;
    border-bottom: 1px solid rgba(201, 164, 92, 0.15);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list li a {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(201, 164, 92, 0.1);
    color: var(--color-text-muted);
    font-size: 12px;
    border-radius: 50px;
    border: 1px solid rgba(201, 164, 92, 0.2);
    transition: all 0.3s ease;
}

.tag-list li a:hover {
    background: var(--color-gold);
    color: var(--color-bg-dark);
    border-color: var(--color-gold);
}

/* Footer Subscribe */
.footer-subscribe {
    padding: 20px 0;
    text-align: center;
}

.subscribe-btn {
    padding: 10px 30px;
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.subscribe-btn:hover {
    background: var(--color-gold);
    color: var(--color-bg-dark);
}

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

@media (max-width: 1024px) {
    .header-desktop {
        display: none;
    }

    .header-mobile {
        display: block;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .footer-bottom-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-nav-menu {
        flex-direction: column;
    }

    .footer-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        padding-left: 20px;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .article-title-banner {
        padding: 8px 15px;
    }

    .article-title-banner .article-title-small {
        font-size: 0.85em;
        color: var(--color-secondary) !important;
    }

    .article-title {
        font-size: 1.3em;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-nav-separator {
        width: 100%;
        height: 1px;
    }

    .share-buttons--with-text .share-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-mobile-inner {
        flex-wrap: wrap;
    }

    .mobile-share-area {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .article-body p {
        font-size: 14px;
    }

    .nav-menu > li > a {
        padding: 10px 10px;
        font-size: 13px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
