/* MediaMuhipa category pages
   Scoped to .category-page so the shared site styles remain unchanged. */

.category-page {
    --category-ink: #183b56;
    --category-muted: #5d7285;
    --category-teal: #0f766e;
    --category-teal-dark: #115e59;
    --category-gold: #d89b2b;
    --category-line: #dce8ec;
    --category-surface: #ffffff;
    min-height: calc(100vh - 80px);
    padding: 104px 16px 64px;
    background:
        radial-gradient(circle at 4% 8%, rgba(15, 118, 110, .08), transparent 26rem),
        radial-gradient(circle at 96% 18%, rgba(216, 155, 43, .08), transparent 24rem),
        #f6f9fa;
}

.category-shell {
    width: min(100%, 1160px);
    margin: 0 auto;
}

.category-page .category-header {
    position: relative;
    overflow: hidden;
    margin: 0 0 32px;
    padding: 34px 40px 38px;
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: 24px;
    background: linear-gradient(122deg, #ffffff 0%, #f0f9f7 66%, #fffaf0 100%);
    box-shadow: 0 16px 42px rgba(24, 59, 86, .08);
    text-align: left;
}

.category-page .category-header::after {
    position: absolute;
    right: -72px;
    bottom: -98px;
    width: 240px;
    height: 240px;
    border: 28px solid rgba(15, 118, 110, .08);
    border-radius: 50%;
    content: "";
}

.category-page .breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--category-muted);
    font-size: .8rem;
    font-weight: 600;
}

.category-page .breadcrumb a {
    color: var(--category-teal);
    text-decoration: none;
}

.category-page .breadcrumb a:hover,
.category-page .breadcrumb a:focus-visible {
    color: var(--category-teal-dark);
    text-decoration: underline;
}

.category-page .breadcrumb i {
    color: #91a5b1;
    font-size: .68rem;
}

.category-page .page-title {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0;
    color: var(--category-ink);
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.category-page .page-title::before {
    display: block;
    margin-bottom: 12px;
    color: var(--category-teal);
    content: "KANAL BERITA";
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.category-page .page-description {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 16px 0 0;
    color: var(--category-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.category-page .featured-section {
    margin-bottom: 30px;
}

.category-page .featured-news {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr);
    gap: 16px;
}

.category-page .featured-main {
    position: relative;
    display: flex;
    min-height: 368px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 18px;
    background: #183b56;
    box-shadow: 0 15px 36px rgba(24, 59, 86, .16);
    cursor: pointer;
    isolation: isolate;
    transition: transform .22s ease, box-shadow .22s ease;
}

.category-page .featured-main::after {
    position: absolute;
    inset: 35% 0 0;
    z-index: 1;
    background: linear-gradient(transparent, rgba(8, 25, 39, .88));
    content: "";
    pointer-events: none;
}

.category-page .featured-main:hover,
.category-page .featured-main:focus-visible {
    box-shadow: 0 20px 42px rgba(24, 59, 86, .24);
    outline: none;
    transform: translateY(-3px);
}

.category-page .featured-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .9;
}

.category-page .featured-content {
    position: relative;
    z-index: 2;
    align-self: end;
    width: 100%;
    padding: 24px;
    color: #fff;
}

.category-page .featured-content .news-category,
.category-page .headline-category,
.category-page .news-category .category-badge {
    color: #b9eee7;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.category-page .featured-content h3 {
    max-width: 700px;
    margin: 8px 0 12px;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.18;
}

.category-page .featured-meta,
.category-page .featured-item-meta {
    color: rgba(255, 255, 255, .76);
    font-size: .77rem;
}

.category-page .featured-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
}

.category-page .featured-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 13px;
    min-height: 112px;
    padding: 10px;
    overflow: hidden;
    border: 1px solid var(--category-line);
    border-radius: 14px;
    background: var(--category-surface);
    box-shadow: 0 6px 16px rgba(24, 59, 86, .06);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.category-page .featured-item:hover,
.category-page .featured-item:focus-visible {
    border-color: rgba(15, 118, 110, .38);
    box-shadow: 0 10px 22px rgba(15, 118, 110, .11);
    outline: none;
    transform: translateY(-2px);
}

.category-page .featured-item img {
    width: 96px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
}

.category-page .featured-item-content {
    min-width: 0;
    padding: 3px 2px 2px 0;
}

.category-page .featured-item-content h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 8px;
    color: var(--category-ink);
    font-size: .9rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.category-page .featured-item-meta {
    color: var(--category-muted);
}

.category-page .headline-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.category-page .headline-item {
    display: block;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--category-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .78);
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.category-page .headline-item:hover,
.category-page .headline-item:focus-visible {
    border-color: rgba(15, 118, 110, .36);
    background: #fff;
    outline: none;
    transform: translateY(-2px);
}

.category-page .headline-title {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    color: var(--category-ink);
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-page .main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, .82fr);
    gap: 24px;
    align-items: start;
}

.category-page .left-column,
.category-page .news-section {
    min-width: 0;
}

