/* ==========================================================================
   Terapan.id — Halaman katalog OJT (mobile-first)
   Memakai token & komponen dari home.css (.th-*)
   ========================================================================== */

.th-ojt #program,
.th-ojt #cari-ojt {
    scroll-margin-top: 80px;
}

/* ---------- Header halaman ---------- */
.th-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 22px 0 32px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 178, 122, .22), transparent 42%),
        radial-gradient(circle at 0 100%, rgba(79, 209, 165, .12), transparent 40%),
        linear-gradient(135deg, var(--th-primary) 0%, var(--th-primary-dark) 100%);
    color: #fff;
}

.th-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
}


.th-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: var(--th-fs-sm);
    color: rgba(255, 255, 255, .7);
}

.th-crumb a {
    color: rgba(255, 255, 255, .85) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.th-crumb a:hover {
    color: #fff !important;
}

.th-crumb i {
    font-size: 9px;
    opacity: .7;
}

.th-crumb span {
    color: #fff;
    font-weight: 600;
}

.th-page-title {
    max-width: 760px;
    color: #fff;
    font-size: var(--th-fs-h1);
    font-weight: 700;
    line-height: 1.18;
}

.th-page-title span {
    color: #ffb27a;
}

.th-page-desc {
    max-width: 640px;
    margin-top: 14px !important;
    color: rgba(255, 255, 255, .86);
    font-size: var(--th-fs-base);
    line-height: 1.65;
}

.th-page-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}






/* ---------- Toolbar: cari + filter ---------- */
.th-catalog {
    padding-top: 28px;
}

.th-toolbar {
    margin-bottom: 20px;
}

.th-search {
    position: relative;
    display: block;
    margin: 0;
}

.th-search > .fa-search {
    position: absolute;
    top: 50%;
    left: 16px;
    color: var(--th-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.th-search input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 44px;
    border: 1px solid #cfdbde;
    border-radius: 12px;
    background: #fff;
    color: var(--th-text);
    font-size: var(--th-fs-base);
    box-shadow: 0 1px 2px rgba(9, 78, 93, .05);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s;
}

.th-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.th-search input::placeholder {
    color: #7b8a8f;
}

.th-search input:focus {
    outline: none;
    border-color: var(--th-primary);
    box-shadow: 0 0 0 3px rgba(9, 78, 93, .15);
}

.th-search-clear {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--th-muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.th-search-clear[hidden] {
    display: none;
}

.th-search-clear:hover,
.th-search-clear:focus-visible {
    background: var(--th-primary-soft);
    color: var(--th-primary);
    outline: none;
}

.th-chips {
    display: flex;
    gap: 8px;
    margin: 12px -15px 0;
    padding: 2px 15px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.th-chips::-webkit-scrollbar {
    display: none;
}

.th-chip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #cfdbde;
    border-radius: 999px;
    background: #fff;
    color: var(--th-text);
    font-family: poppins, sans-serif;
    font-size: var(--th-fs-sm);
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
    -webkit-tap-highlight-color: transparent;
}

.th-chip:hover {
    border-color: var(--th-primary);
    color: var(--th-primary);
}

.th-chip:focus-visible {
    outline: 3px solid #ffb27a;
    outline-offset: 2px;
}

.th-chip.is-active {
    border-color: var(--th-primary);
    background: var(--th-primary);
    color: #fff;
}

.th-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    margin-top: 10px;
    color: var(--th-muted);
    font-size: var(--th-fs-sm);
}

.th-result-bar b {
    color: var(--th-text);
}

.th-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--th-accent);
    font-size: var(--th-fs-sm);
    font-weight: 600;
    cursor: pointer;
}

.th-link-btn[hidden] {
    display: none;
}

.th-link-btn:hover {
    text-decoration: underline;
}

/* ---------- Grid kartu ---------- */
.th-ojt-grid {
    display: grid;
    gap: 14px;
}

.th-ojt-grid .th-card {
    flex: none;
    max-width: none;
}

.th-ojt-grid .th-card[hidden] {
    display: none !important;
}

.th-ojt-grid .th-card-title {
    font-size: var(--th-fs-md);
}

