/* =========================================================
   AOM Page Rail Layout
   assets/css/aom/pages/single-post-rail.css
   ========================================================= */

/* =========================================================
   Hero
   ========================================================= */

.aom-page-hero {
    width: 100%;
    overflow: hidden;
    max-height: 460px;
    aspect-ratio: 16 / 5;
    margin-bottom: 0;
}

.aom-page-hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 40%;
}

/* =========================================================
   Shell — witte achtergrond kaart
   ========================================================= */

.aom-page-shell {
    background: #ffffff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    margin: 0 0 40px;
    padding: 40px 40px 56px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   Header / titel
   ========================================================= */

.aom-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--aoo-border, #e5e7eb);
}

.aom-page-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111827;
    margin: 0;
}

/* =========================================================
   Layout — sidebar + content
   ========================================================= */

.aom-page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

/* =========================================================
   Sidebar
   ========================================================= */

.aom-page-sidebar {
    min-width: 0;
}

.aom-page-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TOC */
.aom-toc {
    background: var(--aoo-surface-alt, #f9fafb);
    border: 1px solid var(--aoo-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
}

.aom-toc.is-hidden {
    display: none;
}

.aom-toc__toggle {
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #111827;
}

.aom-toc__chev {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.aom-toc.is-open .aom-toc__chev {
    transform: rotate(180deg);
}

.aom-toc__inner {
    display: none;
    padding: 0 16px 16px;
}

.aom-toc.is-open .aom-toc__inner {
    display: block;
}

.aom-toc__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aoo-muted, #6b7280);
    margin: 0 0 10px;
}

.aom-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aom-toc__list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.4;
}

.aom-toc__list a:hover {
    color: var(--aoo-brand, #0077b6);
}

.aom-toc__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aoo-brand, #0077b6);
    flex-shrink: 0;
    opacity: 0.4;
}

/* Info box */
.aom-info-box {
    background: var(--aoo-surface-alt, #f9fafb);
    border: 1px solid var(--aoo-border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
}

.aom-info-box__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aoo-muted, #6b7280);
    margin: 0 0 12px;
}

.aom-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.aom-meta-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--aoo-brand, #0077b6);
    color: #fff;
    border-radius: 20px;
}

.aom-meta-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aom-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aom-meta-label {
    font-size: 11px;
    color: var(--aoo-muted, #6b7280);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aom-meta-value {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

/* =========================================================
   Content
   ========================================================= */

.aom-page-content {
    min-width: 0;
}

.aom-page-body {
    font-size: 16px;
    line-height: 1.75;
    color: #374151;
}

.aom-page-body h2 {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #111827;
}

.aom-page-body h3 {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.aom-page-body p {
    margin-bottom: 1.25rem;
}

.aom-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {
    .aom-page-layout {
        grid-template-columns: 1fr;
    }

    .aom-page-sticky {
        position: static;
    }

    .aom-page-shell {
        padding: 24px 20px 40px;
        border-radius: 0;
        box-shadow: none;
    }

    .aom-toc.is-open .aom-toc__inner {
        display: block;
    }
}

@media (max-width: 640px) {
    .aom-page-hero {
        aspect-ratio: 16 / 7;
    }

    .aom-page-title {
        font-size: 1.6rem;
    }
}

/* =========================================================
   Post-specifieke elementen
   ========================================================= */

.aom-post-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--aoo-brand, #0077b6);
    text-decoration: none;
    margin-bottom: 10px;
}

.aom-post-cat:hover {
    text-decoration: underline;
}

.aom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.aom-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background: var(--aoo-surface-alt, #f9fafb);
    border: 1px solid var(--aoo-border, #e5e7eb);
    border-radius: 20px;
    color: #374151;
    text-decoration: none;
}

.aom-tag:hover {
    background: var(--aoo-brand, #0077b6);
    color: #fff;
    border-color: var(--aoo-brand, #0077b6);
}