/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f5f7;
    color: #1a1a2e;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== VARIABLES ===== */
:root {
    --accent: #e8252b;
    --dark: #1a1a2e;
    --dark2: #0d0d1a;
    --mid: #444;
    --light: #f4f5f7;
    --white: #fff;
    --border: #e5e7eb;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --container: 1200px;
}

/* ===== LAYOUT ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===== TOPBAR ===== */
.sm-topbar {
    background: var(--dark2);
    color: #888;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #222;
}
.sm-topbar .container { display: flex; justify-content: space-between; align-items: center; }
.sm-topbar a { color: #888; }
.sm-topbar a:hover { color: var(--accent); }

/* ===== HEADER ===== */
.sm-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.sm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: var(--container);
    margin: 0 auto;
    height: 64px;
}
.sm-logo {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1;
}
.sm-logo span { color: var(--accent); }

/* ===== NAVIGATION ===== */
.sm-nav { display: flex; list-style: none; gap: 0; }
.sm-nav li { position: relative; }
.sm-nav > li > a {
    display: block;
    padding: 0 16px;
    height: 64px;
    line-height: 64px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    white-space: nowrap;
}
.sm-nav > li > a:hover, .sm-nav > li.current-menu-item > a { color: #fff; background: rgba(255,255,255,0.1); }
.sm-nav li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark);
    min-width: 200px;
    display: none;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-top: 3px solid var(--accent);
}
.sm-nav li:hover > ul { display: block; }
.sm-nav li ul a {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sm-nav li ul a:hover { color: #fff; background: rgba(255,255,255,0.07); padding-left: 24px; }
.sm-search-btn { color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; padding: 8px; }
.sm-search-btn:hover { color: #fff; }

/* ===== BREAKING NEWS ===== */
.sm-breaking {
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
    overflow: hidden;
}
.sm-breaking .container { display: flex; align-items: center; gap: 12px; }
.sm-breaking-label {
    background: rgba(0,0,0,0.2);
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.sm-breaking-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-breaking a { color: #fff; }
.sm-breaking a:hover { text-decoration: underline; }

/* ===== MAIN LAYOUT ===== */
.sm-main { padding: 28px 0; }
.sm-content-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 28px; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== SECTION HEADER ===== */
.sm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--dark);
    position: relative;
}
.sm-section-head::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}
.sm-section-head h2 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dark);
}
.sm-section-head a { font-size: 12px; color: var(--accent); font-weight: 600; }
.sm-section-head a:hover { text-decoration: underline; }

/* ===== HERO BLOCK ===== */
.sm-hero { margin-bottom: 32px; }
.sm-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.sm-hero-main { }
.sm-hero-main .sm-post-thumb {
    position: relative;
    padding-bottom: 58%;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.sm-hero-main .sm-post-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.sm-hero-main:hover .sm-post-thumb img { transform: scale(1.04); }
.sm-hero-main .sm-post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 8px;
}
.sm-hero-main .sm-post-title:hover { color: var(--accent); }
.sm-hero-main .sm-post-excerpt { font-size: 14px; color: #555; line-height: 1.6; }

.sm-hero-side { display: flex; flex-direction: column; gap: 16px; }
.sm-mini-card { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.sm-mini-card:last-child { border-bottom: none; padding-bottom: 0; }
.sm-mini-thumb {
    flex: 0 0 88px;
    height: 66px;
    overflow: hidden;
    border-radius: 4px;
}
.sm-mini-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.sm-mini-card:hover .sm-mini-thumb img { transform: scale(1.06); }
.sm-mini-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--dark); }
.sm-mini-title:hover { color: var(--accent); }
.sm-mini-date { font-size: 11px; color: #999; margin-top: 4px; }

/* ===== CATEGORY LABEL ===== */
.sm-cat-label {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 2px 7px;
    border-radius: 3px;
    margin-bottom: 6px;
}

/* ===== CARD GRID ===== */
.sm-cards { margin-bottom: 32px; }
.sm-card { }
.sm-card .sm-post-thumb {
    position: relative;
    padding-bottom: 64%;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.sm-card .sm-post-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.sm-card:hover .sm-post-thumb img { transform: scale(1.05); }
.sm-card .sm-post-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--dark); }
.sm-card .sm-post-title:hover { color: var(--accent); }
.sm-card .sm-post-date { font-size: 11px; color: #999; margin-top: 4px; }

/* ===== LIST BLOCK ===== */
.sm-list-block { margin-bottom: 32px; }
.sm-list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.sm-list-item:first-child { padding-top: 0; }
.sm-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.sm-list-thumb { flex: 0 0 96px; height: 72px; overflow: hidden; border-radius: 4px; }
.sm-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.sm-list-item:hover .sm-list-thumb img { transform: scale(1.06); }
.sm-list-body { flex: 1; }
.sm-list-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--dark); display: block; }
.sm-list-title:hover { color: var(--accent); }
.sm-list-date { font-size: 11px; color: #999; margin-top: 5px; }

/* ===== 2-COL ROW ===== */
.sm-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.sm-row-2-block { }

/* ===== SIDEBAR ===== */
.sm-sidebar { }
.sm-widget { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 24px; box-shadow: var(--shadow); }
.sm-widget-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dark);
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--dark);
    position: relative;
}
.sm-widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

