:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3ff;
    --ink: #111827;
    --muted: #64748b;
    --line: #dbe3ef;
    --primary: #102a63;
    --primary-2: #2148ff;
    --accent: #e8144d;
    --accent-2: #ffb703;
    --success: #0f9f6e;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
}

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

img { max-width: 100%; display: block; }

button, input, select, textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.top-strip {
    background: #07152e;
    color: #dbeafe;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.top-strip-inner {
    display: flex;
    justify-content: center;
    gap: 28px;
    min-height: 34px;
    align-items: center;
    text-transform: uppercase;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.masthead {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--accent));
    font-weight: 900;
    letter-spacing: -0.05em;
    box-shadow: var(--shadow);
}

.brand-text strong {
    display: block;
    font-size: clamp(24px, 3.2vw, 40px);
    letter-spacing: -0.07em;
    line-height: 1;
}

.brand-text small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.masthead-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    overflow: hidden;
}

.search-form input {
    width: 190px;
    border: 0;
    padding: 11px 14px;
    outline: none;
    background: transparent;
}

.search-form button,
.pill-link,
.btn {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-form button:hover,
.pill-link:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(16, 42, 99, 0.16);
}

.pill-link.outline,
.btn.outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--line);
}

.news-nav {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,0.94);
}

.nav-inner {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 800;
}

.nav-links a {
    color: #1f2937;
    position: relative;
    padding: 14px 0;
}

.nav-links a:hover { color: var(--primary-2); }

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    height: 3px;
    border-radius: 99px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .15s ease;
}

.nav-links a:hover::after { transform: scaleX(1); }

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

