/* ==========================================================================
   APE Guide / Panduan page
   Scoped to body.ape-guide-page
   ========================================================================== */

body.ape-guide-page {
    --guide-primary: #2878c8;
    --guide-primary-dark: #1f68b2;
    --guide-navy: #183150;
    --guide-muted: #63758c;
    --guide-border: #e3edf8;
    --guide-soft: #f7fbff;
    --guide-card-radius: 16px;
    --guide-card-shadow: 0 10px 24px rgba(28, 64, 110, 0.05);
    --guide-container: min(1180px, calc(100% - 48px));
    font-family: Inter, sans-serif;
    color: var(--guide-navy);
    background: #ffffff;
}

.ape-guide {
    overflow-x: hidden;
}

.ape-guide *,
.ape-guide *::before,
.ape-guide *::after {
    box-sizing: border-box;
}

.ape-guide-container {
    width: var(--guide-container);
    margin: 0 auto;
}

.ape-guide-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--guide-primary);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.ape-guide-hero {
    padding: 108px 0 36px;
    background:
        radial-gradient(circle at 12% 20%, rgba(40, 120, 200, 0.12), transparent 42%),
        linear-gradient(180deg, #eef6ff 0%, #f7fbff 55%, #ffffff 100%);
}

.ape-guide-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.ape-guide-hero-copy h1 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--guide-navy);
}

.ape-guide-hero-lead {
    margin: 14px 0 0;
    max-width: 58ch;
    font-size: 16px;
    line-height: 1.75;
    color: var(--guide-muted);
}

.ape-guide-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.ape-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ape-guide-btn:focus-visible,
.ape-guide-anchor-link:focus-visible,
.ape-guide-toc-list a:focus-visible,
.ape-guide-nav-card:focus-visible,
.ape-guide-faq-trigger:focus-visible {
    outline: 2px solid var(--guide-primary);
    outline-offset: 2px;
}

.ape-guide-btn-primary {
    background: var(--guide-primary);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(40, 120, 200, 0.22);
}

.ape-guide-btn-primary:hover,
.ape-guide-btn-primary:focus {
    background: var(--guide-primary-dark);
    color: #ffffff;
    text-decoration: none;
}

.ape-guide-btn-secondary {
    background: #ffffff;
    color: var(--guide-primary);
    border-color: #cfe0f5;
}

.ape-guide-btn-secondary:hover,
.ape-guide-btn-secondary:focus {
    background: #f3f8ff;
    color: var(--guide-primary-dark);
    text-decoration: none;
}

.ape-guide-btn-light {
    background: #ffffff;
    color: var(--guide-primary-dark);
}

.ape-guide-btn-light:hover,
.ape-guide-btn-light:focus {
    background: #f3f8ff;
    color: var(--guide-navy);
    text-decoration: none;
}

.ape-guide-btn-outline-light {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.ape-guide-btn-outline-light:hover,
.ape-guide-btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-decoration: none;
}

.ape-guide-anchor-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    min-height: 44px;
    color: var(--guide-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ape-guide-anchor-link:hover,
.ape-guide-anchor-link:focus {
    color: var(--guide-primary-dark);
    text-decoration: none;
}

.ape-guide-hero-card {
    background: #ffffff;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-card-radius);
    box-shadow: var(--guide-card-shadow);
    padding: 22px;
}

.ape-guide-hero-card-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    color: var(--guide-navy);
}

.ape-guide-flow {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ape-guide-flow-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0 14px;
}

.ape-guide-flow-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 34px;
    bottom: 0;
    width: 2px;
    background: #d7e6f7;
}

.ape-guide-flow-num {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e8f2fc;
    color: var(--guide-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    z-index: 1;
}

.ape-guide-flow-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--guide-soft);
    color: var(--guide-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.ape-guide-flow-item strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--guide-navy);
}

.ape-guide-flow-item p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--guide-muted);
}

/* --------------------------------------------------------------------------
   TOC
   -------------------------------------------------------------------------- */

