/* ==========================================================================
   iSort CMS — gaya pelengkap
   Komponen yang lahir bersama CMS: blog, formulir dinamis, tim, paket harga,
   galeri logo, dan halaman artikel. Memakai token yang sama dengan style.css.
   ========================================================================== */

/* -------------------------------------------------- Utilitas umum */
.grid-4 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-2.is-reverse > *:first-child { order: 2; }

.center { text-align: center; }
.muted { color: var(--muted); }

.shell-narrow { width: min(760px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* -------------------------------------------------- Teks kaya (prose) */
.prose { color: var(--ink-2); font-size: 1.02rem; line-height: 1.78; }
.prose-narrow { max-width: 74ch; margin-inline: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.34rem, 2.4vw, 1.78rem); margin-top: 1.9em; color: var(--ink); letter-spacing: -.01em; }
.prose h3 { font-size: clamp(1.12rem, 1.8vw, 1.32rem); margin-top: 1.6em; color: var(--ink); }
.prose p { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r); }
.prose blockquote {
    border-left: 3px solid var(--brand);
    padding: 4px 0 4px 20px;
    color: var(--ink-2);
    font-style: italic;
}
.prose code { background: var(--silver-1); padding: 2px 7px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--bg-deep); color: #E8EAEF; padding: 18px; border-radius: var(--r-sm); overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

.embed-block iframe { max-width: 100%; border: 0; border-radius: var(--r); }

/* -------------------------------------------------- Kartu artikel */
.post-grid { align-items: stretch; }

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s, border-color .35s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--brand) 32%, var(--line)); }

.post-cover { display: block; aspect-ratio: 16 / 10; background: var(--silver-1); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover-fallback { display: grid; place-items: center; height: 100%; color: var(--muted-2); }

.post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body h3 { font-size: 1.12rem; line-height: 1.38; margin: 0; }
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--brand); }
.post-body p { color: var(--muted); font-size: .94rem; margin: 0; }
.post-body .link-arrow { margin-top: auto; }

.post-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: .78rem; color: var(--muted-2); margin: 0;
}
.post-cat {
    background: var(--brand-soft); color: var(--brand-ink);
    padding: 2px 10px; border-radius: var(--r-pill); font-weight: 600;
}
.post-cat:hover { background: var(--brand); color: #fff; }

/* -------------------------------------------------- Daftar blog */
.blog-search { display: flex; gap: 10px; margin-top: 26px; max-width: 460px; }
.blog-search input {
    flex: 1; padding: 12px 16px; border: 1px solid var(--line);
    border-radius: var(--r-pill); font: inherit; font-size: .94rem; background: #fff;
}
.blog-search input:focus { outline: 0; border-color: var(--brand); }

.cat-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 34px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: #fff;
    font-size: .86rem; color: var(--ink-2); font-weight: 500;
}
.chip small { color: var(--muted-2); }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.is-active small { color: rgba(255, 255, 255, .7); }

.pagination-wrap { margin-top: 48px; display: flex; justify-content: center; }
.pagination-wrap ul, .pagination-wrap nav { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.pagination-wrap li span, .pagination-wrap li a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: #fff; color: var(--ink-2); font-size: .9rem;
}
.pagination-wrap li a:hover { border-color: var(--brand); color: var(--brand-ink); }
.pagination-wrap li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination-wrap li.disabled span { opacity: .45; }
.pagination-wrap svg { width: 16px; height: 16px; }

/* -------------------------------------------------- Halaman artikel */
.article-page { padding-top: clamp(28px, 4vw, 56px); }
.article-head { max-width: 76ch; margin-inline: auto; text-align: center; }
.article-head h1 { font-size: clamp(1.8rem, 4vw, 2.9rem); letter-spacing: -.02em; }
.article-head .eyebrow { justify-content: center; }

.article-meta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 10px; margin-top: 24px; color: var(--muted); font-size: .88rem;
}
.article-meta .avatar {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    background: var(--brand-soft); color: var(--brand-ink);
    display: grid; place-items: center; font-weight: 600; font-size: .86rem;
}
.article-meta .avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-meta b { display: block; color: var(--ink); font-size: .9rem; }
.article-meta small { display: block; color: var(--muted-2); font-size: .78rem; }
.article-meta .dot { color: var(--line); }

