/* ================================================================
   BLOG — STAI MUTIARA BANGSA
   Seluruh selector diawali .blog- agar aman dari CSS halaman lain.
   ================================================================ */

:root {
    --blog-navy: #10233f;
    --blog-blue: #24579f;
    --blog-blue-deep: #173f7b;
    --blog-cyan: #8dd0e1;
    --blog-red: #dc2027;
    --blog-yellow: #f2d500;
    --blog-ink: #122541;
    --blog-muted: #60728d;
    --blog-line: #d9e3ef;
    --blog-surface: #f5f8fc;
    --blog-white: #ffffff;
    --blog-shadow: 0 18px 45px rgba(20, 49, 86, 0.1);
}

.page-blog {
    background: var(--blog-white);
}

.blog-page,
.blog-page * {
    box-sizing: border-box;
}

.blog-page {
    color: var(--blog-ink);
    overflow: clip;
}

.blog-page img {
    display: block;
    max-width: 100%;
}

.blog-page button,
.blog-page input,
.blog-page select {
    font: inherit;
}

.blog-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero */
.blog-hero {
    position: relative;
    isolation: isolate;
    min-height: 510px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 79% 42%, rgba(141, 208, 225, 0.24), transparent 30%),
        linear-gradient(113deg, #f9fcff 0%, #edf7fc 52%, #f8fbff 100%);
    border-bottom: 1px solid #e3ebf4;
}

.blog-hero::before,
.blog-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.blog-hero::before {
    width: 200px;
    height: 200px;
    left: -72px;
    bottom: 36px;
    border: 24px solid rgba(36, 87, 159, 0.06);
    border-radius: 50%;
}

.blog-hero::after {
    width: 150px;
    height: 100px;
    right: 5%;
    top: 18%;
    opacity: 0.32;
    background-image: radial-gradient(var(--blog-cyan) 2px, transparent 2px);
    background-size: 15px 15px;
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 70px;
    padding-bottom: 76px;
}

