/* ====================================
   1. BASE STRUCTURE & LAYOUT
   ==================================== */
.api-post-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    justify-content: center;
    text-align: center;
    scroll-padding-top: 120px;
    scroll-snap-align: start;
    scroll-margin-top: 80px;
}

.api-post-grid .no-posts-found {
    grid-column: 1 / -1;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInMessage 0.3s ease forwards;
}

.api-post-grid .no-posts-found.visible {
    opacity: 0.7;
    transform: translateY(0);
}

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

.api-post-grid .loading-indicator { order: 1; }
.api-post-grid .post-grid { order: 2; }
.api-post-grid .pagination-controls,
.api-post-grid .load-more-container,
.api-post-grid .numbered-pagination,
.api-post-grid .next-prev-pagination,
.api-post-grid .pagination-container { order: 3; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;

    will-change: opacity, transform;
    scroll-margin-top: 80px; 
    scroll-snap-align: start; 
    padding-top: 10px;
    transition: opacity 0.35s ease;
    contain: content;
    content-visibility: auto;
    transform: translateZ(0);
}

body.is-scrolling-to-grid {
    scroll-behavior: smooth;
}

.api-post-grid[data-pagination-type="numbered"] .post-grid,
.api-post-grid[data-pagination-type="next_prev"] .post-grid {
    scroll-margin-top: 100px;  
}

/* ====================================
   2. POST ITEM STYLING 
   ==================================== */