/* Sidebar recent */
.sm-sidebar-post { display: flex; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.sm-sidebar-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sm-sidebar-thumb { flex: 0 0 64px; height: 50px; overflow: hidden; border-radius: 4px; }
.sm-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sm-sidebar-title { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--dark); }
.sm-sidebar-title:hover { color: var(--accent); }
.sm-sidebar-date { font-size: 11px; color: #999; margin-top: 3px; }

/* Sidebar categories */
.sm-cat-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.sm-cat-item:last-child { border-bottom: none; }
.sm-cat-item a { color: var(--dark); font-weight: 500; }
.sm-cat-item a:hover { color: var(--accent); }
.sm-cat-count { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }

/* ===== FOOTER ===== */
.sm-footer {
    background: var(--dark);
    color: #aaa;
    margin-top: 40px;
}
.sm-footer-main { padding: 40px 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.sm-footer-brand .sm-logo { margin-bottom: 12px; }
.sm-footer-brand p { font-size: 13px; line-height: 1.7; color: #888; }
.sm-footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #fff; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.sm-footer-col ul { list-style: none; }
.sm-footer-col li { margin-bottom: 8px; }
.sm-footer-col a { font-size: 13px; color: #888; transition: color 0.2s; }
.sm-footer-col a:hover { color: #fff; }
.sm-footer-bottom { border-top: 1px solid #2a2a4a; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #666; }
.sm-footer-bottom a { color: #666; }
.sm-footer-bottom a:hover { color: var(--accent); }

/* ===== SINGLE POST ===== */
.sm-single { max-width: 860px; }
.sm-single-header { margin-bottom: 24px; }
.sm-single-title { font-size: 32px; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.sm-single-meta { font-size: 13px; color: #888; display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sm-single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.sm-single-thumb img { width: 100%; max-height: 500px; object-fit: cover; }
.sm-post-content { font-size: 16px; line-height: 1.8; color: #333; }
.sm-post-content h2 { font-size: 22px; font-weight: 700; margin: 28px 0 14px; color: var(--dark); }
.sm-post-content h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.sm-post-content p { margin-bottom: 18px; }
.sm-post-content ul, .sm-post-content ol { padding-left: 24px; margin-bottom: 18px; }
.sm-post-content li { margin-bottom: 8px; }
.sm-post-content a { color: var(--accent); text-decoration: underline; }
.sm-post-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.sm-post-content th { background: var(--dark); color: #fff; padding: 10px 14px; text-align: left; font-size: 13px; }
.sm-post-content td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.sm-post-content tr:nth-child(even) td { background: #f8f9fa; }

/* ===== ARCHIVE / CATEGORY ===== */
.sm-archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sm-archive-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.sm-archive-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.sm-archive-card .sm-post-thumb { padding-bottom: 58%; position: relative; overflow: hidden; }
.sm-archive-card .sm-post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.sm-archive-card:hover .sm-post-thumb img { transform: scale(1.04); }
.sm-archive-card .sm-card-body { padding: 16px; }
.sm-archive-card .sm-post-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; color: var(--dark); }
.sm-archive-card:hover .sm-post-title { color: var(--accent); }
.sm-archive-card .sm-post-excerpt { font-size: 13px; color: #666; line-height: 1.6; }
.sm-archive-card .sm-post-date { font-size: 11px; color: #999; margin-top: 10px; }

/* ===== PAGINATION ===== */
.sm-pagination { display: flex; justify-content: center; gap: 8px; padding: 32px 0; }
.sm-pagination a, .sm-pagination span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 4px; font-size: 14px; font-weight: 600; border: 1px solid var(--border); color: var(--dark); background: #fff; transition: all 0.2s; }
.sm-pagination a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.sm-pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== BREADCRUMB ===== */
.sm-breadcrumb { font-size: 12px; color: #999; padding: 12px 0; margin-bottom: 20px; }
.sm-breadcrumb a { color: #999; }
.sm-breadcrumb a:hover { color: var(--accent); }
.sm-breadcrumb span + span::before { content: ' › '; color: #ccc; }

/* ===== SEARCH OVERLAY ===== */
.sm-search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999; align-items: center; justify-content: center; }
.sm-search-overlay.active { display: flex; }
.sm-search-form { width: 100%; max-width: 600px; padding: 0 20px; }
.sm-search-input { width: 100%; padding: 16px 20px; font-size: 20px; border: none; border-bottom: 2px solid var(--accent); background: transparent; color: #fff; outline: none; }
.sm-search-input::placeholder { color: #666; }
.sm-search-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 24px; cursor: pointer; background: none; border: none; }

/* ===== MOBILE ===== */
.sm-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.sm-hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 1024px) {
    .sm-content-wrap { grid-template-columns: 1fr; }
    .sm-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .sm-footer-main { grid-template-columns: 1fr 1fr; }
    .sm-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sm-nav { display: none; }
    .sm-hamburger { display: flex; }
    .sm-hero-grid, .sm-row-2 { grid-template-columns: 1fr; }
    .sm-hero-side { display: none; }
    .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
    .sm-footer-main { grid-template-columns: 1fr; }
    .sm-archive-grid { grid-template-columns: 1fr; }
    .sm-sidebar { grid-template-columns: 1fr; }
    .sm-single-title { font-size: 24px; }
}
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .sm-logo { font-size: 22px; }
}