.blog-kicker,
.blog-section-label {
    margin: 0 0 14px;
    color: var(--blog-red);
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.blog-kicker {
    display: flex;
    align-items: center;
    gap: 11px;
}

.blog-kicker span {
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: var(--blog-red);
}

.blog-hero h1 {
    max-width: 820px;
    margin: 0;
    color: var(--blog-navy);
    font-size: clamp(2.65rem, 5vw, 5.3rem);
    line-height: 0.99;
    letter-spacing: -0.052em;
}

.blog-hero-copy {
    max-width: 690px;
    margin: 27px 0 0;
    color: #465e7c;
    font-size: clamp(1rem, 1.25vw, 1.18rem);
    line-height: 1.78;
}

.blog-search {
    width: min(720px, 100%);
    min-height: 62px;
    margin-top: 34px;
    display: flex;
    align-items: center;
    background: var(--blog-white);
    border: 1px solid #cfdae7;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(23, 63, 123, 0.1);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.blog-search:focus-within {
    border-color: var(--blog-blue);
    box-shadow: 0 0 0 4px rgba(36, 87, 159, 0.11), 0 14px 34px rgba(23, 63, 123, 0.1);
}

.blog-search input {
    min-width: 0;
    flex: 1;
    height: 60px;
    padding: 0 4px 0 22px;
    color: var(--blog-ink);
    background: transparent;
    border: 0;
    outline: 0;
}

.blog-search input::placeholder {
    color: #7e8da3;
}

.blog-search button {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--blog-blue-deep);
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.blog-search button:hover {
    background: #eef5fd;
}

.blog-search svg {
    width: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.blog-hero-shape {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.blog-hero-shape-one {
    right: 11%;
    bottom: 0;
    width: 260px;
    height: 140px;
    border: 26px solid rgba(36, 87, 159, 0.045);
    border-bottom: 0;
    border-radius: 150px 150px 0 0;
}

.blog-hero-shape-two {
    right: -28px;
    top: 80px;
    width: 110px;
    height: 110px;
    border-radius: 20px;
    border: 22px solid rgba(141, 208, 225, 0.12);
    transform: rotate(45deg);
}

/* Shared section styles */
.blog-section {
    padding: 84px 0;
}

.blog-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.blog-section-heading h2,
.blog-latest-toolbar h2,
.blog-cta-card h2 {
    margin: 0;
    color: var(--blog-navy);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.036em;
}

.blog-section-heading > p {
    max-width: 470px;
    margin: 0 0 4px;
    color: var(--blog-muted);
    line-height: 1.65;
}

/* Featured */
.blog-featured-section {
    background: var(--blog-white);
}

.blog-featured-grid {
    height: clamp(430px, 38vw, 500px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
}

.blog-featured-card {
    position: relative;
    min-height: 0;
    overflow: hidden;
    color: var(--blog-white);
    background: var(--blog-navy);
    border-radius: 20px;
    box-shadow: var(--blog-shadow);
}

.blog-featured-main {
    grid-row: 1 / 3;
}

.blog-featured-card > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.blog-featured-card:hover > img {
    transform: scale(1.035);
}

.blog-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 17%, rgba(7, 22, 44, 0.25) 48%, rgba(8, 25, 52, 0.94) 100%);
}

.blog-featured-side .blog-image-overlay {
    background: linear-gradient(90deg, rgba(8, 25, 52, 0.88), rgba(8, 25, 52, 0.36));
}

.blog-featured-content {
    position: absolute;
    z-index: 2;
    inset: auto 34px 32px;
}

.blog-featured-main .blog-featured-content {
    inset: auto 42px 40px;
}

.blog-featured-content h3 {
    max-width: 720px;
    margin: 13px 0 17px;
    color: inherit;
    font-size: clamp(1.55rem, 2.6vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.blog-featured-side .blog-featured-content h3 {
    font-size: clamp(1.16rem, 1.45vw, 1.56rem);
    margin: 10px 0 12px;
}

.blog-featured-content > a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: var(--blog-white);
    font-weight: 800;
    text-decoration: none;
}

.blog-featured-content > a svg,
.blog-card-footer > a svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
}

.blog-featured-content > a:hover svg,
.blog-card-footer > a:hover svg {
    transform: translateX(4px);
}

.blog-category {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 10px;
    color: var(--blog-navy);
    background: var(--blog-yellow);
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.blog-category-ekonomi-syariah {
    background: var(--blog-yellow);
}

.blog-category-hukum-keluarga,
.blog-category-keislaman {
    color: var(--blog-white);
    background: var(--blog-red);
}

.blog-category-riset {
    color: var(--blog-white);
    background: var(--blog-blue);
}

.blog-category-entrepreneurship {
    color: var(--blog-navy);
    background: var(--blog-cyan);
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 11px 18px;
    color: #6d7d93;
    font-size: 0.78rem;
}

.blog-featured-card .blog-meta {
    color: rgba(255, 255, 255, 0.78);
}

.blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-meta svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.blog-photo-credit {
    position: absolute;
    z-index: 3;
    right: 13px;
    top: 13px;
    max-width: calc(100% - 26px);
    padding: 5px 8px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(8, 25, 52, 0.62);
    border-radius: 7px;
    font-size: 0.58rem;
    line-height: 1.2;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.blog-featured-card:hover .blog-photo-credit,
.blog-card-image:hover .blog-photo-credit,
.blog-photo-credit:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Filter and toolbar */
.blog-latest-section {
    padding-top: 42px;
    background: linear-gradient(180deg, #fbfdff, #f3f7fb);
}

.blog-category-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 3px 2px 20px;
    scrollbar-width: thin;
    scrollbar-color: #bdd0e4 transparent;
}

.blog-filter-button {
    flex: 0 0 auto;
    min-height: 43px;
    padding: 9px 18px;
    color: #405572;
    background: var(--blog-white);
    border: 1px solid #d5e0ec;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.blog-filter-button:hover {
    color: var(--blog-blue);
    border-color: #a9c2df;
    transform: translateY(-1px);
}

.blog-filter-button.is-active {
    color: var(--blog-white);
    background: var(--blog-blue);
    border-color: var(--blog-blue);
    box-shadow: 0 8px 18px rgba(36, 87, 159, 0.2);
}

.blog-latest-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin: 30px 0 24px;
}

.blog-latest-toolbar .blog-section-label {
    margin-bottom: 10px;
}

.blog-result-summary {
    min-height: 1.4em;
    margin: 9px 0 0;
    color: var(--blog-muted);
    font-size: 0.88rem;
}

.blog-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.blog-per-page {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #60728d;
    font-size: 0.8rem;
    white-space: nowrap;
}

.blog-per-page select {
    min-width: 112px;
    height: 42px;
    padding: 0 34px 0 12px;
    color: var(--blog-ink);
    background-color: var(--blog-white);
    border: 1px solid #d4dfeb;
    border-radius: 9px;
    outline: none;
}

.blog-per-page select:focus-visible {
    border-color: var(--blog-blue);
    box-shadow: 0 0 0 3px rgba(36, 87, 159, 0.12);
}

/* Cards */
.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.blog-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--blog-white);
    border: 1px solid #d8e2ed;
    border-radius: 17px;
    box-shadow: 0 10px 28px rgba(18, 49, 86, 0.055);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: #bfd1e4;
    box-shadow: var(--blog-shadow);
}

.blog-card[hidden] {
    display: none !important;
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e7eef6;
}

.blog-card-image::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(transparent, rgba(7, 28, 57, 0.32));
    pointer-events: none;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-card-image.is-image-missing img {
    display: none;
}

.blog-card-image.is-image-missing::before {
    content: "STAI Mutiara Bangsa";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--blog-blue);
    background: linear-gradient(135deg, #eaf5fa, #eef3fa);
    font-weight: 800;
}

.blog-card-image .blog-category {
    position: absolute;
    z-index: 2;
    left: 15px;
    bottom: 14px;
}

.blog-card-body {
    flex: 1;
    padding: 22px 22px 18px;
}

.blog-card-body h3 {
    margin: 0;
    color: var(--blog-navy);
    font-size: clamp(1.08rem, 1.38vw, 1.3rem);
    line-height: 1.35;
    letter-spacing: -0.018em;
}

.blog-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 12px 0 18px;
    color: var(--blog-muted);
    font-size: 0.86rem;
    line-height: 1.68;
}

