/* UTM AVO Font - Full Vietnamese support */
@font-face {
    font-family: 'UTM AVO';
    src: url('../fonts/utm_avo-webfont.woff2') format('woff2'),
         url('../fonts/utm_avo-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    /* Remove unicode-range to ensure all characters use this font */
}

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    /* Dark Mode Colors (Default) */
    --bg-main: #181818;
    --bg-secondary: #212121;
    --accent: #414141;
    --accent-hover: #e5e7eb;
    --text-primary: #9ca3af;
    --text-secondary: #6b7280;
    --border: #414141;
    --input-bg: #212121;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    
    /* Fluid Spacing System */
    --spacing-xs: clamp(4px, 0.5vw, 8px);
    --spacing-sm: clamp(8px, 1vw, 16px);
    --spacing-md: clamp(12px, 1.5vw, 24px);
    --spacing-lg: clamp(16px, 2vw, 32px);
    --spacing-xl: clamp(20px, 2.5vw, 40px);
    --spacing-2xl: clamp(30px, 3.5vw, 60px);
    
    /* Fluid Typography */
    --font-size-xs: clamp(10px, 1.2vw, 12px);
    --font-size-sm: clamp(12px, 1.4vw, 14px);
    --font-size-base: clamp(14px, 1.6vw, 16px);
    --font-size-md: clamp(16px, 1.8vw, 18px);
    --font-size-lg: clamp(18px, 2vw, 24px);
    --font-size-xl: clamp(24px, 2.5vw, 32px);
    --font-size-2xl: clamp(28px, 3vw, 40px);
    --font-size-3xl: clamp(32px, 4vw, 48px);
    
    /* Fluid Container Sizing */
    --container-padding: clamp(15px, 4vw, 100px);
    --container-max-width: min(1400px, 95vw);
    --sidebar-gap: clamp(8px, 1.5vw, 15px);
    --sidebar-icon-size: clamp(35px, 4vw, 50px);
    
    /* Grid System */
    --grid-gap: 0px;
    --grid-item-min: clamp(250px, 30vw, 400px);
    
    /* Header Fonts */
    --header-site-name-font: 'Playfair Display', serif;
    --header-subtitle-font: 'Playfair Display', serif;
    --header-menu-font: 'Playfair Display', serif;
}

html.light {
    /* Light Mode Colors */
    --bg-main: #f9fafb;
    --bg-secondary: #ffffff;
    --accent: #e5e7eb;
    --accent-hover: #d1d5db;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #d1d5db;
    --input-bg: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
}

html.light .search-modal-content {
    background: transparent;
    border: none;
}

body {
    /* Use UTM AVO with full Vietnamese support */
    font-family: 'UTM AVO', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga" 1, "kern" 1, "calt" 1;
    /* Ensure proper rendering of Vietnamese diacritics */
    font-variant-east-asian: normal;
    /* Force font to be used for all characters including Vietnamese */
    font-synthesis: none;
}

/* Sidebar Left - Fluid responsive positioning */
.sidebar-left {
    position: fixed;
    left: clamp(10px, 2vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-gap);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-icon {
    width: var(--sidebar-icon-size);
    height: var(--sidebar-icon-size);
    min-width: var(--sidebar-icon-size);
    min-height: var(--sidebar-icon-size);
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
    flex-shrink: 0;
}

.sidebar-icon svg {
    width: clamp(18px, 2.2vw, 24px);
    height: clamp(18px, 2.2vw, 24px);
}

.sidebar-icon:hover {
    background: transparent;
    transform: scale(1.1);
    opacity: 0.8;
}

/* Glassmorphism effect for mobile */
/* Sidebar icons background removed - now fully transparent and responsive */

.sidebar-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.sidebar-icon .icon-sun {
    display: none;
}

.sidebar-icon .icon-moon {
    display: block;
}

html.light .sidebar-icon .icon-sun {
    display: block;
}

html.light .sidebar-icon .icon-moon {
    display: none;
}

.language-toggle {
    position: relative;
}

.lang-current {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-primary);
}

.lang-menu {
    position: absolute;
    left: 55px;
    top: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 0;
    display: none;
    min-width: 60px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Language menu hiển thị lên trên và căn giữa khi sidebar ở dưới */
@container main-content (max-width: 1000px) {
    .lang-menu {
        bottom: 100%;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: clamp(5px, 1vh, 10px);
        margin-top: 0;
        margin-left: 0;
    }
}

@media (max-width: 1000px) {
    .lang-menu {
        bottom: 100%;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: clamp(5px, 1vh, 10px);
        margin-top: 0;
        margin-left: 0;
    }
}

.language-toggle:hover .lang-menu,
.language-toggle.active .lang-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Bridge area to prevent gap between toggle and menu */
.language-toggle::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    width: 10px;
    height: 100%;
    z-index: 999;
    display: none;
}

.language-toggle:hover::before,
.language-toggle.active::before {
    display: block;
}

