/* =========================================================
   CSS VARIABLES — EASY CUSTOMIZATION
========================================================= */

:root {
    --bg-primary: #101214;
    --bg-secondary: #14171a;
    --bg-hover: #1b1f23;
    --text-primary: #e1e3e6;
    --text-secondary: #b7bbc0;
    --text-meta: #a0a4a8;
    --accent: #4da6ff;
    --accent-hover: #66b3ff;
}

/* =========================================================
   BASIC RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   HEADER — TRANSPARENT → DARK ON SCROLL
========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 0;
    z-index: 9999;
    background: transparent;
    transition: background 0.35s ease, padding 0.25s ease;
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 8px 0;
}

.site-header-inner {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-logo {
    display: none !important;
}

/* =========================================================
   NAVIGATION — FULL-WIDTH, EVENLY SPACED
========================================================= */

.site-nav {
    width: 100%;
}

.site-nav ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between !important;
    width: 100%;
    margin: 0;
    padding: 0;
}

.site-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
    transition: color 0.25s ease, opacity 0.25s ease;
    padding: 0 6px;
}

.site-nav a:hover,
.site-nav a:focus {
    color: var(--accent) !important;
    opacity: 1;
}

.site-nav a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

/* =========================================================
   HERO SECTION — TRUE 16:9
========================================================= */

.hero-banner {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: url("../images/hero-cockpit.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    margin-top: 0;
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0,0,0,0.2) 0%, 
        rgba(16,18,20,0.8) 100%);
}

@media (max-width: 768px) {
    .hero-banner {
        aspect-ratio: auto;
        height: 45vh;
        background-position: center;
    }
}

/* =========================================================
   POST FEED — HOMEPAGE GRID
========================================================= */

.post-feed {
    width: 92%;
    max-width: 1200px;
    margin: 60px auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 32px;
}

.post-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    background: var(--bg-hover);
    border-color: rgba(77, 166, 255, 0.2);
    box-shadow: 0 8px 24px rgba(77, 166, 255, 0.1);
}

.post-card-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 16px;
    display: block;
}

.post-card-title {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.post-card-title a {
    transition: color 0.25s ease;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
}

/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    width: 92%;
    max-width: 1200px;
    margin: 40px auto 80px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pagination a {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.pagination a:hover {
    background: var(--accent);
    color: white;
}

/* =========================================================
   PAGE TEMPLATE
========================================================= */

.page-template {
    width: 92%;
    max-width: 780px;
    margin: 120px auto 80px;
}

.page-title {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.page-img {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.page-img img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.75;
}

/* =========================================================
   POST TEMPLATE — FULL-WIDTH ARTICLE
========================================================= */

.post-template {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 120px 0 80px;
}

.post-template .post-header,
.post-template .post-content {
    width: 92%;
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================================
   ARTICLE TITLES — INTER
========================================================= */

.post-title {
    font-family: "Inter", sans-serif !important;
    font-weight: 600;
    font-size: 40px;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 20px;
}

.post-meta {
    color: var(--text-meta);
    font-size: 15px;
    font-weight: 300;
    margin-bottom: 24px;
}

/* =========================================================
   IMAGE SYSTEM — LANDSCAPE CROP ALWAYS
========================================================= */

.post-feature-image {
    margin: 40px 0;
}

.post-feature-image img,
.post-content img,
.kg-image,
.kg-card img {
    width: 100%;
    max-width: 1100px;
    height: 520px;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 30px auto;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .post-feature-image img,
    .post-content img,
    .kg-image,
    .kg-card img {
        height: 380px;
    }
}

/* =========================================================
   ARTICLE TEXT — INTER
========================================================= */

.post-content {
    font-family: "Inter", sans-serif !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.4em;
}

.post-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.7em;
    color: white;
}

.post-content h3 {
    font-size: 22px;
    font-weight: 500;
    margin-top: 1.4em;
    margin-bottom: 0.6em;
    color: white;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--accent-hover);
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background: var(--bg-secondary);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.site-footer-inner {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    color: var(--text-meta);
    font-size: 14px;
}

/* =========================================================
   MOBILE TYPOGRAPHY
========================================================= */

@media (max-width: 768px) {
    .post-title {
        font-size: 28px !important;
    }
    .post-content {
        font-size: 17px;
        line-height: 1.65;
    }
    .post-template {
        padding: 100px 0 60px;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 22px !important;
    }
    .post-content {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* =========================================================
   REQUIRED GHOST KOENIG CLASSES
========================================================= */

.kg-width-wide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* =========================================================
   MOBILE HEADER + HAMBURGER MENU
========================================================= */

.mobile-menu-toggle {
    display: none;
}

.mobile-menu {
    display: none;
}

@media (max-width: 768px) {

    .site-header-inner {
        justify-content: flex-start;
    }

    .site-nav ul {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 14px;
        left: 16px;
        width: 28px;
        height: 22px;
        cursor: pointer;
        z-index: 99999;
    }

    .mobile-menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: white;
        margin-bottom: 6px;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .mobile-menu {
        display: none;
        flex-direction: column;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(8px);
        padding: 22px 0 30px 0;
        position: fixed;
        top: 58px;
        left: 0;
        width: 100%;
        gap: 14px;
        text-align: center;
        z-index: 9998;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    
    .mobile-menu.active {
        display: flex !important;
    }

    .mobile-menu a {
        color: white !important;
        font-size: 18px;
        padding: 10px 0;
        font-weight: 500;
        text-decoration: none;
        transition: opacity 0.25s ease;
        display: block;
    }

    .mobile-menu a:hover {
        opacity: 0.6;
    }
}

/* =========================================================
   MOBILE HERO FIX
========================================================= */

@media (max-width: 768px) {
    .hero-banner {
        height: 300px !important;
        aspect-ratio: unset !important;
        background-position: center top !important;
    }
}

/* =========================================================
   FORCE-HIDE MOBILE MENU ON DESKTOP
========================================================= */

@media (min-width: 769px) {
    .mobile-menu,
    .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
}

/* =========================================================
   END
========================================================= */