@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700&display=swap");

:root {
    --bg: #f2f6fb;
    --paper: #ffffff;
    --ink: #0f1d2d;
    --muted: #546577;
    --line: #d5deea;
    --brand: #0a2f4e;
    --brand-2: #1270a9;
    --accent: #f3aa18;
    --danger: #b63627;
    --ok: #09623d;
    --shadow: 0 20px 40px rgba(9, 33, 60, 0.1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0% 0%, #d9ecff 0%, transparent 35%),
        radial-gradient(circle at 100% 15%, #ffe7bf 0%, transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.no-scroll {
    overflow: hidden;
}

.shell {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(8, 31, 51, 0.92);
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.top-line {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ffd66e);
    color: #17170f;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.logo-text strong {
    display: block;
    font-size: 17px;
}

.logo-text small {
    display: block;
    color: #cae1f7;
    font-size: 12px;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    color: #d9e9f8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: 180ms ease;
}

.main-nav a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.page-wrap {
    padding: 18px 0 30px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.hero-primary,
.hero-side,
.content-card,
.news-card,
.detail-main,
.detail-side,
.admin-box,
.stat-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.hero-primary {
    padding: 18px;
}

.hero-primary h1 {
    margin: 4px 0 10px;
    font-family: "Source Serif 4", serif;
    line-height: 1.15;
}

.hero-primary h1 a {
    color: inherit;
    text-decoration: none;
}

.hero-primary p {
    color: #334456;
    margin: 0 0 12px;
}

.hero-side {
    padding: 16px;
}

.hero-side h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #1f4f75;
    background: #d9ecfb;
    border-radius: 8px;
    padding: 5px 9px;
}

.hero-media {
    width: 100%;
    border-radius: 10px;
    margin-top: 12px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #081f33;
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: #9fb0c1;
}

.quick-link {
    display: block;
    text-decoration: none;
    color: var(--ink);
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.quick-link strong {
    display: block;
}

.quick-link small {
    color: var(--muted);
}

.cta-btn {
    margin-top: 14px;
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), #1ca4e8);
    border-radius: 10px;
    font-weight: 700;
    padding: 11px 16px;
}

.section-head {
    margin: 12px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.section-head h2 {
    margin: 0;
    font-family: "Source Serif 4", serif;
}

.inline-link {
    color: var(--brand-2);
    text-decoration: none;
    font-weight: 700;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
}

.news-card {
    overflow: hidden;
}

.card-media-link {
    display: block;
    position: relative;
}

.card-media,
.card-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #0d2940;
}

.card-placeholder {
    background: linear-gradient(135deg, #dfe8f2, #cfdbe8);
}

.card-video-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0d2940;
}

.card-video-preview .card-media,
.card-video-preview .card-placeholder {
    height: 100%;
}

.card-video-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
    pointer-events: none;
}

.card-video-tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(7, 20, 34, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 2;
}

.card-body {
    padding: 13px;
}

.card-body h3 {
    margin: 8px 0 0;
    font-size: 18px;
    line-height: 1.25;
}

.card-body h3 a {
    text-decoration: none;
    color: inherit;
}

.page-intro {
    margin: 6px 0 14px;
}

.page-intro h1 {
    margin: 0;
    font-family: "Source Serif 4", serif;
}

.page-intro p {
    margin: 8px 0 0;
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.detail-main {
    padding: 18px;
}

.detail-main h1 {
    margin: 6px 0 12px;
    font-family: "Source Serif 4", serif;
}

.lead {
    margin: 0 0 12px;
    color: #2a3f53;
    font-weight: 600;
}

.detail-image,
.detail-video {
    width: 100%;
    border-radius: 10px;
    background: #081f33;
}

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

.gallery-thumb {
    margin: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.detail-content {
    margin-top: 12px;
    line-height: 1.75;
    color: #213649;
    white-space: pre-line;
}

.detail-side {
    padding: 16px;
}

.detail-side h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(3, 10, 18, 0.87);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    width: min(92vw, 1000px);
    max-height: 84vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 30px;
    cursor: pointer;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.content-card {
    padding: 18px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.contact-grid h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.contact-grid a {
    color: var(--brand-2);
    text-decoration: none;
}

.form-card {
    max-width: 760px;
}

.admin-box {
    padding: 16px;
}

.admin-wide {
    max-width: 980px;
}

.admin-head {
    margin: 6px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-head h1 {
    margin: 0;
    font-size: 28px;
}

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

.btn,
.actions button,
.admin-form button {
    border: none;
    border-radius: 9px;
    padding: 10px 13px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.actions .danger-btn {
    background: #b63627;
}

.action-forms form {
    margin: 0;
}

.admin-form {
    display: grid;
    gap: 7px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: "Manrope", sans-serif;
}

.admin-form textarea {
    resize: vertical;
}

.datetime-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.secondary-btn {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 12px;
    background: #edf3f9;
    color: var(--brand);
    font-weight: 700;
    cursor: pointer;
}

.admin-form hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--line);
    margin: 10px 0 4px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-form select {
    width: auto;
}

.stats-grid {
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.stat-card {
    padding: 12px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
}

.admin-filters {
    margin: 10px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-filters a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    text-decoration: none;
    color: var(--brand);
    background: #fff;
}

.admin-filters a.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.table .small {
    color: var(--muted);
    font-size: 12px;
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.row-actions a {
    color: var(--brand-2);
    text-decoration: none;
}

.row-actions form {
    margin: 0;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
}

.status-draft {
    background: #e8edf3;
    color: #34485d;
}

.status-review {
    background: #fff2cb;
    color: #785500;
}

.status-published,
.status-approved {
    background: #dff8e8;
    color: #0d643e;
}

.status-archived,
.status-reviewed,
.status-rejected {
    background: #f0f2f6;
    color: #495667;
}

.status-new {
    background: #dcefff;
    color: #0a4f78;
}

.audit-box {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.audit-row {
    display: grid;
    grid-template-columns: 120px 160px 140px 1fr 160px;
    gap: 7px;
    padding: 8px 0;
    border-top: 1px dashed var(--line);
    font-size: 14px;
}

.pagination-wrap {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 7px;
    align-items: center;
}

.page-btn,
.page-num {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-weight: 700;
}

.page-num.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.page-dots {
    color: var(--muted);
}

.site-footer {
    margin-top: 34px;
    background: #07182a;
    color: #dce8f3;
    padding: 24px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.site-footer h3 {
    margin: 0 0 6px;
}

.site-footer p {
    margin: 0;
    color: #bdd1e2;
}

.footer-contact {
    display: grid;
    gap: 6px;
}

.footer-contact a,
.footer-contact span {
    color: #dce8f3;
    text-decoration: none;
}

.success {
    color: var(--ok);
    font-weight: 600;
}

.error {
    color: var(--danger);
    margin: 0;
    font-size: 14px;
}

.small-note {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 980px) {
    .hero-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .audit-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 740px) {
    .top-line {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .main-nav a {
        font-size: 13px;
    }
}
