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

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f0f3f8;
    --ink: #131722;
    --text: #242a36;
    --muted: #677084;
    --line: #e4e8f0;
    --line-strong: #cfd6e3;
    --accent: #e83e77;
    --accent-dark: #bd285b;
    --teal: #149f9a;
    --amber: #c89119;
    --success: #17834f;
    --danger: #d83a3a;
    --shadow: 0 18px 45px rgba(19, 23, 34, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header,
.admin-topbar {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.navbar {
    --bs-navbar-color: var(--muted);
    --bs-navbar-hover-color: var(--ink);
    --bs-navbar-active-color: var(--ink);
    --bs-navbar-toggler-border-color: var(--line);
    padding: .85rem 0;
}

.navbar-toggler {
    border-radius: 8px;
    background: var(--surface);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--ink);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(20, 159, 154, .12);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
    line-height: 1.05;
}

.brand-lockup strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-lockup small {
    margin-top: .25rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-link {
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--ink);
}

.nav-admin {
    color: var(--accent-dark) !important;
}

.search-form input {
    width: 250px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink);
    padding: .7rem .85rem;
    outline: none;
}

.search-form input:focus {
    border-color: rgba(20, 159, 154, .55);
    background: var(--surface);
    box-shadow: 0 0 0 .2rem rgba(20, 159, 154, .12);
}

.search-form input::placeholder {
    color: #8b94a6;
}

