/* ==========================================
   MIRAYA — HALAMAN PELAYANAN
   Mengikuti layout Figma 1440px
   ========================================== */

#miraya-services {
    --service-green: #52a41c;
    --service-dark: #153b24;
    --service-light: #f5faf2;
    --service-line: #dce8dd;

    background: #ffffff;
    color: var(--service-dark);
    font-family: "Poppins", sans-serif;
}

#miraya-services * {
    box-sizing: border-box;
}

#miraya-services .pelayanan-container {
    width: min(1248px, calc(100% - 64px));
    margin-inline: auto;
}

#miraya-services h1,
#miraya-services h2,
#miraya-services h3 {
    font-family: "Rubik", sans-serif;
    letter-spacing: -0.025em;
    color: inherit;
}

#miraya-services p {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
}

#miraya-services a:focus-visible,
#miraya-services .pelayanan-card:focus-visible {
    outline: 3px solid #007abe;
    outline-offset: 3px;
}

/* ==========================================
   01 — HERO
   ========================================== */

#miraya-services .pelayanan-hero {
    min-height: 344px;
    padding: 70px 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f5faf2;
}

#miraya-services .pelayanan-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#miraya-services .pelayanan-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    padding: 6px 15px;
    border-radius: 30px;

    border: 1px solid #d4e9ca;
    background: #e7f4df;

    color: #397516;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

#miraya-services .pelayanan-hero h1 {
    max-width: 800px;
    margin: 23px 0 15px;

    font-size: clamp(30px, 3.1vw, 44px);
    font-weight: 700;
    line-height: 1.14;
}

#miraya-services .pelayanan-hero p {
    max-width: 660px;
    color: #627269;
    font-size: 13px;
    line-height: 1.75;
}

/* ==========================================
   02 — SERVICE CARDS
   ========================================== */

#miraya-services .pelayanan-services {
    padding: 80px 0 94px;
    background: #ffffff;
}

#miraya-services .pelayanan-services__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 28px;
}

#miraya-services .pelayanan-services__header h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
}

#miraya-services .pelayanan-services__header p {
    color: #71847a;
    font-size: 11px;
}

#miraya-services .pelayanan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Kartu utama */

#miraya-services .pelayanan-card {
    position: relative;
    isolation: isolate;

    min-width: 0;
    height: 258px;

    overflow: hidden;
    border-radius: 10px;

    background: linear-gradient(180deg,
            #ccded1 0%,
            #78998a 45%,
            #153b24 100%);

    color: #ffffff;
    cursor: default;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Background photo
   Lokasi: assets/services/*.jpg */

#miraya-services .pelayanan-card__image {
    position: absolute;
    inset: 0;
    z-index: -2;

    background-image:
        var(--service-photo),
        linear-gradient(180deg, #cadbd0, #153b24);
    background-size: cover;
    background-position: center;

    transition:
        transform 0.5s ease,
        filter 0.4s ease;
}

#miraya-services .pelayanan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(180deg,
            rgba(16, 47, 31, 0.06) 20%,
            rgba(8, 43, 28, 0.87) 100%);
    pointer-events: none;
}

/* Judul kartu ketika tidak di-hover */

#miraya-services .pelayanan-card__label {
    position: absolute;
    bottom: 23px;
    left: 24px;
    right: 24px;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

#miraya-services .pelayanan-card__label h3 {
    margin: 0;
    color: #ffffff;

    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
}

/* Detail kartu saat hover */

#miraya-services .pelayanan-card__details {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;

    padding: 23px 24px;
    background: rgba(10, 57, 35, 0.91);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
}

#miraya-services .pelayanan-card__details h3 {
    margin: 0 0 7px;
    color: #ffffff;

    font-size: 23px;
    line-height: 1.2;
}

#miraya-services .pelayanan-card__subtitle {
    color: #ecf6ef;
    font-size: 11px;
    line-height: 1.55;
}