.announcement {
    background: linear-gradient(90deg, #ffedf3, #eff6ff);
    border-top: 1px solid #ffd0de;
    color: #5b1228;
}

.announcement.blue { background: linear-gradient(90deg, #eaf1ff, #f8fbff); color: #132f67; }
.announcement.green { background: linear-gradient(90deg, #e9fff6, #f4fffb); color: #065f46; }
.announcement.gold { background: linear-gradient(90deg, #fff7da, #fffdf4); color: #7a4d00; }

.announcement-inner {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.announcement strong {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.announcement a {
    margin-left: auto;
    font-weight: 800;
    color: var(--primary-2);
}

.flash {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    font-weight: 700;
}

.flash-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.flash-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.flash-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

.hero-wrap {
    padding: 26px 0 34px;
}

.ad-banner,
.breaking-banner {
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(90deg, #1c1a73, #2148ff, #20c997);
    color: #fff;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 16px;
}

.breaking-banner {
    justify-content: flex-start;
    gap: 14px;
    min-height: auto;
    background: #07152e;
}

.breaking-label {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.breaking-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #e5edff;
    font-weight: 800;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .9fr);
    gap: 20px;
}

.lead-story,
.panel,
.card,
.news-card,
.video-card,
.auth-card,
.page-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lead-story {
    overflow: hidden;
}

.lead-image {
    height: 420px;
    background: #d9e4f7;
}

.lead-image img,
.news-thumb img,
.story-image img,
.video-poster img,
.side-image img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lead-content { padding: 22px; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.lead-content h1,
.story-title {
    margin: 10px 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.summary,
.story-summary {
    color: #475569;
    font-size: 17px;
}

.meta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-top: 14px;
}

.side-stack {
    display: grid;
    gap: 14px;
}

.side-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.side-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.side-image {
    border-radius: 12px;
    overflow: hidden;
    min-height: 102px;
    background: #e2e8f0;
}

.side-card h3 {
    margin: 4px 0 8px;
    font-size: 16px;
    line-height: 1.25;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.section {
    padding: 22px 0;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.section-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.news-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.news-thumb {
    height: 190px;
    background: #dbeafe;
    position: relative;
}

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(7, 21, 46, 0.86);
    color: #fff;
    font-weight: 900;
}

.news-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.news-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.news-card p {
    margin: 0;
    color: var(--muted);
}

.video-strip {
    background: #07152e;
    color: #fff;
    padding: 34px 0;
    margin: 30px 0;
}

.video-strip .section-header p { color: #b9c8e8; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.video-card {
    background: #0c1d3e;
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    overflow: hidden;
}

.video-card-content { padding: 16px; }

.video-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.2;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 12px;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-poster {
    height: 230px;
    background: #1e293b;
    position: relative;
}

.portal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.panel { padding: 18px; }

.panel h3 { margin: 0 0 12px; }

.trending-list {
    display: grid;
    gap: 12px;
    counter-reset: item;
}

.trending-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.trending-list a::before {
    counter-increment: item;
    content: counter(item);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gallery-item {
    height: 150px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #e2e8f0;
    position: relative;
}

.gallery-item span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    color: #fff;
    background: rgba(7, 21, 46, .72);
    border-radius: 10px;
    padding: 7px 9px;
    font-weight: 800;
    font-size: 12px;
}

.page-panel {
    padding: 24px;
    margin: 26px auto;
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.story-main {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.story-image {
    height: min(62vw, 560px);
    min-height: 310px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #e2e8f0;
    cursor: zoom-in;
    margin: 18px 0 8px;
}

.image-caption {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 20px;
}

.story-body {
    font-size: 19px;
    line-height: 1.85;
    color: #1f2937;
}

.story-body p { margin: 0 0 18px; }

.comments {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.comment {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
    margin-bottom: 12px;
}

.comment strong { display: block; }
.comment small { color: var(--muted); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-full { grid-column: 1 / -1; }

.form-field label {
    display: block;
    font-weight: 900;
    margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 13px 14px;
    outline: none;
}

.form-field textarea { min-height: 180px; resize: vertical; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(33, 72, 255, 0.11);
}

.form-help {
    display: block;
    color: var(--muted);
    margin-top: 7px;
    font-size: 13px;
}

.auth-card {
    max-width: 560px;
    margin: 34px auto;
    padding: 26px;
}

.auth-card h1,
.page-panel h1 {
    margin-top: 0;
    letter-spacing: -0.04em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #fff, #eef4ff);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th { background: #f1f5f9; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-published { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-draft { background: #e2e8f0; color: #334155; }

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions select,
.admin-actions button,
.small-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.small-button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.small-button.danger { background: #991b1b; color: #fff; border-color: #991b1b; }

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 28px;
}

.image-lightbox[hidden] { display: none; }

.image-lightbox img {
    max-width: min(1200px, 96vw);
    max-height: 88vh;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #fff;
}

.site-footer {
    background: #07152e;
    color: #dce8ff;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
    padding: 36px 0;
}

.footer-grid h3,
.footer-grid h4 { color: #fff; margin-top: 0; }
.footer-grid p { color: #b9c8e8; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    min-height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    color: #9fb3d9;
    font-size: 13px;
}

@media (max-width: 980px) {
    .masthead { align-items: flex-start; flex-direction: column; padding: 18px 0; }
    .masthead-actions { width: 100%; justify-content: flex-start; }
    .search-form input { width: min(48vw, 260px); }
    .hero-grid,
    .portal-layout,
    .story-layout { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 22px, 1180px); }
    .top-strip-inner { gap: 10px; font-size: 10px; flex-wrap: wrap; padding: 7px 0; }
    .brand-text strong { font-size: 26px; }
    .brand-mark { width: 48px; height: 48px; }
    .mobile-menu-button {
        display: inline-flex;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        padding: 9px 12px;
        font-weight: 900;
        margin: 8px 0;
    }
    .nav-inner { align-items: flex-start; flex-direction: column; }
    .nav-links { display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
    .nav-links.is-open { display: flex; }
    .nav-links a { border-top: 1px solid var(--line); padding: 12px 0; }
    .hero-wrap { padding-top: 16px; }
    .lead-image { height: 280px; }
    .side-card { grid-template-columns: 110px 1fr; }
    .news-grid,
    .video-grid,
    .form-grid,
    .footer-grid { grid-template-columns: 1fr; }
    .story-main { padding: 16px; }
    .story-body { font-size: 17px; }
    .footer-bottom { flex-direction: column; gap: 4px; padding: 12px; }
}

/* Mobile header fix: on phones the header must scroll away, not stay fixed.
   This keeps the news content visible on small screens after adding a logo. */
@media (max-width: 720px) {
    html { scroll-padding-top: 0; }

    .site-header {
        position: relative;
        top: auto;
        z-index: 20;
    }

    .top-strip {
        display: none;
    }

    .masthead {
        min-height: auto;
        padding: 10px 0 8px;
        gap: 10px;
        align-items: stretch;
    }

    .brand {
        width: 100%;
        min-width: 0;
        gap: 10px;
        align-items: center;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 14px;
        flex: 0 0 auto;
    }

    .brand img,
    .brand-logo,
    .site-logo,
    .header-logo,
    .logo {
        max-width: 110px;
        max-height: 46px;
        width: auto;
        height: auto;
        object-fit: contain;
        flex: 0 0 auto;
    }

    .brand-text {
        min-width: 0;
        flex: 1 1 auto;
    }

    .brand-text strong {
        font-size: 20px;
        line-height: 1.05;
        letter-spacing: -0.035em;
        overflow-wrap: anywhere;
    }

    .brand-text small {
        font-size: 10px;
        line-height: 1.2;
        margin-top: 3px;
    }

    .masthead-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 7px;
        align-items: center;
    }

    .search-form {
        grid-column: 1 / -1;
        width: 100%;
    }

    .search-form input {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
        padding: 9px 11px;
    }

    .search-form button,
    .pill-link,
    .btn {
        padding: 9px 12px;
        font-size: 13px;
    }

    .news-nav {
        position: relative;
        top: auto;
    }

    .nav-inner {
        min-height: auto;
    }

    .mobile-menu-button {
        margin: 6px 0;
        padding: 8px 11px;
    }

    .announcement-inner {
        min-height: auto;
        padding: 9px 0;
        gap: 8px;
        font-size: 12px;
        line-height: 1.35;
    }

    .announcement strong {
        font-size: 10px;
        padding: 4px 8px;
    }

    .announcement a {
        margin-left: 0;
    }

    .hero-wrap {
        padding-top: 12px;
    }
}

@media (max-width: 480px) {
    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .brand img,
    .brand-logo,
    .site-logo,
    .header-logo,
    .logo {
        max-width: 92px;
        max-height: 40px;
    }

    .masthead-actions {
        grid-template-columns: 1fr 1fr;
    }

    .masthead-actions .search-form {
        grid-column: 1 / -1;
    }

    .masthead-actions .pill-link {
        text-align: center;
    }
}

