/*
 * Cek K3 — Custom Visual & Typography Enhancements
 * Theme-first overrides: complements theme.min.css & cekk3-corporate.css
 * without touching theme.min.css.
 */

/* Typography polish */
h1, h2, h3, .h1, .h2, .h3, .section-title {
    letter-spacing: -0.02em;
    color: var(--text-main, #0F172A);
}

.section-hero h1,
.section-hero .h1,
.section-hero .hero-title {
    color: #ffffff;
}

body {
    font-size: 1rem;
    line-height: 1.65;
}

/* Button hierarchy & accessible tap targets */
.btn {
    min-height: 44px;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-lg {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(2, 112, 168, 0.28);
}

/* Homepage verification hero card */
.ck-hero-card {
    background: #ffffff;
    color: var(--text-main, #0F172A);
    border-radius: var(--radius-lg, 1rem);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ck-hero-card .form-control,
.ck-hero-card .form-select {
    min-height: 46px;
    font-size: 1rem; /* prevents iOS zoom on focus */
    border-color: #cbd5e1;
    color: var(--text-main, #0F172A);
    border-radius: 0.5rem;
}

.ck-hero-card .form-select {
    padding-left: 0.75rem;
    padding-right: 2rem;
    background-position: right 0.65rem center;
}

.ck-hero-card .form-control:focus,
.ck-hero-card .form-select:focus {
    border-color: var(--brand-accent, #0270a8);
    box-shadow: 0 0 0 0.2rem rgba(2, 112, 168, 0.18);
}

.ck-hero-card .form-label {
    color: var(--text-main, #0F172A);
    font-weight: 600;
    font-size: 0.925rem;
}

/* Typesense Name Lookup Autocomplete */
.ck-lookup-wrap {
    position: relative;
}

.ck-input-icon-wrap {
    position: relative;
}

.ck-input-icon-wrap .ck-input-leading-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 1rem;
}

.ck-input-icon-wrap .form-control {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.ck-input-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ck-input-clear:hover {
    background: #f1f5f9;
    color: var(--text-main, #0F172A);
}

.ck-lookup-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1050;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    max-height: 270px;
    overflow-y: auto;
    padding: 0.35rem;
    margin: 0;
    list-style: none;
}

.ck-lookup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.45rem;
    cursor: pointer;
    color: var(--text-main, #0F172A);
    font-size: 0.95rem;
}

.ck-lookup-item:hover,
.ck-lookup-item.is-active {
    background: #eff6ff;
    color: var(--brand-accent, #0270a8);
}

.ck-lookup-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-lookup-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.ck-dob-sublabel {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

/* Daftar pelatihan & jadwal 3 bulan di /cek-sertifikat/personel */
.k3 a.btn {
    text-decoration: none;
}

.k3 a.btn-primary,
.pg-article a.btn-primary {
    color: #ffffff;
}

.k3 a.btn-outline-primary {
    color: var(--brand-accent, #0270a8);
}

.k3 a.btn-outline-primary:hover {
    color: #ffffff;
}

.k3-sched-card {
    background: #ffffff;
    border: 1px solid var(--k3-line, #cbd5e1);
    border-radius: var(--radius-lg, 1rem);
    box-shadow: var(--shadow-soft, 0 4px 16px rgba(15, 23, 42, 0.05));
    padding: 1.5rem;
}

.k3-sched-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #eff6ff;
    color: var(--brand-accent, #0270a8);
    border: 1px solid rgba(2, 112, 168, 0.2);
    white-space: nowrap;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.k3-sched-pill:hover {
    background: var(--brand-accent, #0270a8);
    color: #ffffff !important;
}

.k3-sched-jalur {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.k3-sched-jalur--kemnaker {
    background: #e0f2fe;
    color: #0369a1;
}

.k3-sched-jalur--bnsp {
    background: #fef3c7;
    color: #92400e;
}

.k3-sched-filter-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--brand-primary, #0F172A);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.k3-sched-filter-btn.is-active {
    background: var(--brand-primary, #0F172A);
    border-color: var(--brand-primary, #0F172A);
    color: #ffffff;
}

/* Grid Hasil Pencarian Sertifikat K3 */
.k3 .section-hero a:not(.btn) {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.k3 .section-hero a:not(.btn):hover {
    color: #ffffff;
    text-decoration: underline;
}

.k3 .section-hero .ck-hero-card a {
    color: var(--brand-accent, #0270a8);
}

.ck-hero-quicklink {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.ck-hero-quicklink:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
}

.k3-res-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 4px solid #64748b;
    border-radius: var(--radius-lg, 1rem);
    box-shadow: var(--shadow-card, 0 8px 24px rgba(15, 23, 42, 0.06));
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.k3-res-card--aktif { border-top-color: #16a34a; }
.k3-res-card--segera { border-top-color: #d97706; }
.k3-res-card--kedaluwarsa { border-top-color: #dc2626; }
.k3-res-card--tanpa { border-top-color: #64748b; }

.k3-res-head {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1rem;
}

.k3-res-body {
    padding: 1.25rem 1.5rem;
    flex-grow: 1;
}

.k3-res-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.75rem 0.9rem;
    height: 100%;
}

.k3-res-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.2rem;
}

.k3-res-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-primary, #0F172A);
    overflow-wrap: anywhere;
}

.k3-res-foot {
    padding: 0.9rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.825rem;
    color: #475569;
}

.k3-scope-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--brand-primary, #0F172A);
    font-size: 0.825rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* Contoh Sertifikat K3 Gallery */
.k3-cert-sample-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md, 0.75rem);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft, 0 4px 16px rgba(15, 23, 42, 0.05));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.k3-cert-sample-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover, 0 16px 40px rgba(15, 23, 42, 0.12));
}

.k3-cert-sample-thumb {
    display: block;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.k3-cert-sample-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.k3-cert-sample-body {
    padding: 1rem 1.1rem;
    flex-grow: 1;
}

@media print {
    header, footer, .section-hero, #jadwal-pelatihan, .k3-enriched-info, .d-print-none {
        display: none !important;
    }
    .k3-res-card {
        box-shadow: none !important;
        border: 1px solid #94a3b8 !important;
    }
}

/* Eyebrow pill on dark hero */
.ck-eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f8fafc;
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Hero check-list items */
.ck-hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ck-hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
}

.ck-hero-points li + li {
    margin-top: 0.55rem;
}

/* Status legend cards */
.ck-status-card {
    background: #ffffff;
    border: 1px solid var(--border-color, rgba(15, 23, 42, 0.08));
    border-left-width: 5px;
    border-radius: var(--radius-md, 0.75rem);
    padding: 1.25rem;
    height: 100%;
    box-shadow: var(--shadow-soft, 0 4px 16px rgba(15, 23, 42, 0.05));
}

.ck-status-card--aktif { border-left-color: #16a34a; }
.ck-status-card--segera { border-left-color: #d97706; }
.ck-status-card--kedaluwarsa { border-left-color: #dc2626; }
.ck-status-card--tanpa { border-left-color: #64748b; }

/* CTA banner on homepage */
.ck-cta-banner {
    background: linear-gradient(135deg, var(--brand-primary, #0F172A) 0%, var(--brand-secondary, #334155) 100%);
    color: #ffffff;
    border-radius: var(--radius-xl, 1.5rem);
    box-shadow: var(--shadow-card, 0 8px 24px rgba(15, 23, 42, 0.06));
}

.ck-cta-banner h2 {
    color: #ffffff;
}

.ck-cta-banner p {
    color: rgba(255, 255, 255, 0.84);
}

/* Breadcrumb global contrast & spacing */
.breadcrumb {
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

.breadcrumb-hero-pill {
    display: inline-flex;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

/* Kontrol segmented pencarian (Nama + tanggal lahir | Nomor registrasi): kontras eksplisit, lolos WCAG AA */
.ck-hero-card .ck-mode .btn {
    min-height: 44px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--brand-accent, #0270a8);
    font-weight: 600;
    line-height: 1.2;
}
.ck-hero-card .ck-mode .btn-outline-secondary {
    background: #ffffff;
    color: #025a86;
}
.ck-hero-card .ck-mode .btn-outline-secondary:hover,
.ck-hero-card .ck-mode .btn-outline-secondary:focus-visible {
    background: #e8f3f9;
    color: #014a6f;
}
.ck-hero-card .ck-mode .btn-primary {
    background: var(--brand-accent, #0270a8);
    color: #ffffff;
}
