/* ===== BERITA INDEX & LISTING PAGE STYLES - SMAN 2 BANDAR LAMPUNG ===== */
/* Typography: Plus Jakarta Sans (Headings) + Inter (Body/UI) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ===== PAGE HERO & HEADER ===== */
.berita-hero-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.berita-hero-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.berita-hero-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.05rem;
    color: #64748b;
    margin: 0 auto 1.75rem;
    max-width: 650px;
    line-height: 1.6;
}

/* ===== SEARCH BAR ===== */
.berita-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.berita-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 4px 6px 4px 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.berita-search-form:focus-within {
    border-color: #2c5aa0;
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.15);
}

.berita-search-icon {
    color: #94a3b8;
    margin-right: 10px;
    flex-shrink: 0;
}

.berita-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #1e293b;
    padding: 8px 0;
}

.berita-search-input::placeholder {
    color: #94a3b8;
}

.berita-search-btn {
    padding: 10px 22px;
    background: #2c5aa0;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.berita-search-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

/* Search Status Alert */
.search-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 12px 18px;
    margin: 1.5rem 0 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #0369a1;
}

.search-reset-link {
    color: #0284c7;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.search-reset-link:hover {
    color: #0369a1;
}

/* ===== FEATURED HEADLINE HERO CARD ===== */
.featured-news-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.featured-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.featured-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
    display: block;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.featured-news-card:hover .featured-img {
    transform: scale(1.04);
}

.featured-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #2c5aa0);
    font-size: 3.5rem;
    color: #ffffff;
}

.featured-content {
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge-featured {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.featured-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.featured-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.32;
    margin: 0 0 1rem;
    color: #0f172a;
}

.featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-title a:hover {
    color: #2c5aa0;
}

.featured-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-footer {
    margin-top: auto;
}

.btn-read-featured {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #2c5aa0;
    color: #ffffff;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn-read-featured:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(44, 90, 160, 0.3);
}

/* ===== GRID FEED SECTION ===== */
.feed-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.feed-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.feed-count-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.berita-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 3rem;
}

/* ===== VERTICAL MAGAZINE CARD ===== */
.berita-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.berita-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.berita-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
    display: block;
}

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

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

.berita-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #2c5aa0);
    font-size: 2.2rem;
    color: #ffffff;
}

.berita-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.berita-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #64748b;
    flex-wrap: wrap;
}

.berita-date,
.berita-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.berita-date svg,
.berita-author svg {
    color: #2c5aa0;
}

.berita-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

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

.berita-card-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.berita-card-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.berita-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2c5aa0;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.berita-card-link:hover {
    color: #1e3a8a;
    gap: 7px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    grid-column: 1 / -1;
    margin: 2rem 0;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    color: #1e293b;
    margin: 0 0 8px;
}

.empty-state p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 1.5rem;
}

.btn-reset-empty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #2c5aa0;
    color: #ffffff;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 44px;
}

.btn-reset-empty:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-btn {
    padding: 10px 20px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    min-width: 110px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

.pagination-btn.disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.page-num {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-num:hover:not(.active) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.page-num.active {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.25);
}

.page-dots {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 0 4px;
}

/* ===== DARK MODE SUPPORT ===== */
[data-theme="dark"] .berita-hero-title,
[data-theme="dark"] .featured-title,
[data-theme="dark"] .feed-section-title,
[data-theme="dark"] .berita-card-title,
[data-theme="dark"] .empty-state h3 {
    color: #f8fafc;
}

[data-theme="dark"] .berita-hero-subtitle,
[data-theme="dark"] .feed-count-badge,
[data-theme="dark"] .berita-card-excerpt,
[data-theme="dark"] .empty-state p {
    color: #94a3b8;
}

[data-theme="dark"] .berita-search-form {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .berita-search-input {
    color: #f8fafc;
}

[data-theme="dark"] .search-status-bar {
    background: #0f172a;
    border-color: #0369a1;
    color: #38bdf8;
}

[data-theme="dark"] .featured-news-card,
[data-theme="dark"] .berita-card,
[data-theme="dark"] .empty-state {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .featured-excerpt {
    color: #cbd5e1;
}

[data-theme="dark"] .featured-news-card:hover,
[data-theme="dark"] .berita-card:hover {
    border-color: #475569;
}

[data-theme="dark"] .berita-card-footer {
    border-top-color: #334155;
}

[data-theme="dark"] .feed-header-bar,
[data-theme="dark"] .pagination {
    border-top-color: #334155;
    border-bottom-color: #334155;
}

[data-theme="dark"] .pagination-btn,
[data-theme="dark"] .page-num {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .pagination-btn.disabled {
    background: #0f172a;
    border-color: #1e293b;
    color: #64748b;
}

[data-theme="dark"] .page-num.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* ===== RESPONSIVE DESIGN (MOBILE FIRST) ===== */

/* Tablet (<= 1024px) */
@media (max-width: 1024px) {
    .berita-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Tablet Small (<= 768px) */
@media (max-width: 768px) {
    .berita-hero-title {
        font-size: 1.8rem;
    }

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

    .featured-content {
        padding: 1.5rem;
    }

    .featured-title {
        font-size: 1.35rem;
    }

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

    .berita-card {
        flex-direction: row;
        align-items: stretch;
    }

    .berita-card-image-wrapper {
        width: 130px;
        min-width: 130px;
        aspect-ratio: auto;
        align-self: stretch;
    }

    .berita-card-body {
        padding: 14px 16px;
    }

    .berita-card-title {
        font-size: 0.98rem;
        margin-bottom: 6px;
    }

    .berita-card-excerpt {
        display: none; /* Hide excerpt on mobile list for compact view */
    }

    .berita-card-footer {
        padding-top: 8px;
    }

    .pagination {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Mobile Small (<= 480px) */
@media (max-width: 480px) {
    .berita-hero-title {
        font-size: 1.5rem;
    }

    .berita-search-form {
        padding: 3px 4px 3px 14px;
    }

    .berita-search-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .berita-card-image-wrapper {
        width: 105px;
        min-width: 105px;
    }

    .berita-card-body {
        padding: 12px 14px;
    }

    .berita-card-title {
        font-size: 0.9rem;
    }

    .page-num {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
}
