/* ============================================================
   SINGLE.CSS — Dignity Media
   Article layout · Typography · Share · Author Bio · Related
   ============================================================ */

/* ── SINGLE WRAPPER LAYOUT ─────────────────────────── */

.single-wrap {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-3xl);
    align-items: start;
}

/* ── BREADCRUMBS ────────────────────────────────────── */

.single-breadcrumbs {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* ── ARTICLE HEADER ─────────────────────────────────── */

.article-header { margin-bottom: var(--space-2xl); }

.article-cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--dm-white);
    margin-bottom: var(--space-lg);
}

.article-deck {
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    color: var(--dm-gray-300);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    border-left: 3px solid var(--dm-red);
    padding-left: var(--space-lg);
    font-style: italic;
}

/* Meta bar */
.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: var(--space-lg);
}

.article-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.article-author__avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.15);
    object-fit: cover;
}

.article-author__info { display: flex; flex-direction: column; gap: 2px; }

.article-author__name {
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--dm-white);
}
.article-author__name:hover { color: var(--dm-red); }

.article-author__role {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-500);
}

.article-meta-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-500);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.article-meta-link { color: var(--dm-gray-400); transition: color var(--transition-fast); }
.article-meta-link:hover { color: var(--dm-red); }

.article-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-600);
    margin-top: var(--space-sm);
}
.article-updated svg { color: var(--dm-gray-600); }

/* ── SHARE BAR ──────────────────────────────────────── */

.article-share-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
}

.article-share-bar__label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dm-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--dm-gray-400);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.share-btn:hover { background: rgba(255,255,255,0.1); color: var(--dm-white); }
.share-btn--facebook:hover { background: rgba(24,119,242,0.2); border-color: rgba(24,119,242,0.4); color: #1877F2; }
.share-btn--twitter:hover  { background: rgba(255,255,255,0.08); color: var(--dm-white); }
.share-btn--whatsapp:hover { background: rgba(37,211,102,0.2); border-color: rgba(37,211,102,0.4); color: #25D366; }
.share-btn--copy:hover     { background: rgba(148,163,184,0.15); color: var(--dm-gray-200); }

.share-btn--lg {
    width: auto;
    padding: 0 var(--space-md);
    font-size: 0.875rem;
}

.article-share-bottom {
    padding: var(--space-xl);
    background: var(--dm-bg-secondary);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    margin: var(--space-2xl) 0;
}
.article-share-bottom > p {
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    color: var(--dm-gray-400);
    margin-bottom: var(--space-md);
    font-weight: 600;
}
.article-share-bottom__btns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ── FEATURED IMAGE ─────────────────────────────────── */

.article-featured-image {
    margin: 0 0 var(--space-2xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}
.article-featured-image__img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
}
.article-featured-image__caption {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-500);
    padding: var(--space-sm) var(--space-md);
    background: var(--dm-bg-secondary);
    border-top: 1px solid rgba(255,255,255,0.05);
    font-style: italic;
}

/* ── ARTICLE BODY TYPOGRAPHY ────────────────────────── */

.article-body,
.entry-content {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dm-gray-200);
    max-width: 72ch;
}

.article-body h2,
.entry-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.875rem);
    font-weight: 800;
    color: var(--dm-white);
    margin: var(--space-2xl) 0 var(--space-md);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.07);
    line-height: 1.25;
}

.article-body h3,
.entry-content h3 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--dm-white);
    margin: var(--space-xl) 0 var(--space-md);
    line-height: 1.3;
}

.article-body h4,
.entry-content h4 {
    font-family: var(--font-ui);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dm-gray-100);
    margin: var(--space-lg) 0 var(--space-sm);
}

.article-body p,
.entry-content p {
    margin-bottom: var(--space-lg);
    color: var(--dm-gray-300);
}

.article-body a,
.entry-content a {
    color: var(--dm-red-light);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}
.article-body a:hover,
.entry-content a:hover { color: var(--dm-white); }