#miraya-services .pelayanan-card__details ul {
    display: grid;
    gap: 5px;

    margin: 11px 0 12px;
    padding-left: 17px;

    color: #f0f8f1;
    font-size: 11px;
    line-height: 1.45;
}

#miraya-services .pelayanan-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    align-self: flex-start;
    gap: 12px;

    margin-top: auto;
    min-height: 31px;
    padding: 6px 12px;

    color: #397516;
    background: #ffffff;
    border-radius: 6px;

    font-size: 10px;
    font-weight: 700;

    transition: background 0.2s ease;
}

#miraya-services .pelayanan-card__link:hover {
    background: #e3f5d7;
}

/* Hover dan keyboard focus */

#miraya-services .pelayanan-card:hover,
#miraya-services .pelayanan-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(12, 47, 30, 0.13);
}

#miraya-services .pelayanan-card:hover .pelayanan-card__details,
#miraya-services .pelayanan-card:focus-within .pelayanan-card__details {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#miraya-services .pelayanan-card:hover .pelayanan-card__label,
#miraya-services .pelayanan-card:focus-within .pelayanan-card__label {
    opacity: 0;
    transform: translateY(8px);
}

#miraya-services .pelayanan-card:hover .pelayanan-card__image,
#miraya-services .pelayanan-card:focus-within .pelayanan-card__image {
    transform: scale(1.06);
}

/* Service disclaimer */

#miraya-services .pelayanan-services__note {
    margin-top: 24px;
    color: #7a8c82;
    font-size: 11px;
}

/* ==========================================
   03 — CONSULTATION PREPARATION
   ========================================== */

#miraya-services .pelayanan-preparation {
    padding: 82px 0 90px;
    background: #f5faf2;
}

#miraya-services .pelayanan-preparation__grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 100px;
    align-items: start;
}

#miraya-services .pelayanan-preparation__intro h2 {
    max-width: 440px;
    margin: 25px 0 17px;

    font-size: clamp(27px, 2.6vw, 36px);
    line-height: 1.2;
    font-weight: 700;
}

#miraya-services .pelayanan-preparation__intro p {
    max-width: 430px;
    color: #63756b;
    font-size: 13px;
}

#miraya-services .pelayanan-preparation__items {
    display: flex;
    flex-direction: column;
}

#miraya-services .pelayanan-preparation__item {
    padding: 18px 0 21px;
    border-top: 1px solid #dce8dc;
}

#miraya-services .pelayanan-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 27px;

    padding: 0 6px;
    margin-bottom: 9px;

    background: #e7f4de;
    border-radius: 6px;
    color: var(--service-green);

    font: 700 11px "Rubik", sans-serif;
}

#miraya-services .pelayanan-preparation__item h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

#miraya-services .pelayanan-preparation__item p {
    color: #62766b;
    font-size: 12px;
}

/* ==========================================
   04 — ASSURANCE
   ========================================== */

#miraya-services .pelayanan-assurance {
    padding: 48px 0;
    background: #eaf6e3;
}

#miraya-services .pelayanan-assurance__grid {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 25px;
    align-items: center;
}

#miraya-services .pelayanan-assurance__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--service-green);
}

#miraya-services .pelayanan-assurance h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.3;
}

#miraya-services .pelayanan-assurance p {
    max-width: 710px;
    color: #617267;
    font-size: 13px;
}

/* ==========================================
   05 — FINAL CTA
   ========================================== */

#miraya-services .pelayanan-cta {
    padding: 65px 0;
    background: #52a41c;
    color: #ffffff;
}

#miraya-services .pelayanan-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

#miraya-services .pelayanan-cta__copy>span {
    color: #e8f7df;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

#miraya-services .pelayanan-cta h2 {
    margin: 13px 0 13px;
    color: #ffffff;

    font-size: clamp(27px, 2.65vw, 37px);
    line-height: 1.18;
    font-weight: 700;
}