.ape-guide-toc {
    position: sticky;
    top: 56px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--guide-border);
    backdrop-filter: blur(8px);
}

.ape-guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ape-guide-toc-list a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--guide-muted);
    text-decoration: none;
    background: #f5f8fc;
    border: 1px solid transparent;
}

.ape-guide-toc-list a:hover,
.ape-guide-toc-list a:focus {
    color: var(--guide-primary);
    border-color: #d7e6f7;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Sections / cards
   -------------------------------------------------------------------------- */

.ape-guide-section {
    padding: 48px 0;
    background: #ffffff;
}

.ape-guide-section-soft {
    background: var(--guide-soft);
}

/* Reset creative.css global `header { background-image... }` for guide section heads.
   Markup uses <div class="ape-guide-section-header"> (not <header>) to avoid that selector. */
.ape-guide-page .ape-guide-section-header {
    position: relative;
    max-width: 760px;
    margin: 0 auto 40px;
    padding: 0;
    text-align: center;
    background: transparent;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    color: inherit;
    min-height: 0;
    width: auto;
}

.ape-guide-page .ape-guide-section-header::before,
.ape-guide-page .ape-guide-section-header::after {
    display: none;
    content: none;
}

.ape-guide-page .ape-guide-section-header .ape-guide-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #1976d2;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ape-guide-page .ape-guide-section-header h2 {
    margin: 0;
    color: #173253;
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ape-guide-page .ape-guide-section-header p {
    max-width: 680px;
    margin: 14px auto 0;
    color: #607795;
    font-size: 18px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .ape-guide-page .ape-guide-section-header {
        margin-bottom: 28px;
    }

    .ape-guide-page .ape-guide-section-header h2 {
        font-size: clamp(28px, 7vw, 32px);
    }

    .ape-guide-page .ape-guide-section-header p {
        font-size: 16px;
    }
}

#pengguna,
#alur-pelaporan,
#status-laporan,
#kelengkapan,
#halaman-publik,
#faq {
    scroll-margin-top: 120px;
}

.ape-guide-card-grid {
    display: grid;
    gap: 16px;
}

.ape-guide-card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ape-guide-card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ape-guide-card,
.ape-guide-status-card,
.ape-guide-nav-card {
    background: #ffffff;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-card-radius);
    box-shadow: var(--guide-card-shadow);
    padding: 20px;
}

.ape-guide-card h3,
.ape-guide-nav-card h3 {
    margin: 14px 0 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--guide-navy);
}

.ape-guide-card p,
.ape-guide-nav-card p,
.ape-guide-status-card p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--guide-muted);
}

.ape-guide-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f2fc;
    color: var(--guide-primary);
    font-size: 18px;
}

.ape-guide-card-icon--teal {
    background: #e7f7f4;
    color: #0f766e;
}

.ape-guide-card-icon--orange {
    background: #fff4e8;
    color: #c2410c;
}

.ape-guide-card-icon--green {
    background: #eaf8ef;
    color: #15803d;
}

.ape-guide-card--list ul {
    margin: 14px 0 0;
    padding: 0 0 0 18px;
    color: var(--guide-muted);
    font-size: 14px;
    line-height: 1.7;
}

.ape-guide-card--list li + li {
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.ape-guide-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ape-guide-timeline-item {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-card-radius);
    box-shadow: var(--guide-card-shadow);
    padding: 20px 18px 18px;
}

.ape-guide-timeline-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--guide-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.ape-guide-timeline-item h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--guide-navy);
}

.ape-guide-timeline-item p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--guide-muted);
}

.ape-guide-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #eef6ff;
    border: 1px solid #d7e6f7;
    color: var(--guide-navy);
}

.ape-guide-callout i {
    color: var(--guide-primary);
    margin-top: 2px;
}

.ape-guide-callout p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Status
   -------------------------------------------------------------------------- */

.ape-guide-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.ape-guide-status-card--draft .ape-guide-status-badge {
    background: rgba(243, 156, 18, 0.14);
    color: #c87f0a;
}

