/* News Page Styling */

/* Filter Section */
.filter-section {
    background: #ffffff;
    padding: 2rem 0;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.category-filter {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdfa;
}

.filter-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
}

/* News Grid */
.news-section {
    padding: 3rem 0;
    background: #f8fafc;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #10b981;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cat-kegiatan {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.cat-pemerintahan {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.cat-kesehatan {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.cat-ekonomi {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.cat-teknologi {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.news-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.news-meta i {
    color: #10b981;
    font-size: 0.85rem;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.news-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
    align-self: flex-start;
}

.btn-read-more:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-read-more i {
    font-size: 0.75rem;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.no-results i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0 0 0.5rem;
}

.no-results p {
    color: #64748b;
}

/* Article Detail Page */
.article-section {
    padding: 3rem 0;
    background: #f8fafc;
}

.article-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.breadcrumb-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb-detail a {
    color: #10b981;
    text-decoration: none;
    transition: all 0.3s;
}

.breadcrumb-detail a:hover {
    color: #059669;
}

.breadcrumb-detail span {
    color: #cbd5e1;
}

.article-detail {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    margin: 1rem 0 1.5rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #64748b;
}

.article-meta i {
    color: #10b981;
}

.article-image {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-tags i {
    color: #10b981;
}

.tag {
    padding: 0.5rem 1rem;
    background: #f0fdfa;
    color: #10b981;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget h3 i {
    color: #10b981;
}

.recent-news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-news-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.recent-news-item:hover {
    background: #f8fafc;
    border-color: #10b981;
}

.recent-news-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.recent-news-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-date {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-family: 'Inter', sans-serif;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 4rem 2rem;
}

.error-message i {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.error-message h3 {
    font-size: 1.8rem;
    color: #1e293b;
    margin: 0 0 1rem;
}

.error-message p {
    color: #64748b;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .article-detail {
        padding: 2rem 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-container {
        gap: 2rem;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }
}