/* ─────────────────────────────────────────────
   News-specific styles
   Loaded only on news pages (and pages that
   embed news components: homepage, author, etc.)
   ───────────────────────────────────────────── */

/* ── Author pages (site/author.php) ─────────── */

.author-bio-body {
    padding: 16px;
    line-height: 1.7;
    color: var(--body-text);
}

.author-social-list {
    list-style: none;
    margin: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.author-social-list a,
.author-social-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--body-text);
    text-decoration: none;
}

.author-social-list a:hover {
    color: var(--primary-accent);
}

.author-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: .8rem;
    flex-shrink: 0;
}

.author-social-list a {
    text-decoration: none;
}

/* ── Story body photo captions (bbcode [caption=]/[pic=]/etc.) ── */

.photoCaption {
    max-width: 40%;
    padding: 5px;
}

.photoCaption.right {
    float: right;
    margin-left: 10px;
}

.photoCaption.left {
    float: left;
    margin-right: 10px;
}

.photoCaption img {
    display: block;
    max-width: 100%;
}

.tinyDeets {
    color: #777;
    font-size: 12px;
}

/* ── Story body images ([pic] BBCode) ─────────────────────────────── */

.story-body-media {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
}

figure.story-body-media {
    margin: 16px auto;
}

.story-body-media img {
    display: block;
    max-width: 100%;
    height: auto;
}

.story-body-media.is-full {
    width: 100%;
}

.story-body-media.is-full img {
    width: 100%;
}

.story-body-media.is-float img {
    width: auto;
}

.story-body-media figcaption {
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

/* Floated images can use up to half the desktop story column, but never scale
   above their natural width. */
.story-body-media.is-float {
    float: right;
    max-width: 50%;
    margin: 4px 0 12px 18px;
}

/* [pic gallery] images are square, caption-free thumbnails. Their captions
   are available in the site-wide lightbox after a thumbnail is opened. */
.story-image-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0;
}

.story-image-gallery-thumb {
    display: block;
    aspect-ratio: 1;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #111;
}

.story-image-gallery-thumb:hover,
.story-image-gallery-thumb:focus-visible {
    border-color: var(--primary-accent);
    outline: none;
}

.story-image-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease;
}

.story-image-gallery-thumb:hover img,
.story-image-gallery-thumb:focus-visible img {
    transform: scale(1.04);
}

@media (max-width: 759px) {
    .story-body-media.is-float {
        float: none;
        max-width: 100%;
        margin: 16px 0;
    }

    .story-image-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 760px) {
    .photoCaption {
        max-width: 300px;
    }
}

/* ── Story tags (on full story pages) ──────── */

/* ── Story newsletter signup ───────────────── */

.story-newsletter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin: 24px 16px 16px;
    padding: 18px;
}

.story-newsletter-copy {
    flex: 1 1 270px;
}