.article-cover {
    margin: clamp(30px, 4vw, 52px) 0;
    border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh);
}
.article-cover img { width: 100%; height: auto; display: block; }

.article-body { margin-top: clamp(24px, 3vw, 40px); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px auto 0; max-width: 74ch; }

.article-share {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    margin: 26px auto 0; max-width: 74ch;
    padding-top: 22px; border-top: 1px solid var(--line);
    font-size: .88rem; color: var(--muted);
}
.article-share a { color: var(--brand-ink); font-weight: 500; }
.article-share a:hover { color: var(--brand); }

/* -------------------------------------------------- Formulir */
.form-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: clamp(24px, 3.4vw, 40px);
    box-shadow: var(--sh-sm);
}
.form-intro { color: var(--muted); margin-bottom: 22px; }

.cms-form .form-grid {
    display: grid; gap: 4px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cms-form .form-field { margin-bottom: 16px; }
.cms-form .form-field.is-full { grid-column: 1 / -1; }
.cms-form .form-field.is-half { grid-column: span 1; }

.cms-form label {
    display: block; font-size: .86rem; font-weight: 550;
    color: var(--ink-2); margin-bottom: 7px;
}
.cms-form .req { color: #C0392B; }

.cms-form input[type=text], .cms-form input[type=email], .cms-form input[type=tel],
.cms-form input[type=number], .cms-form input[type=url], .cms-form input[type=date],
.cms-form select, .cms-form textarea {
    width: 100%; padding: 12px 15px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    font: inherit; font-size: .95rem; color: var(--ink);
    background: #fff; transition: border-color .2s, box-shadow .2s;
}
.cms-form textarea { resize: vertical; min-height: 118px; line-height: 1.6; }
.cms-form input:focus, .cms-form select:focus, .cms-form textarea:focus {
    outline: 0; border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.cms-form .has-error input, .cms-form .has-error textarea, .cms-form .has-error select { border-color: #C0392B; }
.cms-form .form-help { display: block; color: var(--muted-2); font-size: .8rem; margin-top: 6px; }
.cms-form .form-error { display: block; color: #C0392B; font-size: .8rem; margin-top: 6px; }

.cms-form .choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cms-form .choice {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; border: 1px solid var(--line);
    border-radius: var(--r-pill); cursor: pointer;
    font-size: .89rem; font-weight: 400; margin: 0;
    transition: border-color .2s, background .2s;
}
.cms-form .choice:hover { border-color: var(--brand); }
.cms-form .choice input { accent-color: var(--brand); }
.cms-form .choice span { color: var(--ink-2); }

.cms-form .form-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    margin-top: 10px;
}
.cms-form .form-actions .muted { font-size: .8rem; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-alert {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 14px 17px; border-radius: var(--r-sm); margin-bottom: 22px;
    font-size: .92rem; line-height: 1.55;
}
.form-alert.is-ok { background: #E7F6EE; color: #10603B; }
.form-alert.is-err { background: #FCEAE8; color: #A32019; }
.form-alert svg { flex: none; margin-top: 2px; }

/* -------------------------------------------------- Kontak */
.contact-wrap {
    display: grid; gap: clamp(28px, 4vw, 56px);
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: start;
}
.contact-wrap.is-full { grid-template-columns: minmax(0, 1fr); }
.contact-wrap.is-left .contact-side { order: 2; }

.contact-side h3 { font-size: 1.24rem; margin-bottom: 12px; }

.contact-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 2px; }
.contact-list b { display: block; color: var(--ink); font-size: .88rem; margin-bottom: 2px; }
.contact-list a, .contact-list span { color: var(--muted); font-size: .93rem; }
.contact-list a:hover { color: var(--brand); }

.map-frame { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.map-frame iframe { display: block; }

/* Linimasa: lihat style.css (satu sumber gaya). */

/* -------------------------------------------------- Tim */
.team-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 22px; text-align: center;
}
.team-card img {
    width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
    margin: 0 auto 14px; display: block;
}
.team-card h3 { font-size: 1.04rem; margin-bottom: 2px; }
.team-card .team-role { color: var(--brand); font-size: .84rem; font-weight: 550; margin-bottom: 10px; }
.team-card p { color: var(--muted); font-size: .89rem; }

/* -------------------------------------------------- Paket harga */
.price-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 30px 26px; display: flex; flex-direction: column; gap: 14px;
}
.price-card.is-featured {
    border-color: var(--brand);
    box-shadow: var(--sh-brand);
    position: relative;
}
.price-card.is-featured::before {
    content: 'Paling dipilih';
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600;
    padding: 4px 14px; border-radius: var(--r-pill); white-space: nowrap;
}
.price-amount { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 650; color: var(--ink); margin: 0; }
.price-amount small { font-size: .88rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.price-card .check-list { flex: 1; }
.price-card .btn { justify-content: center; }

/* -------------------------------------------------- Grid logo */
.logo-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}
.logo-cell {
    display: grid; place-items: center; min-height: 96px; padding: 18px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--muted); font-weight: 550; text-align: center;
    transition: border-color .25s, box-shadow .25s;
}
.logo-cell:hover { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); box-shadow: var(--sh-sm); }
.logo-cell img { max-width: 100%; max-height: 42px; object-fit: contain; }

/* -------------------------------------------------- Responsif */
@media (max-width: 860px) {
    .contact-wrap { grid-template-columns: minmax(0, 1fr); }
    .contact-wrap.is-left .contact-side { order: 0; }
    .cms-form .form-grid { grid-template-columns: minmax(0, 1fr); }
    .cms-form .form-field.is-half { grid-column: 1 / -1; }
    .grid-2.is-reverse > *:first-child { order: 0; }
}

/* -------------------------------------------------- Warna lembut kartu
   Diatur per bagian (Warna kartu) atau per kartu (Warna kartu ini).
   Satu warna dasar --ct; latar & garis kartu adalah versi pudarnya. */
.ct-blue { --ct: #3B82F6; }
.ct-green { --ct: #22A06B; }
.ct-gold { --ct: #C9A23F; }
.ct-purple { --ct: #8B5CF6; }
.ct-teal { --ct: #14B8A6; }
.ct-pink { --ct: #EC4899; }
.ct-orange { --ct: #F97316; }
.ct-gray { --ct: #64748B; }

/* Warna-warni: kartu bergiliran memakai enam warna. */
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+1) { --ct: #3B82F6; }
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+2) { --ct: #22A06B; }
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+3) { --ct: #C9A23F; }
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+4) { --ct: #8B5CF6; }
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+5) { --ct: #14B8A6; }
.ct-mix :is(.grid-2, .grid-3, .grid-4, .timeline, .cert-grid, .logo-grid, .faq, .t-track, .stat-band) > :nth-child(6n+6) { --ct: #EC4899; }

:is(.ct-on :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .post-card, .value-card, .faq-item, .logo-cell, .tl-body, .cert, .contact-tile),
    :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .tl-body).ct-on) {
    background: color-mix(in srgb, var(--ct, #fff) 9%, #fff);
}
:is(.ct-on :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .post-card, .value-card, .faq-item, .logo-cell, .tl-body, .cert, .contact-tile),
    :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .tl-body).ct-on):not(.is-featured) {
    border-color: color-mix(in srgb, var(--ct, var(--line)) 24%, var(--line));
}
:is(.ct-on :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .post-card, .value-card, .faq-item, .logo-cell, .tl-body, .cert, .contact-tile),
    :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .tl-body).ct-on):not(.is-featured):hover {
    border-color: color-mix(in srgb, var(--ct, var(--line)) 45%, var(--line));
}

/* Di latar gelap kartu tetap transparan agar teks putih terbaca. */
.section-deep.ct-on :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .post-card, .value-card, .faq-item, .logo-cell, .tl-body, .cert, .contact-tile, .stat-band > div),
.section-deep :is(.feat-card, .num-card, .quote-card, .price-card, .team-card, .tl-body).ct-on {
    background: color-mix(in srgb, var(--ct, #fff) 14%, transparent);
    border-color: color-mix(in srgb, var(--ct, #fff) 30%, transparent);
}
