/* Kelas Profesi: light theme nuansa pendidikan (Royal Navy Blue & Amber Gold), mobile-first. Tanpa framework. */

:root {
    --red-900: #0f274a;
    --red-700: #163a70;
    --red-600: #1d4ed8;
    --red-100: #e2edfd;
    --red-50: #f0f6ff;
    --gold-500: #e5a00d;
    --gold-300: #f6d36b;
    --gold-200: #fbe6a6;
    --gold-100: #fff8e6;
    --gold-ink: #784d00;
    --ink: #1c2633;
    --ink-soft: #4a5868;
    --line: #dde5ef;
    --surface: #ffffff;
    --surface-alt: #f7f9fc;
    --amber-bg: var(--gold-100);
    --amber-ink: var(--gold-ink);
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 2px 8px rgba(16, 24, 40, 0.04);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface-alt);
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--red-700);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--red-900);
}

h1,
h2,
h3 {
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.5em;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1em;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -48px;
    background: var(--red-700);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 100;
}

.skip-link:focus {
    top: 8px;
}

:focus-visible {
    outline: 3px solid var(--red-600);
    outline-offset: 2px;
}

/* Banner demo */
.demo-banner {
    background: var(--amber-bg);
    color: var(--amber-ink);
    font-size: 0.9rem;
    padding: 8px 16px;
    text-align: center;
    border-bottom: 1px solid #f1d98a;
}

.announcement-banner {
    background: var(--red-700);
    color: #ffffff;
    font-size: 0.88rem;
    padding: 8px 16px;
    text-align: center;
    border-bottom: 2px solid var(--gold-500);
}
.announcement-banner a {
    color: var(--gold-200);
    font-weight: 600;
}

/* Header dan navigasi */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 -3px 0 var(--gold-500);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    line-height: 1;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--red-700);
    letter-spacing: -0.015em;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8d5e00;
    letter-spacing: 0.015em;
    line-height: 1.2;
    margin-top: 2px;
}

.footer-brand-wrap {
    margin-bottom: 12px;
}

.nav-toggle {
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 14px;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    min-height: 40px;
}

.site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 8px 0 12px;
}

.site-nav.is-open {
    display: flex;
}

.site-nav a {
    padding: 10px 4px;
    color: var(--ink);
    text-decoration: none;
    border-top: 1px solid var(--line);
}

.site-nav a.is-active {
    color: var(--red-700);
    font-weight: 600;
}

.site-nav a.is-active {
    box-shadow: inset 0 -3px 0 var(--gold-500);
}

/* Konten utama */
.site-main {
    min-height: 60vh;
}

.section {
    padding: 36px 0;
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
}

.hero {
    background: linear-gradient(180deg, var(--gold-100) 0%, var(--surface) 100%);
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    max-width: 760px;
}

.eyebrow {
    color: var(--red-700);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.lead {
    font-size: 1.05rem;
    color: var(--ink-soft);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 28px 0 22px;
}

.page-head p {
    color: var(--ink-soft);
    margin: 0;
}

/* Tombol */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
}

.btn-primary {
    background: var(--red-700);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-900);
    color: #fff;
}

.btn-outline {
    background: var(--surface);
    border-color: var(--red-700);
    color: var(--red-700);
}

.btn-outline:hover {
    background: var(--red-50);
    color: var(--red-900);
}

.btn-sm {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.btn[disabled] {
    background: #e4e9f1;
    border-color: #e4e9f1;
    color: #6b7786;
    cursor: not-allowed;
}

/* Kartu pelatihan */
.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-pad {
    padding: 20px;
}

.training-card {
    display: flex;
    flex-direction: column;
}

.card-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--red-100);
    overflow: hidden;
}

.card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-media-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--red-700);
    opacity: 0.7;
}

.hero-grid {
    display: grid;
    gap: 28px;
    align-items: center;
}

.hero-figure {
    margin: 0;
}

.hero-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.detail-figure {
    margin: 0 0 16px;
    max-width: 720px;
}

.detail-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.card-title a {
    color: var(--ink);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--red-700);
}

.card-text {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.card-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
}

.meta {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 4px;
    vertical-align: middle;
}

.badge-demo {
    background: var(--amber-bg);
    color: var(--amber-ink);
    border: 1px solid #f1d98a;
}

