/* Naval Analysis — Professional Military News Theme */
:root {
    --bg-dark: #0a0d12;
    --bg-card: #111820;
    --bg-header: #0c1018;
    --bg-accent: #1a1f2e;
    --text-main: #e8eaed;
    --text-muted: #8b949e;
    --red: #e63226;
    --red-dark: #b5221a;
    --yellow: #ffd500;
    --blue: #3ea6ff;
    --green: #2ecc71;
    --orange: #ff8c00;
    --border: #1e2530;
    --glow-red: rgba(230, 50, 38, 0.15);
}

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

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* ═══════════ HEADER ═══════════ */
.top-bar {
    background: var(--red);
    padding: 4px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
}

.top-bar .live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: blink 1s infinite;
}

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

header {
    background: linear-gradient(180deg, var(--bg-header) 0%, #0e1420 100%);
    border-bottom: 3px solid var(--red);
    padding: 0;
}

.header-main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-main);
}

.logo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--red);
    box-shadow: 0 0 12px var(--glow-red);
}

.logo-text {
    font-size: 1.5em;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo-sub {
    font-size: 0.6em;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

nav a:hover {
    color: white;
    background: rgba(230, 50, 38, 0.15);
}

nav a.active {
    color: white;
    background: var(--red);
}

.nav-yt {
    background: var(--red) !important;
    color: white !important;
    border-radius: 4px;
    font-weight: 700;
}

/* ═══════════ BREAKING TICKER ═══════════ */
.ticker-wrap {
    background: #111;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--red);
    color: white;
    padding: 8px 16px;
    font-size: 0.78em;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 1px;
    flex-shrink: 0;
    text-transform: uppercase;
    position: relative;
}

.ticker-label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border: 16px solid transparent;
    border-left: 10px solid var(--red);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    padding-left: 20px;
}

.ticker-scroll {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 35s linear infinite;
    font-size: 0.82em;
    color: var(--yellow);
    font-weight: 600;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ═══════════ MAIN ═══════════ */
main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red);
}

.section-header h2 {
    font-size: 0.95em;
    font-weight: 800;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ═══════════ HERO / FEATURED ═══════════ */
.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 36px;
}

.hero-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.3s;
}

.hero-main:hover {
    border-color: var(--red);
}

.hero-main img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.hero-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--red);
    color: white;
    padding: 4px 14px;
    font-size: 0.72em;
    font-weight: 800;
    border-radius: 3px;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: blink 2s infinite;
}

.hero-body {
    padding: 20px;
}

.hero-date {
    font-size: 0.72em;
    color: var(--red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 1.5em;
    font-weight: 900;
    margin: 8px 0;
    line-height: 1.2;
}

.hero-excerpt {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

.hero-tag {
    display: inline-block;
    background: var(--red);
    color: white;
    font-size: 0.7em;
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 700;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 3px solid var(--red);
}

.hero-side-card:hover {
    background: var(--bg-accent);
    border-color: var(--red);
    transform: translateX(4px);
}

.hero-side-card .date {
    font-size: 0.7em;
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-side-card h3 {
    font-size: 0.95em;
    font-weight: 700;
    margin-top: 6px;
    line-height: 1.3;
}

/* ═══════════ POST GRID ═══════════ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--red);
    box-shadow: 0 8px 30px rgba(230, 50, 38, 0.1);
}

.post-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.post-card .card-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--red);
    color: white;
    font-size: 0.65em;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.post-card-date {
    font-size: 0.72em;
    color: var(--red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-card-title {
    font-size: 1em;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.3;
}

.post-card-excerpt {
    font-size: 0.82em;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ═══════════ SIDEBAR STATS ═══════════ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--blue);
}

.stat-label {
    font-size: 0.72em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ═══════════ POST DETAIL ═══════════ */
.post-detail {
    max-width: 860px;
    margin: 0 auto;
}

.post-detail .breadcrumb {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-detail .breadcrumb a {
    color: var(--blue);
    text-decoration: none;
}

.post-detail h1 {
    font-size: 2em;
    font-weight: 900;
    margin-bottom: 14px;
    line-height: 1.15;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta .author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.post-content {
    font-size: 1.05em;
    line-height: 1.85;
}

.post-content p {
    margin-bottom: 18px;
}

.post-tags {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.tag {
    display: inline-block;
    background: var(--bg-accent);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78em;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 3px;
    transition: all 0.2s;
}

.tag:hover {
    border-color: var(--red);
    color: var(--red);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.post-nav a {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 600;
    transition: color 0.2s;
}

.post-nav a:hover { color: var(--red); }

/* ═══════════ FOOTER ═══════════ */
footer {
    background: var(--bg-header);
    border-top: 3px solid var(--red);
    margin-top: 60px;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.footer-brand span {
    font-size: 1.2em;
    font-weight: 800;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85em;
    line-height: 1.6;
}

.footer-title {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
}

footer ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88em;
    transition: color 0.2s;
}

footer ul a:hover { color: var(--red); }

.footer-bottom {
    text-align: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78em;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.2em; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .header-main { flex-direction: column; gap: 10px; }
    nav { flex-wrap: wrap; justify-content: center; }
    .post-detail h1 { font-size: 1.4em; }
}