.lang-menu div {
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.lang-menu div:hover {
    background: var(--accent);
}

/* Main Content - Centered Layout */
.main-content {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-md) var(--container-padding);
    position: relative;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: main-content;
}

/* Container Queries for fluid responsive design */
@container main-content (max-width: 1000px) {
    .sidebar-left {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        bottom: clamp(15px, 3vh, 20px) !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        gap: clamp(8px, 1.5vw, 12px);
        z-index: 1001;
        width: auto;
        max-width: calc(100vw - clamp(20px, 4vw, 40px));
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0 auto;
    }
    
    .sidebar-icon {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .sidebar-icon:hover {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(15px, 2.5vh, 25px);
    }
    
    .header-left {
        max-width: 100%;
    }
    
    .header-right {
        width: 100%;
        align-items: flex-start;
    }
    
    .header-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(8px, 1.5vw, 15px);
        width: 100%;
        justify-content: flex-start;
    }
    
    .header-nav-item {
        font-size: clamp(10px, 1.1vw + 0.4rem, 13px);
        padding: clamp(3px, 0.5vw, 5px) clamp(4px, 0.8vw, 8px);
    }
    
    .header-custom-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(8px, 1.5vw, 15px);
        width: 100%;
        justify-content: flex-start;
    }
    
    .header-custom-link {
        font-size: clamp(10px, 1.1vw + 0.4rem, 13px);
        padding: clamp(3px, 0.5vw, 5px) clamp(4px, 0.8vw, 8px);
    }
}

/* Header */
.header {
    background: transparent;
    border: none;
    padding: clamp(20px, 2.5vh, 35px) 0 clamp(18px, 2vh, 30px) 0;
    margin-bottom: clamp(25px, 3vh, 40px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(15px, 2.5vw, 40px);
    flex-wrap: nowrap;
    position: relative;
    z-index: 100;
    overflow: visible;
}

/* Chỉ wrap khi thực sự cần thiết */
@container main-content (max-width: 1200px) {
    .header-content {
        flex-wrap: wrap;
    }
}

/* Left: Site Name */
.header-left {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-width: min(100%, clamp(200px, 25vw, 350px));
    max-width: clamp(200px, 30vw, 400px);
    gap: clamp(2px, 0.3vh, 4px);
}

.site-name {
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 500;
    font-family: var(--header-site-name-font, 'Playfair Display'), serif;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: clamp(-0.3px, -0.03vw, 0px);
    transition: color 0.3s ease;
}

.site-subtitle {
    font-size: clamp(13px, 1.5vw, 18px);
    font-weight: 300;
    font-style: italic;
    font-family: var(--header-subtitle-font, 'Playfair Display'), serif;
    color: var(--text-secondary);
    margin: 0;
    margin-top: clamp(1px, 0.2vh, 3px);
    line-height: 1.35;
    letter-spacing: clamp(0.2px, 0.02vw, 0.4px);
    opacity: 0.85;
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* Right: Navigation */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(8px, 1.2vh, 16px);
    position: relative;
    z-index: 100;
    overflow: visible;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
}

/* Main Navigation Menu */
.header-nav {
    display: flex;
    gap: clamp(10px, 1.8vw, 28px);
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
    overflow: visible;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.header-nav-item {
    position: relative;
    font-size: clamp(11px, 1.3vw + 0.2rem, 14px);
    font-weight: 400;
    font-family: var(--header-menu-font, 'Playfair Display'), serif;
    text-transform: uppercase;
    letter-spacing: clamp(0.4px, 0.08vw, 1px);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: clamp(3px, 0.5vw, 6px) clamp(5px, 1vw, 10px);
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.9;
}

.header-nav-item:hover {
    color: var(--text-primary);
    opacity: 1;
    transform: translateY(-1px);
}

/* Dropdown for subcategories */
.header-nav-item.has-dropdown {
    position: relative;
    z-index: 10000;
    overflow: visible;
}

.header-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: clamp(5px, 1vh, 10px);
    background: var(--bg-secondary);
    border: none;
    border-radius: clamp(6px, 0.8vw, 8px);
    padding: clamp(6px, 1vw, 8px) 0;
    min-width: clamp(150px, 20vw, 200px);
    max-width: clamp(200px, 25vw, 300px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: block;
    overflow: visible;
}

.header-nav-item:hover .header-nav-dropdown,
.header-nav-item.has-dropdown:hover .header-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.header-nav-dropdown-item {
    padding: clamp(8px, 1.2vh, 10px) clamp(15px, 2vw, 20px);
    font-size: clamp(12px, 1.3vw, 14px);
    font-weight: 400;
    font-family: var(--header-menu-font, 'Playfair Display'), serif;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    text-transform: none;
    letter-spacing: normal;
}

.header-nav-dropdown-item:hover {
    background: var(--accent);
}

/* Custom Links */
.header-custom-links {
    display: flex;
    gap: clamp(10px, 1.5vw, 20px);
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.header-custom-link {
    font-size: clamp(11px, 1.2vw + 0.2rem, 14px);
    font-weight: 400;
    font-family: var(--header-menu-font, 'Playfair Display'), serif;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: clamp(3px, 0.5vw, 6px) clamp(5px, 1vw, 10px);
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.85;
    letter-spacing: clamp(0.2px, 0.02vw, 0.3px);
}

.header-custom-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-secondary);
}

.btn-primary:hover {
    background: var(--text-secondary);
}

.btn-secondary {
    background: var(--accent);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--accent-hover);
}