.hero-section {
    min-height: 520px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 32px;
    right: max(2rem, calc((100vw - 1140px) / 2));
    bottom: 32px;
    width: min(38vw, 520px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 94px;
    right: max(3rem, calc((100vw - 1140px) / 2 + 32px));
    width: 86px;
    height: 86px;
    border: 1px solid rgba(232, 62, 119, .28);
    border-radius: 999px;
    background: rgba(232, 62, 119, .08);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 6.2rem 1rem 5rem;
}

.hero-kicker,
.eyebrow {
    color: var(--teal);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-section h1 {
    max-width: 560px;
    margin: .65rem 0 1rem;
    color: var(--ink);
    font-size: clamp(2.8rem, 7vw, 6.2rem);
    font-weight: 800;
    line-height: .94;
}

.hero-section p {
    max-width: 520px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.btn {
    border-radius: 8px;
    font-weight: 800;
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-color: #fff;
}

.btn-outline-light {
    --bs-btn-color: var(--text);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-bg: var(--ink);
    --bs-btn-hover-border-color: var(--ink);
    --bs-btn-hover-color: #fff;
}

.content-section {
    padding: 4rem 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-heading h2 {
    margin: .25rem 0 0;
    color: var(--ink);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    font-weight: 800;
}

.compact-heading {
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.headline-card,
.article-card,
.sidebar-panel,
.admin-card,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.headline-card {
    overflow: hidden;
}

.headline-image {
    aspect-ratio: 16 / 9;
    background: var(--surface-soft);
    overflow: hidden;
}

.headline-image img,
.article-thumb img,
.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.headline-copy {
    padding: 1.6rem;
}

.headline-copy h2,
.article-card h3 {
    color: var(--ink);
    font-weight: 800;
}

.headline-copy h2 {
    margin: .85rem 0;
    font-size: clamp(1.65rem, 4vw, 2.7rem);
    line-height: 1.04;
}

.headline-copy p,
.article-card p {
    color: var(--muted);
}

.article-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: #e8f7f6;
    border: 1px solid #c8ecea;
    color: #0d7470;
    padding: .35rem .65rem;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}

.article-meta span + span::before {
    content: "/";
    margin-right: .7rem;
    color: #b5bdca;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.article-card {
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.article-card:hover {
    border-color: rgba(232, 62, 119, .32);
    box-shadow: 0 22px 52px rgba(19, 23, 34, .11);
    transform: translateY(-3px);
}

.article-thumb {
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
}

.article-card-body {
    padding: 1.1rem;
}

.article-card h3 {
    margin: .75rem 0;
    font-size: 1.17rem;
    line-height: 1.28;
}

.sidebar-stack {
    display: grid;
    gap: 1.25rem;
    position: sticky;
    top: 92px;
}

.sidebar-panel {
    padding: 1.25rem;
}

.panel-title {
    margin-bottom: 1rem;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 800;
    text-transform: uppercase;
}

.category-list,
.mini-list {
    display: grid;
    gap: .7rem;
}

.category-list a,
.mini-list a {
    display: block;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--line);
}

.category-list a {
    display: flex;
    justify-content: space-between;
}

.category-list strong {
    color: var(--accent-dark);
}

.mini-list span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    margin-bottom: .25rem;
}

.mini-list strong {
    color: var(--ink);
    font-size: .96rem;
    line-height: 1.3;
}

.ad-slot {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.ad-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-label {
    position: absolute;
    top: .65rem;
    left: .65rem;
    z-index: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: .25rem .55rem;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ad-top {
    aspect-ratio: 1200 / 180;
}

.ad-sidebar {
    aspect-ratio: 1;
}

.ad-in-article {
    aspect-ratio: 970 / 250;
}

.ad-footer {
    aspect-ratio: 1200 / 220;
    margin-bottom: 4rem;
}

.article-hero {
    padding: 4.6rem 0 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.article-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, .96fr);
    gap: 2rem;
    align-items: center;
}

.article-hero-copy h1 {
    margin: 1rem 0;
    color: var(--ink);
    font-size: clamp(2.25rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1;
}

.article-hero-copy p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.article-hero-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.share-button {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: .35rem .65rem;
    font-weight: 800;
}

.article-body {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: clamp(1.25rem, 4vw, 2.25rem);
    box-shadow: var(--shadow);
}

.article-body p {
    color: #2f3747;
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-body p + p {
    margin-top: 1.35rem;
}

.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state h1,
.empty-state h3 {
    color: var(--ink);
}

.empty-state p {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    color: var(--muted);
    background: var(--surface);
}

.footer-grid,
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 800;
}

.footer-bottom {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: .9rem;
}

.admin-login-page,
.admin-page {
    background: var(--bg);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.login-card {
    width: min(100%, 440px);
    padding: 2rem;
}

.login-card h1 {
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 800;
}

.login-card p,
.admin-card p {
    color: var(--muted);
}

.back-home {
    display: block;
    margin-top: 1rem;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.form-control,
.form-select {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background-color: var(--surface);
    color: var(--ink);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(20, 159, 154, .65);
    background-color: var(--surface);
    color: var(--ink);
    box-shadow: 0 0 0 .2rem rgba(20, 159, 154, .12);
}

.form-control::placeholder {
    color: #96a0b1;
}

.form-label {
    color: var(--ink);
    font-weight: 800;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-topbar .container-fluid {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-inline: 1.25rem;
}

.admin-actions {
    display: flex;
    gap: .6rem;
}

.admin-shell {
    padding: 1.5rem;
}

.admin-tabs {
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.admin-tabs .nav-link {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.admin-tabs .nav-link.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.admin-card {
    padding: 1.25rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.password-panel {
    max-width: 560px;
}

.password-card {
    width: 100%;
}

.form-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.15rem;
}

.form-heading span {
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 800;
}

.form-heading a,
.form-heading small {
    color: var(--muted);
    font-weight: 800;
}

.article-editor {
    min-height: 320px;
}

.current-cover {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin-bottom: .75rem;
}

.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
}

.admin-table td,
.admin-table th {
    color: var(--text);
}

.admin-table th {
    color: var(--muted);
    font-size: .8rem;
    text-transform: uppercase;
}

.admin-table small {
    display: block;
    color: var(--muted);
}

.admin-table code {
    color: var(--teal);
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: .28rem .55rem;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-published {
    background: #e9f7ef;
    color: var(--success);
}

.status-draft {
    background: #fff5d8;
    color: var(--amber);
}

.ad-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    aspect-ratio: 16 / 6;
    margin-bottom: 1rem;
}

.ad-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ads-grid .admin-card:nth-child(2) .ad-preview {
    aspect-ratio: 1;
}

.alert {
    border-radius: 8px;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
    }

    .hero-section::before {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        display: block;
        width: calc(100% - 2rem);
        max-width: 720px;
        aspect-ratio: 16 / 10;
        margin: 1rem auto 0;
        order: 2;
    }

    .hero-section::after {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-content {
        padding: 4.5rem 1rem 2rem;
    }

    .article-grid,
    .admin-grid,
    .article-hero-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-stack {
        position: static;
    }

    .search-form input {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 2.9rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid,
    .footer-bottom,
    .admin-topbar .container-fluid {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-shell {
        padding: 1rem;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions .btn {
        flex: 1;
    }
}