.story-newsletter h2 {
    margin: 0;
    font-family: Oswald, sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.story-newsletter h2 span {
    color: var(--primary-accent);
}

.story-newsletter p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.story-newsletter-form {
    flex: 1 1 300px;
}

.story-newsletter-form > a {
    color: var(--ink);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.story-newsletter-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.story-newsletter-form input[type="email"] {
    flex: 1 1 180px;
    min-width: 0;
    height: 42px;
    border: 1px solid var(--line);
    background: #111;
    color: var(--ink);
    padding: 0 12px;
    font: inherit;
}

.story-newsletter-form input[type="email"]:focus {
    border-color: var(--primary-accent);
    outline: none;
}

.story-newsletter-form button {
    height: 42px;
    border: 1px solid var(--primary-accent);
    background: var(--primary-accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .75rem;
    font-weight: 900;
    padding: 0 14px;
    text-transform: uppercase;
}

.story-newsletter-form button:hover,
.story-newsletter-form button:focus-visible {
    background: var(--primary-active);
    border-color: var(--primary-active);
}

.story-newsletter-hp {
    position: absolute;
    left: -9999px;
}

@media (max-width: 759px) {
    .story-newsletter {
        margin-left: 0;
        margin-right: 0;
    }
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.story-tags-label,
.story-tags-list a {
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.story-tags-label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--muted);
}

.story-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.story-tags-list a {
    border: 1px solid #343434;
    background: #0c0c0c;
    color: var(--ink);
    text-decoration: none;
}

.story-tags-list a {
    padding: 5px 8px;
}

.story-tags-list a:hover {
    border-color: var(--primary-accent);
    background: var(--row-hover);
    color: var(--ink);
}

.story-share {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.story-share .tinyDeets {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--muted);
}

.story-share a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--line);
    background: #0b0b0b;
    padding: 5px 8px;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
}

.story-share a:hover {
    border-color: var(--primary-accent);
    background: #171717;
}

/* ── More stories grid (story.php, tags, etc.) */

/* Shared homepage/tour two-column widget styles moved to global.css
   so they apply on every page that renders the widget pair. */

.more-stories {
    border: 1px solid var(--line);
    background: #101010;
}

.more-stories-footer {
    display: grid;
    justify-items: center;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.more-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.more-stories-grid-ad {
    grid-column: 1 / -1;
}

.more-stories .news-card {
    border: 1px solid var(--line);
}

.more-stories .news-card:hover {
    border-color: var(--line);
}

.news-grid-view-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    min-height: 120px;
    transition: border-color .16s ease, color .16s ease;
}

.news-grid-view-all:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

.news-grid-view-all i {
    font-size: 1.2rem;
}

.news-comments-filter {
    border-top: 1px solid var(--line);
    padding: 14px;
}

.news-comments-filter .eyebrow {
    margin-bottom: 10px;
}

.news-comments-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.news-comments-filter-field {
    display: grid;
    gap: 5px;
    flex: 1 1 180px;
    min-width: 0;
}

.news-comments-filter-field span {
    color: var(--muted);
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.news-comments-filter-field select {
    appearance: none;
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--ink);
    cursor: pointer;
    font-size: .82rem;
    padding: 0 32px 0 10px;
}

.news-comments-filter-field select:focus {
    border-color: var(--primary-accent);
    outline: none;
}

.news-comments-filter-clear {
    align-self: flex-end;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.news-comments-filter-clear:hover {
    border-bottom-color: var(--ink);
    color: var(--ink);
}

/* ── News archive ──────────────────────────── */

.news-archive-hero .section-hero-copy {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
}

.news-archive-hero-row,
.news-archive-hero-text {
    display: grid;
    gap: 10px;
}

.news-archive-hero .section-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: auto;
    grid-row: auto;
}

.archive-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #202020;
}

.archive-year-link {
    display: grid;
    gap: 14px;
    min-height: 88px;
    align-content: center;
    background: #101010;
    padding: 13px 14px;
    color: #fff;
}

.archive-year-link:hover {
    background: var(--row-hover);
}

