@charset "UTF-8";

/**
 * Modern Blog List Page - Grid/List View with Filters
 * 
 * Purpose: Professional blog listing with multiple view options
 * Features:
 * - Grid and List view toggle
 * - Filter sidebar
 * - Modern pagination
 * - Search functionality
 * - Responsive design
 * 
 * @version 1.0.0
 * @date 2026-01-25
 */

/* ============================================================
   BLOG LIST PAGE CONTAINER
   ============================================================ */

.nx-blog-list-section {
    padding: 2rem 0 4rem;
    background: #fafafa;
    animation: fadeIn 0.6s ease-out;
}

.nx-blog-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 576px) {
    .nx-blog-list-container {
        padding: 0 1rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   BLOG LIST HEADER
   ============================================================ */

.nx-blog-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    animation: slideDown 0.5s ease-out;
}

.nx-blog-list-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

@media (max-width: 576px) {
    .nx-blog-list-title {
        font-size: 1.5rem;
    }
}

/* ============================================================
   VIEW TOGGLE & FILTER BAR
   ============================================================ */

.nx-blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease-out 0.2s both;
    transition: box-shadow 0.3s ease;
    position: relative;
    z-index: 5;
}

.nx-blog-toolbar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.nx-blog-search-filter {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .nx-blog-search-filter {
        flex: 1 1 auto;
        min-width: 300px;
        max-width: 100%;
        width: auto;
    }
}

.nx-blog-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    width: 100%;
}

@media (min-width: 576px) {
    .nx-blog-search-input {
        width: auto;
    }
}

.nx-blog-search-input:focus {
    outline: none;
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1), 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.nx-blog-search-input::placeholder {
    transition: opacity 0.3s ease;
}

.nx-blog-search-input:focus::placeholder {
    opacity: 0.5;
}

/* Search Button */
.nx-blog-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--bs-primary, #0d6efd);
    border: 2px solid var(--bs-primary, #0d6efd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.nx-blog-search-btn:hover {
    background: var(--bs-primary, #0d6efd);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.nx-blog-search-btn:active {
    transform: translateY(0);
}

.nx-blog-search-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nx-blog-search-btn-text {
    display: none;
}

@media (min-width: 576px) {
    .nx-blog-search-btn-text {
        display: inline;
    }
}

@media (max-width: 575px) {
    .nx-blog-search-btn {
        padding: 0.75rem;
        min-width: 44px;
    }
}

.nx-blog-view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 0.25rem;
    flex-shrink: 0;
    width: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    .nx-blog-view-toggle {
        width: auto;
        justify-content: flex-start;
    }
}

.nx-blog-view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: #6e6e73;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    transform: translateZ(0);
    white-space: nowrap;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 576px) {
    .nx-blog-view-btn {
        padding: 0.5rem 1rem;
        flex: 0 1 auto;
    }
}

.nx-blog-view-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: var(--bs-primary, #0d6efd);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nx-blog-view-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    transform: translateY(-1px);
}