#miraya-services .pelayanan-cta p {
    max-width: 620px;
    color: #f1f9e9;
    font-size: 12px;
}

#miraya-services .pelayanan-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    min-height: 44px;
    padding: 11px 20px;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#miraya-services .pelayanan-button--white {
    background: #ffffff;
    color: #397516;
}

#miraya-services .pelayanan-button:hover {
    background: #edf8e7;
    transform: translateY(-2px);
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 1050px) {
    #miraya-services .pelayanan-preparation__grid {
        gap: 45px;
    }

    #miraya-services .pelayanan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {
    #miraya-services .pelayanan-container {
        width: calc(100% - 36px);
    }

    #miraya-services .pelayanan-hero {
        min-height: 310px;
        padding: 56px 0;
    }

    #miraya-services .pelayanan-hero h1 {
        font-size: clamp(29px, 7.5vw, 36px);
    }

    #miraya-services .pelayanan-hero p {
        font-size: 12px;
    }

    #miraya-services .pelayanan-services {
        padding: 60px 0;
    }

    #miraya-services .pelayanan-services__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 9px;
    }

    #miraya-services .pelayanan-services__header h2 {
        font-size: 23px;
    }

    #miraya-services .pelayanan-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #miraya-services .pelayanan-preparation {
        padding: 60px 0;
    }

    #miraya-services .pelayanan-preparation__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #miraya-services .pelayanan-preparation__intro h2 {
        font-size: 30px;
    }

    #miraya-services .pelayanan-assurance {
        padding: 40px 0;
    }

    #miraya-services .pelayanan-assurance__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #miraya-services .pelayanan-assurance__icon {
        justify-content: flex-start;
    }

    #miraya-services .pelayanan-assurance h2 {
        font-size: 20px;
    }

    #miraya-services .pelayanan-cta {
        padding: 50px 0;
    }

    #miraya-services .pelayanan-cta__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 26px;
    }

    #miraya-services .pelayanan-cta h2 {
        font-size: 29px;
    }

    #miraya-services .pelayanan-button {
        width: 100%;
    }
}

/* ==========================================
   TOUCH DEVICES — No hover required
   ========================================== */

@media (hover: none) {
    #miraya-services .pelayanan-card {
        height: 345px;
    }

    #miraya-services .pelayanan-card__label {
        display: none;
    }

    #miraya-services .pelayanan-card__details {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        overflow-y: auto;
        background: linear-gradient(180deg,
                rgba(10, 57, 35, 0.75),
                rgba(10, 57, 35, 0.97));
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    #miraya-services .pelayanan-card,
    #miraya-services .pelayanan-card__image,
    #miraya-services .pelayanan-card__label,
    #miraya-services .pelayanan-card__details,
    #miraya-services .pelayanan-button {
        transition: none;
    }
}

/* ==========================================
   LAYANAN KELOMPOK A–E  (versi 2)
   Ditempel di BAWAH pelayanan.css.
   Memakai ulang gaya kartu foto yang sudah ada
   (.pelayanan-card, .pelayanan-grid, dst.)
   ========================================== */

#miraya-services summary:focus-visible {
    outline: 3px solid #007abe;
    outline-offset: 3px;
}

/* ---------- Catatan bahasa (hanya di versi EN) ---------- */

#miraya-services .pelayanan-langnote {
    margin-bottom: 18px;
    padding: 10px 14px;

    background: #f5faf2;
    border: 1px solid var(--service-line);
    border-radius: 8px;

    color: #4f6258;
    font-size: 12px;
}

/* ---------- Chip navigasi A–E ---------- */

#miraya-services .pelayanan-groupnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
}

#miraya-services .pelayanan-groupnav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 8px 14px 8px 8px;
    border: 1px solid var(--service-line);
    border-radius: 9px;
    background: #ffffff;

    color: var(--service-dark);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

