/**
 * Single Post — Article Styling
 *
 * Clean reading layout for blog posts, with featured image + meta.
 * Targets single.php template via .tpb-post-single class on #primary.
 *
 * @package ThePhinBox
 */

/* ═══════════════════════════════════════════════════════════════════
   1. LAYOUT — Full width, no sidebar
   ═══════════════════════════════════════════════════════════════════ */

body.single-post #secondary {
    display: none !important;
}

body.single-post .entry-header {
    display: none !important;
}

body.single-post #primary,
body.single-post .site-main,
body.single-post .content-area {
    max-width: 100% !important;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

.tpb-post-single__main {
    max-width: 1600px;
    margin: 0 auto;
}

.tpb-post-single__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

.tpb-post-single__layout.has-no-related-posts {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════════════════
   2. HEADER — Category, title, meta
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__header {
    max-width: 760px;
    margin: 48px auto 40px;
    text-align: center;
}

.tpb-post-single__category {
    margin-bottom: 12px;
}

.tpb-post-single__category a {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted, #6B6B6B);
    text-decoration: none;
}

.tpb-post-single__category a:hover {
    color: var(--color-text, #1A1A1A);
}

.tpb-post-single__title {
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-weight: 400;
    font-size: 36px;
    line-height: 1.2;
    color: var(--color-text, #1A1A1A);
    margin: 0 0 16px;
}

.tpb-post-single__meta {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--color-text-muted, #6B6B6B);
}

.tpb-post-single__meta-sep {
    margin: 0 8px;
}


/* ═══════════════════════════════════════════════════════════════════
   3. FEATURED IMAGE
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__thumbnail {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
}

.tpb-post-single__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .tpb-post-single__thumbnail {
        aspect-ratio: 4 / 5;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   4. CONTENT — Centered reading column
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__content.entry-content {
    /* max-width: 760px; */
    margin: 0 auto;
    padding: 0 0 60px;
    float: none;
}

.tpb-post-single__content h1,
.tpb-post-single__content h2,
.tpb-post-single__content h3,
.tpb-post-single__content h4 {
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-weight: 400;
    color: var(--color-text, #1A1A1A);
    margin: 0 0 16px;
    line-height: 1.25;
}

.tpb-post-single__content h1 { font-size: 32px; margin-top: 0; }
.tpb-post-single__content h2 { font-size: 26px; margin-top: 40px; }

.tpb-post-single__content h3 {
    font-size: 20px;
    margin-top: 32px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-weight: 600;
}

.tpb-post-single__content p {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-muted, #6B6B6B);
    margin: 0 0 20px;
}

.tpb-post-single__content a {
    color: var(--color-text, #1A1A1A);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tpb-post-single__content a:hover { opacity: 0.7; }

.tpb-post-single__content ul,
.tpb-post-single__content ol {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-muted, #6B6B6B);
    margin: 0 0 20px;
    padding-left: 24px;
    list-style: disc;
}

.tpb-post-single__content ol { list-style: decimal; }
.tpb-post-single__content li { margin-bottom: 8px; }

.tpb-post-single__content img {
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    display: block;
}

.tpb-post-single__content figure { margin: 24px 0; }

.tpb-post-single__content figcaption {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 13px;
    color: var(--color-text-muted, #6B6B6B);
    text-align: center;
    margin-top: 8px;
}

.tpb-post-single__content blockquote {
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-size: 20px;
    line-height: 1.6;
    font-style: italic;
    color: var(--color-text, #1A1A1A);
    border-left: 2px solid var(--color-text, #1A1A1A);
    padding-left: 24px;
    margin: 32px 0;
}

.tpb-post-single__content hr {
    border: none;
    border-top: 1px solid var(--color-border, #E8E8E8);
    margin: 40px 0;
}


/* ═══════════════════════════════════════════════════════════════════
   5. TAGS
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__tags {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tpb-post-single__tag {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 13px;
    color: var(--color-text-muted, #6B6B6B);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--color-border, #E8E8E8);
    border-radius: 999px;
}

.tpb-post-single__tag:hover {
    color: var(--color-text, #1A1A1A);
    border-color: var(--color-text, #1A1A1A);
}


/* ═══════════════════════════════════════════════════════════════════
   6. PREV / NEXT NAV
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__nav {
    margin: 0 auto;
    padding: 24px 0 40px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--color-border, #E8E8E8);
}

.tpb-post-single__nav a {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text, #1A1A1A);
    text-decoration: none;
}

.tpb-post-single__nav a:hover { opacity: 0.7; }

.tpb-post-single__nav-next {
    text-align: right;
    margin-left: auto;
}


/* ═══════════════════════════════════════════════════════════════════
   7. COMMENTS
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__comments {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 80px;
}


/* ═══════════════════════════════════════════════════════════════════
   8. SIDEBAR — Other posts in same category
   ═══════════════════════════════════════════════════════════════════ */

.tpb-post-single__sidebar {
    padding: 0 0 60px;
}

.tpb-post-single__sidebar-title {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 22px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text, #1A1A1A);
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border, #E8E8E8);
}

.tpb-post-single__sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tpb-post-single__sidebar-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border, #E8E8E8);
}

.tpb-post-single__sidebar-item:first-child {
    padding-top: 0;
}

.tpb-post-single__sidebar-item:last-child {
    border-bottom: none;
}

.tpb-post-single__sidebar-item-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.tpb-post-single__sidebar-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
}

.tpb-post-single__sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tpb-post-single__sidebar-body {
    display: flex;
    flex-direction: column;
}

.tpb-post-single__sidebar-link {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text, #1A1A1A);
    margin-bottom: 6px;
}

.tpb-post-single__sidebar-item-link:hover .tpb-post-single__sidebar-link {
    opacity: 0.7;
}

.tpb-post-single__sidebar-date {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 12px;
    color: var(--color-text-muted, #6B6B6B);
}


/* ═══════════════════════════════════════════════════════════════════
   9. MOBILE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
    .tpb-post-single__layout {
        grid-template-columns: 1fr;
    }

    .tpb-post-single__sidebar {
        padding-top: 0;
        border-top: 1px solid var(--color-border, #E8E8E8);
    }
}

@media (max-width: 767px) {
    .tpb-post-single__header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tpb-post-single__thumbnail {
        width: 100%;
    }

    .tpb-post-single__content.entry-content,
    .tpb-post-single__tags,
    .tpb-post-single__nav,
    .tpb-post-single__comments {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tpb-post-single__content.entry-content {
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .tpb-post-single__title { font-size: 26px; }
    .tpb-post-single__content h1 { font-size: 26px; }
    .tpb-post-single__content h2 { font-size: 20px; }
    .tpb-post-single__content p  { font-size: 15px; }

    .tpb-post-single__nav {
        flex-direction: column;
        gap: 12px;
    }

    .tpb-post-single__nav-next {
        text-align: left;
        margin-left: 0;
    }
}
