/* ========================================
   MODERN BERITA PAGE STYLES - OPTIMIZED
======================================== */

/* Header Section */
.modern-berita-header {
    position: relative;
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

[data-theme="dark"] .modern-berita-header {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

.header-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(201, 48, 44, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(243, 156, 18, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.header-content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.header-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(201, 48, 44, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.header-breadcrumb:hover {
    background: rgba(201, 48, 44, 0.15);
    transform: translateY(-2px);
}

.header-breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.header-main-content {
    margin-bottom: 3rem;
}

.header-icon-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 
        0 10px 30px rgba(201, 48, 44, 0.25),
        0 0 0 8px rgba(201, 48, 44, 0.1);
    transition: transform 0.3s ease;
}

.header-icon-badge:hover {
    transform: scale(1.05) rotate(5deg);
}

.modern-page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.modern-page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

.header-quick-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(201, 48, 44, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .header-quick-stats {
    background: rgba(22, 33, 62, 0.8);
}

.quick-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon-mini {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 12px;
    color: white;
    font-size: 1.25rem;
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(201, 48, 44, 0.3), transparent);
}

/* Filter Section */
.modern-filter-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 10;
}

.filter-container {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.filter-search-wrapper {
    margin-bottom: 2rem;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(201, 48, 44, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:hover {
    background: rgba(201, 48, 44, 0.1);
    border-color: rgba(201, 48, 44, 0.25);
}

.mobile-filter-toggle:active {
    transform: scale(0.98);
}

.mobile-filter-toggle .toggle-icon {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.mobile-filter-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.mobile-filter-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    border-color: transparent;
}

/* Show toggle and collapse filters on tablet/mobile */
@media (max-width: 768px) {
    .mobile-filter-toggle {
        display: flex;
    }
    
    .filter-controls-grid {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
        padding-top: 0;
    }
    
    .filter-controls-grid.expanded {
        max-height: 1000px;
        opacity: 1;
        padding-top: 1rem;
    }
}

.search-input-group {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.modern-search-input {
    width: 100%;
    padding: 1rem 3.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.modern-search-input:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(201, 48, 44, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 48, 44, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-clear-btn:hover {
    background: var(--primary-color);
    color: white;
}

.filter-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.category-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
}

/* Scroll indicator gradient for mobile */
.filter-control-group {
    position: relative;
}

@media (max-width: 992px) {
    .filter-control-group::after {
        content: '';
        position: absolute;
        right: 0;
        top: calc(1rem + 1.5rem);
        bottom: 0.5rem;
        width: 40px;
        background: linear-gradient(to left, var(--bg-primary) 0%, transparent 100%);
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s ease;
        z-index: 2;
    }
    
    [data-theme="dark"] .filter-control-group::after {
        background: linear-gradient(to left, var(--bg-primary) 0%, transparent 100%);
    }
}

/* Dark mode support for mobile toggle */
[data-theme="dark"] .mobile-filter-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-filter-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(201, 48, 44, 0.3);
}

.chip-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chip-button:hover {
    background: rgba(201, 48, 44, 0.1);
    border-color: rgba(201, 48, 44, 0.2);
}

.chip-button.active {
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(201, 48, 44, 0.3);
}

.chip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.chip-button.active .chip-badge {
    background: rgba(255, 255, 255, 0.25);
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.select-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.modern-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(201, 48, 44, 0.1);
}

.reset-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(201, 48, 44, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Berita Section */
.berita-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.results-text strong {
    color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 12px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(201, 48, 44, 0.1);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   OPTIMIZED BERITA GRID VIEW
======================================== */

/* Berita Grid - Improved */
.berita-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.berita-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    align-items: start;
}

.berita-grid.list-view {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* Card Wrapper */
.berita-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Modern Berita Card */
.modern-berita-card {
    position: relative;
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(201, 48, 44, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modern-berita-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(201, 48, 44, 0.05) 0%, rgba(243, 156, 18, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 20px;
    z-index: 1;
}

.modern-berita-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(201, 48, 44, 0.2);
    border-color: rgba(201, 48, 44, 0.2);
}

.modern-berita-card:hover::before {
    opacity: 1;
}

/* Card Image */
.berita-card-image {
    position: relative;
    width: 100%;
    background: var(--bg-secondary);
    flex-shrink: 0;
    z-index: 2;
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

[data-theme="dark"] .image-wrapper {
    background: linear-gradient(135deg, #2a2a3e 0%, #1f1f2e 100%);
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-berita-card:hover .image-wrapper img {
    transform: scale(1.08);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modern-berita-card:hover .image-overlay {
    opacity: 1;
}

.read-more-overlay {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modern-berita-card:hover .read-more-overlay {
    transform: translateY(0);
}

.read-more-overlay:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Badges */
.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: transform 0.3s ease;
}

.modern-berita-card:hover .category-badge {
    transform: scale(1.05);
}

[data-theme="dark"] .category-badge {
    background: rgba(22, 33, 62, 0.95);
    color: #f39c12;
}

.trending-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    animation: pulse 2s ease infinite;
    z-index: 2;
}

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

/* Card Body */
.berita-card-body {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2;
}

/* Meta Top */
.berita-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Title */
.berita-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    min-height: 3.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.berita-title a:hover {
    color: var(--primary-color);
}

/* Excerpt */
.berita-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem;
}

/* ========================================
   MINIMALIST META BOTTOM STYLES
======================================== */

/* Meta Bottom - Minimalist Version */
.berita-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.875rem;
    margin-top: auto;
    border-top: 1px solid rgba(201, 48, 44, 0.08);
}

/* Meta Stats Minimal */
.meta-stats-minimal {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.stat-minimal {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.2s ease;
}

.stat-minimal i {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.stat-minimal:hover {
    color: var(--primary-color);
}

.stat-minimal:hover i {
    color: var(--primary-color);
    opacity: 1;
}

.stat-separator {
    color: var(--text-secondary);
    opacity: 0.3;
    font-size: 0.625rem;
    user-select: none;
}

/* Minimal Read More Button */
.btn-read-minimal {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    background: transparent;
    border: 1px solid rgba(201, 48, 44, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-read-minimal i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.btn-read-minimal:hover {
    color: white;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-color: transparent;
    transform: translateY(-1px);
}

.btn-read-minimal:hover i {
    transform: translateX(2px);
}

/* Dark Mode Support */
[data-theme="dark"] .berita-meta-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .btn-read-minimal {
    border-color: rgba(243, 156, 18, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .berita-meta-bottom {
        flex-direction: column;
        gap: 0.875rem;
        align-items: flex-start;
    }
    
    .btn-read-minimal {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .meta-stats-minimal {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat-separator {
        display: none;
    }
}


/* Read More Button */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(201, 48, 44, 0.4);
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

.btn-read-more:hover i {
    transform: translateX(3px);
}

/* List View */
.berita-grid.list-view .modern-berita-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
}

.berita-grid.list-view .berita-card-image {
    height: 100%;
}

.berita-grid.list-view .image-wrapper {
    padding-top: 0;
    height: 100%;
}

.berita-grid.list-view .berita-title {
    font-size: 1.375rem;
    min-height: auto;
    -webkit-line-clamp: 2;
}

.berita-grid.list-view .berita-excerpt {
    -webkit-line-clamp: 4;
    min-height: auto;
}

/* Empty State */
.no-berita-found,
.no-results-message {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 48, 44, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-radius: 50%;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.btn-reset-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 48, 44, 0.4);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    transform: translateY(-2px);
}

.pagination .prev,
.pagination .next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
}

/* Newsletter CTA */
.newsletter-cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
}

.newsletter-content-wrapper {
    position: relative;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    color: white;
}

.newsletter-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 2rem;
}

.newsletter-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.newsletter-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-input-group {
    position: relative;
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-input-group i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.form-input-group input {
    flex: 1;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.btn-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-subscribe:hover {
    background: #a82828;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========================================
   ENHANCED RESPONSIVE DESIGN - TABLET & MOBILE
======================================== */

/* Tablet Landscape (1200px and below) */
@media (max-width: 1200px) {
    .berita-grid.grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .filter-container {
        padding: 1.75rem;
    }
}

/* Tablet Portrait (992px and below) */
@media (max-width: 992px) {
    .modern-berita-header {
        padding: 130px 0 70px;
    }
    
    .header-content-wrapper {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .header-quick-stats {
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .quick-stat-card {
        gap: 0.75rem;
    }
    
    .stat-icon-mini {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .berita-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .berita-grid.list-view .modern-berita-card {
        grid-template-columns: 280px 1fr;
    }
    
    .filter-container {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .filters-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .reset-filters-btn {
        grid-column: span 2;
        justify-content: center;
    }
    
    /* Category chips - horizontal scroll on tablet */
    .category-chips-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.625rem;
        padding-bottom: 0.5rem;
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        scrollbar-width: thin;
        scrollbar-color: rgba(201, 48, 44, 0.3) transparent;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-chips-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-chips-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .category-chips-container::-webkit-scrollbar-thumb {
        background: rgba(201, 48, 44, 0.3);
        border-radius: 2px;
    }
    
    .chip-button {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .newsletter-content-wrapper {
        padding: 0 1rem;
    }
}

/* Mobile Landscape & Small Tablets (768px and below) */
@media (max-width: 768px) {
    .modern-berita-header {
        padding: 110px 0 50px;
    }
    
    .header-icon-badge {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        box-shadow: 
            0 8px 20px rgba(201, 48, 44, 0.2),
            0 0 0 6px rgba(201, 48, 44, 0.1);
    }
    
    .modern-page-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 0.75rem;
    }
    
    .modern-page-description {
        font-size: 1rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }
    
    .header-main-content {
        margin-bottom: 2rem;
    }
    
    .header-quick-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .quick-stat-card {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-info {
        text-align: center;
    }
    
    .quick-stat-divider {
        display: none;
    }
    
    /* Filter Section Mobile */
    .modern-filter-section {
        padding: 2rem 0;
    }
    
    .filter-container {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .filter-search-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .modern-search-input {
        padding: 0.875rem 3rem;
        font-size: 0.9375rem;
        border-radius: 12px;
    }
    
    .search-icon {
        left: 1.25rem;
        font-size: 1rem;
    }
    
    .control-label {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }
    
    .category-chips-container {
        margin: 0 -1.25rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        gap: 0.5rem;
    }
    
    .chip-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .chip-badge {
        min-width: 22px;
        height: 22px;
        font-size: 0.6875rem;
    }
    
    .filters-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.875rem;
    }
    
    .filter-select-wrapper {
        gap: 0.375rem;
    }
    
    .select-label {
        font-size: 0.75rem;
    }
    
    .modern-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .reset-filters-btn {
        grid-column: span 2;
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Berita Section Mobile */
    .berita-section {
        padding: 2.5rem 0;
    }
    
    .results-info {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.875rem 1rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .results-text {
        font-size: 0.875rem;
    }
    
    .view-toggle {
        padding: 0.1875rem;
        border-radius: 10px;
    }
    
    .view-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    
    .berita-grid {
        gap: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .berita-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .berita-grid.list-view {
        max-width: 100%;
    }
    
    .berita-grid.list-view .modern-berita-card {
        grid-template-columns: 1fr;
    }
    
    .berita-grid.list-view .image-wrapper {
        padding-top: 56.25%;
        height: auto;
    }
    
    .berita-grid.list-view .berita-title {
        font-size: 1.125rem;
    }
    
    /* Card Styles Mobile */
    .modern-berita-card {
        border-radius: 16px;
    }
    
    .modern-berita-card::before {
        border-radius: 16px;
    }
    
    .modern-berita-card:hover {
        transform: translateY(-4px);
    }
    
    .image-wrapper {
        padding-top: 60%;
    }
    
    .category-badge {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.6875rem;
        border-radius: 8px;
    }
    
    .category-badge i {
        font-size: 0.625rem;
    }
    
    .trending-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.375rem 0.625rem;
        font-size: 0.625rem;
        border-radius: 8px;
    }
    
    .berita-card-body {
        padding: 1rem;
        gap: 0.625rem;
    }
    
    .berita-meta-top {
        gap: 0.5rem;
    }
    
    .meta-item {
        font-size: 0.6875rem;
        gap: 0.25rem;
    }
    
    .meta-item i {
        font-size: 0.6875rem;
    }
    
    .berita-title {
        font-size: 0.9375rem;
        line-height: 1.35;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
    
    .berita-excerpt {
        font-size: 0.8125rem;
        line-height: 1.5;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
    
    .berita-meta-bottom {
        padding-top: 0.625rem;
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .meta-stats-minimal {
        gap: 0.375rem;
    }
    
    .stat-minimal {
        font-size: 0.6875rem;
        gap: 0.25rem;
    }
    
    .stat-minimal i {
        font-size: 0.625rem;
    }
    
    .stat-separator {
        font-size: 0.5rem;
    }
    
    .btn-read-minimal {
        padding: 0.375rem 0.625rem;
        font-size: 0.6875rem;
        border-radius: 6px;
        gap: 0.25rem;
    }
    
    .btn-read-minimal i {
        font-size: 0.625rem;
    }
    
    /* Newsletter Mobile */
    .newsletter-cta-section {
        padding: 3rem 0;
    }
    
    .newsletter-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .newsletter-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .form-input-group {
        flex-direction: column;
        border-radius: 14px;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        gap: 0.75rem;
    }
    
    .form-input-group > input {
        background: white;
        border-radius: 12px;
        padding: 1rem 1rem 1rem 3rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .form-input-group i {
        z-index: 2;
    }
    
    .btn-subscribe {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
        padding: 0.875rem 1.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .form-note {
        font-size: 0.8125rem;
    }
    
    /* Pagination Mobile */
    .pagination-wrapper {
        margin-top: 2rem;
    }
    
    .pagination {
        gap: 0.375rem;
    }
    
    .pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 0.75rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .pagination .prev,
    .pagination .next {
        padding: 0 1rem;
    }
    
    .pagination .prev span,
    .pagination .next span {
        display: none;
    }
    
    /* Empty State Mobile */
    .no-berita-found,
    .no-results-message {
        padding: 3rem 1.5rem;
    }
    
    .empty-state-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .btn-reset-inline {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    .modern-berita-header {
        padding: 100px 0 40px;
    }
    
    .header-icon-badge {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 1.25rem;
        box-shadow: 
            0 6px 16px rgba(201, 48, 44, 0.2),
            0 0 0 4px rgba(201, 48, 44, 0.08);
    }
    
    .modern-page-title {
        font-size: 1.5rem;
    }
    
    .modern-page-description {
        font-size: 0.9375rem;
    }
    
    .header-quick-stats {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .quick-stat-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        padding: 0.625rem 0;
        border-bottom: 1px solid rgba(201, 48, 44, 0.1);
    }
    
    .quick-stat-card:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .quick-stat-card:first-child {
        padding-top: 0;
    }
    
    .stat-info {
        text-align: left;
    }
    
    .stat-icon-mini {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Filter Section Small Mobile */
    .modern-filter-section {
        padding: 1.5rem 0;
    }
    
    .filter-container {
        padding: 1rem;
        border-radius: 14px;
    }
    
    .filter-search-wrapper {
        margin-bottom: 1.25rem;
    }
    
    .modern-search-input {
        padding: 0.75rem 2.75rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .search-icon {
        left: 1rem;
        font-size: 0.9375rem;
    }
    
    .search-clear-btn {
        right: 0.75rem;
        width: 28px;
        height: 28px;
    }
    
    .filter-controls-grid {
        gap: 1.25rem;
    }
    
    .control-label {
        font-size: 0.75rem;
    }
    
    .category-chips-container {
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .chip-button {
        padding: 0.4375rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .reset-filters-btn {
        grid-column: span 1;
    }
    
    /* Berita Section Small Mobile */
    .berita-section {
        padding: 2rem 0;
    }
    
    .results-info {
        padding: 0.75rem;
        border-radius: 10px;
        margin-bottom: 1.25rem;
    }
    
    .berita-grid.grid-view {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Card Styles Small Mobile */
    .modern-berita-card {
        border-radius: 14px;
    }
    
    .modern-berita-card::before {
        border-radius: 14px;
    }
    
    .image-wrapper {
        padding-top: 56.25%;
    }
    
    .category-badge {
        top: 0.625rem;
        left: 0.625rem;
        padding: 0.3125rem 0.625rem;
        font-size: 0.625rem;
        gap: 0.375rem;
    }
    
    .trending-badge {
        top: 0.625rem;
        right: 0.625rem;
        padding: 0.3125rem 0.5rem;
        font-size: 0.5625rem;
    }
    
    .berita-card-body {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .berita-meta-top {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.625rem;
    }
    
    .meta-item {
        font-size: 0.75rem;
    }
    
    .berita-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .berita-excerpt {
        font-size: 0.875rem;
        line-height: 1.55;
        -webkit-line-clamp: 3;
    }
    
    .berita-meta-bottom {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .meta-stats-minimal {
        justify-content: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    .stat-minimal {
        font-size: 0.75rem;
    }
    
    .stat-separator {
        display: inline;
    }
    
    .btn-read-minimal {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }
    
    /* Newsletter Small Mobile */
    .newsletter-cta-section {
        padding: 2.5rem 0;
    }
    
    .newsletter-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 1.25rem;
    }
    
    .newsletter-title {
        font-size: 1.25rem;
    }
    
    .newsletter-description {
        font-size: 0.875rem;
    }
    
    .form-input-group > input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.9375rem;
    }
    
    .form-input-group i {
        left: 1rem;
        font-size: 1rem;
    }
    
    .btn-subscribe {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Pagination Small Mobile */
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }
    
    .pagination .prev,
    .pagination .next {
        padding: 0 0.75rem;
    }
    
    /* Empty State Small Mobile */
    .no-berita-found,
    .no-results-message {
        padding: 2.5rem 1rem;
    }
    
    .empty-state-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .modern-berita-header {
        padding: 90px 0 35px;
    }
    
    .header-icon-badge {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }
    
    .modern-page-title {
        font-size: 1.375rem;
    }
    
    .filter-container {
        padding: 0.875rem;
    }
    
    .modern-search-input {
        padding: 0.625rem 2.5rem;
        font-size: 0.8125rem;
    }
    
    .chip-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .berita-card-body {
        padding: 0.875rem;
    }
    
    .berita-title {
        font-size: 0.9375rem;
    }
    
    .berita-excerpt {
        font-size: 0.8125rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .modern-berita-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .modern-berita-card:active {
        transform: scale(0.98);
    }
    
    .chip-button:hover {
        background: var(--bg-secondary);
        border-color: transparent;
    }
    
    .chip-button:active {
        background: rgba(201, 48, 44, 0.1);
    }
    
    .chip-button.active:hover,
    .chip-button.active:active {
        background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    }
    
    .btn-read-minimal:hover {
        background: transparent;
        color: var(--primary-color);
        transform: none;
    }
    
    .btn-read-minimal:active {
        background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
        color: white;
    }
    
    .reset-filters-btn:hover {
        transform: none;
        background: rgba(201, 48, 44, 0.1);
        color: var(--primary-color);
    }
    
    .reset-filters-btn:active {
        background: var(--primary-color);
        color: white;
    }
    
    /* Larger touch targets */
    .view-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .pagination .page-numbers {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape Mode for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modern-berita-header {
        padding: 100px 0 40px;
    }
    
    .header-quick-stats {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .quick-stat-card {
        flex-direction: row;
        min-width: auto;
        border-bottom: none;
        padding: 0;
    }
    
    .quick-stat-divider {
        display: block;
        width: 1px;
        height: 30px;
    }
    
    .berita-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-row {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .reset-filters-btn {
        grid-column: span 1;
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
    .modern-berita-header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .berita-section .container,
    .modern-filter-section .container,
    .newsletter-cta-section .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
    .category-chips-container {
        scroll-behavior: smooth;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .modern-berita-card,
    .chip-button,
    .btn-read-minimal,
    .reset-filters-btn,
    .berita-card-wrapper {
        transition: none;
        animation: none;
    }
    
    .modern-berita-card:hover {
        transform: none;
    }
    
    @keyframes fadeInUp {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
    
    @keyframes pulse {
        from, to {
            transform: none;
        }
    }
}