#miraya-services .pelayanan-groupnav a:hover {
    background: var(--service-light);
    border-color: #b9dca3;
}

#miraya-services .pelayanan-groupnav b {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;
    border-radius: 6px;

    background: var(--service-green);
    color: #ffffff;
    font: 700 12px "Rubik", sans-serif;
}

/* ---------- Kelompok ---------- */

#miraya-services .pelayanan-group {
    scroll-margin-top: 120px;
}

#miraya-services .pelayanan-group + .pelayanan-group {
    margin-top: 64px;
}

#miraya-services .pelayanan-group__head {
    display: flex;
    align-items: center;
    gap: 16px;

    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--service-line);
}

#miraya-services .pelayanan-group__letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;

    width: 46px;
    height: 46px;
    border-radius: 11px;

    background: var(--service-green);
    color: #ffffff;
    font: 700 21px "Rubik", sans-serif;
}

#miraya-services .pelayanan-group__head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

#miraya-services .pelayanan-group__head p {
    margin-top: 2px;
    color: #71847a;
    font-size: 11px;
}

/* ---------- Sub-kelompok (khusus kelompok E) ---------- */

#miraya-services .pelayanan-section + .pelayanan-section {
    margin-top: 34px;
}

#miraya-services .pelayanan-subgroup {
    margin: 4px 0 16px;
}

#miraya-services .pelayanan-subgroup h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    color: #397516;
}

#miraya-services .pelayanan-subgroup p {
    max-width: 820px;
    color: #63756b;
    font-size: 12px;
}

/* ---------- Grid + sel kartu ----------
   align-items: start -> saat panel satu kartu terbuka,
   kartu di sebelahnya tidak ikut memanjang. */

#miraya-services .pelayanan-section .pelayanan-grid {
    align-items: start;
}

#miraya-services .pelayanan-cell {
    min-width: 0;
    scroll-margin-top: 120px;
}

/* ---------- Kartu foto ---------- */

/* Judul di kartu: layanan punya nama panjang, jadi diperkecil
   dan dipotong maksimal 4 baris (nama lengkap ada di panel). */
#miraya-services .pelayanan-cell .pelayanan-card__label h3 {
    font-size: 18px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tombol transparan yang menutupi seluruh kartu (klik = buka panel) */
#miraya-services .pelayanan-card__toggle {
    position: absolute;
    inset: 0;
    z-index: 1;

    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;

    background: transparent;
    cursor: pointer;
}

#miraya-services .pelayanan-card__toggle:focus-visible {
    outline: 3px solid #007abe;
    outline-offset: -5px;
    border-radius: 10px;
}

/* Overlay hover tidak boleh menangkap klik (supaya klik tembus ke tombol
   di bawahnya), kecuali tombol WhatsApp di dalamnya.
   !important dipakai karena aturan hover/touch bawaan lebih spesifik. */
#miraya-services .pelayanan-cell .pelayanan-card__details {
    pointer-events: none !important;
}

#miraya-services .pelayanan-cell .pelayanan-card__link {
    pointer-events: auto !important;
}

#miraya-services .pelayanan-cell .pelayanan-card__details h3 {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#miraya-services .pelayanan-card__summary {
    color: #f0f8f1;
    font-size: 11px;
    line-height: 1.55;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#miraya-services .pelayanan-card__hint {
    margin-top: 8px;
    color: #c9e8b4;
    font-size: 10px;
    font-weight: 600;
}

/* Kartu yang sedang terbuka diberi garis hijau */
#miraya-services .pelayanan-cell.is-open .pelayanan-card {
    box-shadow:
        0 0 0 2px var(--service-green),
        0 12px 26px rgba(12, 47, 30, 0.13);
}

/* ---------- Panel detail di bawah kartu ---------- */

#miraya-services .pelayanan-panel {
    margin-top: 12px;
    padding: 22px 24px 24px;

    background: #ffffff;
    border: 1px solid var(--service-line);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(12, 47, 30, 0.07);
}

