/* ============================================================
   PROFIL DIREKSI — direksi.css
   Stack  : Metronic 8.5 + Bootstrap 5 + Font Awesome
   Palet  : Hijau Tua #099D51 | Lime #B0D02E | Biru Tua #0456A4
   Badge  : II → hijau-tua | III → biru-tua | IV → lime
   ============================================================ */

/* ── BADGE COLOR SYSTEM ─────────────────────────────────────── */
.badge--red {           /* Eselon II — Merah */
    --badge-bg: #e53935;
    --badge-shadow: rgba(229, 57, 53, .40);
}

.badge--blue {          /* Eselon III — Biru Tua (Kabag/Kabid) */
    --badge-bg: #0456A4;
    --badge-shadow: rgba(4, 86, 164, .40);
}

.badge--green {         /* Eselon IV — Hijau Brand (Kasubag/Kasie) */
    --badge-bg: #099D51;
    --badge-shadow: rgba(9, 157, 81, .40);
}



/* ── HERO ───────────────────────────────────────────────────── */
/*
   Gradient vertikal: sama keluarga warna dengan navbar hijau tua.
   clip-path wave di bawah → transisi halus ke section tanpa garis keras.
*/
.dr-hero {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    overflow: visible;
    background: linear-gradient(180deg, #033f20 0%, #045c2d 65%, #067a3a 100%);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
    padding-bottom: 3rem;
    margin-bottom: -1px;
}

.dr-hero__bg {
    position: absolute;
    inset: 0;
    background:
        url('/assets/media/bg/hospital-banner.jpg') center/cover no-repeat,
        linear-gradient(135deg, #022a14 0%, #056632 50%, #09873e 100%);
    background-blend-mode: overlay;
    opacity: .40;
}

/* Pola titik dekoratif */
.dr-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Kilau lime di sisi kiri — penanda brand */
.dr-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #B0D02E 0%, rgba(176, 208, 46, 0) 100%);
    z-index: 3;
}

.dr-hero__content {
    position: relative;
    z-index: 2;
    padding-top: 2.75rem;
    padding-bottom: 1.75rem;
    text-align: center;
    width: 100%;
}

.dr-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .68);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .85rem;
}

.dr-hero__line {
    display: inline-block;
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(176, 208, 46, .70), transparent);
}

.dr-hero__title {
    font-size: 2.55rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .03em;
    margin: 0 0 .45rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.dr-hero__sub {
    color: rgba(255, 255, 255, .72);
    font-size: .92rem;
    margin: 0;
}


/* ── SECTION ────────────────────────────────────────────────── */
/*
   #e8f5ee → #f2f8f4 : putih dengan tint hijau sangat ringan.
   Menyambung mulus dari ujung wave hero yang berwarna hijau.
*/
.dr-section {
    padding: 4.5rem 0 5rem;
    background: linear-gradient(180deg, #e8f5ee 0%, #f2f8f4 140px, #f2f8f4 100%);
    min-height: 55vh;
}


/* ── LEGEND ─────────────────────────────────────────────────── */
.dr-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.dr-legend__item {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    font-weight: 600;
    color: #4a5a50;
    letter-spacing: .04em;
}

.dr-legend__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--badge-bg, #ccc);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}


/* ── GRID ───────────────────────────────────────────────────── */
.dr-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}


/* ── CARD ───────────────────────────────────────────────────── */
.dr-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    width: 240px;
    box-shadow:
        0 2px 10px rgba(9, 157, 81, .09),
        0 0 0 1px rgba(9, 157, 81, .07);
    cursor: pointer;
    outline: none;
    animation: cardIn .5s ease both;
    animation-delay: var(--delay, 0ms);
    transition:
        transform .28s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .28s ease;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dr-card:hover,
.dr-card:focus {
    transform: translateY(-9px) scale(1.018);
    box-shadow:
        0 18px 42px rgba(9, 157, 81, .18),
        0 0 0 2px rgba(9, 157, 81, .22);
}


/* ── Card photo area ──────────────────────────── */
.dr-card__photo-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    background: #c5e4d2;
    overflow: hidden;
}

.dr-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .4s ease;
}

.dr-card:hover .dr-card__photo {
    transform: scale(1.06);
}

/* gradient fade bawah foto */
.dr-card__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(3, 63, 32, .28), transparent);
    pointer-events: none;
}


