/* ============================================================
   SavannaPost — Main Stylesheet
   ============================================================ */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
    --primary: #E8A020;
    --primary-dark: #c5861a;
    --bg: #070d15;
    --bg2: #0c1420;
    --bg3: #111d2e;
    --border: #1a2640;
    --text: #dce4ee;
    --muted: #7a90ab;
    --dim: #374d66;
    --red: #e63946;
    --green: #34d399;
    --font: 'Segoe UI', system-ui, Arial, sans-serif;
    --radius: 10px;
    --radius-lg: 14px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { font-family: var(--font); }

/* ── Typography ── */
h1 { font-size: 28px; font-weight: 900; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 800; line-height: 1.3; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* ── Utilities ── */
.badge {
    display: inline-block;
    background: var(--primary);
    color: #000;
    font-size: 9px; font-weight: 800;
    padding: 3px 9px; border-radius: 3px;
    letter-spacing: .8px; text-transform: uppercase;
}
.badge.red   { background: var(--red); color: #fff; }
.badge.green { background: var(--green); color: #000; }
.badge.blue  { background: #3b82f6; color: #fff; }
.badge.live  { background: var(--red); color: #fff; animation: blink 1.4s infinite; }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; animation: blink 1.2s infinite; margin-right: 5px; vertical-align: middle; }
.dot.green { background: var(--green); }

.sec-head {
    font-size: 14px; font-weight: 800;
    border-left: 3px solid var(--primary);
    padding-left: 11px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
    text-transform: uppercase; letter-spacing: .5px; color: var(--text);
}

/* ── Header ── */
#hdr { background: var(--bg2); border-bottom: 2px solid var(--primary); position: sticky; top: 0; z-index: 1000; }

#hdr-top {
    background: var(--primary);
    padding: 5px 22px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: #000; font-weight: 600;
}
#hdr-top a { color: #000; margin-left: 10px; }

#hdr-main {
    max-width: 1240px; margin: 0 auto;
    padding: 11px 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.logo { font-size: 26px; font-weight: 900; letter-spacing: -1.5px; color: #fff; line-height: 1; }
.logo span { color: var(--primary); }
.logo small { display: block; font-size: 9px; color: var(--muted); font-weight: 400; letter-spacing: 2px; margin-top: 2px; }

nav { display: flex; gap: 2px; }
nav a {
    color: var(--muted); padding: 7px 14px;
    border-radius: 6px; font-size: 12px; font-weight: 700;
    transition: .15s; cursor: pointer; letter-spacing: .3px;
}
nav a:hover, nav a.active { background: var(--primary); color: #000; }

#srch {
    background: var(--bg3); border: 1px solid var(--border);
    padding: 7px 16px; border-radius: 20px;
    color: var(--text); font-size: 12px; width: 180px; outline: none;
    transition: border-color .2s;
}
#srch:focus { border-color: var(--primary); }

/* ── Breaking Ticker ── */
#ticker-bar {
    background: var(--bg2); border-bottom: 1px solid var(--border);
    display: flex; overflow: hidden;
}
.tk-label {
    background: var(--red); color: #fff;
    padding: 7px 16px; font-size: 10px;
    font-weight: 800; white-space: nowrap;
    letter-spacing: .8px; text-transform: uppercase; flex-shrink: 0;
}
.tk-wrap { overflow: hidden; flex: 1; }
.tk-inner {
    display: flex; animation: scroll-ticker 60s linear infinite;
    white-space: nowrap; padding: 7px 0;
}
.tk-inner span { padding: 0 40px; font-size: 12px; color: #b8c8da; }
.tk-inner span::before { content: "◆ "; color: var(--primary); font-size: 8px; vertical-align: middle; }
@keyframes scroll-ticker { from{transform:translateX(100%)} to{transform:translateX(-100%)} }

/* ── Layout ── */
.container { max-width: 1240px; margin: 0 auto; padding: 20px 22px; }
.grid-main { display: grid; grid-template-columns: 1fr 316px; gap: 24px; }
.content-page { max-width: 900px; }

/* ── Hero ── */
.hero {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    cursor: pointer; transition: border-color .2s; margin-bottom: 22px;
}
.hero:hover { border-color: var(--primary); }
.hero-img {
    height: 300px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.hero-img .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(7,13,21,.9) 0%, transparent 50%);
}
.hero-emoji { font-size: 100px; z-index: 1; filter: drop-shadow(0 4px 20px rgba(0,0,0,.5)); }
.hero-live-tag {
    position: absolute; top: 14px; left: 14px;
    background: rgba(230,57,70,.92); color: #fff;
    padding: 5px 12px; border-radius: 5px;
    font-size: 10px; font-weight: 800;
    display: flex; align-items: center; gap: 5px;
    z-index: 2; letter-spacing: .5px;
}
.hero-location {
    position: absolute; top: 14px; right: 14px;
    background: rgba(7,13,21,.75); color: var(--muted);
    padding: 4px 10px; border-radius: 5px;
    font-size: 10px; z-index: 2; backdrop-filter: blur(4px);
}
.hero-body { padding: 18px 20px; }
.hero-title {
    font-size: 22px; font-weight: 900; line-height: 1.3;
    margin: 8px 0 10px; color: #fff;
}
.hero-exc { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.hero-meta { font-size: 11px; color: var(--dim); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-meta .hi { color: var(--primary); font-weight: 700; }

/* ── News Grid ── */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.ncard {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    cursor: pointer; transition: all .18s; display: flex; flex-direction: column;
}
.ncard:hover { border-color: var(--primary); transform: translateY(-2px); }
.ncard-img {
    height: 134px;
    display: flex; align-items: center; justify-content: center;
    font-size: 46px; position: relative; flex-shrink: 0;
}
.ncard-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.nc-title { font-size: 13px; font-weight: 700; line-height: 1.45; margin: 6px 0 auto; color: var(--text); }
.nc-meta { font-size: 10px; color: var(--dim); display: flex; justify-content: space-between; margin-top: 8px; }

/* ── Article grid (politics/sports etc) ── */
.article-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.article-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    cursor: pointer; transition: border-color .18s;
    display: flex; gap: 0;
}
.article-card:hover { border-color: var(--primary); }
.article-card-img {
    width: 200px; min-width: 200px; height: 140px;
    display: flex; align-items: center; justify-content: center;
    font-size: 54px; flex-shrink: 0;
}
.article-card-body { padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.ac-title { font-size: 15px; font-weight: 800; line-height: 1.4; margin: 6px 0 6px; color: #fff; }
.ac-exc { font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { font-size: 10px; color: var(--dim); display: flex; gap: 14px; }

/* ── Article Full Page ── */
.article-full { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.af-hero { height: 280px; display: flex; align-items: center; justify-content: center; font-size: 100px; }
.af-body { padding: 24px 28px; }
.af-title { font-size: 26px; font-weight: 900; line-height: 1.3; margin: 10px 0 14px; }
.af-meta { font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.af-body-text { font-size: 14px; line-height: 1.85; color: #b8c8da; }
.af-body-text p { margin-bottom: 16px; }
.back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); padding: 8px 16px;
    border-radius: 6px; font-size: 12px; font-weight: 700;
    cursor: pointer; margin-bottom: 16px; transition: .15s;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Sidebar widgets ── */
.sw { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.sw-title {
    background: var(--bg3); border-bottom: 1px solid var(--border);
    color: var(--primary); padding: 11px 15px;
    font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
    display: flex; align-items: center; gap: 7px;
}
.sw-body { padding: 12px 14px; }

/* Live Scores */
.sc-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #0c1420; cursor: pointer; }
.sc-item:last-child { border: none; }
.sc-teams { font-size: 12px; font-weight: 700; }
.sc-sub { font-size: 10px; margin-top: 2px; }
.sc-score { background: var(--red); color: #fff; padding: 4px 11px; border-radius: 6px; font-size: 13px; font-weight: 800; }
.sc-score.ft { background: #1a2640; color: var(--muted); }
.sc-score.vs { background: #1a2640; color: var(--dim); font-size: 10px; }

/* Trending */
.tr-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #0c1420; cursor: pointer; transition: .15s; border-radius: 4px; }
.tr-item:last-child { border: none; }
.tr-item:hover { background: rgba(232,160,32,.05); padding: 9px 6px; }
.tr-num { font-size: 22px; font-weight: 900; min-width: 26px; color: #1a2640; }
.tr-num.hot { color: var(--primary); }
.tr-title { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.4; }
.tr-views { font-size: 10px; color: var(--dim); margin-top: 2px; }

/* Poll */
.p-opt {
    background: var(--bg3); border-radius: 8px;
    padding: 10px 13px; margin-bottom: 9px;
    cursor: pointer; transition: .15s; border: 1px solid transparent;
}
.p-opt:hover { border-color: var(--primary); }
.p-opt.voted { border-color: var(--primary); }
.p-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.p-label { font-size: 12px; font-weight: 700; color: var(--text); }
.p-pct { font-size: 12px; font-weight: 800; color: var(--primary); }
.p-bar-bg { background: #0c1420; border-radius: 4px; height: 3px; }
.p-bar { background: var(--primary); height: 3px; border-radius: 4px; transition: width .5s; }
.p-meta { font-size: 11px; color: var(--dim); margin-bottom: 12px; }

/* Weather */
.wgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.wday { background: var(--bg3); border-radius: 8px; padding: 9px 6px; text-align: center; cursor: pointer; transition: .15s; }
.wday:hover { background: #1a2640; }
.wi { font-size: 22px; margin-bottom: 3px; }
.wtemp { font-size: 13px; font-weight: 800; color: #fbbf24; }
.wcity { font-size: 9px; color: var(--dim); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* Newsletter */
.nl { background: linear-gradient(135deg, var(--bg3), #1a1028); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; margin-bottom: 18px; }
.nl h3 { font-size: 14px; margin-bottom: 5px; color: #fff; }
.nl p { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.nl input { width: 100%; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; margin-bottom: 8px; outline: none; }
.nl input:focus { border-color: var(--primary); }
.nl button { width: 100%; background: var(--primary); color: #000; border: none; padding: 9px; border-radius: 6px; font-weight: 800; cursor: pointer; font-size: 12px; transition: .15s; }
.nl button:hover { background: var(--primary-dark); }

/* ── Toast ── */
#toast {
    position: fixed; bottom: 22px; right: 22px;
    background: var(--bg2); border: 1px solid var(--primary);
    border-radius: 10px; padding: 13px 17px;
    max-width: 280px; z-index: 9999; display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.7);
    animation: slideUp .3s ease;
}
#toast.show { display: block; }
@keyframes slideUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.t-title { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.t-body { font-size: 11px; color: var(--muted); }

/* ── Modal ── */
#modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.88); z-index: 9998;
    align-items: center; justify-content: center;
}
#modal.show { display: flex; }
.m-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
    max-width: 430px; width: 92%; text-align: center; position: relative;
}
.m-close {
    position: absolute; top: 12px; right: 12px;
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--muted); width: 30px; height: 30px;
    border-radius: 50%; cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center; transition: .15s;
}
.m-close:hover { border-color: var(--primary); color: var(--primary); }
.m-icon { font-size: 52px; margin-bottom: 12px; }
.m-title { font-size: 19px; font-weight: 900; margin-bottom: 9px; color: #fff; }
.m-body { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 20px; }
.m-btn { background: var(--primary); color: #000; border: none; padding: 13px 30px; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; width: 100%; transition: .15s; }
.m-btn:hover { background: var(--primary-dark); }

/* ── Search Results ── */
.search-result-item {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
    cursor: pointer; transition: border-color .15s;
}
.search-result-item:hover { border-color: var(--primary); }
.sr-title { font-size: 15px; font-weight: 800; margin: 4px 0 6px; color: #fff; }
.sr-exc { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ── Footer ── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 28px 22px; text-align: center; color: var(--dim); font-size: 12px; margin-top: 20px; }
footer .fl { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 10px; }
footer .fl span { color: var(--primary); }
footer nav a { color: var(--dim); margin: 0 10px; transition: .15s; }
footer nav a:hover { color: var(--primary); }
footer .f-bottom { margin-top: 12px; font-size: 11px; }

/* ── Responsive ── */
@media(max-width: 900px) {
    .grid-main { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .article-card { flex-direction: column; }
    .article-card-img { width: 100%; height: 160px; }
    nav { display: none; }
    .hero-img { height: 200px; }
    .hero-title { font-size: 18px; }
}