#miraya-services .pelayanan-panel[hidden] {
    display: none;
}

#miraya-services .pelayanan-panel__title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

#miraya-services .pelayanan-panel__desc {
    color: #4f6258;
    font-size: 13px;
    line-height: 1.8;
}

/* Dasar hukum / tujuan / ruang lingkup (tahap ke-3) */

#miraya-services .pelayanan-panel__more {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--service-line);
}

#miraya-services .pelayanan-panel__more > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    cursor: pointer;
    list-style: none;

    color: #397516;
    font-size: 12px;
    font-weight: 600;
}

#miraya-services .pelayanan-panel__more > summary::-webkit-details-marker {
    display: none;
}

#miraya-services .pelayanan-panel__more > summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;
    border-radius: 5px;

    background: #e7f4de;
    font-size: 13px;
    line-height: 1;
}

#miraya-services .pelayanan-panel__more[open] > summary::before {
    content: "–";
}

#miraya-services .pelayanan-panel__detail {
    margin-top: 10px;
    padding: 14px 16px 16px;

    background: var(--service-light);
    border-radius: 8px;
}

#miraya-services .pelayanan-panel__detail p {
    color: #4a5e53;
    font-size: 12px;
    line-height: 1.75;
}

#miraya-services .pelayanan-panel__line {
    margin-top: 10px;
    font-weight: 600;
}

#miraya-services .pelayanan-panel__line:first-child {
    margin-top: 0;
}

#miraya-services .pelayanan-panel__point {
    margin-top: 4px;
    padding-left: 14px;
}

/* Tombol di dasar panel */

#miraya-services .pelayanan-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 20px;
}

#miraya-services .pelayanan-panel__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 9px 15px;
    border-radius: 7px;

    background: var(--service-green);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;

    transition: background 0.2s ease;
}

#miraya-services .pelayanan-panel__cta:hover {
    background: #458d16;
}

#miraya-services .pelayanan-panel__close {
    padding: 6px 4px;
    border: 0;
    background: none;

    color: #62766b;
    font: 600 11px "Poppins", sans-serif;
    cursor: pointer;
}

#miraya-services .pelayanan-panel__close:hover {
    color: #397516;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    #miraya-services .pelayanan-groupnav {
        margin-bottom: 34px;
    }

    #miraya-services .pelayanan-group + .pelayanan-group {
        margin-top: 48px;
    }

    #miraya-services .pelayanan-group__letter {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    #miraya-services .pelayanan-group__head h2 {
        font-size: 19px;
    }

    #miraya-services .pelayanan-panel {
        padding: 18px 16px 20px;
    }

    #miraya-services .pelayanan-panel__cta {
        width: 100%;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {

    #miraya-services .pelayanan-groupnav a,
    #miraya-services .pelayanan-panel__cta {
        transition: none;
    }
}

/* ==========================================
   LAYANAN — AKORDEON KELOMPOK (revisi)
   Kelompok tertutup di awal; klik baris -> daftar
   layanan terbuka dengan animasi (tinggi + kartu muncul).
   ========================================== */

/* ---------- Header daftar: judul kiri, tombol kanan ---------- */

#miraya-services .pelayanan-services__header {
    align-items: flex-end;
    margin-bottom: 22px;
}

#miraya-services .pelayanan-services__header p {
    margin-top: 4px;
}

#miraya-services .pelayanan-showall {
    flex: none;
    padding: 10px 18px;

    border: 1px solid #b9dca3;
    border-radius: 9px;
    background: var(--service-light);

    color: #397516;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

#miraya-services .pelayanan-showall:hover {
    background: #eaf6df;
    border-color: var(--service-green);
}

#miraya-services .pelayanan-showall:focus-visible {
    outline: 3px solid #007abe;
    outline-offset: 3px;
}

/* ---------- Baris kelompok ---------- */

