/* ─── Sacred Instruction Single Page — v0 PostDetailTemplate design ─────── */

.si-single {
    background: var(--wp--preset--color--background, #f6f4f0);
    padding: 4rem 1.5rem 6rem;
}

.si-container {
    margin: 0 auto;
    max-width: 48rem; /* ~768px, matches v0 max-w-3xl */
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.si-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--wp--preset--color--muted, #716c67);
    margin-bottom: 2rem;
}

.si-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.si-breadcrumb a:hover {
    color: var(--wp--preset--color--foreground, #2d2a27);
}

.si-breadcrumb .si-bc-current {
    font-weight: 500;
    color: var(--wp--preset--color--foreground, #2d2a27);
}

.si-bc-sep {
    opacity: 0.5;
    line-height: 1;
}

/* ── Post header ─────────────────────────────────────────────────────────── */

.si-header {
    margin-bottom: 2.5rem;
}

.si-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wp--preset--color--accent, #c49a3c);
    margin-bottom: 0.5rem !important;
    line-height: 1.5;
}

.si-title {
    font-family: var(--wp--preset--font-family--serif, 'Noto Serif TC', serif);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--wp--preset--color--foreground, #2d2a27);
    line-height: 1.3;
    margin-bottom: 1rem !important;
    text-wrap: balance;
}

.si-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--wp--preset--color--muted, #716c67);
    font-size: 0.9375rem;
}

.si-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1.4;
}

.si-meta-item svg {
    flex-shrink: 0;
    opacity: 0.75;
}

/* ── Content card ────────────────────────────────────────────────────────── */

.si-card {
    border-radius: 0.75rem;
    border: 1px solid var(--wp--preset--color--border, #e4e0da);
    background: #fcf3cf;
    color: var(--wp--preset--color--foreground, #2d2a27);
    overflow: hidden;
    padding: 1.25rem 2.5rem 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 600px) {
    .si-card {
        padding: 1rem 1.5rem 1.5rem;
    }
}

.si-celestial {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--wp--preset--color--foreground, #2d2a27);
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .si-celestial {
        font-size: 1.5rem;
    }
}

/* Content body — Chinese paragraph indentation (2em = 2 char widths) */
.si-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--wp--preset--color--foreground, #2d2a27);
}

.si-content p {
    margin-bottom: 1rem;
}

.si-content p:last-child {
    margin-bottom: 0;
}

/* ── Prev/Next pagination ────────────────────────────────────────────────── */

.si-pagination {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--wp--preset--color--border, #e4e0da);
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.si-pag-prev,
.si-pag-next {
    flex: 1;
    min-width: 0;
}

.si-pag-next {
    text-align: right;
}

.si-pag-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wp--preset--color--muted, #716c67);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
    max-width: 100%;
}

.si-pag-link:hover {
    color: var(--wp--preset--color--foreground, #2d2a27);
}

.si-pag-link svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.si-pag-prev .si-pag-link:hover svg {
    transform: translateX(-2px);
}

.si-pag-next .si-pag-link:hover svg {
    transform: translateX(2px);
}

.si-pag-dir {
    display: block;
    font-size: 0.8125rem;
    color: var(--wp--preset--color--muted, #716c67);
    margin-bottom: 0.125rem;
}

.si-pag-title {
    display: block;
    font-weight: 500;
    color: var(--wp--preset--color--foreground, #2d2a27);
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-pag-link:hover .si-pag-title {
    color: var(--wp--preset--color--accent, #c49a3c);
}

/* ── Back link ───────────────────────────────────────────────────────────── */

.si-back {
    text-align: center;
}

.si-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--wp--preset--color--muted, #716c67);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.si-back-link:hover {
    color: var(--wp--preset--color--foreground, #2d2a27);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .si-single {
        padding: 2.5rem 1rem 4rem;
    }

    .si-pagination {
        flex-direction: column;
        gap: 1.5rem;
    }

    .si-pag-next {
        text-align: left;
    }

    .si-pag-next .si-pag-link {
        flex-direction: row-reverse;
    }
}