/* Category Menu */
.category-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.category-item {
    padding: 10px 20px;
    background: var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.category-item:hover {
    background: var(--accent-hover);
}

.category-item.active {
    background: var(--text-primary);
    color: var(--bg-secondary);
}

.category-parent {
    font-weight: 600;
}

.category-expand-icon {
    font-size: 12px;
    margin-left: 10px;
    transition: transform 0.3s;
    user-select: none;
}

.category-children {
    margin-left: 20px;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 15px;
    border-left: 2px solid var(--border);
}

.category-child {
    font-weight: 400;
    font-size: 0.95em;
    padding: 8px 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.category-child:hover {
    background: var(--accent);
    border-color: var(--primary);
}

.category-child.active {
    background: var(--primary);
    color: var(--bg-secondary);
    border-color: var(--primary);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--grid-item-min), 1fr));
    gap: 0;
    margin-bottom: var(--spacing-xl);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Page Section Styles */
.page-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

/* About Page Layout - Split Layout */
.page-section.about-layout {
    max-width: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
}

.page-content.about-layout {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.page-content.about-layout .page-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
    min-height: 400px;
    max-height: 70vh;
    height: 70vh;
}

.page-content.about-layout .page-body > * {
    height: 100%;
}

.page-about-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-main);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.page-about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.page-about-content {
    padding: clamp(32px, 3.5vw, 48px) clamp(28px, 3vw, 40px);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    gap: clamp(20px, 2.5vw, 28px);
    /* Custom scrollbar styling - more subtle */
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

.page-about-content::-webkit-scrollbar {
    width: 4px;
}

.page-about-content::-webkit-scrollbar-track {
    background: transparent;
}

.page-about-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.page-about-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

.page-about-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 clamp(16px, 2vw, 24px) 0;
    text-transform: none;
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
    padding-bottom: clamp(20px, 2.5vw, 28px);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(156, 163, 175, 0.2);
}

.page-about-content h1::after {
    display: none;
}

.page-about-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 400;
    color: var(--text-primary);
    margin: clamp(24px, 3vw, 32px) 0 clamp(12px, 1.5vw, 16px) 0;
    line-height: 1.3;
    letter-spacing: 0.2px;
    flex-shrink: 0;
    font-style: italic;
}

.page-about-content p {
    font-size: clamp(13px, 1.6vw, 15px);
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 clamp(16px, 2vw, 20px) 0;
    letter-spacing: 0.3px;
    font-weight: 300;
}

.page-about-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 2vw, 20px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    margin: clamp(24px, 3vw, 32px) 0;
    padding: 0 clamp(20px, 2.5vw, 28px);
    border-left: 2px solid rgba(156, 163, 175, 0.3);
    background: transparent;
    border-radius: 0;
    position: relative;
    box-shadow: none;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.page-about-quote-author {
    display: block;
    margin-top: clamp(16px, 2vw, 20px);
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 400;
    color: var(--text-secondary);
    font-style: normal;
    text-align: left;
    padding-left: clamp(20px, 2.5vw, 28px);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.page-about-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 3vw, 32px);
    margin: clamp(24px, 3vw, 32px) 0;
}

.page-about-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(156, 163, 175, 0.15);
    padding-top: clamp(16px, 2vw, 20px);
    transition: all 0.3s ease;
}

.page-about-section:hover {
    background: transparent;
    border-color: rgba(156, 163, 175, 0.15);
    transform: none;
    box-shadow: none;
}

.page-about-section-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 clamp(16px, 2vw, 20px) 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 0;
}

.page-about-section-title::after {
    display: none;
}

.page-about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-about-list li {
    padding: clamp(10px, 1.2vw, 12px) 0;
    color: var(--text-primary);
    font-size: clamp(13px, 1.5vw, 15px);
    border-bottom: 1px solid rgba(156, 163, 175, 0.1);
    line-height: 1.6;
    position: relative;
    transition: all 0.2s ease;
    font-weight: 300;
    letter-spacing: 0.2px;
}

.page-about-list li::before {
    display: none;
}

.page-about-list li:last-child {
    border-bottom: none;
}

.page-about-list li:hover {
    color: var(--text-primary);
    padding-left: 0;
    opacity: 0.8;
}