#miraya-services .pelayanan-group + .pelayanan-group {
    margin-top: 0;
}

#miraya-services .pelayanan-group {
    border-bottom: 1px solid var(--service-line);
}

#miraya-services .pelayanan-group:first-of-type {
    border-top: 1px solid var(--service-line);
}

#miraya-services .pelayanan-group__heading {
    margin: 0;
    font: inherit;
}

#miraya-services .pelayanan-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    width: 100%;
    padding: 20px 10px;

    border: 0;
    border-radius: 10px;
    background: transparent;

    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;

    transition: background 0.25s ease;
}

#miraya-services .pelayanan-group__toggle:hover {
    background: var(--service-light);
}

#miraya-services .pelayanan-group__toggle:focus-visible {
    outline: 3px solid #007abe;
    outline-offset: 2px;
}

#miraya-services .pelayanan-group__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#miraya-services .pelayanan-group__name {
    color: var(--service-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    transition: color 0.25s ease;
}

#miraya-services .pelayanan-group.is-open .pelayanan-group__name {
    color: #397516;
}

#miraya-services .pelayanan-group__count {
    color: #71847a;
    font-size: 11px;
    font-weight: 400;
}

#miraya-services .pelayanan-group__chevron {
    flex: none;
    color: var(--service-green);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#miraya-services .pelayanan-group.is-open .pelayanan-group__chevron {
    transform: rotate(180deg);
}

/* ---------- Isi kelompok: animasi buka/tutup ----------
   Tinggi beranimasi lewat grid 0fr -> 1fr (tanpa perlu menghitung
   tinggi di JavaScript). visibility menjaga isi yang tertutup
   tidak bisa difokus lewat keyboard. */

#miraya-services .pelayanan-group__collapse {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;

    transition:
        grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.5s;
}

#miraya-services .pelayanan-group.is-open .pelayanan-group__collapse {
    grid-template-rows: 1fr;
    visibility: visible;

    transition:
        grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s;
}

/* margin/padding samping memberi ruang agar bayangan & outline kartu
   tidak terpotong oleh overflow: hidden */
#miraya-services .pelayanan-group__body {
    min-height: 0;
    overflow: hidden;
    margin: 0 -10px;
    padding: 0 10px;
}

#miraya-services .pelayanan-group__body > .pelayanan-section:first-child {
    padding-top: 6px;
}

#miraya-services .pelayanan-group__body > .pelayanan-section:last-child {
    padding-bottom: 30px;
}

/* Kartu muncul bergantian saat kelompok dibuka */
#miraya-services .pelayanan-group.is-open .pelayanan-cell {
    animation: pelayananCellIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

#miraya-services .pelayanan-group.is-open .pelayanan-cell:nth-child(3n + 2) {
    animation-delay: 0.06s;
}

#miraya-services .pelayanan-group.is-open .pelayanan-cell:nth-child(3n) {
    animation-delay: 0.12s;
}

@keyframes pelayananCellIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Dipakai sementara saat tiba lewat link (#services?s=... / ?g=...)
   supaya halaman langsung di posisi akhir sebelum digulir. */
#miraya-services .pelayanan-group.no-anim,
#miraya-services .pelayanan-group.no-anim * {
    transition: none !important;
    animation: none !important;
}

@media (max-width: 700px) {
    #miraya-services .pelayanan-services__header {
        align-items: flex-start;
    }

    #miraya-services .pelayanan-group__toggle {
        padding: 18px 6px;
    }

    #miraya-services .pelayanan-group__name {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #miraya-services .pelayanan-group__collapse,
    #miraya-services .pelayanan-group__chevron,
    #miraya-services .pelayanan-group__name,
    #miraya-services .pelayanan-group__toggle,
    #miraya-services .pelayanan-showall {
        transition: none;
    }

    #miraya-services .pelayanan-group.is-open .pelayanan-cell {
        animation: none;
    }
}