/*
Theme Name: Giá Vàng Việt Nam
Theme URI: GiavangVN
Author: GiaVang Team
Author URI: GiavangVN
Description: Theme WordPress hiển thị giá vàng thời gian thực từ các hãng vàng Việt Nam (SJC, BTMC, DOJI, PNJ,...).
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giavang
Tags: gold-price, vietnamese, real-time, charts

Giá Vàng Việt Nam Theme - Hiển thị giá vàng SJC, BTMC, DOJI, PNJ,... real-time
*/

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
    /* Colors - Gold Theme */
    --color-primary: #d4af37;
    --color-primary-dark: #b8960c;
    --color-primary-light: #f4e4a6;

    /* Background Colors */
    --color-bg-main: #1a1a2e;
    --color-bg-secondary: #16213e;
    --color-bg-card: #0f3460;
    --color-bg-table-header: #1e3a5f;
    --color-bg-table-row: #0a2647;
    --color-bg-table-row-alt: #0d2d4d;

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #b8c5d6;
    --color-text-muted: #6c7a89;

    /* Status Colors */
    --color-up: #00d26a;
    --color-down: #ff4757;
    --color-unchanged: #ffa502;

    /* Border & Shadow */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --box-shadow-hover: 0 12px 40px rgba(212, 175, 55, 0.2);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: linear-gradient(135deg, var(--color-bg-main) 0%, var(--color-bg-secondary) 100%);
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main-content {
    padding: var(--spacing-xl) 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background: rgba(15, 52, 96, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    /* Prevent logo from shrinking */
}

.site-logo img,
.custom-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

.site-logo h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.site-logo span {
    color: var(--color-text-primary);
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

/* Higher specificity to override generic A tags or visited states */
.site-header .main-nav ul li a,
.site-header .main-nav ul li a:visited {
    color: var(--color-text-secondary);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    /* Prevent text wrapping */
    display: inline-block;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary) !important;
    background: rgba(212, 175, 55, 0.1);
}

/* Update Time */
.update-time {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    /* Prevent time from shrinking */
}

.update-time .pulse {
    width: 8px;
    height: 8px;
    background: var(--color-up);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ==========================================================================
   Gold Price Tables
   ========================================================================== */
.gold-section {
    margin-bottom: var(--spacing-2xl);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    /* Full width for consistency */
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-dark));
    border-radius: 2px;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: var(--spacing-xs);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-sm);
    width: fit-content;
    /* Only occupy necessary width */
}

.chart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--color-text-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-bg-main);
}

/* Gold Table */
.gold-table-wrapper {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.gold-table {
    width: 100%;
    border-collapse: collapse;
}

.gold-table th,
.gold-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
}

.gold-table thead {
    background: var(--color-bg-table-header);
}

.gold-table th {
    font-weight: 600;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gold-table tbody tr {
    background: var(--color-bg-table-row);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.gold-table tbody tr:nth-child(even) {
    background: var(--color-bg-table-row-alt);
}

.gold-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Price Cells */
.price {
    font-weight: 700;
    font-size: var(--font-size-lg);
    font-variant-numeric: tabular-nums;
}

.price-buy {
    color: var(--color-up);
}

.price-sell {
    color: var(--color-down);
}

.price-best {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 210, 106, 0.2), transparent);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
}

/* Change Indicator */
.change {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.change.up {
    color: var(--color-up);
    background: rgba(0, 210, 106, 0.15);
}

.change.down {
    color: var(--color-down);
    background: rgba(255, 71, 87, 0.15);
}

.change.unchanged {
    color: var(--color-unchanged);
    background: rgba(255, 165, 2, 0.15);
}

/* Brand Logo in Table */
.brand-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
}

.brand-name {
    font-weight: 600;
}

.brand-region {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.region-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
}

.region-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
}

.region-header {
    background: linear-gradient(135deg, var(--color-bg-table-header), var(--color-bg-secondary));
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 2px solid var(--color-primary);
}

.region-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
}

.region-table {
    width: 100%;
}

