/* General Styles */
    .filedohoa-page-container {
        max-width: 100%;
        margin: 20px auto;
        padding: 0 15px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    .filedohoa-main-content {
        display: flex;
        gap: 30px;
    }

    /* Left Sidebar (Filters) */
    .filedohoa-sidebar {
        width: 280px; /* Fixed width */
        flex-shrink: 0;
    }

    .filedohoa-content {
        width: calc(100% - 310px); /* Adjust based on sidebar width and gap */
    }

    .filter-widget {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .filter-widget h3 {
        margin-top: 0;
        font-size: 18px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

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

    .filter-widget li {
        margin-bottom: 0px;
    }

    .filter-widget a {
        text-decoration: none;
        color: #555;
        display: flex;
        justify-content: space-between;
        padding: 5px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    .filter-widget a:hover {
        background-color: #f0f0f0;
        color: #123593;
    }
    .filter-widget a.active {
        font-weight: bold;
    }
    .filter-widget .count {
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 12px;
    }
    .filter-widget a.active .count {
        background: #fff;
        color: #555;
    }

    /* Color filter specific styles */
    .filter-widget ul:has(.color-filter-item) {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    .color-filter-item {
        margin-bottom: 0 !important;
    }
    .color-filter-button {
        display: block !important;
        width: 35px;
        height: 20px;
        border-radius: 4px;
        border: 1px solid #f8f9fa;
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
    }
    .color-filter-button:hover {
        border-color: #1947c4;
        transform: scale(1.05);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .color-filter-button.active {
        border-color: #1947c4;
        border-width: 3px;
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(25, 71, 196, 0.3);
    }
    
    /* Special handling for white and light colors */
    .color-filter-button[style*="background-color: #ffffff"],
    .color-filter-button[style*="background-color: #ffff00"],
    .color-filter-button[style*="background-color: #ffc0cb"] {
        border-color: #999;
    }
    .color-filter-button[style*="background-color: #ffffff"]:hover,
    .color-filter-button[style*="background-color: #ffff00"]:hover,
    .color-filter-button[style*="background-color: #ffc0cb"]:hover {
        border-color: #1947c4;
    }
    
    /* Remove old color circle styles */
    .color-filter-link,
    .color-circle,
    .color-name {
        display: none;
    }

    /* Mobile Menu Toggle Button */
    .filedohoa-mobile-menu-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.3s ease;
        padding: 0;
    }
    .filedohoa-mobile-menu-toggle:hover {
        background: #f0f0f0;
        border-color: #ccc;
    }
    .menu-grid-icon {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2px;
        width: 12px;
        height: 12px;
    }
    .grid-dot {
        background: #555;
        border-radius: 1px;
        width: 4px;
        height: 4px;
    }

    /* Mobile Sidebar Overlay */
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .mobile-sidebar-overlay.show {
        opacity: 1;
    }

    /* Mobile Sidebar Header */
    .mobile-sidebar-header {
        display: none;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
        margin: 0px 0px 0px 0px;
        flex-shrink: 0;
    }
    .mobile-sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }
    .mobile-sidebar-header h3 {
        margin: 0;
        font-size: 18px;
        color: #333;
    }
    .mobile-sidebar-close {
        width: 30px;
        height: 30px;
        border: none;
        background: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        color: #666;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    .mobile-sidebar-close:hover {
        background: #e9ecef;
        color: #333;
    }

    /* Search & Filter Bar */
    .filedohoa-controls {
        display: flex;
        gap: 15px;
        margin-bottom: 25px;
        align-items: center;
    }
    .filedohoa-home-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid #ddd;
        border-radius: 22px;
        color: #555;
        text-decoration: none;
        font-size: 20px;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }
    .filedohoa-home-link:hover {
        background-color: #f0f0f0;
        border-color: #ccc;
    }
    .filedohoa-search-form {
        flex-grow: 1;
        position: relative;
    }
    .filedohoa-search-form input[type="search"] {
        width: 100%;
        padding: 12px 20px;
        border: 1px solid #ddd;
        border-radius: 25px;
        font-size: 16px;
        outline: none;
        transition: border-color 0.3s;
    }
    .filedohoa-search-form input[type="search"]:focus {
        border-color: #1947c4;
    }
    .filedohoa-search-form button {
        position: absolute;
        right: 5px;
        top: 5px;
        bottom: 5px;
        border: none;
        background: #1947c4;
        color: white;
        border-radius: 20px;
        padding: 0 25px;
        cursor: pointer;
        font-size: 16px;
        transition: background-color 0.3s;
    }
    .filedohoa-search-form button:hover {
        background: #123593;
    }
    .filedohoa-sort-form {
        position: relative;
    }
    .filedohoa-sort-form select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        padding: 3px 20px 3px 20px;
        border: 1px solid #ddd;
        border-radius: 25px;
        background-color: #fff;
        font-size: 16px;
        cursor: pointer;
        min-width: 120px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
    }

    /* Pinterest-style Grid */
    .filedohoa-grid {
        column-count: 6;
        column-gap: 15px;
    }

    .filedohoa-item {
        margin-bottom: 15px;
        break-inside: avoid;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        page-break-inside: avoid;
        -webkit-column-break-inside: avoid;
    }

    .filedohoa-item a {
        display: block;
        text-decoration: none;
    }

    .filedohoa-item img {
        width: 100%;
        height: auto;
        display: block;
        transition: transform 0.4s ease;
    }

    .filedohoa-item:hover img {
        transform: scale(1.05);
    }

    .filedohoa-item-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
        padding: 30px 15px 15px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .filedohoa-item:hover .filedohoa-item-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .filedohoa-item-title {
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        margin: 0;
        flex-grow: 1;
    }

    .filedohoa-item a.filedohoa-title-link {
        text-decoration: none;
        flex-grow: 1;
    }
    .filedohoa-item-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    .filedohoa-item a.filedohoa-download-icon,
    .filedohoa-item a.filedohoa-copy-link {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
        font-size: 16px;
        flex-shrink: 0;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    .filedohoa-item a.filedohoa-download-icon:hover,
    .filedohoa-item a.filedohoa-copy-link:hover {
        background: rgba(25, 71, 196, 0.9);
        color: #fff;
    }

    /* Copy notification */
    .copy-notification {
        position: fixed;
        top: 20px;
        right: 20px;
        background: #28a745;
        color: white;
        padding: 12px 20px;
        border-radius: 5px;
        font-size: 14px;
        font-weight: bold;
        z-index: 9999;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    .copy-notification.show {
        opacity: 1;
        transform: translateY(0);
    }

    /* Single Post Content */
    .single-file-content {
        background: #fff;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Breadcrumb Navigation */
    .filedohoa-breadcrumb {
        margin-bottom: 20px;
        padding: 0;
        font-size: 14px;
        color: #6c757d;
    }
    .filedohoa-breadcrumb a {
        color: #555;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    .filedohoa-breadcrumb a:hover {
        color: #123593;
        text-decoration: underline;
    }
    .breadcrumb-separator {
        margin: 0 8px;
        color: #adb5bd;
    }
    .breadcrumb-current {
        color: #495057;
        font-weight: 500;
    }

    /* New Single File Layout */
    .single-file-layout {
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }

    /* Left Image Section */
    .single-file-image-section {
        flex: 1 1 0;
        width: 100%;
        max-width: 100%;
    }
    .single-file-image-container {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
        border-radius: 12px;
        overflow: hidden;
        background: #f8f9fa;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    .image-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        filter: blur(20px);
        opacity: 0.3;
    }
    .single-file-image-container img {
        position: absolute;
        z-index: 2;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .single-file-image-container.no-image {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        cursor: default;
    }
    .no-image-placeholder {
        text-align: center;
        color: #6c757d;
    }
    .no-image-placeholder i {
        font-size: 48px;
        margin-bottom: 10px;
        display: block;
    }

    /* Right Info Section */
    .single-file-info-section {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
    .single-file-info-section h1.entry-title {
        font-size: 2.2rem;
        margin-top: 0;
        margin-bottom: 25px;
        color: #2c3e50;
        line-height: 1.3;
    }

    @media (min-width: 1200px) {
        .single-file-layout {
            gap: 48px;
        }
        .single-file-image-section {
            flex: 0 0 calc((100% - 48px) / 3);
            width: calc((100% - 48px) / 3);
            max-width: calc((100% - 48px) / 3);
        }
    }

    /* Taxonomies */
    .single-file-taxonomies {
        margin-bottom: 25px;
    }
    .taxonomy-group {
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .taxonomy-group strong {
        color: #495057;
        font-size: 14px;
        min-width: 80px;
    }
    .taxonomy-term {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 36px;
        background: #e9ecef;
        padding: 6px 13px;
        border: 1px solid transparent;
        border-radius: 18px;
        font-size: 13px;
        line-height: 1;
        color: #495057;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }
    .taxonomy-term__arrow {
        font-size: 10px;
        opacity: 0.58;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .taxonomy-term:hover,
    .taxonomy-term:focus-visible {
        background: #1947c4;
        border-color: #1947c4;
        color: white;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(25, 71, 196, 0.2);
        outline: none;
    }
    .taxonomy-term:hover .taxonomy-term__arrow,
    .taxonomy-term:focus-visible .taxonomy-term__arrow {
        opacity: 1;
        transform: translateX(2px);
    }
    #filedohoa-results {
        scroll-margin-top: 120px;
    }

    /* Description */
    .single-file-description {
        margin-bottom: 25px;
    }
    .single-file-description h3 {
        font-size: 18px;
        margin-bottom: 10px;
        color: #2c3e50;
    }
    .single-file-description p {
        line-height: 1.6;
        color: #1f1f1f;
        margin-bottom: 0;
        font-size: 16px;
        font-weight: 400;
    }

    /* Copy Link Button */
    .single-file-copy-link {
        margin-bottom: 20px;
    }
    .copy-link-button {
        background: #f8f9fa;
        color: #6c757d;
        border: 1px solid #e9ecef;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 400;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .copy-link-button:hover {
        background: #e9ecef;
        color: #495057;
        border-color: #dee2e6;
    }

    /* Download Button */
    .single-file-download-button {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 15px 30px;
        background: linear-gradient(135deg, #1947c4 0%, #123593 100%);
        color: #fff;
        text-decoration: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(25, 71, 196, 0.3);
        width: 100%;
        align-items: center;       /* căn giữa theo chiều dọc */
        justify-content: center;   /* căn giữa theo chiều ngang */
    }
    .single-file-download-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(25, 71, 196, 0.4);
        text-decoration: none;
        color: #fff;
    }

    /* Image Popup */
    .image-popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        z-index: 10000;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 80px 40px;
        box-sizing: border-box;
    }
    .image-popup-overlay.show {
        opacity: 1;
    }
    .image-popup-content {
        position: relative;
        max-width: 90%;
        max-height: 90%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .image-popup-content img {
        max-width: 70%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    }
    .image-popup-close {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.3s ease;
        z-index: 10001;
    }
    .image-popup-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    .single-file-download-button {
        display: inline-block;
        margin-top: 30px;
        padding: 15px 30px;
        background-color: #1947c4;
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
        font-size: 18px;
        font-weight: bold;
        transition: background-color 0.3s;
    }
    .single-file-download-button:hover {
        background-color: #123593;
    }

    /* Related Posts */
    .related-posts-section {
        margin-top: 40px;
    }
    .related-posts-section h2 {
        font-size: 24px;
        border-bottom: 2px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    /* Pagination */
    .filedohoa-pagination {
        margin-top: 30px;
        text-align: center;
    }
    .filedohoa-pagination .page-numbers {
        padding: 8px 15px;
        margin: 0 2px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-decoration: none;
        color: #555;
        transition: all 0.3s ease;
    }
    .filedohoa-pagination .page-numbers:hover,
    .filedohoa-pagination .page-numbers.current {
        background: #1947c4;
        color: #fff;
        border-color: #1947c4;
    }

    /* Responsive */
    @media (max-width: 1600px) { .filedohoa-grid { column-count: 5; } }
    @media (max-width: 1400px) { .filedohoa-grid { column-count: 4; } }
    @media (max-width: 1200px) { .filedohoa-grid { column-count: 3; } }
    @media (max-width: 992px) {
        .filedohoa-main-content {
            flex-direction: column;
        }
        .filedohoa-sidebar, .filedohoa-content {
            width: 100%;
        }
        .filedohoa-grid { column-count: 3; }
    }
    @media (max-width: 768px) { 
        .filedohoa-grid { column-count: 2; }
        
        /* Show mobile menu toggle */
        .filedohoa-mobile-menu-toggle {
            display: flex;
        }
        
        /* Hide sidebar by default on mobile */
        .filedohoa-sidebar {
            position: fixed;
            top: 0;
            left: -280px;
            width: 280px;
            height: 100vh;
            height: 100dvh; /* Use dynamic viewport height for mobile */
            background: #fff;
            z-index: 9999;
            transition: left 0.3s ease;
            box-shadow: 2px 0 10px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .filedohoa-sidebar.mobile-open {
            left: 0;
        }
        
        /* Show mobile sidebar header */
        .mobile-sidebar-header {
            display: flex;
            flex-shrink: 0;
        }
        
        /* Mobile sidebar content wrapper */
        .mobile-sidebar-content {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 20px;
        }
        
        /* Sidebar content area - scrollable */
        .filedohoa-sidebar .filter-widget {
            flex-shrink: 0;
        }
        
        /* Ensure main content is not affected by sidebar */
        .filedohoa-main-content {
            position: relative;
            overflow-x: hidden;
        }
        
        /* Prevent horizontal scroll issues */
        body {
            overflow-x: hidden;
        }
        
        /* Container padding */
        .filedohoa-page-container {
            margin: 10px auto;
            padding: 0 10px;
        }
        
        /* Reduce gap between content sections */
        .filedohoa-main-content {
            gap: 20px;
        }
        
        /* Optimize filter widgets */
        .filter-widget {
            padding: 15px;
            margin-bottom: 15px;
        }
        .filter-widget h3 {
            font-size: 16px;
            margin-bottom: 12px;
        }
        .filter-widget a {
            padding: 8px 5px;
            font-size: 14px;
        }
        
        /* Optimize controls bar */
        .filedohoa-controls {
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .filedohoa-home-link {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }
        .filedohoa-search-form input[type="search"] {
            padding: 10px 16px;
            font-size: 14px;
        }
        .filedohoa-search-form button {
            padding: 0 20px;
            font-size: 14px;
        }
        .filedohoa-sort-form select {
            padding: 8px 35px 8px 16px;
            font-size: 14px;
            min-width: 100px;
        }
        
        /* Grid items optimization */
        .filedohoa-grid {
            column-gap: 10px;
            column-fill: balance;
        }
        .filedohoa-item {
            margin-bottom: 10px;
            display: inline-block;
            width: 100%;
            vertical-align: top;
        }
        .filedohoa-item-overlay {
            padding: 20px 10px 10px;
        }
        .filedohoa-item-title {
            font-size: 14px;
        }
        .filedohoa-item a.filedohoa-download-icon,
        .filedohoa-item a.filedohoa-copy-link {
            width: 35px;
            height: 35px;
            font-size: 14px;
        }
        
        /* Single post content */
        .single-file-content {
            width: 95%;
            padding: 20px;
        }
        .single-file-content h1.entry-title {
            font-size: 1.8rem;
            margin-bottom: 15px;
        }
        .single-file-entry-content {
            font-size: 15px;
            line-height: 1.6;
        }
        .single-file-download-button {
            padding: 12px 25px;
            font-size: 16px;
            margin-top: 20px;
            
        }
        
        /* Related posts */
        .related-posts-section {
            margin-top: 30px;
        }
        .related-posts-section h2 {
            font-size: 20px;
            margin-bottom: 15px;
        }
        
        /* Pagination */
        .filedohoa-pagination .page-numbers {
            padding: 6px 12px;
            font-size: 14px;
        }
        
        /* Copy notification */
        .copy-notification {
            top: 15px;
            right: 15px;
            padding: 10px 16px;
            font-size: 13px;
        }
        
        /* Single post mobile layout */
        .single-file-layout {
            flex-direction: column;
            gap: 25px;
        }
        .single-file-image-section,
        .single-file-info-section {
            width: 100%;
            max-width: 100%;
            flex-basis: auto;
        }
        .single-file-image-container {
            height: auto;
            min-height: 200px;
        }
        .single-file-image-container img {
            position: static;
            transform: none;
            top: auto;
            left: auto;
            width: 100%;
            height: auto;
            object-fit: contain;
            border-radius: 8px;
            max-height: 70vh;
        }
        .image-background {
            display: none;
        }
        .single-file-info-section h1.entry-title {
            font-size: 1.8rem;
        }
        .single-file-download-button {
            width: 100%;
            justify-content: center;
            padding: 15px;
        }
        
        /* Mobile popup adjustments */
        .image-popup-overlay {
            padding: 60px 20px;
        }
        .image-popup-content {
            max-width: 95%;
            max-height: 95%;
        }
        .image-popup-content img {
            max-width: 95%;
        }
        .image-popup-close {
            top: 15px;
            right: 15px;
            font-size: 16px;
            width: 36px;
            height: 36px;
        }
    }
    @media (max-width: 576px) { 
        .filedohoa-grid { column-count: 2; }
        
        /* Ultra mobile optimizations */
        .filedohoa-page-container {
            margin: 16px auto;
            padding: 0 8px;
        }
        
        /* Keep controls in single row for mobile */
        .filedohoa-controls {
            flex-direction: row;
            gap: 8px;
            align-items: center;
            flex-wrap: nowrap;
        }
        .filedohoa-home-link {
            width: 32px;
            height: 32px;
            font-size: 14px;
            flex-shrink: 0;
        }
        .filedohoa-search-form {
            flex-grow: 1;
            min-width: 0;
        }
        .filedohoa-search-form input[type="search"] {
            padding: 8px 12px;
            font-size: 14px;
        }
        .filedohoa-search-form button {
            padding: 0 15px;
            font-size: 14px;
        }
        
        /* Custom dropdown with hamburger icon */
        .filedohoa-sort-form {
            position: relative;
            flex-shrink: 0;
        }
        .filedohoa-sort-form select {
            opacity: 0;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            z-index: 2;
        }
        .filedohoa-sort-dropdown-trigger {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background: #fff;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .filedohoa-sort-dropdown-trigger:hover {
            background: #f0f0f0;
            border-color: #ccc;
        }
        .filedohoa-sort-dropdown-trigger::before {
            content: '';
            display: block;
            width: 16px;
            height: 12px;
            background-image: 
                linear-gradient(to right, #555 0%, #555 100%),
                linear-gradient(to right, #555 0%, #555 100%),
                linear-gradient(to right, #555 0%, #555 100%);
            background-size: 16px 2px, 12px 2px, 14px 2px;
            background-position: 0 0, 0 5px, 0 10px;
            background-repeat: no-repeat;
        }
        
        /* Filter widgets - make more touch-friendly */
        .filter-widget a {
            padding: 5px 8px;
            font-size: 15px;
        }
        
        /* Grid items - 2 columns for mobile */
        .filedohoa-grid {
            column-count: 2;
            column-gap: 8px;
            column-fill: balance;
        }
        .filedohoa-item {
            margin-bottom: 12px;
            max-width: 100%;
            display: inline-block;
            width: 100%;
            vertical-align: top;
        }
        .filedohoa-item-overlay {
            padding: 20px 12px 12px;
        }
        .filedohoa-item-title {
            font-size: 13px;
            line-height: 1.3;
        }
        .filedohoa-item a.filedohoa-download-icon,
        .filedohoa-item a.filedohoa-copy-link {
            width: 32px;
            height: 32px;
            font-size: 13px;
            border-radius: 5px;
        }
        .filedohoa-item-actions {
            gap: 6px;
        }
        
        /* Single post - ultra mobile */
        .single-file-content {
            width: 100%;
            padding: 15px;
        }
        .single-file-content h1.entry-title {
            font-size: 1.5rem;
            line-height: 1.2;
        }
        .single-file-entry-content {
            font-size: 14px;
        }
        .single-file-download-button {
            width: 100%;
            text-align: center;
            padding: 15px;
            font-size: 17px;
            
        }
        
        /* Pagination - stack for mobile */
        .filedohoa-pagination {
            margin-top: 25px;
        }
        .filedohoa-pagination .page-numbers {
            padding: 8px 15px;
            margin: 2px;
            font-size: 15px;
        }
        
        /* Copy notification */
        .copy-notification {
            top: 10px;
            right: 10px;
            left: 10px;
            padding: 12px;
            font-size: 14px;
            text-align: center;
        }
    }

.download-popup-overlay {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0,0,0,0.7);
                    z-index: 999999;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }
                .download-popup-wrapper {
                    position: relative;
                    max-width: 1200px;
                    width: 90%;
                    background: #fff;
                    border-radius: 10px;
                    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
                    overflow: hidden;
                }
                .download-popup-close {
                    position: absolute;
                    top: 10px;
                    right: 10px;
                    background: none;
                    border: none;
                    font-size: 18px;
                    cursor: pointer;
                    color: #666;
                    z-index: 10;
                }
                .download-popup-container {
                    display: flex;
                }
                .download-popup-left {
                    width: 60%;
                    background: #f8f9fa;
                    padding: 0px;
                }
                .download-popup-right {
                    width: 40%;
                    padding: 30px;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                }
                .ad-placeholder {
                    width: 100%;
                    height: 300px;
                    background: #e9ecef;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #6c757d;
                    border: 1px dashed #adb5bd;
                }
                .download-popup-right h3 {
                    font-size: 24px;
                    margin-top: 0;
                    margin-bottom: 15px;
                    color: #333;
                }
                .download-user-info {
                    background: #f8f9fa;
                    padding: 15px;
                    border-radius: 8px;
                    margin-bottom: 20px;
                    border-left: 4px solid #1947c4;
                }
                .download-remaining {
                    margin: 0;
                    color: #495057;
                    font-size: 16px;
                    display: flex;
                    align-items: center;
                    gap: 8px;
                }
                .download-remaining i {
                    color: #1947c4;
                }
                .download-remaining strong {
                    color: #1947c4;
                    font-size: 18px;
                }
                .login-required {
                    text-align: center;
                    color: #dc3545;
                    font-size: 16px;
                    margin: 0 0 15px 0;
                }
                .login-required i {
                    font-size: 24px;
                    margin-bottom: 10px;
                    display: block;
                    color: #ffc107;
                }
                .google-login-button {
                    display: inline-flex;
                    align-items: center;
                    gap: 10px;
                    padding: 12px 20px;
                    background: #4285f4;
                    color: white;
                    text-decoration: none;
                    border-radius: 6px;
                    font-weight: 500;
                    transition: all 0.3s;
                    border: none;
                    cursor: pointer;
                    font-size: 14px;
                }
                .google-login-button:hover {
                    background: #3367d6;
                    transform: translateY(-1px);
                    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
                    text-decoration: none;
                    color: white;
                }
                .google-login-button i {
                    font-size: 16px;
                }
                .download-popup-right p {
                    color: #666;
                    margin-bottom: 25px;
                }
                .download-button-container {
                    text-align: center;
                    margin-top: 20px;
                }
                .download-now-button {
                    display: inline-block;
                    padding: 14px 30px;
                    background: #1947c4;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                    font-weight: bold;
                    transition: all 0.3s;
                }
                .download-now-button.disabled {
                    background: #6c757d;
                    pointer-events: none;
                    cursor: not-allowed;
                    opacity: 0.7;
                }
                .download-now-button:hover {
                    background: #123593;
                    transform: translateY(-2px);
                    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
                }
                @media (max-width: 768px) {
                    .download-popup-container {
                        flex-direction: column;
                    }
                    .download-popup-left,
                    .download-popup-right {
                        width: 100%;
                    }
                    .ad-placeholder {
                        height: 200px;
                    }
                }


/* FolioPool 2.3.29 — unified content width with the main navigation. */
.filedohoa-page-container {
    box-sizing: border-box;
    width: min(1280px, calc(100% - 40px));
    max-width: 1280px;
    margin: 24px auto 40px;
    padding: 0;
}
.filedohoa-main-content {
    width: 100%;
    min-width: 0;
}
.filedohoa-content {
    min-width: 0;
}
.filedohoa-grid,
#filedohoa-results.filedohoa-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    column-count: initial !important;
    column-gap: 24px !important;
}
.filedohoa-grid .filedohoa-item {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: block !important;
}
@media (max-width: 1199px) {
    .filedohoa-page-container { width: calc(100% - 32px); }
    .filedohoa-grid,
    #filedohoa-results.filedohoa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; }
}
@media (max-width: 992px) {
    .filedohoa-page-container { width: calc(100% - 32px); }
}
@media (max-width: 767px) {
    .filedohoa-page-container { width: calc(100% - 24px); margin-top: 14px; }
    .filedohoa-grid,
    #filedohoa-results.filedohoa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
}
@media (max-width: 479px) {
    .filedohoa-grid,
    #filedohoa-results.filedohoa-grid { grid-template-columns: 1fr !important; }
}