.nx-blog-view-btn:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.nx-blog-view-btn.active {
    background: var(--bs-primary, #0d6efd);
    color: #ffffff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.nx-blog-view-btn.active::before {
    opacity: 1;
    transform: scale(1);
}

.nx-blog-view-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.nx-blog-view-btn:hover svg {
    transform: scale(1.1);
}

.nx-blog-view-btn.active svg {
    transform: scale(1.15);
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */

.nx-blog-filters {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
    transition: box-shadow 0.3s ease;
    position: relative;
    z-index: 10;
}

.nx-blog-filters:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.nx-blog-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nx-blog-filters-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.nx-blog-clear-filters {
    font-size: 0.875rem;
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nx-blog-clear-filters:hover {
    color: var(--bs-primary, #0d6efd);
    text-decoration: underline;
}

.nx-blog-filter-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 11;
}

.nx-blog-filter-group:last-child {
    margin-bottom: 0;
}

.nx-blog-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    display: block;
}

.nx-blog-filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform: translateZ(0);
    position: relative;
    z-index: 1000;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.nx-blog-filter-select::-ms-expand {
    display: none;
}

.nx-blog-filter-select:hover {
    border-color: rgba(13, 110, 253, 0.3);
    transform: translateY(-1px);
}

.nx-blog-filter-select:focus {
    outline: none;
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1), 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
    z-index: 1001;
}

.nx-blog-filter-select:active,
.nx-blog-filter-select:focus-visible {
    z-index: 1001;
}

/* Ensure dropdown options appear above everything */
.nx-blog-filter-select option {
    background: #ffffff;
    color: #1d1d1f;
    padding: 0.5rem;
}

/* ============================================================
   BLOG GRID VIEW
   ============================================================ */

.nx-blog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.nx-blog-list-grid .nx-blog-card {
    margin: 0;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.nx-blog-list-grid .nx-blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

/* Stagger animation for grid items */
.nx-blog-list-grid .nx-blog-card:nth-child(1) { animation-delay: 0.1s; }
.nx-blog-list-grid .nx-blog-card:nth-child(2) { animation-delay: 0.2s; }
.nx-blog-list-grid .nx-blog-card:nth-child(3) { animation-delay: 0.3s; }
.nx-blog-list-grid .nx-blog-card:nth-child(4) { animation-delay: 0.4s; }
.nx-blog-list-grid .nx-blog-card:nth-child(5) { animation-delay: 0.5s; }
.nx-blog-list-grid .nx-blog-card:nth-child(6) { animation-delay: 0.6s; }
.nx-blog-list-grid .nx-blog-card:nth-child(n+7) { animation-delay: 0.7s; }

@media (max-width: 991px) {
    .nx-blog-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nx-blog-list-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================================
   BLOG LIST VIEW
   ============================================================ */

.nx-blog-list-view {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

.nx-blog-list-view.active {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

.nx-blog-list-view .nx-blog-list-item {
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
    transform: translateX(-30px);
}

/* Stagger animation for list items */
.nx-blog-list-view.active .nx-blog-list-item:nth-child(1) { animation-delay: 0.1s; }
.nx-blog-list-view.active .nx-blog-list-item:nth-child(2) { animation-delay: 0.2s; }
.nx-blog-list-view.active .nx-blog-list-item:nth-child(3) { animation-delay: 0.3s; }
.nx-blog-list-view.active .nx-blog-list-item:nth-child(4) { animation-delay: 0.4s; }
.nx-blog-list-view.active .nx-blog-list-item:nth-child(5) { animation-delay: 0.5s; }
.nx-blog-list-view.active .nx-blog-list-item:nth-child(n+6) { animation-delay: 0.6s; }

.nx-blog-list-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    border: 1px solid rgba(0, 0, 0, 0.06);
    height: 200px;
    position: relative;
    transform: translateZ(0);
}

.nx-blog-list-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.nx-blog-list-item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.nx-blog-list-item:hover::before {
    opacity: 1;
}

.nx-blog-list-item > * {
    position: relative;
    z-index: 1;
}

.nx-blog-list-item-image {
    width: 300px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
}

.nx-blog-list-item-image {
    overflow: hidden;
}

.nx-blog-list-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
    filter: brightness(1);
    will-change: transform;
}

.nx-blog-list-item:hover .nx-blog-list-item-image img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.nx-blog-list-item-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nx-blog-list-item-date {
    font-size: 0.8125rem;
    color: #6e6e73;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nx-blog-list-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.nx-blog-list-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nx-blog-list-item-title a:hover {
    color: var(--bs-primary, #0d6efd);
}

.nx-blog-list-item-excerpt {
    font-size: 0.9375rem;
    color: #6e6e73;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nx-blog-list-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.nx-blog-list-item-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nx-blog-list-item-read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bs-primary, #0d6efd);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-blog-list-item-read-more:hover {
    gap: 0.75rem;
    transform: translateX(4px);
}

.nx-blog-list-item-read-more:hover::after {
    width: 100%;
}

.nx-blog-list-item-read-more svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-blog-list-item-read-more:hover svg {
    transform: translateX(2px);
}

@media (max-width: 768px) {
    .nx-blog-list-item {
        flex-direction: column;
        height: auto;
    }
    
    .nx-blog-list-item-image {
        width: 100%;
        height: 200px;
    }
}

/* ============================================================
   MODERN PAGINATION
   ============================================================ */

.nx-blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.nx-blog-pagination .pagination {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.nx-blog-pagination .page-item {
    margin: 0;
}

.nx-blog-pagination .page-link {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform: translateZ(0);
    overflow: hidden;
}

.nx-blog-pagination .page-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bs-primary, #0d6efd);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 8px;
}

.nx-blog-pagination .page-link:hover {
    background: rgba(13, 110, 253, 0.05);
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.nx-blog-pagination .page-link:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.nx-blog-pagination .page-item.active .page-link {
    background: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.nx-blog-pagination .page-item.active .page-link::before {
    opacity: 1;
    transform: scale(1);
}

.nx-blog-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nx-blog-pagination .page-link svg {
    width: 18px;
    height: 18px;
}

/* Override Bootstrap pagination styles */
.nx-blog-pagination nav {
    display: flex;
    justify-content: center;
}

.nx-blog-pagination nav .pagination {
    gap: 0.5rem;
}

/* Previous/Next buttons with icons */
.nx-blog-pagination .page-item:first-child .page-link,
.nx-blog-pagination .page-item:last-child .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.nx-blog-pagination .page-item:first-child .page-link::before {
    content: '←';
    margin-right: 0.25rem;
}

.nx-blog-pagination .page-item:last-child .page-link::after {
    content: '→';
    margin-left: 0.25rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.nx-blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nx-blog-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #6e6e73;
    opacity: 0.5;
}

.nx-blog-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.nx-blog-empty-text {
    font-size: 0.9375rem;
    color: #6e6e73;
    margin: 0;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(13, 110, 253, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Loading state animation */
.nx-blog-loading {
    position: relative;
    overflow: hidden;
}

.nx-blog-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

/* View transition animations */
.nx-blog-list-grid,
.nx-blog-list-view {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-blog-list-grid.hiding,
.nx-blog-list-view.hiding {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.nx-blog-list-grid.showing,
.nx-blog-list-view.showing {
    opacity: 1;
    transform: scale(1);
}

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

/* Mobile First - Stack vertically on small screens */
@media (max-width: 767px) {
    .nx-blog-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nx-blog-search-filter {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        min-width: 0;
    }
    
    .nx-blog-search-input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .nx-blog-search-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .nx-blog-view-toggle {
        width: 100%;
        justify-content: stretch;
        box-sizing: border-box;
    }
    
    .nx-blog-view-btn {
        flex: 1 1 0;
        min-width: 0;
        box-sizing: border-box;
    }
}

/* Extra small devices - Additional safety */
@media (max-width: 375px) {
    .nx-blog-toolbar {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .nx-blog-search-filter {
        gap: 0.5rem;
    }
    
    .nx-blog-search-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .nx-blog-search-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .nx-blog-view-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .nx-blog-view-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Tablet - Side by side */
@media (min-width: 768px) and (max-width: 991px) {
    .nx-blog-toolbar {
        flex-direction: row;
        align-items: stretch;
    }
    
    .nx-blog-search-filter {
        flex: 1 1 auto;
        min-width: 250px;
    }
    
    .nx-blog-view-toggle {
        flex-shrink: 0;
    }
}

/* Desktop - Full layout */
@media (min-width: 992px) {
    .nx-blog-toolbar {
        flex-direction: row;
        align-items: center;
    }
    
    .nx-blog-search-filter {
        flex: 1 1 auto;
        min-width: 350px;
        max-width: 600px;
    }
    
    .nx-blog-view-toggle {
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .nx-blog-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nx-blog-pagination .page-link {
        min-width: 40px;
        height: 40px;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================ */

/* GPU acceleration for smooth animations */
.nx-blog-list-grid .nx-blog-card,
.nx-blog-list-item,
.nx-blog-view-btn,
.nx-blog-pagination .page-link {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform, opacity;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .nx-blog-list-section,
    .nx-blog-list-header,
    .nx-blog-list-title,
    .nx-blog-toolbar,
    .nx-blog-filters,
    .nx-blog-list-grid .nx-blog-card,
    .nx-blog-list-view .nx-blog-list-item,
    .nx-blog-pagination .page-link {
        animation: none !important;
        transition: none !important;
    }
    
    .nx-blog-list-grid .nx-blog-card,
    .nx-blog-list-view .nx-blog-list-item {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Loading skeleton animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.nx-blog-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Focus states for accessibility */
.nx-blog-view-btn:focus-visible,
.nx-blog-search-input:focus-visible,
.nx-blog-filter-select:focus-visible,
.nx-blog-pagination .page-link:focus-visible {
    outline: 3px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover states */
.nx-blog-clear-filters:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
    border-radius: 4px;
}