.archive-year-link strong {
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

.archive-year-link-label {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.archive-year-link-label em {
    color: var(--muted);
    font-size: .68rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
    text-align: right;
}

.archive-story-list {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.archive-month-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--line);
    background: #202020;
}

.archive-month-nav-link {
    display: grid;
    gap: 5px;
    min-height: 82px;
    align-content: center;
    background: #101010;
    padding: 14px;
    color: #fff;
}

.archive-month-nav-link:hover {
    background: var(--row-hover);
}

.archive-month-nav-link span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.archive-month-nav-link strong {
    font-size: 1rem;
    line-height: 1.15;
}

.archive-month-nav-link:last-child {
    justify-items: end;
    text-align: right;
}

.archive-month-nav-link.is-disabled {
    opacity: .52;
}

.archive-month-nav-link.is-disabled:hover {
    background: #101010;
}

.news-archive-year {
    scroll-margin-top: calc(var(--sticky-header-height) + 58px);
}

@media (min-width: 760px) {
    .news-archive-hero-row {
        grid-template-columns: minmax(0, 1fr) 260px;
        align-items: end;
        gap: 18px;
    }

    .news-archive-hero h1 {
        grid-column: auto;
    }

    .news-archive-hero .section-hero-stats {
        align-self: end;
    }

    .archive-year-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .site-author-hero h1 {
        grid-column: 1;
    }

    .site-author-hero .section-hero-stats {
        grid-row: 2;
        align-self: end;
    }
}

.more-stories .news-card-link {
    grid-template-areas:
        "media"
        "heading";
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
}

.more-stories .story-card-heading {
    grid-area: heading;
    align-self: start;
    background: none;
    padding: 0;
}

.more-stories .story-card-preview {
    display: none;
}

.more-stories .story-card h2 {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: .9rem;
    line-height: 1.1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.more-stories .story-meta {
    font-size: .7rem;
}

.more-stories .story-thumb {
    aspect-ratio: 16 / 9;
}

/* ── Tag directory ──────────────────────────── */

.news-tag-directory {
    gap: 18px;
}

.news-tag-subnav {
    border-top: 1px solid var(--line);
}

.news-tag-anchor {
    scroll-margin-top: calc(var(--sticky-header-height) + 58px);
}

.news-tag-list {
    display: grid;
    gap: 1px;
    background: #202020;
}

.news-tag-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 48px;
    background: #0c0c0c;
    color: var(--ink);
    border-bottom: 0;
    padding: 11px 12px;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}

.news-tag-link:hover {
    background: #171717;
    color: var(--ink);
}

.news-tag-link-name {
    min-width: 0;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.news-tag-link-meta {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
}

.news-tag-link:hover .news-tag-link-name {
    color: var(--ink);
}

.news-tag-category-grid {
    display: grid;
    gap: 1px;
    background: #202020;
}

.news-tag-category {
    display: grid;
    align-content: start;
    background: #0f0f0f;
}

.news-tag-category header {
    display: grid;
    gap: 5px;
    min-height: 86px;
    align-content: end;
    border-bottom: 1px solid #202020;
    background:
        linear-gradient(135deg, rgba(160, 0, 28, .14), rgba(255, 255, 255, .02)),
        #111;
    padding: 14px;
}

.news-tag-category h3 {
    margin: 0;
    color: #fff;
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: .95;
    text-transform: uppercase;
}

.news-tag-category .news-tag-list {
    background: transparent;
}

.news-tag-category .news-tag-link {
    border-bottom: 1px solid #202020;
    background: transparent;
}

.news-tag-category .news-tag-link:last-child {
    border-bottom: 0;
}

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

@media (min-width: 760px) and (min-height: 560px) {
    .news-tag-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-tag-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-tag-category .news-tag-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 760px) {
    .news-tags-hero-directory {
        grid-template-columns: minmax(0, 1fr);
    }

    .more-stories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 18px;
    }

    .more-stories .news-card {
        height: auto;
        max-height: none;
    }

    .more-stories .news-card-link {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "media"
            "heading";
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        height: 100%;
        padding: 10px;
    }

    .more-stories .news-card .story-thumb {
        grid-area: media;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .more-stories .news-card .story-card-heading {
        grid-area: heading;
        padding: 0;
    }

    .more-stories .news-card .story-card-preview {
        display: none;
    }
}

@media (min-width: 1180px) and (min-height: 560px) {
    .more-stories-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .news-tag-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* PicVault Grid uses equal columns; Preview wraps uncropped, proportional images
   with a shared height limit and the action tile at the end. */
.story-picvault-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-picvault-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.story-picvault-preview > .media-card {
    display: block;
    flex: 0 1 auto;
    max-width: 100%;
    min-height: 0;
}

.story-picvault-preview > .media-card img {
    width: auto;
    height: auto;
    max-height: 180px;
    aspect-ratio: auto;
    object-fit: contain;
}

.story-picvault-preview > .news-grid-view-all {
    flex: 0 1 180px;
    width: 180px;
    height: 180px;
}

@media (min-width: 760px) {
    .story-picvault-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