.article-body blockquote,
.entry-content blockquote {
    border-left: 4px solid var(--dm-red);
    padding: var(--space-lg) var(--space-2xl);
    margin: var(--space-2xl) 0;
    background: linear-gradient(to right, rgba(193,18,31,0.06), transparent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body blockquote p,
.entry-content blockquote p {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--dm-gray-100);
    margin: 0;
    line-height: 1.6;
}

.article-body blockquote cite,
.entry-content blockquote cite {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--dm-gray-500);
    font-style: normal;
    margin-top: var(--space-sm);
}

.article-body ul,
.article-body ol,
.entry-content ul,
.entry-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li,
.entry-content li {
    margin-bottom: var(--space-sm);
    color: var(--dm-gray-300);
    padding-left: var(--space-xs);
}

.article-body li::marker,
.entry-content li::marker { color: var(--dm-red); }

.article-body figure,
.entry-content figure { margin: var(--space-2xl) 0; }

.article-body figure img,
.entry-content figure img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.article-body figcaption,
.entry-content figcaption {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-500);
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
}

.article-body .wp-block-pullquote,
.entry-content .wp-block-pullquote {
    border-top: 3px solid var(--dm-red);
    border-bottom: 3px solid var(--dm-red);
    padding: var(--space-xl) var(--space-2xl);
    text-align: center;
    margin: var(--space-2xl) 0;
}

.article-body .wp-block-pullquote blockquote,
.entry-content .wp-block-pullquote blockquote {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Responsive embeds */
.article-body .wp-block-embed,
.entry-content .wp-block-embed {
    margin: var(--space-2xl) 0;
}
.article-body .wp-block-embed__wrapper,
.entry-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.article-body .wp-block-embed__wrapper iframe,
.entry-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Highlight box */
.article-body .wp-block-info,
.entry-content .highlight-box {
    background: rgba(0,53,102,0.15);
    border: 1px solid rgba(0,53,102,0.3);
    border-left: 4px solid var(--dm-blue-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

/* ── TAGS ───────────────────────────────────────────── */

.article-tags {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: var(--space-xl);
}

.article-tags__label {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dm-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 5px;
    flex-shrink: 0;
}

.article-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.article-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--dm-bg-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--dm-gray-400);
    transition: all var(--transition-fast);
}
.article-tag:hover {
    background: rgba(193,18,31,0.1);
    border-color: rgba(193,18,31,0.3);
    color: var(--dm-red-light);
}

/* ── POST NAVIGATION ────────────────────────────────── */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: var(--dm-bg-secondary);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}
.post-nav-link:hover { border-color: rgba(255,255,255,0.15); background: var(--dm-bg-tertiary); }
.post-nav-link--next { text-align: right; }

.post-nav-link__dir {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dm-red);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.post-nav-link--next .post-nav-link__dir { justify-content: flex-end; }

.post-nav-link__title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--dm-gray-200);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── AUTHOR BIO ─────────────────────────────────────── */

.author-bio-box {
    display: flex;
    gap: var(--space-xl);
    background: linear-gradient(135deg, var(--dm-bg-secondary), var(--dm-bg-tertiary));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
    align-items: flex-start;
}

.author-bio-box__avatar {
    width: 96px !important;
    height: 96px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(193,18,31,0.3) !important;
    flex-shrink: 0;
    object-fit: cover;
}

.author-bio-box__info { flex: 1; }

.author-bio-box__label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dm-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.author-bio-box__name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--dm-white);
    margin-bottom: var(--space-sm);
}
.author-bio-box__name a { color: inherit; }
.author-bio-box__name a:hover { color: var(--dm-red); }

