/* ============================================================
   Kerala Lottery Sambad — front-end theme
   Mobile-first, system fonts (zero web-font load = fast LCP)
   ============================================================ */
:root {
    --green:      #0b7a43;
    --green-dark: #085c33;
    --gold:       #f4b400;
    --ink:        #16231c;
    --muted:      #5f6b64;
    --line:       #e3e8e4;
    --bg:         #f6f8f6;
    --card:       #ffffff;
    --live:       #e23b3b;
    --radius:     14px;
    --shadow:     0 2px 10px rgba(16,40,26,.06);
    --shadow-lg:  0 10px 34px rgba(16,40,26,.12);
    --wrap:       1080px;
    --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); color: var(--ink);
    background: var(--bg); line-height: 1.55; font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.2; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .9rem; }
.skip-link { position:absolute; left:-999px; }
.skip-link:focus { left:8px; top:8px; background:#fff; padding:8px 14px; z-index:99; border-radius:8px; }

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(120deg, var(--green), var(--green-dark));
    color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 10px; background: var(--gold);
    color: var(--green-dark); font-weight: 800; display: grid; place-items: center; font-size: 18px;
}
.brand-text strong { display: block; font-size: 1.05rem; line-height: 1.1; }
.brand-text small { font-size: .72rem; opacity: .85; }
.main-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 1.7rem; }
.hero p { color: var(--muted); max-width: 640px; }

/* ---------- Ads ---------- */
.ad-strip { margin: 16px 0; text-align: center; min-height: 0; }
.ad-strip:empty { display: none; margin: 0; }

/* ---------- Result card ---------- */
.result-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 22px; margin: 16px 0; border: 1px solid var(--line);
}
.result-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.result-head h1, .result-head h2 { font-size: 1.5rem; margin: 6px 0 2px; }
.result-meta { color: var(--muted); font-size: .9rem; margin: 0; }
.status-badge {
    display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
    background: var(--line); color: var(--muted); padding: 4px 10px; border-radius: 999px;
}
.status-badge.is-live { background: var(--live); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.first-prize {
    text-align: center; background: linear-gradient(135deg, #fff8e1, #fff);
    border: 2px solid var(--gold); border-radius: 12px; padding: 10px 18px; min-width: 150px;
}
.first-prize span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.first-prize strong { display: block; font-size: 1.5rem; letter-spacing: .06em; color: var(--green-dark); }
.first-prize em { font-style: normal; font-size: .8rem; color: var(--muted); }

/* ---------- Prize table ---------- */
.prize-table { margin-top: 18px; border-top: 1px solid var(--line); }
.prize-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.prize-label { font-weight: 700; color: var(--green-dark); margin-bottom: 6px; }
.prize-nums { display: flex; flex-wrap: wrap; gap: 8px; }
.prize-nums span {
    background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
    padding: 6px 10px; font-variant-numeric: tabular-nums; font-weight: 600;
    letter-spacing: .04em; font-size: .95rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; background: var(--green); color: #fff; padding: 11px 18px;
    border-radius: 10px; font-weight: 700; border: 0; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn-block { display: block; text-align: center; margin-top: 18px; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-gold { background: var(--gold); color: var(--green-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

/* ---------- Sections / grids ---------- */
.section { margin: 30px 0; }
.section-title { font-size: 1.25rem; border-left: 4px solid var(--gold); padding-left: 10px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mini-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); color: var(--ink);
}
.mini-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; transform: translateY(-2px); transition: .15s; }
.mini-date { font-size: .75rem; color: var(--gold); font-weight: 800; }
.mini-code { font-size: .8rem; color: var(--muted); }
.post-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card-body { padding: 14px; }
.post-card-body h3 { font-size: 1.05rem; }
.tag { display: inline-block; background: #e8f5ee; color: var(--green-dark); font-size: .72rem;
       font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; }

/* ---------- Article ---------- */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 24px; box-shadow: var(--shadow); margin: 16px 0; }
.article-hero { border-radius: 12px; margin: 14px 0; width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.article-body { font-size: 1.05rem; }
.article-body img { border-radius: 10px; margin: 14px 0; }
.article-body h2 { margin-top: 1.4em; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { background: #f0f5f1; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }

/* ---------- Misc ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 14px 0; }
.breadcrumb a { color: var(--muted); }
.empty-state { text-align: center; padding: 40px 16px; background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line); }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0; justify-content: center; }
.pagination a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.pagination a.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- SEO article + TOC + FAQ ---------- */
.seo-article {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow); margin: 30px 0; scroll-margin-top: 80px;
}
.seo-article h2 { font-size: 1.4rem; margin-top: 1.4em; color: var(--green-dark); scroll-margin-top: 80px; }
.seo-article h2:first-child { margin-top: 0; }
.seo-article h3 { font-size: 1.1rem; margin-top: 1.1em; color: var(--ink); }
.seo-article p { margin: .7em 0; }
.seo-article ul, .seo-article ol { padding-left: 1.2em; margin: .7em 0; }
.seo-article li { margin: .35em 0; }
.seo-article em { color: var(--green-dark); font-style: normal; background: #f0f7f2; padding: 0 3px; border-radius: 4px; }
.toc {
    background: #f4f9f6; border: 1px solid var(--line); border-left: 4px solid var(--gold);
    border-radius: 10px; padding: 16px 20px; margin: 20px 0;
}
.toc h3 { margin: 0 0 8px; font-size: 1.05rem; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--green-dark); font-weight: 600; }

.faq details {
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fbfdfc;
    overflow: hidden;
}
.faq summary {
    cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--green-dark);
    list-style: none; position: relative; padding-right: 40px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 1.3rem; font-weight: 700; color: var(--gold);
}
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0; padding: 14px 16px; color: var(--ink); }

@media (max-width: 620px) { .toc ol { columns: 1; } .seo-article { padding: 18px; } }

/* ---------- Footer ---------- */
.site-footer { background: #0d221a; color: #cfe0d6; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding: 34px 16px; }
.footer-grid h4 { color: #fff; }
.footer-grid a { display: block; color: #a9c4b6; padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px; font-size: .82rem; color: #86a394; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: 62px 0 auto 0; background: var(--green-dark);
        flex-direction: column; padding: 8px 16px 16px; display: none;
    }
    body.nav-open .main-nav { display: flex; }
    .main-nav a { padding: 12px; border-radius: 8px; }
    .hero h1 { font-size: 1.4rem; }
    .result-head h1, .result-head h2 { font-size: 1.25rem; }
    .first-prize { width: 100%; }
}
