/* ============================================================
   BLOG.CSS
   Page-specific styles for blog.php (article layout).
   The hero (background image + title) uses the shared .event-hero
   styles from common_specific.css.
   Loaded AFTER common_specific.css, so rules here override the
   shared detail-page styles (resources, etc.) for this page only.
   The .author-strip box is NOT styled here: it comes unchanged
   from common_specific.css.
   ============================================================ */

/* ── PAGE WRAPPER ────────────────────────────────────────── */
.article-page {
    --a-text:   #f5f5f5;                 /* body text: bright off-white */
    --a-head:   #ffffff;                 /* headings */
    --a-muted:  #c4c4c4;                 /* captions, meta */
    --a-accent: var(--accent-color-1, #ff7518);
    --a-line:   rgba(255,255,255,.14);

    flex: 1 0 auto;                      /* keeps the footer at the bottom (body is a flex column) */
    color: var(--a-text);
    padding: 3rem 1.25rem 3rem;
}

.article-wrap {
    max-width: 900px;                    /* content column width */
    margin-left: auto;
    margin-right: auto;
}

/* ── INSTITUTE LABEL (above title in the hero) ───────────── */
.blog-institute {
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    font-size: var(--fs-sm);
    color: var(--primary-color-2);
    letter-spacing: var(--ls-wider);
    display: block;
    margin-bottom: .5rem;
}

/* ── ABSTRACT (the "desc" field) ─────────────────────────── */
.article-abstract {
    margin: 0 0 2rem;
    padding-left: 1.1rem;
    border-left: var(--bw-heavy) solid var(--a-accent);
    color: var(--a-head);
    font-size: 1.05rem;
    line-height: 1.75;
    text-align: justify;
    font-weight: var(--fw-light);
}

/* ── TABLE OF CONTENTS ───────────────────────────────────── */
.article-toc {
    margin: 0 0 2.5rem;
    padding: 1rem 1.25rem;
    border: var(--bw-thin) solid var(--a-line);
    border-radius: var(--card-radius);
    background: var(--bg-section);
}
.article-toc summary {
    cursor: pointer;
    color: var(--a-head);
    font-weight: var(--fw-semibold);
}
.article-toc ol { margin: .9rem 0 0; padding-left: 1.4rem; }
.article-toc li { margin: .45rem 0; color: var(--a-muted); }
.article-toc a {
    color: var(--a-text);
    text-decoration: none;
    line-height: 1.5;
    transition: var(--transition);
}
.article-toc a:hover { color: var(--a-accent); }

/* ── ARTICLE BODY: one continuous column, no boxes ───────── */
.article-prose p {
    margin: 0 0 1.2rem;
    color: var(--a-text);
    font-size: var(--fs-md);             /* same size as before */
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.article-prose h2,
.article-resources h2 {
    margin: 2.5rem 0 .9rem;
    padding: 0;
    border: 0;                           /* no underline under headings */
    color: var(--primary-color-2);
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    scroll-margin-top: 90px;             /* anchor jumps don't hide under the navbar */
}

/* ── FIGURES (image + caption + credit, size set per image) ─ */
.article-figure {
    margin: 2rem auto;
    max-width: 100%;
}
.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--card-radius);
    border: var(--bw-thin) solid var(--border);
}
.article-figure figcaption {
    margin-top: .65rem;
    color: var(--a-muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.article-figure .fig-caption {
    display: block;
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.article-figure .fig-num { color: var(--a-head); font-weight: var(--fw-semibold); font-size: inherit; }
.article-figure .fig-credit  { display: block; font-size: var(--fs-xs); font-style: italic; opacity: .85; }

/* ── TAGS + SHARE (end of article) ───────────────────────── */
.article-end {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: var(--bw-thin) solid var(--a-line);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.article-tags,
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

.article-end-label {
    min-width: 3.5rem;
    color: var(--a-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
}

.article-tag {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255,117,24,0.12);
    border: var(--bw-thin) solid rgba(255,117,24,0.3);
    color: var(--primary-color-2);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
}

.share-btn {
    padding: .4rem .95rem;
    border: var(--bw-thin) solid var(--a-line);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--a-text);
    font: inherit;
    font-size: var(--fs-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.share-btn:hover { border-color: var(--a-accent); color: var(--a-accent); }
.share-btn[hidden] { display: none; }

/* spacing around the (unchanged) author box */
.article-wrap .author-strip { margin-top: 2.5rem; }

/* ── RESOURCES: arrow stays on the FIRST line ────────────── */
.article-resources { margin-top: 2.5rem; }
.article-resources h2 { margin-top: 0; font-size: var(--fs-lg); }

.resources-list { list-style: none; margin: 0; padding: 0; }

.resource-row {
    display: flex;
    align-items: flex-start;             /* arrow aligns to the top line, not the middle */
    gap: .7rem;
    margin: 0 0 .9rem;
    line-height: 1.6;
}
.resource-arrow {
    flex: 0 0 auto;
    color: var(--a-accent);
    line-height: 1.6;                    /* same as the link text, so it sits on line 1 */
    transition: transform .3s;
}
.resource-row:hover .resource-arrow { transform: translateX(3px); }

.resource-text {
    color: var(--a-text);
    font-size: var(--fs-md);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* the old arrow from common_specific.css is replaced by .resource-arrow above */
.article-resources .resource-link::before { content: none; }

.article-resources .resource-link {
    display: block;
    padding: 0 0 .15rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    width: auto;
}

/* ── READ FURTHER (compact list) ────────────────────────── */
.read-further {
    max-width: 900px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: var(--bw-thin) solid var(--a-line);
    background: none;
}
.read-further > h2 {
    margin: 0 0 .75rem;
    color: var(--a-head);
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
}
.rf-list { list-style: none; margin: 0; padding: 0; }
.rf-list li { border-bottom: var(--bw-thin) solid var(--a-line); }
.rf-list li:last-child { border-bottom: 0; }
.rf-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: .85rem 0;
    color: var(--a-text);
    text-decoration: none;
}
.rf-main  { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.rf-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--a-head); transition: var(--transition); }
.rf-desc  { font-size: var(--fs-sm); color: var(--a-muted); line-height: 1.5; }
.rf-meta  { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--a-muted); white-space: nowrap; }
.rf-link:hover .rf-title { color: var(--a-accent); }

/* ── SMALL SCREENS ───────────────────────────────────────── */
@media (max-width: 600px) {
    .article-page { padding-top: 2.5rem; }
    .article-prose h2 { font-size: 1.25rem; margin-top: 2rem; }
    .article-abstract { font-size: 1rem; }
    .rf-link { flex-direction: column; gap: .3rem; }
    .rf-meta { white-space: normal; }
    /* on phones, small/medium images would get tiny: keep a sensible minimum */
    .article-figure { min-width: min(100%, 280px); }
}
