:root {
    --bg-body: #FFFFFF;
    --bg-light-gray: #F2F2F2;
    --text-black: #111111;
    --text-gray: #666666;
    --accent-red: #ff9100;
    /* Belgian Red / Official looking red */
    --accent-dark: #1A1A1A;
    --font-heading: 'Oswald', 'Impact', sans-serif;
    --font-body: 'Roboto', 'Arial', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Roboto:wght@300;400;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-black);
    line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: var(--text-black);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 5px solid var(--accent-red);
    padding: 1.5rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-wrapper {
    margin-left: 2rem;
}

#search-input {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    width: 250px;
    background: #f4f4f4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    /* Slight visual lowering for alignment */
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-dark);
    color: #fff;
    padding: 1rem 2rem;
    border-left: 5px solid var(--accent-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: var(--font-heading);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.highlight-red {
    color: var(--accent-red);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--accent-red);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 2rem;
}

/* Hero */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #333;
    overflow: hidden;
    margin-bottom: 1rem;
    background-image: url('images/antarctic_base_1766694045091.png');
    /* Top Secret Base */
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
}

.category-tag {
    background: var(--accent-dark);
    color: #fff;
    font-family: var(--font-heading);
    padding: 2px 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.hero-section h2 {
    font-size: 3rem;
    line-height: 1;
    margin: 0.5rem 0;
}

.hero-section p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-read-primary {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 1rem;
}

.btn-read-primary:hover {
    background: var(--accent-dark);
}

/* Stories List */
.section-header {
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.red-bar {
    width: 50px;
    height: 4px;
    background: var(--accent-red);
    position: absolute;
    bottom: -2px;
    left: 0;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.story-card {
    background: #fff;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.story-card:hover {
    border-bottom-color: var(--accent-red);
}

.story-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.story-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0.9;
}

.story-card:hover .story-thumb {
    transform: scale(1.05);
    opacity: 1;
}

.evidence-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 5px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.story-hero-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-bottom: 4px solid var(--accent-red);
}

.story-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.story-meta {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.story-card h4 {
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.story-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* Single Story View */
.hidden {
    display: none;
}

.story-view {
    background: #fff;
    padding: 2rem;
    border: 1px solid #ddd;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-back {
    background: none;
    border: none;
    font-family: var(--font-heading);
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-back:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.story-view h1 {
    font-size: 2.5rem;
    margin: 0.5rem 0 1rem 0;
    line-height: 1.1;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 1rem;
}

.meta-line {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', monospace;
    /* Typewriter feel */
}

.story-body {
    font-family: 'Georgia', serif;
    /* Better reading font */
    font-size: 1.1rem;
    line-height: 1.8;
    color: #222;
}

.story-body p {
    margin-bottom: 1.5rem;
}

/* Only apply Drop Cap to stories with 'cinematic' class, and only the first paragraph */
.story-body.cinematic>p:first-of-type::first-letter {
    font-size: 3.5rem;
    float: left;
    margin-right: 0.5rem;
    line-height: 0.8;
    color: var(--accent-red);
    font-family: var(--font-heading);
}

/* Related Docs */
.related-docs-container {
    margin-top: 4rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.related-card {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.related-card:hover {
    border-color: var(--accent-red);
    background: #fff;
}

.related-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.related-card .meta {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar-widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.bg-dark {
    background: var(--accent-dark);
    color: #fff;
}

.bg-dark h4 {
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
}

.trending-list li:last-child {
    border: none;
}

.trending-list a:hover {
    color: var(--accent-red);
}

.border-red {
    border: 2px solid var(--accent-red);
}

.sidebar-widget input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    font-family: var(--font-body);
}

.btn-subscribe {
    width: 100%;
    background: var(--text-black);
    color: #fff;
    border: none;
    padding: 10px;
    font-family: var(--font-heading);
    cursor: pointer;
}

.btn-subscribe:hover {
    background: var(--accent-red);
}

/* Footer */
.site-footer {
    background: var(--bg-light-gray);
    border-top: 1px solid #ddd;
    padding: 3rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: #555;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
}

.footer-links a {
    margin-left: 20px;
    color: #555;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-overlay {
        width: 100%;
        clip-path: none;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comments-list {
    margin-top: 2rem;
}

.comment-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: var(--accent-dark);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.comment-author {
    font-weight: bold;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.comment-date {
    font-size: 0.75rem;
    color: #888;
    font-family: var(--font-body);
}

.comment-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.comment-rating {
    color: var(--accent-red);
    font-size: 0.9rem;
}

/* Comment Form */
.add-comment-form {
    background: #f9f9f9;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #ddd;
    border-left: 4px solid var(--accent-red);
}

.add-comment-form h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.add-comment-form input,
.add-comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: #fff;
}

.add-comment-form input:focus,
.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

.add-comment-form textarea {
    height: 80px;
    resize: vertical;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.new-comment {
    animation: slideIn 0.5s ease;
    background: #fff9f0; /* Slight highlight for new comment */
    border: 1px solid #ffeebb;
    padding: 1rem;
    border-radius: 4px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Native Banner Ad */
.native-banner {
    width: 100%;
    background: #f9f9f9;
    border: 2px solid var(--accent-red);
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.native-banner:hover {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.native-banner h3 {
    color: var(--accent-red);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.native-banner p {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.1rem;
    max-width: 600px;
}

.native-banner .ad-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-red);
    color: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Header Stack */
    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem;
    }

    .logo-wrapper {
        text-align: center;
    }

    .logo {
        font-size: 1.8rem;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 1.2rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem 1.5rem;
        width: 100%;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .search-wrapper {
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #search-input {
        width: 100%;
        max-width: 100%;
    }

    /* Hero Section Adjustments */
    .hero-section {
        height: auto;
        min-height: 450px;
        display: flex;
        align-items: flex-end;
    }

    .hero-overlay {
        position: relative;
        width: 100%;
        clip-path: none;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.98);
        bottom: auto;
        left: auto;
    }

    .hero-section h2 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    /* Layout & Spacing */
    .container {
        padding: 0 1rem;
    }

    .content-wrapper {
        margin-top: 1rem;
        gap: 2rem;
    }

    /* Ensure Grids are Single Column */
    .stories-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar adjustments */
    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding: 1.2rem;
    }

    /* Story View Mobile */
    .story-view {
        padding: 1.2rem;
    }

    .story-view h1 {
        font-size: 1.8rem;
    }

    .story-body.cinematic>p:first-of-type::first-letter {
        font-size: 3rem;
        margin-right: 0.3rem;
    }

    /* Footer */
    .site-footer {
        padding: 2rem 0;
        margin-top: 2rem;
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links a {
        margin-left: 0;
    }
}