.blog-card-footer {
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 20px;
    border-top: 1px solid #e2e9f1;
}

.blog-author {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-author > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--blog-white);
    background: linear-gradient(145deg, var(--blog-blue), var(--blog-navy));
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 850;
}

.blog-author div {
    min-width: 0;
}

.blog-author small,
.blog-author strong {
    display: block;
}

.blog-author small {
    margin-bottom: 2px;
    color: #7a899d;
    font-size: 0.64rem;
}

.blog-author strong {
    overflow: hidden;
    color: var(--blog-ink);
    font-size: 0.74rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-card-footer > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: var(--blog-blue);
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
}

.blog-card-footer > a svg {
    width: 19px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.blog-pagination:empty {
    display: none;
}

.blog-pagination button {
    min-width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    color: #536985;
    background: var(--blog-white);
    border: 1px solid #d4dfeb;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.blog-pagination button:hover:not(:disabled) {
    color: var(--blog-blue);
    border-color: #9ebbd9;
}

.blog-pagination button.is-current {
    color: var(--blog-white);
    background: var(--blog-blue);
    border-color: var(--blog-blue);
}

.blog-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.blog-pagination button svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.blog-pagination-bottom {
    margin-top: 34px;
}

.blog-empty {
    padding: 54px 24px;
    text-align: center;
    background: var(--blog-white);
    border: 1px dashed #b9cce0;
    border-radius: 18px;
}

.blog-empty svg {
    width: 48px;
    color: var(--blog-blue);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.blog-empty h3 {
    margin: 14px 0 7px;
    color: var(--blog-navy);
    font-size: 1.35rem;
}

.blog-empty p {
    margin: 0;
    color: var(--blog-muted);
}

.blog-empty button {
    margin-top: 20px;
    padding: 11px 17px;
    color: var(--blog-white);
    background: var(--blog-blue);
    border: 0;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
}

/* CTA */
.blog-cta-section {
    padding: 76px 0 88px;
    background: #f3f7fb;
}

.blog-cta-card {
    position: relative;
    isolation: isolate;
    min-height: 260px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 48px 58px;
    color: var(--blog-white);
    background: linear-gradient(120deg, #0d2a50, #174a88);
    border-radius: 22px;
    box-shadow: 0 22px 48px rgba(16, 35, 63, 0.2);
}

.blog-cta-card > div:not(.blog-cta-decoration) {
    position: relative;
    z-index: 2;
}

.blog-cta-card .blog-section-label {
    color: var(--blog-cyan);
}

.blog-cta-card h2 {
    max-width: 720px;
    color: var(--blog-white);
}

.blog-cta-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
}

.blog-button {
    min-height: 49px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 850;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease;
}

.blog-button:hover {
    transform: translateY(-2px);
}

.blog-button-primary {
    color: var(--blog-navy);
    background: var(--blog-yellow);
}

.blog-button-outline {
    color: var(--blog-white);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.blog-button-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.blog-cta-decoration {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.blog-cta-decoration-left {
    width: 130px;
    height: 85px;
    left: 20px;
    bottom: 14px;
    opacity: 0.45;
    background-image: radial-gradient(var(--blog-cyan) 2px, transparent 2px);
    background-size: 13px 13px;
}

.blog-cta-decoration-right {
    width: 220px;
    height: 220px;
    right: -85px;
    bottom: -85px;
    border: 2px solid rgba(141, 208, 225, 0.34);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(141, 208, 225, 0.05), 0 0 0 68px rgba(141, 208, 225, 0.035);
}

/* Accessibility */
.blog-page a:focus-visible,
.blog-page button:focus-visible,
.blog-page input:focus-visible,
.blog-page select:focus-visible {
    outline: 3px solid rgba(36, 87, 159, 0.28);
    outline-offset: 3px;
}

/* Tablet */
@media (max-width: 1024px) {
    .blog-featured-grid {
        height: 440px;
        min-height: 0;
        grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    }

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

    .blog-cta-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 760px) {
    .blog-page {
        overflow: hidden;
    }

    .blog-hero {
        min-height: 0;
    }

    .blog-hero-inner {
        padding-top: 55px;
        padding-bottom: 58px;
    }

    .blog-hero h1 {
        font-size: clamp(2.45rem, 12vw, 3.6rem);
        line-height: 1.02;
    }

    .blog-hero-copy {
        margin-top: 21px;
        font-size: 0.96rem;
        line-height: 1.7;
    }

    .blog-search {
        min-height: 56px;
        margin-top: 27px;
        border-radius: 12px;
    }

    .blog-search input {
        height: 54px;
        padding-left: 16px;
        font-size: 0.9rem;
    }

    .blog-search button {
        width: 52px;
        height: 52px;
    }

    .blog-section {
        padding: 62px 0;
    }

    .blog-section-heading,
    .blog-latest-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .blog-section-heading > p {
        font-size: 0.9rem;
    }

    .blog-featured-grid {
        height: auto;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .blog-featured-main {
        min-height: 300px;
        aspect-ratio: 4 / 3;
        grid-row: auto;
    }

    .blog-featured-side {
        min-height: 230px;
        aspect-ratio: 16 / 10;
        grid-row: auto;
    }

    .blog-featured-main .blog-featured-content,
    .blog-featured-content {
        inset: auto 22px 23px;
    }

    .blog-featured-content h3,
    .blog-featured-side .blog-featured-content h3 {
        font-size: 1.38rem;
    }

    .blog-photo-credit {
        opacity: 0.88;
        transform: none;
    }

    .blog-category-filter {
        width: calc(100% + 32px);
        margin-left: -16px;
        padding-right: 16px;
        padding-left: 16px;
    }

    .blog-latest-section {
        padding-top: 34px;
    }

    .blog-latest-toolbar {
        margin-top: 25px;
    }

    .blog-toolbar-controls {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-pagination-top {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .blog-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .blog-card-body {
        padding: 20px 18px 17px;
    }

    .blog-card-footer {
        padding: 12px 17px;
    }

    .blog-card-footer > a span {
        display: none;
    }

    .blog-card-footer > a svg {
        width: 24px;
    }

    .blog-cta-section {
        padding: 54px 0 66px;
    }

    .blog-cta-card {
        min-height: 0;
        padding: 36px 24px;
        border-radius: 18px;
    }

    .blog-cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .blog-button {
        width: 100%;
    }
}

@media (max-width: 410px) {
    .blog-featured-main {
        min-height: 285px;
    }

    .blog-featured-side {
        min-height: 215px;
    }

    .blog-author strong {
        max-width: 150px;
    }

    .blog-pagination button {
        min-width: 38px;
        height: 38px;
    }
}

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