/* Sirius News — Frontend Styles
 * Design tokens: gold #C9A962, navy #1b2e4a, dark navy #0b1a2e
 */

/* ─────────────────────────────── Page Wrapper ──────────────────────────── */

.sn-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ─────────────────────────────── Archive Header ────────────────────────── */

.sn-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.sn-archive-title {
    font-size: 2.2rem;
    color: #1b2e4a;
    margin: 0 0 8px;
}

/* ─────────────────────────────── Archive Grid ──────────────────────────── */

.sn-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.sn-archive-grid.sn-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sn-archive-grid.sn-cols-1 {
    grid-template-columns: 1fr;
}

/* ─────────────────────────────── Card ──────────────────────────────────── */

.sn-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sn-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* Card image */
.sn-card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.sn-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.sn-card:hover .sn-card-img img {
    transform: scale(1.05);
}

.sn-card-img--placeholder {
    background: #e8e8e8;
    aspect-ratio: 16 / 9;
}

/* Card body */
.sn-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sn-card-date {
    color: #C9A962;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.sn-card-title {
    font-size: 1.2rem;
    margin: 8px 0;
    color: #1b2e4a;
    line-height: 1.3;
}

.sn-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* ─────────────────────────────── Single Article ────────────────────────── */

/* Layout wrapper — flex container: sticky share column + article column on desktop */
.sn-article-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.sn-article {
    flex: 1 1 720px;
    max-width: 760px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* Hero image — moved BELOW header in markup (Airbnb style) */
.sn-article-hero {
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 40px;
    aspect-ratio: 16 / 9;
}

.sn-article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Article header (above hero) */
.sn-article-header {
    margin-bottom: 28px;
}

.sn-article-title {
    font-size: 2.4rem;
    color: #1b2e4a;
    margin: 0 0 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sn-article-meta {
    color: #717171;
    font-size: 0.9rem;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.sn-article-byline strong {
    text-decoration: underline;
    color: #222;
    font-weight: 500;
}

.sn-article-meta-sep {
    color: #bbb;
}

/* ─────────────────────────────── Share Buttons ─────────────────────────── */

/* Sticky share column (desktop) */
.sn-share-sticky {
    flex: 0 0 44px;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
    padding-top: 2px;
}

/* Inline share row (mobile) — shown below byline */
.sn-share--inline {
    display: none;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
}

.sn-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #e5e5e5;
    color: #222;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
    flex: 0 0 auto;
}

.sn-share-btn:hover {
    background: #1b2e4a;
    border-color: #1b2e4a;
    color: #fff;
}

.sn-share-btn:active {
    transform: scale(0.94);
}

.sn-share-btn:focus-visible {
    outline: 2px solid #C9A962;
    outline-offset: 2px;
}

.sn-share-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Copy-link confirmation toast that briefly appears next to the icons */
.sn-share-toast {
    font-size: 0.8rem;
    color: #1b2e4a;
    background: #f0efe8;
    border: 1px solid #e0dccb;
    padding: 4px 10px;
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    white-space: nowrap;
    margin-top: 8px;
    align-self: center;
}

.sn-share--inline .sn-share-toast {
    margin-top: 0;
    margin-left: 8px;
    align-self: center;
}

.sn-share-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Article content */
.sn-article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.sn-article-content p {
    margin-bottom: 1.2em;
}

.sn-article-content p:last-child {
    margin-bottom: 0;
}

.sn-article-content h2,
.sn-article-content h3,
.sn-article-content h4 {
    color: #1b2e4a;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.sn-article-content a {
    color: #C9A962;
    text-decoration: underline;
}

.sn-article-content img {
    max-width: 100%;
    border-radius: 8px;
    height: auto;
}

/* ─────────────────────────────── Gallery Grid ──────────────────────────── */

.sn-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.sn-gallery-img {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.sn-gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    transition: transform 0.2s ease;
    display: block;
}

.sn-gallery-img:hover img {
    transform: scale(1.05);
}

/* ─────────────────────────────── Lightbox ──────────────────────────────── */

.sn-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.sn-lightbox.open {
    display: flex;
}

.sn-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s ease;
    display: block;
}

.sn-lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.sn-lb-close:hover {
    opacity: 1;
}

.sn-lb-prev,
.sn-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    backdrop-filter: blur(4px);
    line-height: 1;
    padding: 0;
}

.sn-lb-prev:hover,
.sn-lb-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sn-lb-prev {
    left: 20px;
}

.sn-lb-next {
    right: 20px;
}

.sn-lb-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
}

/* ─────────────────────────────── Back Link ─────────────────────────────── */

.sn-back-link {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.sn-back-link a {
    color: #C9A962;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.sn-back-link a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────── Empty State ───────────────────────────── */

.sn-no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.05rem;
}

/* ─────────────────────────────── Pagination ────────────────────────────── */

.sn-page-wrapper .navigation.pagination {
    margin-top: 20px;
    text-align: center;
}

.sn-page-wrapper .navigation.pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.sn-page-wrapper .navigation.pagination a,
.sn-page-wrapper .navigation.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    background: #f5f5f5;
    color: #333;
    transition: background 0.15s, color 0.15s;
}

.sn-page-wrapper .navigation.pagination a:hover {
    background: #C9A962;
    color: #fff;
}

.sn-page-wrapper .navigation.pagination .current {
    background: #1b2e4a;
    color: #fff;
}

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

@media (max-width: 1024px) {
    .sn-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide sticky share column below desktop; show inline share row instead */
@media (max-width: 1023px) {
    .sn-share-sticky {
        display: none;
    }
    .sn-share--inline {
        display: flex;
    }
    .sn-article-layout {
        gap: 0;
    }
    .sn-article {
        flex: 1 1 100%;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .sn-archive-grid {
        grid-template-columns: 1fr;
    }

    .sn-archive-title {
        font-size: 1.8rem;
    }

    .sn-article-title {
        font-size: 1.75rem;
    }

    .sn-article-meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .sn-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sn-lb-prev {
        left: 8px;
    }

    .sn-lb-next {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .sn-page-wrapper {
        padding: 24px 16px 40px;
    }

    .sn-card-body {
        padding: 16px;
    }

    .sn-article-content {
        font-size: 1rem;
    }

    .sn-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}