/* Mobile: kartu horizontal ringkas supaya 9+ program cepat dipindai */
@media (max-width: 575.98px) {
    .th-ojt-grid .th-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-areas:
            "media body"
            "media cta";
        grid-template-rows: 1fr auto;
    }

    .th-ojt-grid .th-card-media {
        grid-area: media;
        aspect-ratio: auto;
        height: 100%;
    }

    .th-ojt-grid .th-card-media img {
        position: absolute;
        inset: 0;
    }

    .th-ojt-grid .th-badge {
        display: none;
    }

    .th-ojt-grid .th-card-body {
        grid-area: body;
        padding: 14px 14px 4px;
    }

    .th-ojt-grid .th-card-title {
        margin-bottom: 8px !important;
        font-size: var(--th-fs-base);
    }

    .th-ojt-grid .th-card-meta {
        margin-bottom: 4px !important;
        font-size: var(--th-fs-sm);
    }

    .th-ojt-grid .th-card-meta + .th-card-meta {
        display: none;
    }

    .th-ojt-grid .th-card-cta {
        grid-area: cta;
        margin: 4px 14px 0;
        padding: 10px 0 12px;
        font-size: var(--th-fs-sm);
    }

    .th-ojt-grid .th-card-cta i {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 359.98px) {
    .th-page-actions .th-btn {
        padding-right: 12px;
        padding-left: 12px;
        font-size: var(--th-fs-sm);
        gap: 8px;
    }

    .th-ojt-grid .th-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }
}

/* ---------- Tidak ada hasil ---------- */
.th-no-result {
    padding: 36px 20px;
    border: 1px dashed #c6dadf;
    border-radius: var(--th-radius);
    background: #f7fbfc;
    text-align: center;
}

.th-no-result[hidden] {
    display: none;
}

.th-no-result-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--th-primary-soft);
    color: var(--th-primary);
    font-size: 20px;
}

.th-no-result h2 {
    color: var(--th-primary-dark);
    font-size: var(--th-fs-md);
    font-weight: 600;
}

.th-no-result p {
    max-width: 420px;
    margin: 8px auto 20px !important;
    color: var(--th-muted);
    font-size: var(--th-fs-base);
}

.th-no-result-actions {
    display: grid;
    gap: 10px;
}

/* ---------- Finder section ---------- */
.th-finder-wrap {
    display: grid;
    gap: 24px;
}

.th-finder-copy .th-section-title {
    font-size: var(--th-fs-h2);
}

.th-checklist {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.th-checklist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--th-text);
    font-size: var(--th-fs-base);
    font-weight: 600;
    line-height: 1.45;
}

.th-checklist i {
    margin-top: 3px;
    color: #1f9d74;
}

.th-ojt .th-finder {
    border: 1px solid var(--th-border);
}

/* ---------- Final CTA ---------- */
.th-final--ojt {
    padding-top: 56px;
}

/* ---------- ≥576px ---------- */
@media (min-width: 576px) {
    .th-page-actions,
    .th-no-result-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .th-no-result-actions {
        justify-content: center;
    }

    .th-ojt-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* ---------- ≥768px ---------- */
@media (min-width: 768px) {
    .th-page-hero {
        padding: 32px 0 56px;
    }

    .th-crumb {
        margin-bottom: 26px;
    }

    .th-page-desc {
        font-size: var(--th-fs-md);
    }

    .th-catalog {
        padding-top: 48px;
    }

    .th-toolbar {
        display: grid;
        grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
        column-gap: 16px;
        align-items: center;
        margin-bottom: 28px;
    }

    .th-chips {
        margin: 0;
        padding: 2px 0 4px;
        flex-wrap: wrap;
    }

    .th-result-bar {
        grid-column: 1 / -1;
        margin-top: 14px;
    }

    .th-final--ojt {
        padding-top: 80px;
    }
}

/* ---------- ≥992px ---------- */
@media (min-width: 992px) {
    .th-page-hero {
        padding: 36px 0 68px;
    }

    .th-page-copy {
        max-width: 760px;
    }








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

    .th-finder-wrap {
        grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
        gap: 64px;
        align-items: center;
    }

    .th-finder-copy .th-section-desc {
        font-size: var(--th-fs-md);
    }
}

/* Area sentuh breadcrumb lebih besar di HP */
.th-crumb a {
    display: inline-block;
    margin: -12px 0;
    padding: 12px 0;
}