.category-page .news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.category-page .news-card {
    overflow: hidden;
    border: 1px solid var(--category-line);
    border-radius: 16px;
    background: var(--category-surface);
    box-shadow: 0 8px 22px rgba(24, 59, 86, .06);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.category-page .news-card:hover,
.category-page .news-card:focus-within {
    border-color: rgba(15, 118, 110, .3);
    box-shadow: 0 14px 30px rgba(24, 59, 86, .11);
    transform: translateY(-3px);
}

.category-page .news-image {
    position: relative;
    height: 176px;
    overflow: hidden;
    background: #dce8ec;
}

.category-page .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.category-page .news-card:hover .news-image img {
    transform: scale(1.04);
}

.category-page .news-image .news-category {
    position: absolute;
    top: 12px;
    left: 12px;
}

.category-page .news-image .category-badge {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(15, 75, 71, .88);
    color: #e5fffb;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.category-page .news-content {
    padding: 17px;
}

.category-page .news-title {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.35;
}

.category-page .news-title a {
    color: var(--category-ink);
    text-decoration: none;
}

.category-page .news-title a:hover,
.category-page .news-title a:focus-visible {
    color: var(--category-teal-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.category-page .news-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 9px 0 15px;
    color: var(--category-muted);
    font-size: .82rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.category-page .news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    color: #78909d;
    font-size: .7rem;
}

.category-page .news-meta > div {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-page .news-meta i {
    color: var(--category-teal);
}

.category-page .right-sidebar {
    display: grid;
    gap: 16px;
}

.category-page .sidebar-section {
    padding: 20px;
    border: 1px solid var(--category-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(24, 59, 86, .055);
}

.category-page .sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--category-ink);
    font-size: 1rem;
}

.category-page .sidebar-title::before {
    width: 4px;
    height: 20px;
    border-radius: 999px;
    background: var(--category-gold);
    content: "";
}

.category-page .popular-news,
.category-page .school-news {
    display: grid;
    gap: 11px;
}

.category-page .popular-item,
.category-page .school-item {
    display: grid;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf2f3;
    padding-bottom: 11px;
}

.category-page .popular-item {
    grid-template-columns: 25px 56px minmax(0, 1fr);
}

.category-page .school-item {
    grid-template-columns: 33px minmax(0, 1fr);
}

.category-page .popular-item:last-child,
.category-page .school-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.category-page .popular-rank {
    color: var(--category-gold);
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
}

.category-page .popular-item img {
    width: 56px;
    height: 50px;
    border-radius: 9px;
    object-fit: cover;
}

.category-page .popular-content,
.category-page .school-content {
    min-width: 0;
}

.category-page .popular-content h4,
.category-page .school-content h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--category-ink);
    font-size: .8rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-page .popular-meta,
.category-page .school-meta {
    color: #7a8e99;
    font-size: .68rem;
}

.category-page .school-badge {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 10px;
    background: #e7f6f3;
    color: var(--category-teal-dark);
    font-size: .75rem;
}

.category-page .quick-links {
    display: grid;
    gap: 5px;
}

.category-page .quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 7px 8px;
    border-radius: 9px;
    color: var(--category-muted);
    font-size: .82rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.category-page .quick-link i {
    width: 20px;
    color: var(--category-teal);
    text-align: center;
}

.category-page .quick-link:hover,
.category-page .quick-link:focus-visible {
    background: #eaf7f5;
    color: var(--category-teal-dark);
    outline: none;
}

.category-page .empty-state {
    display: grid;
    min-height: 330px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 40px 24px;
    border: 1px dashed #b9d5d6;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    text-align: center;
}

.category-page .empty-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 5px;
    place-items: center;
    border-radius: 18px;
    background: #e7f6f3;
    color: var(--category-teal);
    font-size: 1.35rem;
}

.category-page .empty-state h3 {
    margin: 0;
    color: var(--category-ink);
    font-size: 1.15rem;
}

.category-page .empty-state p {
    max-width: 390px;
    margin: 0 0 7px;
    color: var(--category-muted);
    font-size: .86rem;
    line-height: 1.6;
}

.category-page .btn-primary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-radius: 10px;
    background: var(--category-teal);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.category-page .btn-primary:hover,
.category-page .btn-primary:focus-visible {
    background: var(--category-teal-dark);
    outline: none;
    transform: translateY(-1px);
}

.category-page .pagination-container {
    margin-top: 24px;
}

.category-page .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.category-page .page-link {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--category-line);
    border-radius: 10px;
    background: #fff;
    color: var(--category-ink);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.category-page .page-link:hover,
.category-page .page-link:focus-visible {
    border-color: rgba(15, 118, 110, .45);
    background: #effaf8;
    color: var(--category-teal-dark);
    outline: none;
}

.category-page .page-link.active {
    border-color: var(--category-teal);
    background: var(--category-teal);
    color: #fff;
}

.category-page .page-link.disabled {
    color: #9aabb3;
    cursor: default;
}

.category-page :focus-visible {
    box-shadow: 0 0 0 3px rgba(216, 155, 43, .38);
}

@media (max-width: 980px) {
    .category-page .featured-news {
        grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
    }

    .category-page .headline-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-page .main-layout {
        grid-template-columns: 1fr;
    }

    .category-page .right-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .category-page {
        padding: 88px 12px 42px;
    }

    .category-page .category-header {
        margin-bottom: 24px;
        padding: 24px 20px 27px;
        border-radius: 18px;
    }

    .category-page .breadcrumb {
        margin-bottom: 17px;
    }

    .category-page .page-description {
        font-size: .9rem;
    }

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

    .category-page .featured-main {
        min-height: 300px;
    }

    .category-page .headline-strip,
    .category-page .news-grid,
    .category-page .right-sidebar {
        grid-template-columns: 1fr;
    }

    .category-page .sidebar-section {
        padding: 17px;
    }

    .category-page .empty-state {
        min-height: 280px;
        padding: 30px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-page *,
    .category-page *::before,
    .category-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
