/*
Theme Name: Gia Vàng
Description: A modern WordPress theme for gold trading business with news layout
Version: 1.0
Author: Your Name
Text Domain: giavang
*/

/* DESIGN SYSTEM: Modern Color Palette */
:root {
    /* Primary Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

html, body {
    background-color: var(--gray-50) !important;
    color: var(--gray-900) !important;
}

/* Reset and Base Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a202c !important;
    background-color: #f7fafc !important;
    font-size: 16px;
    margin: 0;
    padding: 0;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; } /* 36px */
h2 { font-size: 1.875rem; } /* 30px */
h3 { font-size: 1.5rem; } /* 24px */
h4 { font-size: 1.25rem; } /* 20px */
h5 { font-size: 1.125rem; } /* 18px */
h6 { font-size: 1rem; } /* 16px */

p {
    line-height: 1.7;
    color: var(--gray-700);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: #1e3a8a;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* Modern Container System */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-900 { color: var(--gray-900); }

.bg-white { background-color: white; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-primary-50 { background-color: var(--primary-50); }

/* Modern Components */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
    color: var(--gray-800);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Modern Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-800);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Modern Animations & Micro-interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Loading States */
.loading {
    animation: pulse 2s infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus States */
.focus-ring:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-2 {
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}


/* Modern Top Bar */
.top-bar {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    font-size: 0.875rem;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--primary-500);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left .current-date {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.top-bar-left .current-date::before {
    content: "📅";
    font-size: 0.75rem;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.weather-info span {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}


/* Modern Header Design */
.site-header {
    width: 100%;
    position: fixed !important;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    top: 0;
    transform: translateY(0);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
}

.site-header.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
}

.site-content {
    margin-top: 80px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.site-title a {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
}

.site-title a:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-1px);
}

.custom-logo {
    max-height: 50px;
    width: auto;
}


/* Header Search */

.header-search {
    flex: 0 0 300px;
    max-width: 300px;
}

.search-form {
    position: relative;
    display: flex;
}

.search-field {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-field:focus {
    border-color: #2c5aa0;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 3px;
    transition: color 0.3s;
}

.search-submit:hover {
    color: #2c5aa0;
}


/* Modern Navigation */
.main-navigation {
    padding: 0;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: var(--space-3) 0;
    gap: var(--space-8);
}

@media (max-width: 768px) {
    .site-content {
        margin-top: 80px;
    }

    .nav-content {
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }
}

.nav-menu {
    list-style: none;
    display: flex !important;
    margin: 0;
    padding: 0;
    gap: var(--space-2);
}

.nav-menu li {
    margin: 0;
    position: relative;
}

.nav-menu a {
    color: var(--gray-700);
    text-decoration: none;
    padding: var(--space-3) var(--space-4);
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    position: relative;
}

.nav-menu a:hover {
    background-color: #FFD651;
    color: #2c5aa0;
    transform: translateY(-1px);
}

.nav-menu .current-menu-item a {
    color:#fdbf30 !important;
    font-weight: 600;
}

.nav-menu .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #fdbf30;
    border-radius: 50%;
}

.nav-extras {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-extra-item {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-extra-item:hover {
    color: var(--primary-600);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.subscribe-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white !important;
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-sm);
}

.subscribe-btn:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-toggle {
    display: none;
    background: #fdbf30;
    border: 2px solid white;
    border-radius: var(--radius-lg);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: var(--space-2);
    width: 48px;
    height: 48px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.menu-toggle:hover {
    background: #f1b321ff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: black;
    border-radius: 1px;
    transition: all 0.3s ease;
}


/* Main Content Layout */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-8);
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    background: transparent;
}

.content-area {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-area section.widget_block {
    padding: 0;
    height: fit-content;
}

.widget-area section.widget_search {
    height: fit-content;
    padding: 15px;
}

.widget-area input.wp-block-search__input {
    border: none;
    background: none;
    border-bottom: 5px solid #fdbf30;
}

.widget-area input.wp-block-search__input:focus {
    outline: none;
}

.widget-area button.wp-block-search__button {
    border-radius: 5px;
    font-weight: 600;
    background: #fdbf30;
    color: black;
    padding: 5px;
}

/* Modern Post Styles */

.entry {
    padding: var(--space-8);
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.entry:last-child {
    border-bottom: none;
}

.entry:hover {
    background: var(--gray-50);
}

.entry-header {
    margin-bottom: var(--space-6);
}

.entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-3);
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.entry-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: all 0.2s ease;
}

.entry-title a:hover {
    color: var(--primary-600);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.entry-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
    display: flex;
    gap: var(--space-4);
    align-items: center;
    font-weight: 500;
}

.entry-meta a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-meta a:hover {
    color: var(--primary-600);
}

.entry-meta .meta-separator {
    color: var(--gray-300);
    font-weight: 400;
}

.post-thumbnail {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.post-thumbnail:hover img {
    transform: scale(1.02);
}

.entry-content {
    line-height: 1.7;
    color: #444;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
}


/* Sidebar Widgets */

.widget {
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 0 !important;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.widget:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    padding: 20px 25px 15px;
    color: #fdbf30;
    position: relative;
    border-bottom: 3px solid #2c5aa0;
}

.widget-content {
    padding: 25px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.widget li:hover {
    background: #f8f9fa;
    padding-left: 10px;
    border-radius: 6px;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1.4;
}

.widget a:hover {
    color: #2c5aa0;
}

.post-date {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-weight: 400;
}

.post-count {
    font-size: 12px;
    color: #2c5aa0;
    font-weight: 600;
    background: #e8f2ff;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}


/* Tag Cloud */

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 8px 14px;
    background: #f8f9fa;
    color: #666 !important;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
    color: #fff !important;
    border-color: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}


/* Pagination */

.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    padding: 0 25px;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
}

.page-numbers a:hover,
.page-numbers .current {
    background: #2c5aa0;
    color: #fff;
    border-color: #2c5aa0;
}

.page-numbers .dots {
    border: none;
    background: none;
    color: #999;
}


/* Mobile Menu Toggle Animation */

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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


/* Footer */

.site-footer {
    background: #2e3d52 !important;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.site-footer a,
.site-footer p,
.site-footer strong,
.site-footer h4 {
    color: white !important;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    padding: 5px 0;
}

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: #3498db;
}

/* Footer Links Styles */
.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    cursor: pointer;
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: #3498db;
    cursor: pointer;
}

.footer-column ul li a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    cursor: pointer;
    display: block;
    padding: 5px 0;
}

.footer-column ul li a:hover {
    color: #3498db;
    cursor: pointer;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 12px;
}

/* Page lien quan */

.page-content {
    margin: 35px;
    background: #fff;
    padding: 10px;
}

.page-wrapper {
    margin: 20px 0;
    background: #fff;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}
.featured-projects-section,
.real-estate-news-section {
    padding: 20px 0;
}

/* Responsive Design */

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .main-content {
        gap: 15px;
    }

    .top-bar {
        padding: 8px 15px;
        font-size: 12px;
    }

    .site-header {
        padding: 12px 0;
    }
}

/* Desktop menu override */
@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 5px !important;
    }

    .site-main {
        padding: 0;
    }

    .site-header {
        padding: 10px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .site-branding {
        text-align: left;
        flex: 1;
    }

    .header-search {
        order: 2;
        width: 100%;
    }

    .header-search .search-form {
        max-width: none;
    }

    .main-navigation {
        order: 3;
        width: 100%;
        position: relative;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        border-radius: 6px;
        margin-top: 5px;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
    }

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

    .nav-menu .current-menu-item a::after {
        bottom: 25;
    }

    .nav-menu a {
        padding: 16px 20px;
        display: block;
        font-size: 16px;
        font-weight: 500;
        min-height: 48px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        background-color: #FFD651;
        color: #2c5aa0;
        padding-left: 25px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: #fdbf30;
        color: #fff;
        border: 2px solid #fff;
        border-radius: 8px;
        cursor: pointer;
        margin-left: auto;
        padding: 0;
        position: relative;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
        z-index: 1000;
    }

    .menu-toggle:hover {
        background: #f1b321ff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(44, 90, 160, 0.4);
    }

    .menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: black;
        margin: 2px 0;
        border-radius: 1px;
        transition: all 0.3s ease;
    }

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

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .nav-extras {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }

    .top-bar {
        display: none;
    }

    .site-title {
        font-size: 22px;
        font-weight: 700;
    }

    .site-title a {
        color: #2c5aa0;
        font-weight: 700;
    }

    /* Home page mobile styles */
    /* Home wrapper responsive - same as news-content-wrapper */
    .home-wrapper {
        grid-template-columns: 1fr !important;
        gap: 7px;
        padding: 0 10px;
    }

    .home-wrapper .news-main-content h3 {
        margin-top: 15px;
    }

    /* Homepage tin-moi responsive - first-child horizontal at 768px */
    .home-wrapper .tin-moi .news-item:first-child {
        display: block;
        order: 0;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border: 1px solid #e9ecef;
        padding: 10px;
    }

    .home-wrapper .tin-moi .news-item:first-child .news-thumb {
        min-width: 100%;
        height: 220px;
        order: 0;
        flex-shrink: 0;
    }

    .home-wrapper .tin-moi .news-item:first-child .news-content {
        order: 1;
        padding: 15px 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .featured-story {
        padding: 15px;
    }

    .featured-story .story-title {
        font-size: 18px;
    }

    .featured-story .story-image img {
        height: 200px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        padding: 15px;
    }

    .news-item .item-image {
        width: 80px;
        height: 60px;
        margin-right: 10px;
    }

    .news-item .item-title {
        font-size: 13px;
    }

    .categories-section {
        padding: 15px;
    }

    .category-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

    .category-tab {
        font-size: 12px;
        padding: 8px 0;
    }

    .category-posts {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-post .post-thumb {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    .content-wrapper {
        padding: 0 5px;
    }

    .home-wrapper {
        padding: 0 5px !important;
    }

    /* Mobile stack layout for tin-moi */
    .home-wrapper .tin-moi .news-item,
    .home-wrapper .tin-moi .news-item:first-child {
        flex-direction: column;
        min-height: auto;
    }

    .home-wrapper .tin-moi .news-item:first-child .news-thumb {
        width: 100%;
        height: 150px;
        order: 0;
    }

    .home-wrapper .tin-moi .news-item:first-child .news-content {
        order: 1;
        padding: 15px;
    }

    .site-title {
        font-size: 18px;
    }

    .featured-story {
        padding: 10px;
    }

    .featured-story .story-title {
        font-size: 16px;
    }

    .featured-story .story-image img {
        height: 150px;
    }

    .news-item {
        padding: 10px;
    }

    .news-item .item-image {
        width: 70px;
        height: 50px;
        margin-right: 8px;
    }

    .news-item .item-title {
        font-size: 12px;
    }

    .categories-section {
        padding: 10px;
    }

    .breaking-news {
        padding: 8px 10px;
        font-size: 12px;
    }

    .widget {
        padding: 10px;
    }

    .widget-title {
        font-size: 14px;
    }
}

.home-content {
    background: #f5f5f5 !important;
}

/* Home wrapper - same structure as news-content-wrapper */
.home-wrapper {
    background: #fff;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Home main content - same as news-main-content */
.home-wrapper .news-main-content {
    background: #fff;
    padding: 0;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.main-content h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333 !important;
}

/* Breaking News Banner */
.breaking-news {
    background: #c41e3a;
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #e5e5e5;
}

.breaking-news .label {
    background: #fff;
    color: #c41e3a;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 10px;
    font-weight: 700;
}

/* Featured Story */
.featured-story {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.featured-story .story-image {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.featured-story .story-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-story .story-image:hover img {
    transform: scale(1.02);
}

.featured-story .story-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.featured-story .story-title a {
    color: #333;
    text-decoration: none;
}

.featured-story .story-title a:hover {
    color: #2c5aa0;
}

.featured-story .story-meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.featured-story .story-excerpt {
    color: #444;
    line-height: 1.7;
    font-size: 15px;
}

/* News Grid */
.news-content-wrapper {
    background: #fff;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    padding: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #f0f0f0;
}

.news-item {
    background: #fff;
    padding: 20px;
    transition: background 0.3s;
}

.news-item:hover {
    background: #f8f9fa;
}

.news-item .item-image {
    width: 120px;
    height: 80px;
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.news-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item .item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-item .item-title a {
    color: #333;
    text-decoration: none;
}

.news-item .item-title a:hover {
    color: #2c5aa0;
}

.news-item .item-meta {
    color: #666;
    font-size: 11px;
    clear: both;
}

/* Categories Section */
.categories-section {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c5aa0;
    display: inline-block;
}

.category-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.category-tab {
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
}

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

.category-post {
    display: flex;
    flex-direction: column;
}

.category-post .post-thumb {
    width: 100%;
    height: 120px;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

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

.category-post .post-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
}

.category-post .post-title a {
    color: #333;
    text-decoration: none;
}

.category-post .post-title a:hover {
    color: #2c5aa0;
}

.category-post .post-time {
    color: #666;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
    }

    .news-content-wrapper {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

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

    .news-item .item-image {
        width: 100px;
        height: 70px;
        margin-right: 12px;
    }

    .featured-story .story-image img {
        height: 200px;
    }

    .featured-story .story-title {
        font-size: 20px;
    }
}

/* Responsive Utilities */

/* Touch device optimizations */
.touch-device .nav-menu a,
.touch-device .widget a,
.touch-device .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.touch-active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Lazy loading images */
img.lazy {
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Viewport height fix */
.full-height {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}

/* Reduce motion for low-end devices */
.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Mobile Menu Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Large Desktop */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .content-wrapper {
        gap: 30px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .content-wrapper {
        gap: 25px;
    }

    .site-header {
        padding: 15px 0;
    }

    .nav-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    /* Base Layout */
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    .container {
        padding: 0 10px !important;
    }

    .site-main {
        padding: 15px 0;
    }

    .site-header {
        padding: 10px 0;
    }

    /* Navigation */
    .nav-content {
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .nav-menu a {
        min-height: 48px;
        padding: 16px 20px;
        display: block;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a:hover {
        background-color: #f8f9fa;
    }

    /* Search */
    .search-field {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 45px 14px 15px;
        width: 100%;
        max-width: none;
    }

    /* Content Layout */
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
    }

    /* Typography */
    h1 { font-size: 24px; line-height: 1.3; }
    h2 { font-size: 22px; line-height: 1.3; }
    h3 { font-size: 20px; line-height: 1.3; }
    h4 { font-size: 18px; line-height: 1.3; }
    h5 { font-size: 16px; line-height: 1.3; }
    h6 { font-size: 15px; line-height: 1.3; }

    p {
        margin-bottom: 16px;
        line-height: 1.7;
    }

    /* Lists */
    ul, ol {
        margin-bottom: 18px;
        padding-left: 25px;
    }

    li {
        margin-bottom: 8px;
        line-height: 1.6;
    }

    /* Widgets */
    .widget {
        margin-bottom: 20px;
        padding: 0;
        border-radius: 10px;
    }

    .widget-title {
        font-size: 16px;
        line-height: 1.2;
        margin-bottom: 0;
        cursor: pointer;
        position: relative;
        padding: 15px 20px;
        background-color: #fdbf30 !important;
        border-bottom: 2px solid #2c5aa0;
    }

    .widget-content {
        display: none;
        padding: 20px;
    }

    .widget.active .widget-content {
        display: block;
    }

    .widget ul {
        display: block;
    }

    .widget li {
        font-size: 14px;
        line-height: 1.4;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }

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

    /* News Grid */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .featured-story {
        margin-bottom: 20px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Entry/Post */
    .entry {
        padding: 15px;
        margin-bottom: 20px;
    }

    .entry-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .entry-content {
        font-size: 15px;
        line-height: 1.6;
    }

    .entry-meta {
        font-size: 13px;
        margin-bottom: 15px;
    }

    /* Pagination */
    .page-numbers a,
    .page-numbers span {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        margin: 0 2px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-column {
        margin-bottom: 25px;
    }

    .footer-column h4 {
        font-size: 15px;
        margin-bottom: 15px;
    }

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

    .social-icons {
        justify-content: center;
        margin-top: 20px;
    }
}

/* Mobile Medium */
@media (max-width: 480px) {
    /* Base */
    .container {
        padding: 0 8px !important;
    }

    .site-header {
        padding: 12px 0;
    }

    /* Navigation */
    .menu-toggle {
        width: 40px;
        height: 40px;
        touch-action: manipulation;
        border-radius: 6px;
        border-width: 1px;
    }

    .menu-toggle span {
        width: 18px;
        height: 2px;
        margin: 2px 0;
    }

    .search-field {
        font-size: 16px;
        padding: 16px 45px 16px 15px;
        min-height: 48px;
    }

    /* Typography */
    body {
        font-size: 14px;
    }

    h1 { font-size: 22px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    h5 { font-size: 15px; }
    h6 { font-size: 14px; }

    /* Content */
    .entry {
        padding: 12px;
    }

    .entry-title {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .entry-content {
        font-size: 14px;
        line-height: 1.6;
    }

    .entry-meta {
        font-size: 12px;
    }

    /* Widgets */
    .widget {
        padding: 0;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .widget-title {
        font-size: 15px;
        padding: 12px 15px;
    }

    .widget-title::before {
        left: 15px;
        width: 20px;
    }

    .widget-content {
        padding: 15px;
    }

    .widget li {
        font-size: 13px;
        padding: 10px 0;
    }

    .tag-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* Footer */
    .footer-column {
        margin-bottom: 20px;
    }

    .company-info p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Mobile Small */
@media (max-width: 360px) {
    .container {
        padding: 0 5px !important;
    }

    .entry {
        padding: 10px;
    }

    .entry-title {
        font-size: 16px;
    }

    .entry-content {
        font-size: 13px;
    }

    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    h4 { font-size: 15px; }
    h5 { font-size: 14px; }
    h6 { font-size: 13px; }

    .widget {
        padding: 10px;
    }

    .company-info p {
        font-size: 12px;
    }
}

/* Mobile Extra Small */
@media (max-width: 320px) {
    .container {
        padding: 0 3px !important;
    }

    body {
        font-size: 13px;
    }

    .entry-title {
        font-size: 15px;
    }

    .entry-content {
        font-size: 12px;
    }

    h1 { font-size: 18px; }
    h2 { font-size: 16px; }
    h3 { font-size: 15px; }
    h4 { font-size: 14px; }
    h5 { font-size: 13px; }
    h6 { font-size: 12px; }
}

/* ========================================
   PRODUCTION OPTIMIZATIONS
   ======================================== */

/* Performance optimizations */
* {
    box-sizing: border-box;
}

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

/* Lazy loading support */
img[loading="lazy"] {
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus management */
*:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link,
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2c5aa0;
    color: white !important;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100000;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.skip-link:focus,
.skip-to-content:focus {
    top: 6px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error states */
.error {
    color: #d32f2f;
    border-color: #d32f2f;
}

.success {
    color: #388e3c;
    border-color: #388e3c;
}

/* Print styles */
@media print {
    .no-print,
    .menu-toggle,
    .nav-menu,
    .search-form,
    .widget-area,
    .social-icons,
    .back-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

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

    a {
        color: #000;
        text-decoration: underline;
    }

    .entry {
        page-break-inside: avoid;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nav-menu a:hover,
    .nav-menu .current-menu-item a {
        background: #000;
        color: #fff;
    }

    .search-field:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Critical CSS for above-the-fold content */
.critical {
    font-display: swap;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Final responsive fixes and improvements */

/* Ensure images are always responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for embedded content */
iframe, embed, object, video {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* Improve focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background: #2c5aa0;
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Print styles */
@media print {
    .menu-toggle,
    .nav-menu,
    .widget-area,
    .site-footer {
        display: none !important;
    }

    .content-wrapper {
        grid-template-columns: 1fr !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-menu a:hover,
    .nav-menu .current-menu-item a {
        background: #000;
        color: #fff;
    }

    .search-field:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .post-thumbnail:hover img,
    .featured-story .story-image:hover img {
        transform: none;
    }
}

/* Force correct colors - override any dark mode */
html {
    background-color: #f5f5f5 !important;
}

body {
    background-color: #f5f5f5 !important;
    color: #333 !important;
}

.widget {
    background: #fff !important;
    color: #333 !important;
}

.main-content {
    background: #fff !important;
    color: #333 !important;
}

.content-area {
    color: #333 !important;
}

.entry {
    background: #fff !important;
    color: #333 !important;
}

.entry-title,
.entry-title a {
    color: #333 !important;
}

.entry-content {
    color: #444 !important;
}

.widget-title {
    color: #333 !important;
}

.widget a {
    color: #444 !important;
}

.widget li {
    color: #333 !important;
}

/* Ensure text is always visible */
p, span, div, h1, h2, h3, h4, h5, h6 {
    color: inherit;
}

.widget-area section {
    padding: 15px;
    font-weight: 600;
    height: fit-content;
}

/* Trending Section Excerpt */
.tin-hot-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tin-hot-date {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 8px;
}

/* Sidebar Posts with Images */
.sidebar-post-with-image {
    display: flex !important;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 15px !important;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-post-with-image:last-child {
    border-bottom: none;
}

.sidebar-post-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    overflow: hidden;
    border-radius: 4px;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-post-thumb:hover img {
    transform: scale(1.05);
}

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-info a {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-post-info a:hover {
    color: #fdbf30;
}

.sidebar-post-info .post-date {
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

/* Tin Moi Pagination */
.tin-moi-pagination {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.tin-moi-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.tin-moi-pagination .page-numbers li {
    margin: 0;
}

.tin-moi-pagination .page-numbers a,
.tin-moi-pagination .page-numbers span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.tin-moi-pagination .page-numbers a:hover {
    background-color: #fdbf30;
    border-color: #fdbf30;
    color: #000;
    transform: translateY(-1px);
}

.tin-moi-pagination .page-numbers .current {
    background-color: #fdbf30;
    border-color: #fdbf30;
    color: #000;
    font-weight: 600;
}

.tin-moi-pagination .page-numbers .prev,
.tin-moi-pagination .page-numbers .next {
    font-weight: 600;
}

@media (max-width: 768px) {
    .tin-moi-pagination .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tin-moi-pagination .page-numbers a,
    .tin-moi-pagination .page-numbers span {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 35px;
    }
}

/* Widget Admin Styles - Simple */
.widgets-php .widget-inside input[type="text"] {
    width: 100%;
    padding: 5px;
    margin: 5px 0;
}

.widgets-php .widget-inside button {
    padding: 5px 10px;
    margin: 2px;
    cursor: pointer;
}

/* Header menu font-size tweaks (smaller across viewports) */
/* Base desktop */
.nav-menu a { font-size: 0.8125rem !important; padding: 8px 12px !important; }
.nav-extra-item { font-size: 0.8125rem !important; }

/* >=1200px keep compact but readable */
@media (min-width: 1200px) {
    .nav-menu a { font-size: 0.875rem !important; padding: 10px 14px !important; }
}

/* Tablet ≤1024px */
@media (max-width: 1024px) {
    .site-header { padding: 10px 0 !important; }
    .nav-menu a { font-size: 13px !important; padding: 8px 12px !important; }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
    .site-header { padding: 8px 0 !important; }
    .nav-menu a { font-size: 14px !important; padding: 12px 16px !important; min-height: 44px !important; }
}

/* Small Mobile ≤480px */
@media (max-width: 480px) {
    .site-header { padding: 6px 0 !important; }
    .nav-menu a { font-size: 13px !important; padding: 10px 14px !important; }
}