body:not(.et-tb) #main-content .container, body:not(.et-tb-has-header) #main-content .category-filter-section .container {
    padding-top: 0;
}

/* Blog Template Wrapper */
.blog-template-wrapper {
    min-height: 50vh;
    padding: 3rem 0;
}

/* Base Blog Wrapper */
.blog-wrapper {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark, #333);
    min-height: 100vh;
}

.blog-wrapper h1,
.blog-wrapper h2,
.blog-wrapper h3,
.blog-wrapper h4,
.blog-wrapper h5,
.blog-wrapper h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Category Filter Section - TOP - ENHANCED WITH HEIGHT AND SWIPE */
.category-filter-section {
    padding: 1.5rem 0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Desktop Filter - FIXED: Only show horizontal scroll when more than 5 categories */
.desktop-filter {
    position: relative;
    width: 100%;
}

.filter-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    min-height: 60px; /* Fixed container height */
}

/* FIXED: Conditional horizontal scroll - only when many categories */
.filter-buttons-container {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Center when few categories */
}

/* FIXED: Default layout for <= 7 categories */
.filter-buttons {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    transition: transform 0.3s ease;
    align-items: center;
    height: 100%;
    justify-content: center; /* Center by default */
    flex-wrap: wrap;
    /* Remove overflow for small lists */
    overflow: visible;
}

/* FIXED: Only enable horizontal scroll when there are many categories */
.filter-buttons.many-categories {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    justify-content: flex-start; /* Left align when scrollable */
    /* Enhanced touch scrolling */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* Enable natural scrolling with momentum */
    overscroll-behavior-x: contain;
    flex-wrap: nowrap;
    min-height: 80px;
}

.filter-buttons.many-categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* FIXED: Only show container overflow when needed */
.filter-buttons-container.has-many-categories {
    overflow: hidden;
    justify-content: flex-start;
    min-height: 80px;
}

.filter-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    color: #333333;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    height: fit-content;
    /* Add scroll snap for smooth experience */
    scroll-snap-align: center;
    /* Enable dragging cursor on hover - only when scrollable */
    cursor: pointer;
}

.filter-buttons.many-categories .filter-btn {
    cursor: grab;
}

.filter-buttons.many-categories .filter-btn:active {
    cursor: grabbing;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 43, 32, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
    background: #E02B20;
    border-color: #E02B20;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 43, 32, 0.3);
}

/* FIXED: Scroll Arrows - only show when many categories */
.filter-scroll-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    color: #666;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* FIXED: Only show scroll arrows when there are many categories */
.filter-container.has-many-categories .filter-scroll-btn {
    display: flex;
}

.filter-scroll-btn:hover {
    background: #E02B20;
    border-color: #E02B20;
    color: white;
    transform: scale(1.1);
}

.filter-scroll-btn:disabled,
.filter-scroll-btn.hidden {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.filter-scroll-left {
    margin-right: 1rem;
}

.filter-scroll-right {
    margin-left: 1rem;
}

/* Mobile Filter - Dropdown */
.mobile-filter {
    padding: 0 1rem;
}

.mobile-filter-dropdown {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.category-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px; /* Fixed height */
}

.category-dropdown:focus {
    outline: none;
    border-color: #E02B20;
    box-shadow: 0 0 0 3px rgba(224, 43, 32, 0.1);
}

.dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    transition: transform 0.3s ease;
}

.mobile-filter-dropdown:hover .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* FIXED: Enhanced scrolling indicators - only when many categories */
.filter-buttons-container.has-many-categories::before,
.filter-buttons-container.has-many-categories::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.filter-buttons-container.has-many-categories::before {
    left: 0;
    background: linear-gradient(to right, rgba(248, 249, 250, 0.8), transparent);
    opacity: 0;
}

.filter-buttons-container.has-many-categories::after {
    right: 0;
    background: linear-gradient(to left, rgba(248, 249, 250, 0.8), transparent);
    opacity: 0;
}

.filter-buttons-container.has-many-categories.show-left-fade::before {
    opacity: 1;
}

.filter-buttons-container.has-many-categories.show-right-fade::after {
    opacity: 1;
}

/* Top Section Styles - Equal Height Columns */
.top-section {
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.top-section .row {
    align-items: stretch;
    margin: 0;
}

.top-section .col-lg-8,
.top-section .col-lg-4 {
    display: flex;
    flex-direction: column;
}

/* FIXED: Carousel Styles - Responsive height for mobile */
.carousel-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
}

