/* =====================================================
   LOGO HEADER
   ===================================================== */

.school-brand-image {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 12px;
    object-fit: contain;
}

/* =====================================================
   HERO HALAMAN
   ===================================================== */

.page-hero-description {
    max-width: 720px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.7;
}

/* =====================================================
   DAFTAR JURUSAN DAN EKSTRAKURIKULER
   ===================================================== */

.public-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.public-listing-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.public-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.listing-image {
    height: 220px;
    background: #dbe4ee;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--primary);
    background:
        linear-gradient(
            135deg,
            rgba(13, 59, 102, 0.1),
            rgba(244, 180, 0, 0.16)
        );
    font-size: 34px;
    font-weight: 900;
}

.listing-content {
    flex: 1;
    padding: 23px;
    display: flex;
    flex-direction: column;
}

.listing-label {
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(13, 59, 102, 0.09);
    font-size: 11px;
    font-weight: 800;
}

.listing-content h2 {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: 20px;
    line-height: 1.35;
}

.listing-content p {
    color: var(--muted);
    line-height: 1.7;
}

.listing-meta {
    margin: 0 0 5px;
    color: var(--primary) !important;
    font-size: 13px;
    font-weight: 700;
}

.listing-button {
    min-height: 45px;
    margin-top: auto;
    padding: 10px 15px;
    border-radius: 10px;
    color: var(--white);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
}

.listing-button:hover {
    background: var(--primary-dark);
}

/* =====================================================
   HALAMAN DETAIL
   ===================================================== */

.detail-card,
.news-detail-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.detail-main-image,
.news-detail-image {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
}

.detail-content,
.news-detail-body {
    padding: 35px;
}

.detail-section + .detail-section {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.detail-section h2 {
    margin: 0 0 16px;
    color: var(--primary-dark);
}

.detail-information-grid {
    padding: 25px 35px 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.detail-information-item {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--soft);
}

.detail-information-item span,
.detail-information-item strong {
    display: block;
}

.detail-information-item span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.detail-information-item strong {
    color: var(--primary-dark);
}

.rich-content {
    color: #334155;
    line-height: 1.85;
}

.rich-content h2,
.rich-content h3,
.rich-content h4 {
    color: var(--primary-dark);
}

.rich-content img {
    height: auto;
    margin: 20px auto;
    border-radius: 12px;
}

.rich-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.rich-content th,
.rich-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

/* =====================================================
   BERITA
   ===================================================== */

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 12px;
}

.news-card-meta span {
    color: var(--primary);
    font-weight: 700;
}

.news-detail-meta {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 13px;
}

.news-article {
    font-size: 16px;
}

.pagination {
    margin-top: 35px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pagination a {
    min-width: 42px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--primary);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.pagination a:hover,
.pagination a.active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {
    .public-listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-information-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .school-brand-image {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .public-listing-grid,
    .detail-information-grid {
        grid-template-columns: 1fr;
    }

    .listing-image {
        height: 210px;
    }

    .detail-content,
    .news-detail-body {
        padding: 23px;
    }

    .detail-information-grid {
        padding: 20px 23px 0;
    }
}