/* ── Eselon badge ─────────────────────────────── */
.dr-card__badge {
    position: absolute;
    top: .8rem;
    right: .8rem;
    background: var(--badge-bg, #e53935);
    box-shadow: 0 4px 14px var(--badge-shadow, rgba(229, 57, 53, .4));
    color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform .25s ease;
}

.dr-card:hover .dr-card__badge {
    transform: scale(1.1) rotate(-5deg);
}

.dr-card__badge-roman {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.dr-card__badge-label {
    font-size: .42rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: 1px;
    opacity: .9;
}


/* ── Hover hint ────────────────────────────────── */
.dr-card__hint {
    position: absolute;
    bottom: .7rem;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(6px);
    color: #099D51;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .75rem;
    border-radius: 50px;
    white-space: nowrap;
    opacity: 0;
    border: 1px solid rgba(9, 157, 81, .22);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.dr-card:hover .dr-card__hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ── Card info (bawah) ────────────────────────── */
.dr-card__info {
    padding: 1rem 1.1rem 1.2rem;
    position: relative;
    background: #fff;
}

/* garis aksen atas warna eselon */
.dr-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--badge-bg, #e53935);
    display: block;
}

.dr-card__name {
    font-size: .82rem;
    font-weight: 700;
    color: #1a3a28;
    margin: .4rem 0 .4rem;
    line-height: 1.4;
    text-align: center;
}

.dr-card__position {
    font-size: .68rem;
    font-weight: 600;
    color: #7a9085;
    letter-spacing: .07em;
    text-align: center;
    margin: 0;
}


/* ── MODAL ──────────────────────────────────────────────────── */
.bm {
    border: none;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(135deg, #022d17 0%, #04542a 55%, #033d20 100%);
    color: #fff;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .45);
}

.bm__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    background: rgba(255, 255, 255, .08);
    border: 1.5px solid rgba(176, 208, 46, .35);
    color: rgba(176, 208, 46, .85);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s, color .2s;
}

.bm__close:hover {
    background: rgba(176, 208, 46, .15);
    transform: rotate(90deg);
    color: #B0D02E;
}

.bm__inner {
    display: flex;
    gap: 0;
    align-items: stretch;
    min-height: 420px;
}


/* ── Modal left (foto) ──────────────────────────── */
.bm__left {
    flex-shrink: 0;
    width: 280px;
    background: rgba(0, 0, 0, .20);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-right: 1px solid rgba(176, 208, 46, .12);
}

.bm__photo-wrap {
    position: relative;
    border-radius: .85rem;
    overflow: hidden;
    border: 2px solid rgba(176, 208, 46, .35);
    width: 100%;
    box-shadow:
        0 0 0 6px rgba(9, 157, 81, .10),
        0 8px 32px rgba(0, 0, 0, .35);
}

.bm__photo-wrap img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* badge in modal reuse dr-card__badge */
.bm__photo-wrap .dr-card__badge {
    width: 58px;
    height: 58px;
    top: .9rem;
    right: .9rem;
}

.bm__photo-wrap .dr-card__badge-roman {
    font-size: 1.15rem;
}

.bm__photo-wrap .dr-card__badge-label {
    font-size: .45rem;
}


/* ── Modal right (info) ─────────────────────────── */
.bm__right {
    flex: 1;
    padding: 2.25rem 2.5rem 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.bm__pos-label {
    font-size: .70rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #B0D02E;
    margin: 0 0 .3rem;
    opacity: .90;
}

.bm__name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 .85rem;
}

/* divider dinamis warna badge */
.bm__divider {
    height: 3px;
    width: 56px;
    background: var(--badge-bg, #e53935);
    border-radius: 4px;
    margin-bottom: 1.5rem;
    transition: background .3s;
}

.bm__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.bm__item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.bm__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(176, 208, 46, .10);
    border: 1px solid rgba(176, 208, 46, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: #B0D02E;
    margin-top: 1px;
}

.bm__lbl {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
    margin-bottom: .18rem;
}

.bm__val {
    font-size: .875rem;
    color: rgba(255, 255, 255, .90);
    line-height: 1.5;
}


/* ── SG overrides (umkeu & pelayanan pages) ─────────────────── */
.sg-section {
    background: linear-gradient(180deg, #e8f5ee 0%, #f2f8f4 140px, #f2f8f4 100%) !important;
}

.sg-breadcrumb a {
    color: #099D51 !important;
}

.sg-group {
    box-shadow:
        0 2px 12px rgba(9, 157, 81, .07),
        0 0 0 1px rgba(9, 157, 81, .06) !important;
}

.sg-group__header {
    border-bottom-color: #d8ede2 !important;
}

.sg-connector__line {
    background: #b8ddc8 !important;
}

.sg-connector__label {
    color: #5a9a73 !important;
    background: #eef8f2 !important;
    border-color: #c8e8d5 !important;
}


/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dr-hero {
        clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
    }

    .bm__inner {
        flex-direction: column;
    }

    .bm__left {
        width: 100%;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid rgba(176, 208, 46, .12);
    }

    .bm__photo-wrap img {
        height: 220px;
    }

    .bm__right {
        padding: 1.5rem;
    }

    .bm__name {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .dr-hero {
        clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%);
        padding-bottom: 1rem;
    }

    .dr-card {
        width: calc(50% - 1rem);
    }

    .dr-hero__title {
        font-size: 1.8rem;
    }
}

@media (max-width: 400px) {
    .dr-card {
        width: 100%;
    }
}