.page-about-bottom-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(32px, 4vw, 48px);
    align-items: start;
    margin: clamp(32px, 4vw, 48px) 0 0 0;
    padding-top: clamp(24px, 3vw, 32px);
    border-top: 1px solid rgba(156, 163, 175, 0.15);
    flex-shrink: 0;
}

.page-about-social {
    display: flex;
    gap: clamp(12px, 1.5vw, 16px);
    flex-wrap: wrap;
    align-items: center;
}

.page-about-social a {
    width: clamp(36px, 4.5vw, 40px);
    height: clamp(36px, 4.5vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(156, 163, 175, 0.3);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(14px, 1.6vw, 16px);
}

.page-about-social a:hover {
    background: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.page-about-cta {
    margin: 0;
    padding: clamp(20px, 2.5vw, 28px);
    background: transparent;
    border-radius: 0;
    border: 1px solid rgba(156, 163, 175, 0.2);
    box-shadow: none;
    flex-shrink: 0;
}

.page-about-cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 clamp(12px, 1.5vw, 16px) 0;
    text-transform: none;
    letter-spacing: 0.2px;
    line-height: 1.4;
    font-style: italic;
}

.page-about-cta p {
    font-size: clamp(13px, 1.5vw, 15px);
    margin: 0 0 clamp(20px, 2.5vw, 24px) 0;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.2px;
}

.page-about-cta-button {
    display: inline-block;
    padding: clamp(10px, 1.2vw, 12px) clamp(24px, 3vw, 32px);
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0;
    font-weight: 400;
    font-size: clamp(12px, 1.4vw, 14px);
    transition: all 0.3s ease;
    margin: 0;
    border: 1px solid rgba(156, 163, 175, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.page-about-cta-button:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: none;
}

.page-about-footer {
    margin: clamp(32px, 4vw, 48px) 0 0 0;
    padding-top: clamp(24px, 3vw, 32px);
    border-top: 1px solid rgba(156, 163, 175, 0.15);
    font-size: clamp(11px, 1.3vw, 13px);
    flex-shrink: 0;
}

.page-about-footer p {
    margin: 0;
    font-size: clamp(11px, 1.3vw, 13px);
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.3px;
}

.page-about-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

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

@media (max-width: 968px) {
    .page-content.about-layout .page-body {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .page-about-image {
        width: 100%;
        height: 50vh;
        min-height: 400px;
        order: 1;
    }
    
    .page-about-image img {
        min-height: 400px;
        height: 100%;
    }
    
    .page-about-content {
        width: 100%;
        order: 2;
        padding: clamp(25px, 3vw, 40px) clamp(20px, 2.5vw, 30px);
        height: auto;
        overflow-y: visible;
    }
    
    .page-about-sections-grid {
        grid-template-columns: 1fr;
        gap: clamp(16px, 2vw, 24px);
    }
    
    .page-about-bottom-row {
        grid-template-columns: 1fr;
        gap: clamp(16px, 2vw, 24px);
    }
}

.page-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-header-content {
    position: relative;
    width: 100%;
}

.page-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: var(--bg-main);
}

.page-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-header-text {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.2;
}

.page-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    background: var(--accent);
    color: var(--text-primary);
    margin-top: var(--spacing-sm);
}

.page-type-badge.page-type-about {
    background: var(--primary);
    color: white;
}

.page-type-badge.page-type-contact {
    background: #10b981;
    color: white;
}

.page-type-badge.page-type-announcement {
    background: #f59e0b;
    color: white;
}

.page-body {
    padding: var(--spacing-xl);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: var(--font-size-base);
}

.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6 {
    color: var(--text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    font-weight: 600;
}

.page-body h1 {
    font-size: var(--font-size-2xl);
}

.page-body h2 {
    font-size: var(--font-size-xl);
}

.page-body h3 {
    font-size: var(--font-size-lg);
}

.page-body p {
    margin-bottom: var(--spacing-md);
}

.page-body ul,
.page-body ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.page-body li {
    margin-bottom: var(--spacing-sm);
}

.page-body a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

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

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: var(--spacing-md) 0;
}

.page-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.page-body code {
    background: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.page-body pre {
    background: var(--accent);
    padding: var(--spacing-md);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.page-body pre code {
    background: none;
    padding: 0;
}

/* Contact Form Styles (Frontend) */
.page-body .contact-form-wrapper {
    position: relative;
    max-width: 700px;
    margin: 30px auto;
    padding: 0;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 2px solid var(--border);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-body .contact-form-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.page-body .contact-form-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: 28px 32px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-body .contact-form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.page-body .contact-form-title {
    margin: 0 0 10px 0;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.page-body .contact-form-subtitle {
    margin: 0;
    font-size: clamp(13px, 1.5vw, 15px);
    opacity: 0.95;
    color: white;
    position: relative;
    z-index: 1;
}

.page-body .contact-form {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.page-body .contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 600px) {
    .page-body .contact-form-row {
        grid-template-columns: 1fr;
    }
    
    .page-body .contact-form {
        padding: 24px 20px;
    }
    
    .page-body .contact-form-header {
        padding: 24px 20px;
    }
}

.page-body .contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-body .contact-form-label {
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 15px);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-body .contact-form-label .required {
    color: #ef4444;
    font-size: 18px;
    font-weight: 700;
}

.page-body .contact-form-input,
.page-body .contact-form-textarea {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: clamp(14px, 1.6vw, 16px);
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.page-body .contact-form-input:focus,
.page-body .contact-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.page-body .contact-form-input::placeholder,
.page-body .contact-form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.page-body .contact-form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

.page-body .contact-form-submit {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: clamp(15px, 1.8vw, 17px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    position: relative;
    overflow: hidden;
}

.page-body .contact-form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.page-body .contact-form-submit:hover::before {
    left: 100%;
}

.page-body .contact-form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

.page-body .contact-form-submit:active {
    transform: translateY(-1px);
}

.page-body .contact-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.page-body .submit-icon {
    font-size: 20px;
}

.page-body .submit-text {
    font-size: clamp(15px, 1.8vw, 17px);
}

.page-body .form-message {
    margin: 24px 32px 0;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: clamp(13px, 1.5vw, 15px);
    font-weight: 500;
    display: none;
    animation: slideDown 0.4s ease;
    line-height: 1.6;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-body .form-message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
    display: block;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.page-body .form-message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
    display: block;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

@media (max-width: 768px) {
    .page-section {
        padding: var(--spacing-md) 0;
    }
    
    .page-header-text,
    .page-body {
        padding: var(--spacing-md);
    }
    
    .page-title {
        font-size: var(--font-size-2xl);
    }
    
    .page-featured-image {
        max-height: 300px;
    }
}

.post-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    background: var(--bg-secondary);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 2 / 3; /* 4:6 ratio - portrait orientation */
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 1;
}

.post-card:hover {
    transform: scale(1.01);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    background: var(--bg-secondary);
}

.post-card:hover .post-image {
    transform: scale(1.05);
}

.post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
    transform: translateY(0);
}

.post-title-overlay {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.post-category-overlay {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.post-stats-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 15px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.post-card:hover .post-stats-overlay {
    opacity: 1;
    transform: translateY(0);
}

.post-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.post-stat-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.post-stat-item.likes svg {
    fill: #ef4444;
    stroke: #ef4444;
}

/* Posts Loading More Indicator */
.posts-loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.posts-loading-more .loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.posts-loading-more p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent body scroll when modal is active */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    max-width: 1400px;
    width: 100%;
    max-height: 98vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin: auto;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--accent-hover);
}

.modal-body {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr;
    gap: 30px;
    padding: 30px;
    align-items: stretch;
    height: calc(98vh - 60px);
    overflow: hidden;
}

.modal-images-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-images {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
    opacity: 1;
    transition: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform;
}

.modal-image.active {
    display: block;
    opacity: 1;
}

.modal-image.loaded {
    opacity: 1;
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
    opacity: 0.7;
}

.image-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.image-nav-btn svg {
    width: 24px;
    height: 24px;
}

.image-nav-prev {
    left: 15px;
}

.image-nav-next {
    right: 15px;
}

.image-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 10px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-info::-webkit-scrollbar {
    width: 6px;
}

.modal-info::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 10px;
}

.modal-info::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.modal-info::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.modal-view-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
}

.modal-view-count svg {
    width: 18px;
    height: 18px;
}

.modal-content-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 15px;
    margin-top: 0;
}

.modal-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hashtag {
    padding: 5px 12px;
    background: var(--accent);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 14px;
}

.action-btn:hover {
    background: var(--accent-hover);
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

.action-btn.like-btn.active {
    background: #ff6b6b;
    color: white;
}

.action-btn.like-btn.active svg {
    fill: white;
    stroke: white;
}

.like-count,
.comment-count {
    font-weight: 600;
    margin-left: 4px;
}

.share-container {
    position: relative;
}

.share-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px;
}

.share-container.active .share-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
}

.share-option:hover {
    background: var(--accent);
}

.share-option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.share-option[data-platform="facebook"] svg {
    fill: #1877F2;
    color: #1877F2;
}

.share-option[data-platform="twitter"] svg {
    fill: #000000;
    color: #000000;
}

.share-option[data-platform="pinterest"] svg {
    fill: #BD081C;
    color: #BD081C;
}

.share-option[data-platform="instagram"] svg {
    stroke: #E4405F;
    color: #E4405F;
}

.modal-comments {
    margin-top: 15px;
    flex-shrink: 0;
    min-height: 0;
}

.modal-comments h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

.comments-list {
    max-height: none;
    overflow-y: visible;
    margin-top: 15px;
    min-height: 0;
}

.comment-item {
    padding: 15px;
    background: var(--accent);
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-content {
    color: var(--text-secondary);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    font-family: inherit;
    font-size: 13px;
}

.captcha-container input::placeholder {
    color: #888;
}

.captcha-code {
    font-weight: bold;
    font-size: 16px;
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    letter-spacing: 4px;
    color: white;
}

.btn-refresh-captcha {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.btn-refresh-captcha:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-refresh-captcha svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
}

.btn-refresh-captcha {
    padding: 12px;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-primary);
}

.btn-refresh-captcha:hover {
    background: var(--accent-hover);
}

.btn-refresh-captcha svg {
    width: 20px;
    height: 20px;
}

.btn-refresh-captcha:active svg {
    transform: rotate(180deg);
    transition: transform 0.3s;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-refresh-captcha:hover {
    background: var(--accent-hover);
}

/* Messages Button */
.messages-btn {
    position: fixed;
    bottom: clamp(15px, 3vh, 30px);
    right: clamp(15px, 3vw, 30px);
    min-width: clamp(50px, 15vw, 180px);
    max-width: calc(100vw - clamp(30px, 6vw, 60px));
    height: clamp(40px, 5vh, 50px);
    padding: 0 clamp(8px, 1.5vw, 16px);
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: white;
    border: none;
    border-radius: clamp(20px, 3vh, 25px);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(8px, 1.2vw, 12px);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    font-size: clamp(12px, 1.5vw, 15px);
}

.messages-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #333333 0%, #222222 100%);
}

/* Fluid responsive: Remove background when screen is small */
@container (max-width: 800px) {
    .messages-btn {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
    }
    
    .messages-btn:hover {
        background: transparent;
        transform: translateY(-2px);
        box-shadow: none;
    }
}

/* Fallback for browsers without container queries */
@media (max-width: 800px) {
    .messages-btn {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
    }
    
    .messages-btn:hover {
        background: transparent;
        transform: translateY(-2px);
        box-shadow: none;
    }
}

.messages-btn .messages-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: white;
    stroke-width: 2;
}

.messages-btn .messages-text {
    font-size: 15px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    flex: 1;
}

.messages-btn .messages-badge {
    width: 32px;
    height: 32px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    font-family: 'Times New Roman', serif;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.messages-popup.active ~ .messages-btn {
    display: none;
}

/* Emoji Picker */
.emoji-picker {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    width: 300px;
    max-width: calc(100vw - 60px);
    max-height: 250px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.emoji-item {
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    text-align: center;
    border-radius: 6px;
    transition: background 0.2s;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Popup - Bottom Right Corner */
.messages-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-sizing: border-box;
}

.messages-popup.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Fullscreen mode */
.messages-popup.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    transform: translateY(0) !important;
}

.messages-popup.drag-over {
    border: 2px dashed var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.messages-popup.drag-over .messages-popup-container {
    opacity: 0.9;
}

.messages-btn.in-sidebar {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
}

.messages-popup-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1a1a1a;
}

/* Header */
.messages-popup-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
    flex-shrink: 0;
}

.messages-header-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.messages-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.messages-header-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.messages-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.messages-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Times New Roman', serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.messages-profile-info {
    flex: 1;
    min-width: 0;
}