.post-item {
    display: block;
    position: relative;
    z-index: 1;
    padding: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;

    opacity: 0;
    transform: scale(0.95) translateY(10px);
    animation: postFadeIn 0.65s cubic-bezier(0.25, 0.1, 0.25, 1.2) forwards;
    will-change: transform, opacity, box-shadow;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.post-item .post-content {
    position: relative;
    z-index: 2;
}

.post-item .post-buttons {
    position: relative;
    z-index: 5;
    pointer-events: auto;
    display: flex !important;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
    margin-top: 10px;
    width: 100%;
}

.post-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.post-item h3 {
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

.api-post-grid .post-item .post-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    text-indent: -9999px;
    cursor: pointer;
}

/* ====================================
   3. INTERACTION STATES 
   ==================================== */

.api-post-grid:not([data-popup="yes"]):not([data-buttons-enabled="yes"]) .post-item .post-link {
    z-index: 10;
    pointer-events: auto;
    display: block !important;
}

.api-post-grid.direct-link-enabled .post-item {
    cursor: pointer;
}

.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-item {
    cursor: pointer !important;
}

.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-content {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 2;
}

.api-post-grid[data-popup="yes"] .post-item .post-link {
    display: none !important;
}

.api-post-grid[data-buttons-enabled="yes"] .post-item .post-link {
    pointer-events: none;
}

.api-post-grid[data-buttons-enabled="yes"] .post-content {
    pointer-events: none;
}

/* ====================================
   4. HOVER & INTERACTION EFFECTS 
   ==================================== */

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.api-post-grid:not([data-popup="yes"]):not([data-buttons-enabled="yes"]) .post-item:hover,
.api-post-grid.direct-link-enabled .post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.api-post-grid.direct-link-enabled .post-item:hover:after,
.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-item:hover::after {
    transform: scale(1.2);
    opacity: 0.9;
}

.post-item .post-content:active,
.api-post-grid .post-item.clicked,
.api-post-grid .post-content.clicked {
    transform: scale(0.98);
    opacity: 0.9;
    transition: transform 0.1s ease-out;
}

.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-item.clicked,
.api-post-grid[data-popup="yes"]:not([data-buttons-enabled="yes"]) .post-content.clicked {
    transform: scale(0.98);
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ====================================
   5. LOADING STATES & ANIMATIONS 
   ==================================== */

.post-grid.loading,
.post-grid.loading-transition {
    opacity: 0.6;
    pointer-events: none;
}

.post-grid.posts-fading {
    opacity: 0.4;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.loading-indicator {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    display: none; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 40px 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-indicator.show {
    display: flex;
    opacity: 1;
}

.loading-text {
    position: relative;
    display: inline-block;
    margin-top: 12px;
    opacity: 0.7;
}

.loading-text::after {
    content: '';
    position: absolute;
    left: 100%;
    margin-left: 5px;
    animation: loadingDots 1.5s infinite;
}

.spinner,
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite, pulse 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes postFadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0.95) translateY(10px); 
    }
    60% { 
        opacity: 1; 
        transform: scale(1.02) translateY(-2px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

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

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

.post-item:nth-child(4n+1) { animation-delay: 0.08s; } 
.post-item:nth-child(4n+2) { animation-delay: 0.16s; } 
.post-item:nth-child(4n+3) { animation-delay: 0.24s; } 
.post-item:nth-child(4n+4) { animation-delay: 0.32s; } 

/* ====================================
   6. PAGINATION CONTROLS 
   ==================================== */

.api-post-grid .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 30px;
    gap: 8px;
}

.api-post-grid .pagination-controls {
    width: 100%;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    display: none;
    transition: opacity 0.4s ease;
}

.api-post-grid .pagination-controls.show {
    display: flex;
    opacity: 1;
    will-change: contents;
}

.api-post-grid .pagination-container button,
.api-post-grid .pagination-container .page-number,
.api-post-grid .pagination-container .load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
    appearance: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.api-post-grid .load-more-button {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.api-post-grid .load-more-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.api-post-grid .load-more-button.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
}

.api-post-grid.has-more-pages .load-more-button {
    display: inline-flex;
}

.api-post-grid .pagination-container button:hover:not(:disabled),
.api-post-grid .pagination-container .page-number:hover:not(:disabled),
.api-post-grid .pagination-container .load-more-button:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.api-post-grid .pagination-container button:active:not(:disabled),
.api-post-grid .pagination-container .page-number:active:not(:disabled),
.api-post-grid .pagination-container .load-more-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.api-post-grid .pagination-container button:disabled,
.api-post-grid .pagination-container button.disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.api-post-grid .numbered-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
}

.api-post-grid .numbered-pagination::-webkit-scrollbar {
    display: none;
}

.api-post-grid .pagination-container .page-number {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    text-align: center;
}

.api-post-grid .numbered-pagination .page-number.current {
    position: relative;
    z-index: 2;
    background-color: #0056b3;
}

/* ====================================
   7. CATEGORY FILTER SYSTEM 
   ==================================== */

.category-filter-wrapper,
.api-post-grid .category-filter-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    transition: opacity 0.3s ease, visibility 0s linear;
    opacity: 0;
    visibility: hidden;
    z-index: 10;
}

.category-filter-wrapper.loading,
.api-post-grid .category-filter-wrapper.loaded {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.category-filter,
.api-post-grid .category-filter {
    display: flex;
    width: 100%;
    padding: 8px 0;
    margin: 0;
    gap: 8px;
    overflow-x: auto;
    position: relative;
    flex-wrap: nowrap;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;

    scrollbar-width: none;
    -ms-overflow-style: none;

    z-index: 10;
    pointer-events: auto !important;
    mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}

.category-filter {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-x;
    position: relative;
    display: flex;
    gap: 8px;
    padding: 0 20px;
    margin: 0 -20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.category-filter.grabbing {
    cursor: grabbing !important;
}

.category-filter .category-button {
    flex: 0 0 auto;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.category-filter .category-button.scrolling-to {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-filter .category-button:active {
    transform: scale(0.95);
}

.category-filter .category-button:active {
    transform: scale(0.95);
}

.category-filter .category-button.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-filter::-webkit-scrollbar,
.api-post-grid .category-filter::-webkit-scrollbar {
    display: none;
}

.api-post-grid[data-category-filter="no"] .category-filter {
    display: none;
}

.api-post-grid[data-category-filter="yes"] .category-filter {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.api-post-grid .category-filter.is-scrollable,
.api-post-grid .category-filter.show-end-mask,
.api-post-grid .category-filter.show-start-mask {
    --mask-size: 40px;
    --mask-color: black;
}

.api-post-grid .category-filter.is-scrollable {
    mask-image: linear-gradient(to right,
        transparent 0,
        var(--mask-color) var(--mask-size),
        var(--mask-color) calc(100% - var(--mask-size)),
        transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
        transparent 0,
        var(--mask-color) var(--mask-size),
        var(--mask-color) calc(100% - var(--mask-size)),
        transparent 100%);
}

.api-post-grid .category-filter.show-end-mask {
    mask-image: linear-gradient(to right,
        var(--mask-color) 0,
        var(--mask-color) calc(100% - var(--mask-size)),
        transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
        var(--mask-color) 0,
        var(--mask-color) calc(100% - var(--mask-size)),
        transparent 100%);
}

.api-post-grid .category-filter.show-start-mask {
    mask-image: linear-gradient(to right,
        transparent 0,
        var(--mask-color) var(--mask-size),
        var(--mask-color) 100%);
    -webkit-mask-image: linear-gradient(to right,
        transparent 0,
        var(--mask-color) var(--mask-size),
        var(--mask-color) 100%);
}

.category-filter .category-button,
.api-post-grid .category-filter .category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    min-width: max-content;
    flex-shrink: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 5;
    pointer-events: auto !important;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.category-filter .category-button.scrolling-to {
    animation: pulse 0.5s ease;
}

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

.category-filter .category-button:hover:not(.active),
.api-post-grid .category-filter .category-button:hover {
    color: #fff;
    background: #0073e6;
    transform: translateY(-1px);
}

.category-filter .category-button.active,
.api-post-grid .category-filter .category-button.active {
    color: #fff;
    background: #0073e6;
    font-weight: 600;
    transform: translateY(-1px);
}

.api-post-grid[data-pagination-type="infinite_scroll"].is-loading .category-filter,
.api-post-grid[data-pagination-type="infinite_scroll"].is-loading .category-filter .category-button {
    pointer-events: auto !important;
}

.category-divider,
.api-post-grid .category-divider {
    width: 100%;
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.category-filter-wrapper.loaded .category-divider {
    opacity: 1;
    visibility: visible;
}

.api-post-grid[data-category-filter="no"] .category-divider {
    display: none;
}

@media (max-width: 768px) {
    .category-filter .category-button,
    .api-post-grid .category-filter .category-button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ====================================
   8. POST BUTTONS 
   ==================================== */

.post-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 4px;
    border: none !important;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.preview-btn {
    background-color: #0073e6;
    color: #ffffff;
}

.preview-btn:hover {
    background-color: #005bb5;
    color: #ffffff;
    transform: translateY(-2px);
}

.whatsapp-btn {
    background-color: #25D366;
    color: #ffffff;
}

.whatsapp-btn:hover {
    background-color: #1ea952;
    color: #ffffff;
    transform: translateY(-2px);
}

.post-button .icon-container {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    color: inherit;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.post-button:hover .icon-container {
    transform: scale(1.1);
}

.post-button .icon-container svg.svg-processed {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.post-button .icon-container svg.svg-processed path {
    fill: currentColor;
}

/* ====================================
   9. INFINITE SCROLL - SIMPLIFIED
   ==================================== */

.infinite-scroll-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    width: 100%;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.infinite-scroll-loader.visible {
    opacity: 0.8;
}

.api-post-grid[data-pagination-type="infinite_scroll"].is-loading,
.api-post-grid[data-pagination-type="infinite_scroll"].is-loading .post-grid {
    pointer-events: none;
}

.api-post-grid[data-pagination-type="infinite_scroll"].is-loading .post-grid {
    pointer-events: none;
}

.api-post-grid[data-pagination-type="infinite_scroll"] .post-grid {
    contain: layout style;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.api-post-grid[data-pagination-type="infinite_scroll"] .post-grid.initial-load .post-item {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

body.prevent-animations-during-scroll * {
    animation-play-state: paused !important;
    transition: none !important;
}

/* ====================================
   10. RESPONSIVE ADJUSTMENTS 
   ==================================== */
@media (max-width: 1024px) {
    
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .api-post-grid .category-filter,
    .api-post-grid .numbered-pagination {
        cursor: grab;
        touch-action: pan-x pinch-zoom;
    }
    
    .api-post-grid .category-filter .category-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .loading-indicator {
        margin: 30px 0;
    }
    
    .spinner {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .loading-indicator {
        margin: 20px 0;
    }
    
    .spinner {
        width: 25px;
        height: 25px;
    }
    
    .api-post-grid .pagination-container .page-number {
        min-width: 36px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 14px;
    }
    
    .api-post-grid .pagination-container button,
    .api-post-grid .pagination-container .load-more-button {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .api-post-grid .category-filter .category-button {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .post-buttons {
        flex-direction: column;
        gap: 8px;
        padding: 8px 0;
    }
    
    .post-button {
        width: 100%;
        min-height: 32px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .post-button .icon-container {
        width: 12px;
        height: 12px;
    }
    
    .preview-btn {
        order: 1;
    }
    
    .whatsapp-btn {
        order: 2;
    }
    
    .post-item .post-buttons {
        opacity: 1;
        transform: none;
    }
}

/* ====================================
   11. EDITOR MODE ENHANCEMENTS 
   ==================================== */

.elementor-editor-active .api-post-grid .pagination-controls,
.elementor-editor-active .api-post-grid .load-more-container,
.elementor-editor-active .api-post-grid .numbered-pagination-container,
.elementor-editor-active .api-post-grid .next-prev-pagination-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.elementor-editor-active .category-filter-wrapper,
.elementor-editor-preview .category-filter-wrapper,
.elementor-editor-active .category-filter,
.elementor-editor-preview .category-filter,
.elementor-editor-active .category-divider,
.elementor-editor-preview .category-divider {
    opacity: 1 !important;
    visibility: visible !important;
}

.elementor-editor-active .category-filter,
.elementor-editor-preview .category-filter {
    display: flex !important;
}

.elementor-editor-active .category-divider,
.elementor-editor-preview .category-divider {
    display: block !important;
}

.elementor-editor-active .infinite-scroll-loader,
.elementor-editor-preview .infinite-scroll-loader {
    display: none !important;
}

/* ====================================
   12. ACCESSIBILITY & PERFORMANCE 
   ==================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

.api-post-grid {
    position: relative; 
}

.api-post-grid-scroll-anchor {
    position: absolute;
    height: 2px; 
    left: 0;
    right: 0;
    top: 0;
    z-index: -1;
    pointer-events: none;
    visibility: visible; 
    background: transparent; 
}

.api-post-grid .post-grid:before {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 1px;
    top: -1px;
    visibility: hidden;
    pointer-events: none;
}

.api-post-grid[data-pagination-type="numbered"] .post-grid,
.api-post-grid[data-pagination-type="next_prev"] .post-grid {
    scroll-margin-top: 80px;
    position: relative;
    transform: translateZ(0);
}

.api-post-grid[data-scrolling="true"] .post-grid {
    will-change: transform;
    contain: paint;
}

.api-post-grid[data-scrolling="true"] {
    pointer-events: none;
}

body.prevent-animations-during-scroll * {
    animation-play-state: paused !important;
    transition: none !important;
}

.api-post-grid .pagination-container .page-number {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease-out;
}

.api-post-grid .pagination-container .page-number.clicked {
    transform: scale(0.95);
    opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
    html, body.is-scrolling-to-grid {
        scroll-behavior: auto !important;
    }
    
    .post-item:hover,
    .post-button:hover {
        transform: none !important;
    }
}