.region-table td {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Chart Section
   ========================================================================== */
.chart-section {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--spacing-2xl);
}

.chart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.chart-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
}

.chart-filters {
    display: flex;
    gap: var(--spacing-xs);
}

.chart-filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.chart-filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.chart-filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-main);
}

.chart-container {
    position: relative;
    height: 400px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: rgba(15, 52, 96, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: var(--spacing-2xl) 0;
    margin-top: var(--spacing-2xl);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-col h3,
.footer-title {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
}

.footer-description,
.footer-col p,
.footer-col li {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: var(--spacing-xs);
}

.footer-menu a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-menu a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom .copyright {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Footer Widget Styling - Remove individual backgrounds */
.footer-col .widget {
    margin-bottom: var(--spacing-md);
    background: none;
    box-shadow: none;
    padding: 0;
}

.footer-col .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col .widget li {
    margin-bottom: var(--spacing-xs);
}

.footer-col .widget a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col .widget a::before {
    content: '';
    display: none;
    width: 44px;
    /* Ratio 2:1 (approx 220x110) */
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    background-color: #fff;
    padding: 2px;
    border-radius: 3px;
}

/* Show icon only for brand links */
.footer-col .widget a[href*="sjc"]::before,
.footer-col .widget a[href*="btmc"]::before,
.footer-col .widget a[href*="bao-tin-minh-chau"]::before,
.footer-col .widget a[href*="doji"]::before,
.footer-col .widget a[href*="pnj"]::before,
.footer-col .widget a[href*="btmh"]::before,
.footer-col .widget a[href*="bao-tin-manh-hai"]::before,
.footer-col .widget a[href*="phuquy"]::before,
.footer-col .widget a[href*="phu-quy"]::before,
.footer-col .widget a[href*="ngoctham"]::before,
.footer-col .widget a[href*="ngoc-tham"]::before,
.footer-col .widget a[href*="mi-hong"]::before,
.footer-col .widget a[href*="gia-vang-the-gioi"]::before {
    display: block;
}

/* Specific Logo Paths */
.footer-col .widget a[href*="sjc"]::before {
    background-image: url('assets/logo/logo-sjc.png');
}

.footer-col .widget a[href*="gia-vang-the-gioi"]::before {
    background-image: url('assets/logo/logo-gold-global.png');
}

.footer-col .widget a[href*="btmc"]::before,
.footer-col .widget a[href*="bao-tin-minh-chau"]::before {
    background-image: url('assets/logo/logo-bao-tin-minh-chau.png');
}

.footer-col .widget a[href*="doji"]::before {
    background-image: url('assets/logo/logo-doji.png');
}

.footer-col .widget a[href*="mi-hong"]::before {
    background-image: url('assets/logo/logo-mi-hong.png');
}

.footer-col .widget a[href*="pnj"]::before {
    background-image: url('assets/logo/logo-pnj.png');
}

.footer-col .widget a[href*="btmh"]::before,
.footer-col .widget a[href*="bao-tin-manh-hai"]::before {
    background-image: url('assets/logo/logo-bao-tin-manh-hai.png');
}

.footer-col .widget a[href*="phuquy"]::before,
.footer-col .widget a[href*="phu-quy"]::before {
    background-image: url('assets/logo/logo-phu-quy.png');
}

.footer-col .widget a[href*="ngoctham"]::before,
.footer-col .widget a[href*="ngoc-tham"]::before {
    background-image: url('assets/logo/logo-ngoc-tham.png');
}

.footer-col .widget a[href*="gia-vang-the-gioi"]::before {
    background-image: url('assets/logo/logo-gold-global.png');
}

.footer-col .widget a:hover {
    color: var(--color-primary);
}

.footer-col .widget p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.loading {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-table-row) 25%,
            var(--color-bg-table-row-alt) 50%,
            var(--color-bg-table-row) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .header-inner {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 0.9rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .gold-table th,
    .gold-table td {
        padding: var(--spacing-sm);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 300px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .gold-table-wrapper {
        overflow-x: auto;
    }



    .tabs {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Sidebar & Layout
   ========================================================================== */
.content-sidebar-wrap {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
}

.site-main {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
}

.widget-area {
    width: 350px;
    flex-shrink: 0;
}

/* Card Style for Content */
.card-style {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--box-shadow);
}

/* Widget Styles */
.widget {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--spacing-lg);
}

.widget-title {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

/* Mini Gold Table */
.mini-gold-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.mini-gold-table th,
.mini-gold-table td {
    padding: var(--spacing-sm) var(--spacing-xs);
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-gold-table th:first-child,
.mini-gold-table td:first-child {
    text-align: left;
}

.mini-gold-table th {
    color: var(--color-text-muted);
    font-weight: 500;
}

.mini-gold-table .brand-col {
    color: var(--color-primary);
    font-weight: 600;
}

.mini-gold-table .price-col {
    color: var(--color-text-primary);
    font-weight: 500;
}

.widget-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.view-more-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.view-more-link:hover {
    color: var(--color-primary);
}

/* Related Posts Widget */
.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-post-item {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-link {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.related-post-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.related-post-info {
    flex: 1;
}

.related-post-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 var(--spacing-xs) 0;
}

.related-post-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.related-post-link:hover .related-post-title {
    color: var(--color-primary);
}

/* Other Brands Section (Brand Logos) */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.brand-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 120px;
}

.brand-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.brand-logo-wrapper {
    /* height: 50px; */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.brand-logo-img {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
}

.brand-name-link {
    color: #4facfe;
    /* Light blue */
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .brand-card {
        padding: 15px 5px;
        min-height: 100px;
    }

    .brand-name-link {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .content-sidebar-wrap {
        flex-direction: column;
    }

    .widget-area {
        width: 100%;
    }

    .mini-gold-table th,
    .mini-gold-table td {
        padding: var(--spacing-md);
    }
}

/* =========================================
   Single Post Styling
   ========================================= */

/* Main Container Adjustments */
.single-content-wrapper {
    padding: 2.5rem;
}

/* Post Header */
.entry-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.entry-title {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: .8rem;
    color: var(--color-primary);
}

/* Meta Data (Date & Author) */
.entry-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    /* Fallback */
    color: rgba(255, 255, 255, 0.5);
    /* More subtle */
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 400;
}

.entry-meta .posted-on::before {
    content: '🕒';
    margin-right: 5px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Post Content Typography */
.entry-content {
    font-size: 1.125rem;
    /* ~18px for better readability */
    line-height: 1.8;
    color: var(--color-text-primary);
}

.entry-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Headings in Content */
.entry-content h2 {
    font-size: 1.7rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--color-heading);
    border-left: 4px solid var(--color-primary);
    padding-left: 15px;
    line-height: 1.4;
}

.entry-content h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

/* Images in Content */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.entry-content figcaption {
    font-size: 0.9rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    opacity: 0.8;
}

/* Quote/Highlight */
.entry-content blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    font-style: italic;
    border-radius: 0 8px 8px 0;
    color: var(--color-text-primary);
}

/* Tables in Content */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

.entry-content table th,
.entry-content table td {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.entry-content table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--color-primary);
}

/* Responsive Adjustments for Single Post */
@media (max-width: 768px) {
    .single-content-wrapper {
        padding: 1.5rem;
    }

    .entry-title {
        font-size: 1.6rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h2 {
        font-size: 1.4rem;
    }
}

/* =========================================
   Blog Archive Layout
   ========================================= */

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Featured Post (First Item) */
.post-item.featured-layout {
    display: flex;
    flex-direction: column;
}

.post-item.featured-layout .post-thumbnail {
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.post-item.featured-layout .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item.featured-layout .post-thumbnail:hover img {
    transform: scale(1.05);
}

.post-item.featured-layout .entry-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

/* List Layout (Subsequent Items) */
.post-item.list-layout {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.post-item.list-layout:last-child {
    border-bottom: none;
}

.post-item.list-layout .post-thumbnail {
    width: 260px;
    height: 160px;
    flex-shrink: 0;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.post-item.list-layout .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item.list-layout .post-content {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.post-item.list-layout .entry-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.post-item.list-layout .entry-meta {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.post-item.list-layout .entry-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

/* Responsive Archive */
@media (max-width: 768px) {
    .post-item.featured-layout .post-thumbnail {
        height: 250px;
    }

    .post-item.list-layout {
        flex-direction: column;
        gap: 15px;
    }

    .post-item.list-layout .post-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* =========================================
   Mobile Header & Navigation
   ========================================= */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all var(--transition-fast);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 3px 0;
    transition: all var(--transition-fast);
}

.menu-toggle.active {
    background-color: var(--color-primary);
}

.menu-toggle.active span {
    background-color: #000;
}

/* Hamburger Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-region-filter {
    display: none;
}

@media (max-width: 1200px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 52, 96, 0.98);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .main-nav.active {
        max-height: 80vh;
        /* Allow taller menu */
        overflow-y: auto;
        /* Enable scrolling if content overflows */
        padding: 0.5rem 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        /* Stretch to fill width (minus padding) */
        padding: 0.5rem 0;
        width: 100%;
        /* Ensure container is full width */
    }

    .site-header .main-nav ul li {
        width: 100%;
        /* Ensure list item is full width */
        display: block;
    }

    .site-header .main-nav ul li a {
        display: block;
        padding: 8px 20px;
        /* Reduced padding */
        margin: 2px 15px;
        /* Reduced margin */
        /* Side margins */
        border: none;
        border-radius: var(--border-radius-sm);
        text-align: left;
        width: auto;
        /* Allow it to fill the block (li is 100%) */
        box-sizing: border-box;
    }

    .site-header .main-nav ul li a:hover,
    .site-header .main-nav ul li a.active,
    .main-nav a:hover,
    .main-nav a.active {
        background: rgba(212, 175, 55, 0.1);
        color: var(--color-primary) !important;
        padding-left: 20px;
    }

    .change {
        font-size: 10px;
        font-weight: 600;
    }
}

/* =========================================
   Responsive Price Display for Mobile
   ========================================= */
.price-mobile {
    display: none;
}

@media (max-width: 768px) {
    .price-desktop {
        display: none;
    }

    .price-mobile {
        display: inline-block;
        white-space: nowrap;
    }

    /* Hide brand logo text on mobile to save space */
    .brand-logo {
        display: none !important;
    }

    /* Mobile Region Filter */
    .mobile-region-filter {
        display: block;
        padding: 10px 0;
        margin-bottom: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: var(--border-radius-sm);
        text-align: left;
    }

    .region-select-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 10px;
    }

    .region-select-wrapper label {
        color: var(--color-text-muted);
        font-size: 13px;
        white-space: nowrap;
    }

    .region-select {
        flex: 1;
        background: var(--color-bg-secondary);
        border: 1px solid rgba(212, 175, 55, 0.2);
        color: var(--color-text-primary);
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 13px;
        outline: none;
    }

    .single-region-label {
        padding: 0 10px;
        color: var(--color-text-secondary);
        font-size: 13px;
    }

    .single-region-label strong {
        color: var(--color-primary);
    }

    /* Hide Region Column on Mobile */
    .region-col {
        display: none !important;
    }

    /* Optimize table for mobile */
    .gold-table th,
    .gold-table td {
        padding: 5px;
        /* Reduce padding significantly */
        font-size: 10px;
        /* Slightly smaller font */
    }

    .header-unit {
        display: block;
        font-size: 10px;
        /* Smaller font for unit */
        opacity: 0.8;
        font-weight: normal;
        margin-top: 2px;
    }
}

/* Entry Content Lists */
.entry-content ul,
.entry-content ol {
    margin-left: 1.5rem;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.entry-content ul li,

/* Responsive Brand Logos in Comparison Table */
.brand-img-desktop {
    display: none;
}

.brand-text-mobile {
    display: block;
}

@media (min-width: 992px) {
    .brand-img-desktop {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .brand-text-mobile {
        display: none;
    }

    .region-table .brand-logo {
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }
}