.carousel-image {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card:hover .carousel-image img {
    transform: scale(1.08);
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
    z-index: 10;
}

.carousel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.carousel-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.carousel-category {
    background: linear-gradient(135deg, #E02B20, #c41e18);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carousel-category:hover {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    transform: scale(1.05);
}

.carousel-category a {
    color: inherit;
    text-decoration: none;
}

.carousel-date {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.carousel-title {
    font-size: 1.6rem;
    margin-bottom: 0;
    line-height: 1.3;
    font-weight: 700;
}

.carousel-title a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.carousel-title a:hover {
    color: #E02B20;
    text-shadow: 0 0 10px rgba(224, 43, 32, 0.5);
}

/* FIXED: Progress Dots Indicators */
.carousel-indicators-custom {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
    z-index: 20;
}

.carousel-indicators-custom button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.carousel-indicators-custom button.active,
.carousel-indicators-custom button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.progress-ring-svg {
    transform: rotate(-90deg);
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.progress-ring-circle,
.progress-ring-progress {
    transition: stroke-dashoffset 0.1s ease;
}

/* FIXED: Dot Center - Only show on active slide - Enhanced Control */
.dot-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    display: none; /* Hidden by default */
    z-index: 10;
}

/* FIXED: Active dot center styling - only for active button */
.carousel-indicators-custom button.active .dot-center {
    opacity: 1 !important;
    background: #E02B20 !important;
    width: 12px !important;
    height: 12px !important;
    box-shadow: 0 0 15px rgba(224, 43, 32, 0.8), 0 0 30px rgba(224, 43, 32, 0.4) !important;
    display: block !important;
    animation: pulseActive 2s infinite;
}

/* FIXED: Ensure non-active buttons don't show dot centers */
.carousel-indicators-custom button:not(.active) .dot-center {
    opacity: 0 !important;
    display: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* FIXED: Hover state only for non-active buttons */
.carousel-indicators-custom button:not(.active):hover .dot-center {
    opacity: 0.4 !important;
    background: rgba(255, 255, 255, 0.7) !important;
    width: 8px !important;
    height: 8px !important;
    display: block !important;
    box-shadow: none !important;
}

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

/* Recent Articles Sidebar */
.recent-articles-sidebar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(224, 43, 32, 0.1);
}

.sidebar-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid #E02B20;
    padding-bottom: 0.75rem;
    position: relative;
    font-weight: 700;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #E02B20, #c41e18);
    border-radius: 2px;
}

.recent-articles-list {
    flex: 1;
}

.recent-article-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.5);
}

.recent-article-item:hover,
.recent-article-item.active {
    background: linear-gradient(135deg, rgba(224, 43, 32, 0.05), rgba(224, 43, 32, 0.02));
    border-color: #E02B20;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(224, 43, 32, 0.15);
}

.recent-article-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recent-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recent-article-item:hover .recent-article-thumb img {
    transform: scale(1.1);
}

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

.recent-article-meta {
    margin-bottom: 0.5rem;
}

