:root {
    --red: #b91c1c;
    --red-dark: #7f1d1d;
    --red-light: #fee2e2;
    --ink: #101828;
    --muted: #667085;
    --line: #e5e7eb;
    --bg: #fff5f5;
}

/* Base */
* {
    box-sizing: border-box;
}

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

a {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.14);
}

.topbar,
.brand-wrap,
.container,
.footer {
    max-width: 1180px;
    margin: auto;
}

.topbar {
    padding: 7px 20px;
    font-size: 13px;
    opacity: .9;
}

.brand-wrap {
    padding: 28px 20px;
}

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

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 62px;
    height: 62px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.brand strong {
    display: block;
    font-size: 31px;
    letter-spacing: .4px;
}

.brand small {
    display: block;
    color: #fee2e2;
    font-weight: 700;
}

/* Navigation */
.nav {
    background: var(--red-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 12px 20px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
}

.nav-search {
    display: flex;
    gap: 5px;
}

/* Forms */
input,
textarea {
    font-family: inherit;
}

.nav-search input,
.search-box input,
.big-search input,
.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 11px;
    border-radius: 6px;
}

.nav-search input {
    width: 170px;
    padding: 8px;
}

button,
.btn,
.nav-search button,
.search-box button,
.big-search button {
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Layout */
.container {
    margin: 22px auto;
    padding: 0 20px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}

/* Hero */
.hero {
    min-height: 310px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    color: #fff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    margin-bottom: 24px;
}

.hero h1 {
    max-width: 560px;
    margin: 10px 0;
    font-size: 38px;
}

.hero p {
    max-width: 520px;
}

.badge {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Posts */
.post-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(15,23,42,.04);
}

.post-card img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 8px;
}

.post-card h3 {
    margin: 8px 0 4px;
    font-size: 22px;
}

.post-card small,
.meta,
.crumbs {
    color: var(--muted);
    font-size: 13px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-box,
.side-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
}

.search-box {
    display: flex;
    gap: 8px;
}

.side-box a {
    display: block;
    border-bottom: 1px solid #eef2f7;
    padding: 8px 0;
}

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

.tags a {
    background: var(--red-light);
    color: var(--red-dark);
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
}

/* Article */
.article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 28px;
}

.article h1 {
    font-size: 42px;
    line-height: 1.12;
}

.featured-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    margin: 18px 0;
}

.article-body h2 {
    margin-top: 28px;
}

/* Search / Contact */
.big-search {
    display: flex;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 16px;
    border-radius: 10px;
}

.contact-form {
    max-width: 720px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: 10px;
    display: grid;
    gap: 12px;
}

.contact-form textarea {
    min-height: 160px;
}

.hp {
    position: absolute;
    left: -9999px !important;
}

/* Notices */
.notice {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.error {
    background: #fff1f3;
    border-color: #fecdd3;
}

/* Admin */
.admin,
.admin-login {
    max-width: 960px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 12px;
}

.admin-login {
    max-width: 420px;
}

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

.stats {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.stats div {
    background: #fff1f1;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 20px;
    min-width: 160px;
}

.stats strong {
    display: block;
    font-size: 32px;
    color: var(--red);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 15px 0;
}

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

th {
    background: #fff1f1;
}

/* Footer */
.footer {
    margin-top: 30px;
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer a {
    color: #fff;
}

/* Mobile */
@media (max-width: 850px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .article h1 {
        font-size: 30px;
    }

    .footer {
        display: block;
    }

    .search-box {
        display: block;
    }

    .search-box button {
        margin-top: 8px;
        width: 100%;
    }
}
