/* =========================================================
   ui.css: shared primitives for every public page.
   Loaded right after navbar.css (fonts + brand vars live there).
   Page stylesheets add page-specific rules only.

   HCI notes baked in here:
   - one card radius, one shadow pair, one spacing scale (consistency)
   - 44px minimum hit area on buttons/tabs (Fitts)
   - visible :focus-visible ring on everything interactive
   - all non-user-triggered motion sits behind prefers-reduced-motion
   ========================================================= */

:root {
    --ink: #1f2328;
    --muted: #6b7480;
    --muted-2: #8a94a6;
    --canvas: #fafbfd;
    --line: rgba(29, 70, 110, 0.1);

    --radius-card: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;

    --shadow-card: 0 6px 24px -8px rgba(29, 70, 110, 0.16), 0 1px 2px rgba(29, 70, 110, 0.06);
    --shadow-card-hover: 0 18px 40px -14px rgba(29, 70, 110, 0.28);

    --space-section: clamp(3rem, 7vw, 5.5rem);
    --dot-color: rgba(29, 70, 110, 0.14);

    /* Subject tints (pastel cards) + their status-dot colors */
    --tint-tech: #e8eef7;
    --dot-tech: #3b5f8f;
    --tint-business: #fde7bd;
    --dot-business: #e8a23a;
    --tint-health: #cdf5e6;
    --dot-health: #1fa77a;
    --tint-aviation: #e6dcfb;
    --dot-aviation: #7b5be6;
    --tint-rose: #fde3e3;
    --dot-rose: #d23b3b;

    --wa: #25d366;
}

/* ---------- focus ---------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
}

/* ---------- dotted canvas ---------- */
.canvas-dots {
    background-color: var(--canvas);
    background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* ---------- section header ---------- */
.section-head {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 640px;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    align-items: center;
}

.section-head__eyebrow {
    font-family: "Poppins", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.section-head__title {
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--secondary);
    margin: 0;
}

.section-head__lead {
    font-family: "Open Sans", sans-serif;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

/* ---------- pill / status chip ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: #fff;
    border-radius: var(--radius-pill);
    font-family: "Poppins", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(29, 70, 110, 0.12);
    white-space: nowrap;
}

.pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, var(--secondary));
    flex-shrink: 0;
}

.pill--plain::before {
    display: none;
}

/* ---------- card ---------- */
.card {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card--tint {
    background: var(--tint, #fff);
}

.card--lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.8rem 1.6rem;
    border: 0;
    border-radius: var(--radius-pill);
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.btn--primary {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(29, 70, 110, 0.55);
}

.btn--primary:hover {
    background: #163455;
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
}

.btn--ghost:hover {
    background: var(--secondary);
    color: #fff;
}

.btn--wa {
    background: var(--wa);
    color: #fff;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}

.btn--wa:hover {
    background: #1ebe57;
    transform: translateY(-1px);
}

/* ---------- logo grid ---------- */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.logo-tile {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    padding: 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.logo-tile img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.3);
    opacity: 0.85;
    transition:
        filter 0.25s ease,
        opacity 0.25s ease;
}

.logo-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.logo-tile:hover img {
    filter: grayscale(0);
    opacity: 1;
}

.logo-tile--placeholder {
    background: transparent;
    border: 1.5px dashed rgba(29, 70, 110, 0.22);
}

.logo-tile--placeholder svg {
    width: 28px;
    height: 28px;
    opacity: 0.25;
    color: var(--secondary);
}

/* ---------- empty state ---------- */
.empty-state {
    text-align: center;
    color: #888;
    font-family: "Open Sans", sans-serif;
    font-style: italic;
    padding: 2rem 0;
}

/* ---------- CTA band (was in course.css; shared by course pages + Tentang Kami) ---------- */
.course-cta {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: var(--course-max, 1040px);
    border-radius: var(--radius-card);
    padding: 3rem 2rem;
    background-color: #fff;
    background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
    background-size: 22px 22px;
    border: 1px solid var(--line);
    color: var(--ink);
    text-align: center;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* gold accent rule along the top edge; replaces the old gradient wash */
.course-cta::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--accent);
}

/* soft tinted bloom keeps the block from reading as a plain white box */
.course-cta::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 166, 31, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.course-cta > * {
    position: relative;
    z-index: 1;
}

.course-cta__kicker {
    font-family: "Poppins", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent2);
}

.course-cta__title {
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    color: var(--secondary);
}

.course-cta__lead {
    font-family: "Open Sans", sans-serif;
    font-size: clamp(14px, 1.6vw, 16px);
    color: var(--muted);
    max-width: 50ch;
    margin: 0;
}

.course-cta .cta-button,
.course-cta .btn {
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .course-cta {
        padding: 2.25rem 1.25rem;
    }
}

/* ---------- Keuntungan / advantages (home + Tentang Kami) ---------- */
.advantages {
    padding: var(--space-section) 0;
}

.advantages .container {
    padding: 0 var(--con-padding);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

/* 3 + 4 rows: never a 4 + 3 orphan */
.advantage-card:nth-child(-n + 3) {
    grid-column: span 4;
}

.advantage-card:nth-child(n + 4) {
    grid-column: span 3;
}

.advantage-card {
    --c: var(--secondary);
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    align-items: stretch;
    min-height: 120px;
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.advantage-card__num {
    display: grid;
    place-items: center;
    background: var(--c);
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.advantage-card__body {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.1rem 1.1rem 1rem;
}

.advantage-card__icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--c) 14%, white);
    color: var(--c);
}

.advantage-card__icon svg {
    width: 22px;
    height: 22px;
}

.advantage-card__title {
    font-family: "Poppins", sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    margin: 0;
}

@media (max-width: 900px) {
    .advantage-card:nth-child(n) {
        grid-column: span 6;
    }

    .advantage-card:last-child {
        grid-column: span 12;
    }
}

@media (max-width: 560px) {
    .advantage-card:nth-child(n),
    .advantage-card:last-child {
        grid-column: span 12;
    }
}
