/*
 * Single post styles — opentable theme.
 * Loaded only on is_singular('post').
 *
 * Class map (single.php → CSS):
 *   .single-page-header          — breadcrumb band at top
 *   .single-container            — max-width article wrapper
 *   .single-blog-media           — featured image wrapper
 *   .single-blog-media-img       — the <img> from wp_get_attachment_image
 *   .single-blog-header          — header holding <h1>
 *   .single-post-title           — the <h1>
 *   .post-meta                   — <ul> date + category
 *   .meta-icon                   — SVG icon <span>
 *   .meta-date / .meta-category  — <li> items
 *   .single-blog-content         — the_content() wrapper
 *   .related-posts               — related posts section
 *   .related-posts-title         — <h3> heading
 *   .related-posts-grid          — 3-col grid
 *   .related-post                — individual card <article>
 *   .related-post-figure         — thumbnail <figure>
 *   .related-post-thumb          — thumbnail <a>
 *   .related-post-content        — title + excerpt wrapper
 *   .related-post-title          — card title <div>
 *   .related-post-excerpt        — card excerpt <div>
 *   .post-pagination-wrap        — prev/next band
 *   .post-pagination             — <ul>
 *   .post-prev / .post-next      — <li> items
 *   .post-pagination-icon        — SVG arrow <span>
 */

/* ── Page header (breadcrumb band) ──────────────────────────────────────────── */
.single-page-header {
    background-color: var(--appskey-color-bg-alt, #f8fdf0);
    border-bottom: 3px solid var(--appskey-color-primary, #95c93d);
    padding: 0.875rem 1.5rem;
}

.single-page-header__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.single-page-header__title {
    font-family: var(--appskey-font-body, 'Lato', sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.single-page-header__title a {
    color: var(--appskey-color-primary, #95c93d);
    text-decoration: none;
}

.single-page-header__title a:hover {
    text-decoration: underline;
}

/* ── Article container ───────────────────────────────────────────────────────── */
.single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    background-color: #ffffff;
}

/* ── Featured image ──────────────────────────────────────────────────────────── */
.single-blog-media {
    width: 50%;
    margin-bottom: 2rem;
    border-radius: 3px;
    overflow: hidden;
}

.single-blog-media-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Article header + title ──────────────────────────────────────────────────── */
.single-blog-header {
    margin-bottom: 0.75rem;
}

.single-post-title {
    font-family: var(--appskey-font-heading, 'Playfair Display', serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--appskey-color-dark, #2d2d2d);
    margin: 0;
}

/* ── Post meta (date + category) ─────────────────────────────────────────────── */
.post-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-family: var(--appskey-font-body, 'Lato', sans-serif);
    font-size: 0.875rem;
    color: #666;
}

.post-meta li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-icon {
    display: inline-flex;
    align-items: center;
    color: var(--appskey-color-primary, #95c93d);
    flex-shrink: 0;
}

.meta-icon svg {
    width: 13px;
    height: 13px;
}

.meta-category a {
    color: var(--appskey-color-primary, #95c93d);
    text-decoration: none;
    font-weight: 600;
}

.meta-category a:hover {
    text-decoration: underline;
}

/* Override _s base theme rule: .updated:not(.published) { display:none } */
.post-meta .updated {
    display: inline;
}

/* ── Content typography ──────────────────────────────────────────────────────── */
.single-blog-content {
    font-family: var(--appskey-font-body, 'Lato', sans-serif);
    font-size: 1rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 3rem;
}

.single-blog-content h2,
.single-blog-content h3,
.single-blog-content h4 {
    font-family: var(--appskey-font-heading, 'Playfair Display', serif);
    color: var(--appskey-color-dark, #2d2d2d);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.single-blog-content h2 { font-size: 1.625rem; }
.single-blog-content h3 { font-size: 1.25rem; }
.single-blog-content h4 { font-size: 1.0625rem; }

.single-blog-content p { margin: 0 0 1.25rem; }

.single-blog-content ul,
.single-blog-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
}

.single-blog-content li { margin-bottom: 0.4rem; }

.single-blog-content a {
    color: var(--appskey-color-primary, #95c93d);
    text-decoration: underline;
}

.single-blog-content a:hover {
    color: var(--appskey-color-primary-dark, #7aab2d);
}

.single-blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    border-radius: 3px;
}

.single-blog-content blockquote {
    border-left: 4px solid var(--appskey-color-primary, #95c93d);
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    background-color: var(--appskey-color-bg-alt, #f8fdf0);
    font-style: italic;
    color: #555;
}

.single-blog-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* Multi-page post links */
.page-links {
    margin-top: 2rem;
    font-family: var(--appskey-font-body, 'Lato', sans-serif);
    font-size: 0.875rem;
    color: #666;
}

/* ── Related posts ───────────────────────────────────────────────────────────── */
.related-posts {
    border-top: 3px solid var(--appskey-color-primary, #95c93d);
    padding-top: 2.5rem;
}

.related-posts-title {
    font-family: var(--appskey-font-heading, 'Playfair Display', serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--appskey-color-dark, #2d2d2d);
    margin: 0 0 1.75rem;
    text-align: left;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ── Related post card ───────────────────────────────────────────────────────── */
.related-post {
    display: flex;
    flex-direction: column;
}

.related-post-figure {
    margin: 0 0 0.75rem;
    overflow: hidden;
    border-radius: 3px;
    aspect-ratio: 16 / 9;
}

.related-post-thumb {
    display: block;
    width: 100%;
    height: 100%;
}

.related-post-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.related-post:hover .related-post-figure img {
    transform: scale(1.04);
}

.related-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.related-post-title {
    font-family: var(--appskey-font-heading, 'Playfair Display', serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--appskey-color-dark, #2d2d2d);
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
}

.related-post-title a:hover {
    color: var(--appskey-color-primary, #95c93d);
}

.related-post-excerpt {
    font-family: var(--appskey-font-body, 'Lato', sans-serif);
    font-size: 0.875rem;
    line-height: 1.65;
    color: #666;
}

.related-post-excerpt p { margin: 0; }

/* ── Post pagination band (prev / next) ──────────────────────────────────────── */
.post-pagination-wrap {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 1.5rem;
}

.post-pagination {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.post-prev,
.post-next {
    flex: 0 1 48%;
}

.post-next { text-align: right; }

.post-prev a,
.post-next a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--appskey-font-heading, 'Playfair Display', serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--appskey-color-dark, #2d2d2d);
    transition: color 0.2s ease;
}

.post-prev a:hover,
.post-next a:hover {
    color: var(--appskey-color-primary, #95c93d);
}

.post-next a { justify-content: flex-end; }

.post-pagination-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--appskey-color-primary, #95c93d);
}

.post-pagination-icon svg {
    width: 11px;
    height: 11px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 959px) {
    .single-post-title { font-size: 1.875rem; }
}

@media (max-width: 767px) {
    .single-container { padding: 2rem 1rem 3rem; }
    .single-post-title { font-size: 1.5rem; }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .related-post {
        flex-direction: row;
        gap: 1rem;
        align-items: flex-start;
    }

    .related-post-figure {
        flex: 0 0 110px;
        margin: 0;
        aspect-ratio: unset;
        align-self: stretch;
    }

    .post-pagination {
        flex-direction: column;
        gap: 1.25rem;
    }

    .post-prev,
    .post-next {
        flex: none;
    }

    .post-next {
        text-align: left;
    }

    .post-next a { justify-content: flex-start; }
}