.facts {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.facts li {
    font-size: 0.85rem;
    background: var(--gold-100);
    color: var(--gold-ink);
    border-radius: 6px;
    padding: 2px 8px;
}

.price {
    color: var(--red-900);
    font-size: 1.05rem;
}

/* Chip kategori */
.chips {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}

.chip:hover {
    border-color: var(--red-600);
    color: var(--red-700);
}

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

.chip-count {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.chip.is-active .chip-count {
    color: #fbe0e0;
}

/* Langkah pendaftaran */
.steps {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    gap: 12px;
    counter-reset: step;
}

.steps li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 16px 16px 56px;
    position: relative;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold-500);
    color: var(--red-900);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps strong {
    display: block;
    margin-bottom: 2px;
}

.steps span {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* Notifikasi */
.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 16px;
    font-size: 0.95rem;
}

.notice-info {
    background: #f4f5f7;
    color: var(--ink);
    border: 1px solid var(--line);
}

.notice-warning {
    background: var(--amber-bg);
    color: var(--amber-ink);
    border: 1px solid #f1d98a;
}

/* FAQ */
.faq-list details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 16px;
    margin-bottom: 10px;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    padding: 14px 0;
    min-height: 44px;
    list-style-position: inside;
}

.faq-list details p {
    color: var(--ink-soft);
    padding-bottom: 14px;
    margin: 0;
}

/* Form pencarian */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.search-form input[type="search"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.result-count {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.empty {
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

/* Halaman detail */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding-top: 16px;
}

.breadcrumb a {
    color: var(--ink-soft);
}

.detail {
    padding-top: 12px;
    padding-bottom: 36px;
}

.detail-head {
    margin-bottom: 20px;
}

.detail-layout {
    display: grid;
    gap: 20px;
}

.detail-main section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
}

.detail-main h2 {
    font-size: 1.1rem;
}

.detail-aside {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    align-self: start;
}

.summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    margin: 0 0 16px;
}

.summary dt {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.summary dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.curriculum {
    padding-left: 20px;
    margin: 0;
}

.curriculum li {
    margin-bottom: 6px;
}

.plain {
    padding-left: 20px;
    margin: 0 0 1em;
}

.small {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 8px;
}

/* Halaman teks (about, legal) */
.prose {
    max-width: 780px;
}

.prose h2 {
    margin-top: 1.4em;
}

.prose .notice {
    margin-bottom: 20px;
}

.contact-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.error-page {
    text-align: center;
    padding: 40px 0;
}

.debug {
    text-align: left;
    background: #f1f4f8;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.85rem;
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 3px solid var(--gold-500);
    padding: 28px 0 0;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.footer-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

.footer-brand {
    font-weight: 800;
    color: var(--red-700);
    margin-bottom: 4px;
}

.footer-title {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.copyright {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding: 14px 16px;
    font-size: 0.85rem;
}

.copyright p {
    margin: 0;
}

/* Breakpoint: tablet */
@media (min-width: 640px) {
    h1 {
        font-size: 2.1rem;
    }

    .search-form {
        flex-direction: row;
    }

    .search-form input[type="search"] {
        flex: 1;
    }

    .search-form .btn {
        width: auto;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Breakpoint: laptop */
@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .header-inner {
        flex-wrap: nowrap;
    }

    .site-nav {
        display: flex;
        width: auto;
        flex-direction: row;
        gap: 4px;
        padding: 0;
    }

    .site-nav a {
        border-top: 0;
        padding: 8px 12px;
        border-radius: 6px;
    }

    .site-nav a:hover {
        background: var(--red-50);
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-layout {
        grid-template-columns: 1fr 340px;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Formulir */
.form {
    display: grid;
    gap: 14px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input,
.field textarea {
    width: 100%;
    font: inherit;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.field.has-error input,
.field.has-error textarea {
    border-color: var(--red-600);
}

.field-error {
    color: var(--red-700);
    font-size: 0.9rem;
    margin: 6px 0 0;
}

.notice-success {
    background: #eef8f1;
    color: #1d5b36;
    border: 1px solid #bfe3cb;
}

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

/* Checkout sandbox */
.sandbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.notice-info {
    margin-bottom: 14px;
}