.recent-date {
    font-size: 0.75rem;
    color: #E02B20;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-title {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

.recent-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-title a:hover,
.recent-article-item.active .recent-title a {
    color: #E02B20;
}

/* Blog Posts Grid */
.blog-posts-grid {
    margin-bottom: 3rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.blog-posts-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: rgba(224, 43, 32, 0.2);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(224, 43, 32, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .blog-card-image::after {
    opacity: 1;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.blog-date {
    color: #E02B20;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-category a {
    background: linear-gradient(135deg, #E02B20, #c41e18);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-category a:hover {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    transform: scale(1.05);
}

.blog-card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-shrink: 0;
    font-weight: 700;
}

.blog-card-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #E02B20;
}

.blog-card-excerpt {
    color: #666666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    font-size: 0.95rem;
}

/* No Posts Found */
.no-posts-found {
    padding: 4rem 2rem;
}

.no-posts-found i {
    opacity: 0.3;
}

/* Pagination */
.blog-pagination {
    margin-top: 4rem;
    scroll-margin-top: 100px;
}

.blog-pagination nav {
    display: flex;
    justify-content: center;
}

.blog-pagination .page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-pagination .page-numbers li {
    display: flex;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e9ecef;
    color: #333333;
    text-decoration: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blog-pagination .page-numbers a:hover,
.blog-pagination .page-numbers .current {
    background: linear-gradient(135deg, #E02B20, #c41e18);
    border-color: #E02B20;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 43, 32, 0.3);
}

/* Loading Spinner */
#loading-spinner {
    margin: 3rem 0;
    padding: 2rem;
    text-align: center;
}

.spinner-border {
    color: #E02B20 !important;
    width: 3rem;
    height: 3rem;
}

/* Blog posts container */
#blog-posts-container {
    width: 100%;
    scroll-margin-top: 120px;
}

/* Smooth transitions for filter changes */
.blog-posts-grid {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.blog-posts-grid.loading {
    opacity: 0.5;
}

/* Smooth transitions for carousel sync */
.recent-article-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure smooth category filter scrolling */
.category-filter-section {
    scroll-margin-top: 100px;
}

/* Ensure carousel maintains proper spacing during transitions */
.carousel-inner {
    transition: min-height 0.3s ease;
}

/* Add smooth scroll behavior to the entire blog template */
#blog-template {
    scroll-behavior: smooth;
}

#blog-template .container {
    max-width: 1440px;
}

/* Animation keyframes for smooth dot center transitions */
@keyframes dotCenterShow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes dotCenterHide {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

.dot-center.active {
    animation: dotCenterShow 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dot-center:not(.active) {
    animation: dotCenterHide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* FIXED: Dragging state - only for many categories */
.filter-buttons.many-categories.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.filter-buttons.many-categories.dragging .filter-btn {
    pointer-events: none; /* Disable button clicks during drag */
    user-select: none;
}

/* FIXED: Mobile carousel responsive height */
@media (max-width: 991.98px) {
    .category-filter-section {
        padding: 1rem 0;
    }
    
    .filter-container {
        min-height: 50px;
    }
    
    .filter-buttons {
        /* Better touch scrolling on mobile */
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: none;
    }
    
    .filter-btn {
        scroll-snap-align: start;
        touch-action: manipulation;
    }
    
    /* FIXED: Mobile carousel height adjustment */
    .carousel-card {
        min-height: 300px; /* Slightly reduce but maintain good proportion */
        height: auto; /* Allow natural height */
    }
    
    .carousel-image {
        height: 300px; /* Fixed image height for mobile */
        min-height: 300px;
    }

    .carousel-content {
        padding: 1.25rem;
        position: absolute; /* Change back to absolute for better control */
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6), transparent);
        color: white;
        z-index: 10;
        border-radius: 0 0 12px 12px;
    }

    .carousel-item {
        background: transparent !important;
        box-shadow: none !important;
    }

    .carousel-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Keep same shadow, no transform */
    }

    .blog-wrapper h3 {
        padding-right: 4em;
    }
}

@media (max-width: 767.98px) {
    .category-filter-section {
        padding: 0.75rem 0;
    }
    
    .mobile-filter-dropdown {
        max-width: 100%;
    }
    
    .category-dropdown {
        height: 45px;
        font-size: 0.85rem;
    }
    
    /* FIXED: Better mobile carousel dimensions */
    .carousel-card {
        min-height: 280px;
        height: auto;
    }
    
    .carousel-image {
        height: 200px; /* Adjusted image height for smaller screens */
        min-height: 200px;
    }
    
    .carousel-overlay {
        display: none !important; /* Remove overlay on mobile since we have background on content */
    }
    
    .carousel-title {
        font-size: 1.2rem;
    }
    
    .carousel-indicators-custom {
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    .progress-ring-svg {
        width: 32px;
        height: 32px;
    }
    
    .progress-ring-circle,
    .progress-ring-progress {
        cx: 16;
        cy: 16;
        r: 12;
    }
    
    .dot-center {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicators-custom button.active .dot-center {
        width: 8px !important;
        height: 8px !important;
    }
    
    .blog-card-content {
        padding: 1.25rem;
    }
    
    .blog-card-title {
        font-size: 1.1rem;
    }
    
    .recent-article-item {
        padding: 1rem;
    }
    
    .recent-article-thumb {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .top-section {
        padding: 0 0.5rem;
    }
    
    /* FIXED: Ultra-mobile carousel adjustments */
    .carousel-card {
        min-height: 260px;
    }
    
    .carousel-image {
        height: 180px;
        min-height: 180px;
    }
    
    .carousel-content {
        padding: 1rem;
        margin-top: -40px;
    }
    
    .carousel-title {
        font-size: 1.1rem;
    }
    
    .carousel-meta {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .blog-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .recent-articles-sidebar {
        padding: 1.5rem;
    }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .filter-btn:active {
        transform: translateY(-1px) scale(0.98);
    }
}

/* Custom Scrollbar */
.recent-articles-sidebar::-webkit-scrollbar {
    width: 4px;
}

.recent-articles-sidebar::-webkit-scrollbar-track {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 2px;
}

.recent-articles-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E02B20, #c41e18);
    border-radius: 2px;
}

.recent-articles-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c41e18, #a01611);
}

/* Filter buttons scrollbar - only for many categories */
.filter-buttons.many-categories::-webkit-scrollbar {
    height: 4px;
}

.filter-buttons.many-categories::-webkit-scrollbar-track {
    background: rgba(233, 236, 239, 0.5);
    border-radius: 2px;
}

.filter-buttons.many-categories::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E02B20, #c41e18);
    border-radius: 2px;
}

/* Accessibility improvements */
.filter-btn:focus,
.carousel-indicators-custom button:focus,
.blog-card:focus-within,
.filter-scroll-btn:focus,
.category-dropdown:focus {
    outline: 3px solid rgba(224, 43, 32, 0.3);
    outline-offset: 2px;
}

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

/* Print styles */
@media print {
    .carousel-indicators-custom,
    .filter-buttons,
    .filter-scroll-btn,
    .mobile-filter,
    #loading-spinner {
        display: none !important;
    }
    
    .blog-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .category-filter-section {
        position: static;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .blog-card,
    .carousel-card,
    .recent-articles-sidebar {
        border: 2px solid #000;
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .filter-scroll-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .filter-btn,
    .filter-scroll-btn,
    .blog-card,
    .carousel-card,
    .recent-article-item {
        transition: none;
    }
    
    .carousel-image img,
    .blog-card-image img {
        transition: none;
    }
    
    .filter-buttons {
        scroll-behavior: auto;
    }
    
    @keyframes pulseActive {
        0%, 100% { transform: translate(-50%, -50%) scale(1); }
    }
}