/* Tomorrow Next - Main Stylesheet
 * Dark theme magazine design
 * Colors: Background #0a0a0a, Accent #ffa301, Text #ffffff / #a0a0a0
 * Font: Heebo
 */

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', Verdana, Geneva, sans-serif;
    background-color: #0a0a0a;
    color: #d0d0d0;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ffa301;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff;
    font-weight: 500;
    line-height: 1.35;
}

/* ============ Layout ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-layout {
    display: flex;
    gap: 40px;
    padding: 30px 0 60px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.single-column .content-main {
    max-width: 800px;
    margin: 0 auto;
}

/* ============ Header ============ */
.site-header {
    background: rgba(10, 10, 10, 0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 70px;
    gap: 30px;
}

.site-main {
    padding-top: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    width: auto;
    display: block;
}

.site-logo .logo-img {
    height: 70px;
}

.footer-logo .logo-img {
    height: 55px;
}

.logo-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    text-transform: lowercase;
}

.logo-icon {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0;
}

.nav-links li a {
    padding: 24px 16px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #c0c0c0;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #ffa301;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-social {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-shrink: 0;
}

.header-social a {
    color: #808080;
    transition: color 0.2s;
}

.header-social a:hover {
    color: #ffffff;
}

/* ============ Hero Section ============ */
.hero-section {
    margin-top: -70px;
    margin-bottom: 10px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.hero-card {
    display: block;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    min-height: 500px;
    text-decoration: none;
}

/* Top gradient fade */
.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, #0a0a0a, transparent);
    z-index: 2;
    pointer-events: none;
}

.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.hero-card:hover .hero-image {
    transform: scale(1.03);
}

