﻿/* =========================
   RESET + VARIABLES
========================= */
:root {
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --accent: #2563eb;
    --bg: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 16px;
}

/* =========================
   HEADER
========================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo img {
    height: 40px;
}

.main-nav {
    display: flex;
    gap: 20px;
}

    .main-nav a {
        text-decoration: none;
        color: var(--text);
        font-weight: 600;
        font-size: 15px;
    }

/* =========================
   HERO
========================= */
.hero {
    margin-top: 16px;
}

.hero-card {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
}

    .hero-card img {
        width: 100%;
        height: 420px;
        object-fit: cover;
    }

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient( to top, rgba(0,0,0,0.75), rgba(0,0,0,0.15), transparent );
    color: #fff;
}

    .hero-overlay h1 {
        font-family: "Playfair Display", serif;
        font-size: 32px;
        line-height: 1.25;
        margin: 0 0 8px 0;
    }

    .hero-overlay time {
        font-size: 14px;
        opacity: 0.85;
    }

/* =========================
   GRID
========================= */
.content-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

/* =========================
   SECTION TITLES
========================= */
.section-title {
    font-size: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

/* =========================
   NEWS CARD
========================= */
.news-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

    .news-card img {
        width: 96px;
        height: 96px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
    }

    .news-card h3,
    .news-card h4 {
        font-size: 16px;
        margin: 0 0 6px 0;
        line-height: 1.4;
    }

    .news-card a {
        text-decoration: none;
        color: var(--text);
    }

    .news-card time {
        font-size: 13px;
        color: var(--muted);
    }

/* =========================
   ARTICLE PAGE
========================= */
.article-layout {
    display: grid;
    grid-template-columns: 3fr 1.2fr;
    gap: 40px;
    margin-top: 32px;
}

.article-title {
    font-family: "Playfair Display", serif;
    font-size: 34px;
    line-height: 1.25;
}

.article-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.article-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    margin: 24px 0;
}

.article-content {
    font-size: 17px;
    line-height: 1.75;
}

.share-bar {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

    .share-bar a {
        text-decoration: none;
        font-weight: 600;
        color: var(--accent);
    }

/* =========================
   COMMENTS
========================= */
.comment-box {
    margin: 48px 0;
    max-width: 700px;
}

    .comment-box input,
    .comment-box textarea {
        width: 100%;
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        font-size: 15px;
    }

        .comment-box button,
        .comment-box input[type=submit] {
            background: var(--accent);
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
        }

/* =========================
   MOBILE (THIS IS THE KEY)
========================= */
@media (max-width: 900px) {

    .content-grid,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .hero-card img {
        height: 300px;
    }

    .hero-overlay h1 {
        font-size: 24px;
    }

    .main-nav {
        display: none; /* simple version; add hamburger later */
    }

    .news-card img {
        width: 80px;
        height: 80px;
    }

    .article-title {
        font-size: 26px;
    }
}

/* =========================
   HAMBURGER
========================= */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

    .hamburger span {
        width: 24px;
        height: 3px;
        background: var(--text);
        border-radius: 2px;
    }

/* =========================
   MOBILE NAV
========================= */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--border);
}

    .mobile-nav a {
        padding: 14px 20px;
        text-decoration: none;
        color: var(--text);
        font-weight: 600;
        border-bottom: 1px solid var(--border);
    }

/* =========================
   RESPONSIVE SWITCH
========================= */
@media (max-width: 900px) {

    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-nav.open {
        display: flex;
    }
}