.messages-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    word-break: break-word;
}

.messages-profile-status {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.messages-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Content Area */
.messages-popup-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    position: relative;
    z-index: 1;
}

.messages-chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.messages-history {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* Popup Form */
.messages-popup-form {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.message-form-fields {
    padding: 12px 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    overflow: visible;
}

.message-form-fields.active {
    display: flex;
}

.message-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.message-form-fields input {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    font-family: inherit;
    font-size: 13px;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.message-form-fields input::placeholder {
    color: #888;
}

/* Input Wrapper */
.messages-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #2a2a2a;
    position: relative;
    z-index: 1;
}

.messages-input-wrapper textarea {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: #1a1a1a;
    color: white;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    outline: none;
}

.messages-input-wrapper textarea::placeholder {
    color: #888;
}

.messages-input-icon {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.messages-input-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.messages-input-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
}


.btn-attach-image {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-attach-image:hover {
    background: var(--accent-hover);
}

.btn-attach-image svg {
    width: 20px;
    height: 20px;
}

.message-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #2a2a2a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.message-images-preview:empty {
    display: none;
}

.message-image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.message-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-image-preview .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.messages-history h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding-bottom: 10px;
    z-index: 1;
}

.message-item {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 75%;
    word-wrap: break-word;
    box-sizing: border-box;
    position: relative;
}

.message-customer {
    background: #2a2a2a;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    margin-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.message-admin {
    background: #333;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    margin-right: auto;
    margin-left: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.message-sender {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.message-customer .message-sender {
    color: var(--text-primary);
}

.message-admin .message-sender {
    color: var(--text-primary);
}

.message-content {
    margin-bottom: 6px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-customer .message-content {
    color: var(--text-primary);
}

.message-admin .message-content {
    color: var(--text-primary);
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.message-customer .message-time {
    color: var(--text-secondary);
}

.message-admin .message-time {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
}

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

.footer-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.heart-icon {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Search Modal */
.search-modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    height: auto;
    display: flex;
    flex-direction: column;
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    box-shadow: none;
    margin: auto;
}

.search-form {
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
    height: 100%;
}

.search-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 18px;
    font-family: inherit;
    box-sizing: border-box;
    flex-shrink: 0;
}

.search-results {
    margin-top: 20px;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 200px); /* Cho phép hiển thị nhiều kết quả hơn */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    padding-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* Prevent scroll chaining to body */
}

.search-result-item {
    display: flex;
    gap: clamp(10px, 2vw, 15px);
    padding: clamp(10px, 2vw, 15px);
    background: var(--accent);
    border-radius: 8px;
    margin-bottom: clamp(8px, 1.5vw, 12px);
    cursor: pointer;
    transition: all 0.3s;
    align-items: flex-start;
    flex-direction: row; /* Luôn hiển thị ngang (thumbnail bên trái, content bên phải) */
}

.search-result-item:hover {
    background: var(--accent-hover);
    transform: translateX(5px);
}

.search-result-thumbnail {
    flex-shrink: 0;
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
    min-width: clamp(60px, 10vw, 100px);
    min-height: clamp(60px, 10vw, 100px);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(24px, 4vw, 40px);
    color: var(--text-secondary);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 clamp(6px, 1vw, 8px) 0;
    line-height: 1.4;
}

.search-result-excerpt {
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--text-secondary);
    margin: 0 0 clamp(6px, 1vw, 8px) 0;
    line-height: 1.5;
}

.search-result-tags {
    font-size: clamp(10px, 1.2vw, 12px);
    color: var(--primary);
    margin-top: clamp(6px, 1vw, 8px);
}

/* Responsive cho search results - Mobile */
@media (max-width: 768px) {
    /* Khung tìm kiếm ở giữa màn hình */
    #searchModal.modal.active {
        align-items: center;
        justify-content: center;
        padding: 15px;
    }
    
    .search-modal-content {
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        margin: 0;
        position: relative;
    }
    
    .search-form {
        padding: clamp(20px, 5vw, 30px);
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    
    .search-form input {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    /* Kết quả tìm kiếm - danh sách dọc, hiển thị nhiều kết quả */
    .search-results {
        max-height: calc(90vh - 150px); /* Cho phép hiển thị nhiều kết quả */
        margin-top: 15px;
        padding-bottom: 20px;
    }
    
    /* Layout danh sách: thumbnail nhỏ bên trái, content bên phải */
    .search-result-item {
        flex-direction: row; /* Giữ layout ngang */
        align-items: flex-start;
        text-align: left;
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .search-result-thumbnail {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        border-radius: 6px;
    }
    
    .search-result-content {
        flex: 1;
        min-width: 0;
        text-align: left;
    }
    
    .search-result-title {
        font-size: 15px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .search-result-excerpt {
        font-size: 13px;
        margin-bottom: 4px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .search-result-tags {
        font-size: 11px;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .search-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .search-form {
        padding: clamp(15px, 4vw, 20px);
    }
    
    .search-form input {
        font-size: 16px; /* Đảm bảo không zoom trên iOS */
        padding: 12px;
    }
    
    .search-results {
        max-height: calc(95vh - 140px);
        margin-top: 12px;
        padding-bottom: 15px;
    }
    
    .search-result-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .search-result-thumbnail {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
    }
    
    .search-result-title {
        font-size: 14px;
    }
    
    .search-result-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

.search-load-more {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.search-error {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.toast.success::before {
    background: #10b981;
}

.toast.error::before {
    background: #ef4444;
}

.toast.warning::before {
    background: #f59e0b;
}

.toast.info::before {
    background: #3b82f6;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    margin-top: 2px;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-close svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* Fluid Responsive System - No fixed breakpoints */
/* All sizing now uses clamp() and viewport units for smooth scaling */

@media (max-width: 992px) {
    .sidebar-left {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        bottom: clamp(15px, 3vh, 20px) !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        gap: clamp(8px, 1.5vw, 12px);
        z-index: 1001;
        width: auto;
        max-width: calc(100vw - clamp(20px, 4vw, 40px));
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0 auto;
    }
    
    .sidebar-icon {
        flex-shrink: 0;
        min-width: clamp(35px, 4vw, 50px);
        width: clamp(35px, 4vw, 50px);
        height: clamp(35px, 4vw, 50px);
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .sidebar-icon:hover {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .sidebar-icon svg {
        width: clamp(18px, 2.2vw, 24px);
        height: clamp(18px, 2.2vw, 24px);
    }
    
    .messages-btn {
        position: fixed;
        left: 50%;
        bottom: 20px;
        top: auto;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        min-width: 50px;
        max-width: 50px;
        padding: 0;
        z-index: 1002;
        margin: 0;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .messages-btn:hover {
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .messages-btn .messages-text {
        display: none;
    }
    
    .messages-btn .messages-badge {
        display: none;
    }
    
    .messages-popup {
        left: 50% !important;
        bottom: 80px !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        top: auto !important;
    }
    
    
    .main-content {
        padding: 20px 40px;
    }
    
    .header {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    .header-content {
        gap: 25px;
    }
    
    .header-nav {
        gap: 15px;
    }
    
    .header-nav-item {
        font-size: 13px;
    }
    
    .header-custom-links {
        gap: 15px;
    }
    
    .header-custom-link {
        font-size: 13px;
    }
    
    .site-name {
        font-size: 24px;
    }
    
    .site-subtitle {
        font-size: 14px;
    }
}

/* Fluid Responsive: Further adjustments for smaller viewports */
/* Using container queries with viewport-based fallback for maximum flexibility */
@container (max-width: 800px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(15px, 2.5vh, 20px);
    }
    
    .header-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(10px, 2vw, 15px);
        width: 100%;
    }
    
    .header-custom-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(10px, 2vw, 15px);
        width: 100%;
    }
}

/* Fallback for browsers without container queries */
@media (max-width: 1200px) {
    .header-content {
        flex-wrap: wrap;
    }
}

@media (max-width: 800px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(15px, 2.5vh, 20px);
    }
    
    .header-left {
        max-width: 100%;
    }
    
    .header-right {
        width: 100%;
        align-items: flex-start;
    }
    
    .header-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(10px, 2vw, 15px);
        width: 100%;
        justify-content: flex-start;
    }
    
    .header-custom-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: clamp(10px, 2vw, 15px);
        width: 100%;
        justify-content: flex-start;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: clamp(10px, 2vw, 15px);
        gap: clamp(10px, 2vw, 15px);
        height: auto;
        max-height: 98vh;
        overflow-y: auto;
    }
    
    /* Mobile: Ưu tiên hiển thị ảnh lớn - chiếm phần lớn màn hình */
    .modal-images-container {
        height: 70vh;
        min-height: 400px;
        max-height: calc(100vh - 200px);
        order: 1;
    }
    
    /* Mobile: Thu nhỏ phần info và ẩn mặc định */
    .modal-info {
        order: 2;
        max-height: none;
        overflow-y: visible;
    }
    
    /* Mobile: Nút toggle cho content và comments - chỉ hiện trên mobile */
    .mobile-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background: var(--accent);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-family: inherit;
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 10px;
        transition: all 0.3s;
    }
    
    .mobile-toggle-btn:hover {
        background: var(--accent-hover);
    }
    
    .mobile-toggle-btn svg {
        width: 18px;
        height: 18px;
        transition: transform 0.3s;
    }
    
    .mobile-toggle-btn.collapsed svg {
        transform: rotate(-90deg);
    }
    
    /* Mobile: Ẩn phần content và comments mặc định, chỉ hiện khi mở */
    .modal-content-text-wrapper,
    .modal-comments-wrapper {
        margin-bottom: 10px;
    }
    
    /* Mobile: Điều chỉnh modal content để không có padding thừa */
    .modal-content {
        max-height: 98vh;
        height: 98vh;
    }
    
    /* Mobile: Giảm padding modal */
    .modal {
        padding: 10px;
    }
    
    /* Mobile: Tối ưu kích thước ảnh */
    .modal-image {
        max-height: 100%;
        object-fit: contain;
    }
    
    /* Mobile: Điều chỉnh nút điều hướng ảnh */
    .image-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .image-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .emoji-picker {
        width: calc(100vw - clamp(20px, 4vw, 40px));
        max-width: calc(100vw - clamp(20px, 4vw, 40px));
    }
}

/* Desktop: Ẩn nút toggle và luôn hiển thị nội dung */
.mobile-toggle-btn {
    display: none;
}

/* Desktop: Nội dung luôn hiển thị, bỏ qua class collapsed */
.mobile-collapsible-content {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 800px) {
    /* Mobile: Hiện nút toggle */
    .mobile-toggle-btn {
        display: flex;
    }
    
    /* Mobile: Nội dung mặc định ẩn (có class collapsed) */
    .mobile-collapsible-content.collapsed {
        max-height: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }
    
    /* Mobile: Nội dung khi mở (không có class collapsed) */
    .mobile-collapsible-content:not(.collapsed) {
        max-height: 500px;
        opacity: 1;
        overflow-y: auto;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }
    
    .modal-content-text-wrapper .mobile-collapsible-content:not(.collapsed) {
        max-height: 300px;
    }
    
    .modal-comments-wrapper .mobile-collapsible-content:not(.collapsed) {
        max-height: 400px;
    }
}

/* All responsive adjustments now use fluid sizing - no fixed breakpoints */
/* The system automatically adapts to any screen size smoothly */