.author-bio-box__desc {
    font-size: 0.9375rem;
    color: var(--dm-gray-400);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.author-bio-box__links { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ── SIDEBAR ────────────────────────────────────────── */

.single-sidebar { position: sticky; top: calc(var(--header-height) + var(--space-xl)); display: flex; flex-direction: column; gap: var(--space-xl); }

.sidebar-widget {
    background: var(--dm-bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.sidebar-widget__title {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dm-gray-400);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
}

.sidebar-widget--newsletter,
.sidebar-widget--donate { overflow: visible; background: transparent; border: none; padding: 0; }

/* Related posts */
.related-posts-list { display: flex; flex-direction: column; }
.related-post-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background var(--transition-fast);
    align-items: flex-start;
}
.related-post-card:last-child { border-bottom: none; }
.related-post-card:hover { background: rgba(255,255,255,0.03); }
.related-post-card__thumb { width: 72px; height: 54px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.related-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-post-card__info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.related-post-card__cat { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dm-red); }
.related-post-card__title { font-family: var(--font-display); font-size: 0.875rem; font-weight: 700; color: var(--dm-gray-200); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-post-card:hover .related-post-card__title { color: var(--dm-white); }
.related-post-card__time { font-family: var(--font-ui); font-size: 0.75rem; color: var(--dm-gray-600); }

/* ── MORE STORIES SECTION ───────────────────────────── */

.more-stories-section { padding: var(--space-4xl) 0; background: var(--dm-bg-secondary); }

/* ── ARCHIVE / PAGE STYLES ──────────────────────────── */

.archive-hero {
    background: linear-gradient(to bottom, var(--dm-bg-secondary), var(--dm-bg-primary));
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: var(--space-3xl);
}
.archive-hero__title { font-size: clamp(1.75rem,3vw,2.5rem); margin-bottom: var(--space-sm); }
.archive-hero__desc  { color: var(--dm-gray-400); margin-top: var(--space-sm); }
.archive-hero__meta  { display:flex; gap:var(--space-lg); margin-top:var(--space-md); font-family:var(--font-ui); font-size:0.875rem; color:var(--dm-gray-500); }

.archive-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-3xl);
    align-items: start;
    padding-bottom: var(--space-4xl);
}
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); margin-bottom: var(--space-2xl); }
.archive-sidebar { position: sticky; top: calc(var(--header-height) + var(--space-xl)); display: flex; flex-direction: column; gap: var(--space-xl); }

/* Page templates */
.page-wrap { padding-bottom: var(--space-4xl); }
.page-hero { position: relative; height: 60vh; min-height: 400px; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.4) 60%, transparent 100%); }
.page-hero__content { position: relative; z-index: 1; padding: var(--space-3xl) 0 var(--space-2xl); width: 100%; }
.page-hero__title { font-size: clamp(2rem,4vw,3rem); }
.page-header { padding: var(--space-2xl) 0 var(--space-xl); border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: var(--space-2xl); }
.page-title { font-size: clamp(1.75rem,3vw,2.5rem); margin-top: var(--space-md); }
.page-content-wrap { max-width: 900px; margin: 0 auto; padding: var(--space-2xl) 0; }
.page-content .entry-content { max-width: 100%; }

/* Article page links */
.article-page-links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    font-family: var(--font-ui);
    font-size: 0.875rem;
}
.article-page-links__label { color: var(--dm-gray-500); font-weight: 600; }
.article-page-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--dm-bg-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--dm-gray-300);
    text-decoration: none;
    font-weight: 600;
}

/* ── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 1200px) {
    .single-layout { grid-template-columns: 1fr 300px; gap: var(--space-2xl); }
}

@media (max-width: 1024px) {
    .single-layout { grid-template-columns: 1fr; }
    .single-sidebar { position: static; }
    .archive-layout { grid-template-columns: 1fr; }
    .archive-sidebar { position: static; }
    .archive-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
    .article-meta-bar { flex-direction: column; align-items: flex-start; gap: var(--space-md); }
    .article-share-bar { margin-left: 0; }
    .author-bio-box { flex-direction: column; gap: var(--space-lg); }
    .post-navigation { grid-template-columns: 1fr; }
    .archive-grid { grid-template-columns: 1fr; }
}


.share-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.share-btn--facebook { color: #1877F2 !important; }
.share-btn--twitter  { color: #1A1A1A !important; }
.share-btn--whatsapp { color: #25D366 !important; }
.share-btn--copy     { color: #686868 !important; }
.share-btn--facebook:hover { background: #E7F0FD !important; border-color: #BFDBFE !important; }
.share-btn--twitter:hover  { background: #F0EFEC !important; border-color: #C8C6C2 !important; }
.share-btn--whatsapp:hover { background: #E5F8EC !important; border-color: #B8E8C8 !important; }
.share-btn--copy:hover     { background: #F0EFEC !important; border-color: #C8C6C2 !important; }