.ape-guide-status-card--submitted .ape-guide-status-badge {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.ape-guide-status-card--verified .ape-guide-status-badge {
    background: rgba(0, 166, 90, 0.14);
    color: #008d4c;
}

.ape-guide-status-card--rejected .ape-guide-status-badge {
    background: rgba(221, 75, 57, 0.14);
    color: #c0392b;
}

.ape-guide-status-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ape-guide-status-path {
    background: var(--guide-soft);
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    padding: 16px 18px;
}

.ape-guide-status-path h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--guide-navy);
}

.ape-guide-status-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--guide-muted);
}

.ape-guide-status-chain span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--guide-border);
    color: var(--guide-navy);
}

.ape-guide-status-chain i {
    color: var(--guide-primary);
}

/* --------------------------------------------------------------------------
   Public nav cards
   -------------------------------------------------------------------------- */

.ape-guide-nav-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 100%;
}

.ape-guide-nav-card:hover,
.ape-guide-nav-card:focus {
    transform: translateY(-2px);
    border-color: #cfe0f5;
    box-shadow: 0 14px 28px rgba(28, 64, 110, 0.08);
    text-decoration: none;
    color: inherit;
}

.ape-guide-nav-cta {
    margin-top: auto;
    padding-top: 16px;
    font-size: 13px;
    font-weight: 800;
    color: var(--guide-primary);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

#faq .ape-guide-section-header {
    margin-bottom: 32px;
}

.ape-guide-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ape-guide-faq-item {
    background: #ffffff;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    overflow: hidden;
}

.ape-guide-faq-item h3 {
    margin: 0;
    font-size: inherit;
}

.ape-guide-faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    padding: 20px 18px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--guide-navy);
    cursor: pointer;
}

.ape-guide-faq-trigger i {
    flex: 0 0 auto;
    color: var(--guide-primary);
    transition: transform 0.2s ease;
}

.ape-guide-faq-item.is-open .ape-guide-faq-trigger i {
    transform: rotate(180deg);
}

.ape-guide-faq-panel {
    padding: 0 18px 20px;
}

.ape-guide-faq-panel p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--guide-muted);
}

.ape-guide-faq-panel[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.ape-guide-cta {
    padding: 56px 0;
    background: linear-gradient(135deg, #1f68b2 0%, #2878c8 55%, #3a8fd9 100%);
    color: #ffffff;
    text-align: center;
}

.ape-guide-cta h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ape-guide-cta p {
    margin: 14px auto 0;
    max-width: 62ch;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.ape-guide-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .ape-guide-btn,
    .ape-guide-nav-card,
    .ape-guide-faq-trigger i {
        transition: none;
    }

    .ape-guide-nav-card:hover,
    .ape-guide-nav-card:focus {
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .ape-guide-card-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ape-guide-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ape-guide-hero-grid {
        grid-template-columns: 1fr;
    }

    .ape-guide-card-grid-3,
    .ape-guide-status-paths {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.ape-guide-page {
        --guide-container: min(1180px, calc(100% - 32px));
    }

    .ape-guide-hero {
        padding: 96px 0 28px;
    }

    .ape-guide-toc {
        position: static;
    }

    .ape-guide-section {
        padding: 36px 0;
    }

    .ape-guide-hero-actions,
    .ape-guide-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ape-guide-btn {
        width: 100%;
    }

    .ape-guide-timeline {
        grid-template-columns: 1fr;
    }

    .ape-guide-card-grid-4 {
        grid-template-columns: 1fr;
    }

    #pengguna,
    #alur-pelaporan,
    #status-laporan,
    #kelengkapan,
    #halaman-publik,
    #faq {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 480px) {
    body.ape-guide-page {
        --guide-container: min(1180px, calc(100% - 24px));
    }

    .ape-guide-hero-copy h1 {
        font-size: 28px;
    }

    .ape-guide-hero-card,
    .ape-guide-card,
    .ape-guide-status-card,
    .ape-guide-nav-card,
    .ape-guide-timeline-item {
        padding: 16px;
    }
}
