/* ===================================
   BERITA.CSS - Styling untuk Halaman Berita
   Kementerian Agama Kabupaten Karawang
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Berita Section */
.berita-section {
    padding: 80px 0 60px;
    background: #f8f9fa;
    min-height: calc(100vh - 70px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Berita Header */
.berita-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 30px;
    flex-wrap: wrap;
}

.berita-header-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a5f3e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.berita-header-content p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Alert */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content strong {
    display: block;
    margin-bottom: 8px;
}

.alert-content p {
    font-size: 14px;
    margin: 0;
}

.alert-content a {
    color: #1a5f3e;
    font-weight: 600;
    text-decoration: none;
}

.alert-content a:hover {
    text-decoration: underline;
}

/* Filter */
.berita-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.filter-info strong {
    color: #1a5f3e;
    font-weight: 600;
}

/* Berita Grid */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Berita Card */
.berita-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.berita-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Berita Card Image */
.berita-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #e0e0e0;
}

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

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

.berita-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 95, 62, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.berita-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: #1a5f3e;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.berita-link-btn:hover {
    background: #1a5f3e;
    color: white;
}

/* Berita Card Content */
.berita-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.berita-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 12px;
}

.berita-date {
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.berita-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a5f3e;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.berita-title a {
    color: #1a5f3e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.berita-title a:hover {
    color: #2d8659;
}

.berita-excerpt {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
    flex-grow: 1;
}

.berita-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a5f3e;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.berita-read-more:hover {
    color: #2d8659;
    gap: 10px;
}

/* Berita Footer */
.berita-footer {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.berita-footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.berita-footer a {
    color: #1a5f3e;
    text-decoration: none;
    font-weight: 600;
}

.berita-footer a:hover {
    text-decoration: underline;
}

/* Empty State */
.berita-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.berita-empty h3 {
    font-size: 24px;
    color: #1a5f3e;
    margin-bottom: 10px;
}

.berita-empty p {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #1a5f3e;
    border-radius: 6px;
    background: transparent;
    color: #1a5f3e;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: #1a5f3e;
    color: white;
}

.btn-outline {
    border-color: #1a5f3e;
    color: #1a5f3e;
}

.btn-outline:hover {
    background: #1a5f3e;
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #1a5f3e 0%, #2d8659 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 62, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }

    .berita-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 40px;
    }

    .berita-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }

    .berita-header-content h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .berita-section {
        padding: 60px 0 40px;
    }

    .container {
        padding: 0 20px;
    }

    .berita-header {
        margin-bottom: 30px;
    }

    .berita-header-content h1 {
        font-size: 24px;
    }

    .berita-header-content p {
        font-size: 14px;
    }

    .berita-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .berita-card-image {
        height: 150px;
    }

    .berita-card-content {
        padding: 18px;
    }

    .berita-title {
        font-size: 15px;
    }

    .berita-excerpt {
        font-size: 12px;
    }

    .berita-filter {
        padding: 15px;
    }

    .berita-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .berita-section {
        padding: 50px 0 30px;
    }

    .container {
        padding: 0 15px;
    }

    .berita-header {
        margin-bottom: 25px;
    }

    .berita-header-content h1 {
        font-size: 20px;
    }

    .berita-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .berita-card-image {
        height: 180px;
    }

    .berita-card-content {
        padding: 16px;
    }

    .berita-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .berita-excerpt {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .berita-read-more {
        font-size: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 13px;
    }

    .berita-empty {
        padding: 50px 20px;
    }

    .empty-icon {
        font-size: 48px;
    }

    .berita-empty h3 {
        font-size: 20px;
    }
}