.hero-no-image {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px max(20px, calc((100% - 1200px) / 2 + 20px)) 40px;
    background: linear-gradient(transparent, #0a0a0a);
    z-index: 2;
}

.hero-title {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 12px;
    max-width: 700px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.hero-excerpt {
    color: #a0a0a0;
    font-size: 15px;
    max-width: 600px;
    line-height: 1.5;
}

/* ============ Category Badge ============ */
.category-badge {
    display: inline-block;
    border: 1px solid rgba(255, 163, 1, 0.5);
    color: #ccc;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background-color 0.2s;
}

.category-badge:hover {
    background-color: #ffa301;
    color: #000000;
}

/* ============ Story Cards ============ */
.story-list {
    display: flex;
    flex-direction: column;
}

.story-card {
    border-bottom: 1px solid #1a1a1a;
}

.story-card:last-child {
    border-bottom: none;
}

.story-card-inner {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    text-decoration: none;
}

.story-card-image {
    width: 300px;
    flex-shrink: 0;
}

.story-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.no-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.story-card-content {
    flex: 1;
    min-width: 0;
}

.story-card-title {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #ffffff;
    transition: color 0.2s;
}

.story-card:hover .story-card-title {
    color: #ffa301;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.story-card-meta time {
    color: #808080;
    font-size: 13px;
}

.story-card-excerpt {
    color: #808080;
    font-size: 14px;
    line-height: 1.6;
}

/* ============ Category Page ============ */
.category-header {
    padding: 50px 0 10px;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid #444;
    color: #c0c0c0;
    font-size: 13px;
    transition: all 0.2s;
}

.category-tag:hover,
.category-tag.active {
    border-color: #ffa301;
    color: #ffa301;
}

/* ============ Single Story ============ */
.story-header {
    padding: 50px 0 10px;
}

.story-title {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 16px;
    max-width: 800px;
}

.story-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.story-meta time {
    color: #808080;
    font-size: 14px;
}

.story-featured-image {
    margin-bottom: 30px;
}

.story-featured-image img {
    width: 100%;
    border-radius: 0;
}

/* Prose / Rich text content */
.prose {
    font-size: 16px;
    line-height: 1.8;
    color: #c0c0c0;
}

.prose h2 {
    font-size: 26px;
    margin: 36px 0 16px;
}

.prose h3 {
    font-size: 22px;
    margin: 28px 0 12px;
}

.prose p {
    margin-bottom: 18px;
}

.prose img {
    margin: 24px 0;
    border-radius: 0;
}

.prose a {
    color: #ffa301;
    text-decoration: underline;
}

.prose blockquote {
    border-left: 3px solid #ffa301;
    padding: 12px 20px;
    margin: 24px 0;
    color: #a0a0a0;
    font-style: italic;
}

.prose ul,
.prose ol {
    margin: 16px 0;
    padding-left: 24px;
}

.prose li {
    margin-bottom: 6px;
}

.prose pre {
    background: #111;
    padding: 16px;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
}

.prose code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.prose hr {
    border: none;
    border-top: 2px solid #333;
    margin: 32px 0;
}

/* Responsive YouTube embeds */
.prose .lexical-youtube,
.prose div[data-youtube-id] {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    margin: 24px 0;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
}

.prose .lexical-youtube iframe,
.prose div[data-youtube-id] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Tweet embeds */
.prose .lexical-tweet,
.prose div[data-tweet-url],
.prose div[data-tweet-id] {
    margin: 24px auto;
    max-width: 550px;
    min-height: 100px;
}

.prose .lexical-tweet iframe,
.prose div[data-tweet-url] iframe,
.prose div[data-tweet-id] iframe {
    width: 100%;
    border: none;
    min-height: 250px;
}

/* Tables in content */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.prose th,
.prose td {
    border: 1px solid #333;
    padding: 10px 14px;
    text-align: left;
}

.prose th {
    background: #333 !important;
    font-weight: 700;
    color: #fff;
}

.prose td {
    background: #0d0d0d;
}

/* Share buttons */
.story-share {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-share span {
    color: #808080;
    font-size: 14px;
}

.share-link {
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid #333;
    transition: all 0.2s;
}

.share-link:hover {
    border-color: #ffa301;
    color: #ffa301;
}

/* ============ Sidebar ============ */
.sidebar {
    width: 320px;
    flex-shrink: 0;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    border: 1px solid #333;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: #ffffff;
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

.search-btn {
    background: transparent;
    border: none;
    border-left: 1px solid #333;
    padding: 10px 14px;
    color: #808080;
    cursor: pointer;
    transition: color 0.2s;
}

.search-btn:hover {
    color: #ffffff;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
}

.widget-title svg {
    color: #ffa301;
}

.widget-stories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-story {
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.widget-story-image {
    width: 80px;
    flex-shrink: 0;
}

.widget-story-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
}

.widget-story-info h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.widget-story:hover .widget-story-info h4 {
    color: #ffa301;
}

.widget-story-info time {
    font-size: 12px;
    color: #808080;
}

/* ============ Pagination ============ */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 30px 0;
    justify-content: center;
}

.page-link {
    padding: 8px 14px;
    font-size: 14px;
    color: #808080;
    border: 1px solid #333;
    transition: all 0.2s;
}

.page-link:hover {
    color: #ffffff;
    border-color: #ffa301;
}

.page-link.active {
    background: #ffa301;
    color: #000;
    border-color: #ffa301;
}

.page-dots {
    padding: 8px 4px;
    color: #666;
}

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #808080;
}

/* ============ Footer ============ */
.site-footer {
    background: #050505;
    border-top: 1px solid #1a1a1a;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    gap: 60px;
}

.footer-brand {
    flex: 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-tagline {
    color: #666;
    font-size: 14px;
}

.footer-nav h4,
.footer-social h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: #ffa301;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 8px;
}

.footer-nav a {
    color: #808080;
    font-size: 14px;
}

.footer-nav a:hover {
    color: #ffa301;
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-links a {
    color: #808080;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #ffa301;
}

.footer-bottom {
    border-top: 1px solid #1a1a1a;
    padding: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #555;
    font-size: 13px;
}

/* ============ Back to Top ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #ffa301;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #ffb733;
}

.back-to-top svg {
    color: #000;
}

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ffa301;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: #ffb733;
    color: #000;
}

/* ============ Search Results ============ */
.search-results-count {
    color: #808080;
    font-size: 14px;
}

/* ============ Page Content ============ */
.page-header {
    padding: 30px 0 20px;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 30px;
}

.page-content {
    padding-bottom: 40px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }

    .hero-title {
        font-size: 28px;
    }

    .story-card-image {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .site-header {
        backdrop-filter: none;
        background: rgba(10, 10, 10, 0.9);
    }

    .header-inner {
        height: 60px;
    }

    .site-main {
        padding-top: 60px;
    }

    .hero-section {
        margin-top: -60px;
    }

    .nav-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        border-top: 1px solid rgba(255, 163, 1, 0.2);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    }

    .nav-links.open {
        max-height: 400px;
        opacity: 1;
        padding: 8px 0 12px;
    }

    .nav-links li {
        opacity: 0;
        transform: translateX(-12px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.open li:nth-child(1) {
        transition-delay: 0.05s;
    }

    .nav-links.open li:nth-child(2) {
        transition-delay: 0.1s;
    }

    .nav-links.open li:nth-child(3) {
        transition-delay: 0.15s;
    }

    .nav-links.open li:nth-child(4) {
        transition-delay: 0.2s;
    }

    .nav-links.open li:nth-child(5) {
        transition-delay: 0.25s;
    }

    .nav-links.open li:nth-child(6) {
        transition-delay: 0.3s;
    }

    .nav-links li a {
        padding: 14px 24px;
        font-size: 16px;
        border-left: 2px solid transparent;
        transition: border-color 0.2s, color 0.2s, padding-left 0.2s;
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        border-left-color: #ffa301;
        padding-left: 30px;
    }

    .header-social {
        display: none;
    }

    .content-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .hero-card {
        min-height: 350px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-overlay {
        padding: 40px 20px 20px;
    }

    .story-card-inner {
        flex-direction: column;
        gap: 14px;
    }

    .story-card-image {
        width: 100%;
    }

    .story-card-image img {
        height: 200px;
    }

    .story-title {
        font-size: 26px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 30px;
    }

    .story-share {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-card {
        min-height: 280px;
    }

    .hero-title {
        font-size: 20px;
    }

    .category-title {
        font-size: 24px;
    }

    .story-card-title {
        font-size: 18px;
    }
}

/* ============ Story Featured Image ============ */
.story-featured-image {
    margin: 0 0 24px;
}

.story-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.story-featured-image figcaption {
    padding: 10px 0;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    border-bottom: 1px solid #1a1a1a;
}

/* ============ Inline Content Images ============ */
figure.lexical-image {
    margin: 28px 0;
}

figure.lexical-image img {
    width: 100%;
    height: auto;
    display: block;
}

figure.lexical-image figcaption {
    padding: 10px 0;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    border-bottom: 1px solid #1a1a1a;
}

/* ============ Gallery Display ============ */
.gallery-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.gallery-figure {
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    background: #111;
    transition: transform 0.3s;
}

.gallery-figure:hover {
    transform: scale(1.02);
}

.gallery-figure img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s;
}

.gallery-figure:hover img {
    opacity: 0.85;
}

.gallery-figure figcaption {
    padding: 10px 14px;
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.4;
}

/* ============ Lightbox ============ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 20px;
    line-height: 1;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-caption {
    color: #d0d0d0;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
    max-width: 600px;
}

.lightbox-counter {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .gallery-display {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 32px;
        padding: 12px;
    }
}

/* ============ Story Taxonomy ============ */
.story-taxonomy {
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.taxonomy-label {
    font-size: 13px;
    color: #666;
    margin-right: 8px;
}

.story-tags, .story-entities {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tag-pill {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid rgba(255, 163, 1, 0.4);
    color: #ccc;
    font-size: 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: rgba(255, 163, 1, 0.15);
    border-color: #ffa301;
    color: #ffa301;
}

.entity-pill {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    color: #bbb;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.entity-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #555;
}

/* ============ Related Stories ============ */
.related-stories {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #1a1a1a;
}

.related-stories h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #fff;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-card {
    text-decoration: none;
    color: #ccc;
    transition: color 0.2s;
}

.related-card:hover {
    color: #ffa301;
}

.related-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    margin-bottom: 8px;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card h4 {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-card {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .related-card-image {
        width: 80px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

/* ============ Archive ============ */
.archive-description {
    color: #888;
    font-size: 15px;
    margin-top: 4px;
}

.archive-content {
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1a1a1a;
}

.widget-tags, .widget-entities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Image alignment */
.lexical-image {
    margin: 16px 0;
    text-align: center;
}

.lexical-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.lexical-image figcaption {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

figure.lexical-image.lexical-image-float-left {
    float: left;
    width: 40%;
    margin: 4px 20px 12px 0;
    text-align: left;
}

figure.lexical-image.lexical-image-float-right {
    float: right;
    width: 40%;
    margin: 4px 0 12px 20px;
    text-align: left;
}

.lexical-image-float-left img,
.lexical-image-float-right img {
    width: 100%;
}

/* Raw HTML Embeds (Sketchfab, CodePen, etc.) */
.lexical-raw-html {
    margin: 24px 0;
}

.lexical-raw-html iframe {
    max-width: 100%;
    display: block;
}

/* ============ Newsletter Form ============ */
.footer-newsletter {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    border-top: 1px solid #1a1a1a;
    text-align: center;
}

.footer-newsletter h4 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: #ffa301;
}

.footer-newsletter p {
    color: #666;
    font-size: 14px;
    margin-bottom: 14px;
}

.newsletter-form {
    display: flex;
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid #333;
}

.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: #ffffff;
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    outline: none;
}

.newsletter-input::placeholder {
    color: #666;
}

.newsletter-btn {
    background: #ffa301;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #ffb733;
}

.newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-msg {
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.newsletter-msg.success {
    color: #4caf50;
}

.newsletter-msg.error {
    color: #ef5350;
}

/* ============ Ad Slots ============ */
.ad-slot {
    margin: 20px 0;
    text-align: center;
    overflow: hidden;
}

.ad-slot:empty {
    display: none;
}

@media (max-width: 768px) {
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-btn {
        width: 100%;
    }
}

/* ============ Lightbox ============ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    cursor: pointer;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    cursor: default;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    z-index: 2;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    cursor: pointer;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}
.lightbox-nav:hover {
    color: #ffa301;
    background: rgba(255, 163, 1, 0.1);
    border-color: rgba(255, 163, 1, 0.3);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 13px;
    letter-spacing: 0.05em;
}
.lightbox-caption {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 14px;
    max-width: 80vw;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .lightbox-nav { display: none; }
    .lightbox-overlay img {
        max-width: 96vw;
        max-height: 80vh;
    }
}

/* Make story images clickable with expand indicator */
.img-expand-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    cursor: pointer;
}
.img-expand-wrap::after {
    content: '+';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    font-size: 18px;
    font-weight: 300;
    line-height: 26px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 2;
}
.img-expand-wrap:hover::after {
    opacity: 1;
}
.story-content .img-expand-wrap::after {
    top: 32px;
}
.img-expand-wrap img {
    cursor: pointer;
}

/* ============ Callout ============ */
.lexical-callout {
    margin: 24px 0;
    padding: 18px 24px;
    border-top: 2px solid #ffa301;
    border-bottom: 2px solid #ffa301;
    text-align: center;
}
.lexical-callout-float-left {
    float: left;
    width: 40%;
    margin: 4px 24px 16px 0;
}
.lexical-callout-float-right {
    float: right;
    width: 40%;
    margin: 4px 0 16px 24px;
}
@media (max-width: 768px) {
    .lexical-callout-float-left,
    .lexical-callout-float-right {
        float: none;
        width: 100%;
        margin: 24px 0;
    }
}