/* ========================================
   BERITA PAGE STYLING
   ======================================== */

/* Hero Section styles moved to hero-section.blade.php partial */

/* Filter Section */
.berita-filter-section {
    padding: 3rem 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: #2d5a9c;
    color: #2d5a9c;
    transform: translateY(-2px);
}

.filter-tab.active {
    background: #2d5a9c;
    border-color: #2d5a9c;
    color: white;
    box-shadow: 0 4px 12px rgba(45, 90, 156, 0.3);
}

.filter-search {
    flex-shrink: 0;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2d5a9c;
    box-shadow: 0 0 0 3px rgba(45, 90, 156, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d5a9c;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #1e3a5f;
    transform: translateY(-50%) scale(1.1);
}

/* News Grid Section */
.berita-grid-section {
    padding: 1.5rem 0;
    background: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f1f5f9;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
}

.news-category {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-date {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.news-card-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.news-views i {
    font-size: 0.7rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d5a9c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: #f0f4ff;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #2d5a9c;
    color: white;
    transform: translateX(3px);
}

.read-more-btn i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(2px);
}

/* No News State */
.no-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-news-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.no-news h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.no-news p {
    font-size: 1rem;
    color: #94a3b8;
}

/* Pagination Section */
/* .berita-pagination-section {
    padding: 2rem 0 4rem 0;
    background: #f8fafc;
} */

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    border-color: #2d5a9c;
    color: #2d5a9c;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: #2d5a9c;
    border-color: #2d5a9c;
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #2d5a9c;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2d5a9c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-weight: 600;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .berita-hero-title {
        font-size: 2.5rem;
    }
    
    .berita-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .berita-hero-section {
        padding: 4rem 0 3rem 0;
    }
    
    .berita-hero-title {
        font-size: 2rem;
    }
    
    .berita-hero-subtitle {
        font-size: 1rem;
    }
    
    .berita-filter-section {
        padding: 2rem 0;
    }
    
    .filter-tabs {
        gap: 0.25rem;
    }
    
    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .berita-grid-section {
        padding:1.5rem 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-card-image {
        height: 200px;
    }
    
    .news-card-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .news-excerpt {
        font-size: 0.85rem;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Animation Classes */
.news-card.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Animation */
.filter-tab.slide-in {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
