/* ============================================================
   Sineth News — Style
   Theme: Bold Editorial — dark charcoal + crimson red
   Completely distinct from idiripela-news (navy/grid-cards)
   ============================================================ */

:root {
    --primary:      #C0392B;
    --primary-dark: #922B21;
    --primary-light:#E74C3C;
    --dark:         #1C1C1E;
    --slate:        #2C3E50;
    --mid:          #5D6D7E;
    --light-gray:   #F0F2F5;
    --border:       #DDE1E7;
    --white:        #FFFFFF;
    --press:        #D35400;
    --gold:         #E67E22;
    --text:         #1A1A1A;
    --text-muted:   #6B7280;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    font-family: 'Inter', 'Noto Sans Sinhala', sans-serif;
    background: var(--light-gray);
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Masthead (top identity bar) ─────────────────────────── */
.masthead {
    background: var(--dark);
    padding: 0;
    border-bottom: 3px solid var(--primary);
}
.masthead-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: stretch;
    min-height: 70px;
}
.masthead-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.5rem .75rem 0;
    border-right: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
}
.masthead-brand img { height: 42px; width: auto; }
.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.5px;
    line-height: 1.1;
}
.brand-name span { color: var(--primary); }
.brand-sub {
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .05em;
    text-transform: uppercase;
}
.masthead-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-left: 1.5rem;
    flex: 1;
}
.masthead-date {
    font-size: .78rem;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
}
.masthead-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.masthead-actions a {
    color: rgba(255,255,255,.7);
    font-size: .82rem;
    text-decoration: none;
    padding: .3rem .6rem;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.masthead-actions a:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-switch-btn {
    background: var(--primary);
    color: #fff !important;
    padding: .3rem .8rem !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: .78rem !important;
}
.lang-switch-btn:hover { background: var(--primary-dark) !important; }

/* ── Nav bar ─────────────────────────────────────────────── */
.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.site-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 48px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    display: block;
    padding: .4rem .85rem;
    font-size: .84rem;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: rgba(192,57,43,.07);
}
.nav-search {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.nav-search input {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .3rem .9rem;
    font-size: .82rem;
    width: 180px;
    outline: none;
    transition: border-color .2s, width .3s;
    background: var(--light-gray);
}
.nav-search input:focus { border-color: var(--primary); width: 220px; background: #fff; }
.nav-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: .3rem .9rem;
    font-size: .82rem;
    cursor: pointer;
    transition: background .2s;
}
.nav-search button:hover { background: var(--primary-dark); }

/* ── Breaking Ticker ─────────────────────────────────────── */
.breaking-ticker {
    background: var(--primary);
    color: #fff;
    padding: .45rem 0;
    overflow: hidden;
}
.breaking-label {
    background: var(--dark);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: .75rem;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-items {
    display: flex;
    gap: 3rem;
    animation: ticker-scroll 35s linear infinite;
    white-space: nowrap;
}
.ticker-items a { color: #fff; font-size: .83rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ticker-items a:hover { text-decoration: underline; }
@keyframes ticker-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ── Featured Hero ────────────────────────────────────────── */
.featured-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--dark);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    min-height: 360px;
}
.hero-text {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, var(--dark) 60%, var(--slate));
}
.hero-text h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: .75rem 0;
}
.hero-text h2 a { color: #fff; }
.hero-text h2 a:hover { color: rgba(255,255,255,.8); }
.hero-meta { font-size: .8rem; color: rgba(255,255,255,.55); display: flex; gap: 1rem; }
.hero-excerpt { color: rgba(255,255,255,.7); font-size: .9rem; margin: .5rem 0 1rem; line-height: 1.6; }
.hero-image {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-no-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: var(--slate);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.2);
    font-size: 3rem;
}

/* ── News strips (main listing) ───────────────────────────── */
.news-strip {
    display: flex;
    gap: 1rem;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border-left: 4px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.news-strip:hover { border-left-color: var(--primary); box-shadow: 0 3px 12px rgba(0,0,0,.1); }
.strip-img {
    width: 180px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}
.strip-img img { width: 100%; height: 140px; object-fit: cover; }
.strip-no-img {
    width: 180px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    font-size: 2rem;
    flex-shrink: 0;
}
.strip-body { padding: 1rem 1rem 1rem 0; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.strip-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: .35rem 0 .5rem;
    color: var(--text);
}
.strip-title a { color: inherit; }
.strip-title a:hover { color: var(--primary); }
.strip-excerpt { font-size: .85rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.strip-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .6rem; }
.strip-meta { font-size: .77rem; color: var(--text-muted); display: flex; gap: .75rem; }
.strip-readmore {
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.strip-readmore:hover { color: var(--primary-dark); }

/* ── Badges ───────────────────────────────────────────────── */
.badge-breaking {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.badge-press {
    display: inline-block;
    background: var(--press);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.badge-cat {
    display: inline-block;
    background: rgba(192,57,43,.1);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
}

/* ── Lang badge ───────────────────────────────────────────── */
.lang-badge {
    display: inline-block;
    font-size: .58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--gold);
    color: #fff;
    vertical-align: middle;
    margin-left: 5px;
    white-space: nowrap;
}
.lang-badge-only    { background: var(--gold); }
.lang-badge-primary { background: #9CA3AF; font-weight: 500; }

/* ── Translate notice ─────────────────────────────────────── */
.translate-notice {
    background: #FFF8F0;
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    padding: .9rem 1.1rem;
    font-size: .88rem;
    color: #555;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar-section {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sidebar-heading {
    background: var(--slate);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .65rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sidebar-body { padding: .75rem 1rem; }
.cat-pill-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem 1rem; }
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--light-gray);
    color: var(--slate);
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background .2s, color .2s;
    border: 1px solid var(--border);
}
.cat-pill:hover, .cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-pill .cnt { font-weight: 400; font-size: .72rem; opacity: .7; }
.mini-post { display: flex; gap: .65rem; padding: .6rem 0; border-bottom: 1px solid var(--light-gray); }
.mini-post:last-child { border-bottom: none; }
.mini-post-img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--light-gray);
}
.mini-post-placeholder {
    width: 64px;
    height: 48px;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.mini-post-title { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.mini-post-title a { color: inherit; }
.mini-post-title a:hover { color: var(--primary); }
.mini-post-date { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.hospital-cta {
    background: linear-gradient(135deg, var(--slate), var(--dark));
    color: #fff;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 1.25rem;
}
.hospital-cta img { height: 44px; margin: 0 auto .75rem; }
.hospital-cta h6 { color: #fff; font-weight: 700; margin-bottom: .25rem; }
.hospital-cta p { color: rgba(255,255,255,.6); font-size: .82rem; margin-bottom: 1rem; }
.btn-cta-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background .2s;
}
.btn-cta-primary:hover { background: var(--primary-dark); color: #fff; }

/* ── Section divider ──────────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 1rem;
}
.section-divider-label {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
}
.section-divider-line { flex: 1; height: 2px; background: var(--primary); }
.section-divider-line-thin { flex: 1; height: 1px; background: var(--border); }

/* ── Article view ─────────────────────────────────────────── */
.article-wrap {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.article-featured-img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    max-height: 480px;
    object-fit: cover;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}
.article-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}
.article-content p { margin-bottom: 1.1rem; }

/* ── Share bar ────────────────────────────────────────────── */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    background: var(--light-gray);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}
.share-bar a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 600;
    padding: .4rem .9rem;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity .2s;
}
.share-bar a:hover { opacity: .85; }
.share-fb  { background: #1877F2; color: #fff; }
.share-x   { background: #000; color: #fff; }
.share-wa  { background: #25D366; color: #fff; }
.share-li  { background: #0A66C2; color: #fff; }

/* ── Category page cards ──────────────────────────────────── */
.cat-card {
    display: block;
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 2px solid transparent;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cat-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(192,57,43,.12); transform: translateY(-2px); color: var(--primary); }
.cat-icon {
    width: 56px;
    height: 56px;
    background: rgba(192,57,43,.08);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto .75rem;
}
.cat-card h5 { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.cat-count { font-size: .78rem; color: var(--text-muted); }

/* ── Login page ───────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, var(--slate) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.login-box h3 { font-size: 1.35rem; font-weight: 800; color: var(--dark); text-align: center; margin-bottom: .25rem; }
.login-logo { text-align: center; margin-bottom: 1.25rem; }
.login-logo img { height: 56px; margin: 0 auto; }
.btn-login {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .65rem 1.5rem;
    font-size: .95rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: background .2s;
}
.btn-login:hover { background: var(--primary-dark); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination .page-link { color: var(--primary); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.75);
    padding: 2.5rem 0 0;
    margin-top: 3rem;
    border-top: 4px solid var(--primary);
}
.footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; }
.footer-brand span { color: var(--primary); }
.footer-tagline-text { font-size: .82rem; color: rgba(255,255,255,.45); margin-top: .25rem; }
.footer-heading { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .85rem; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { font-size: .82rem; color: rgba(255,255,255,.5); margin-bottom: .35rem; display: flex; align-items: center; gap: .5rem; }
.footer-divider { border-color: rgba(255,255,255,.08); margin: 1.5rem 0 0; }
.footer-bottom { background: rgba(0,0,0,.25); padding: .75rem 0; margin-top: 0; }
.social-icons { display: flex; gap: .5rem; margin-top: .75rem; }
.social-icons a {
    width: 34px; height: 34px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.6);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.social-icons a:hover { background: var(--primary); color: #fff; }

/* ── Admin ────────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; background: #F0F2F5; }
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--slate);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    background: var(--dark);
    padding: 1.1rem 1rem;
    border-bottom: 2px solid var(--primary);
}
.sidebar-brand .brand-name { font-size: 1rem; font-weight: 800; color: #fff; }
.sidebar-brand .brand-name span { color: var(--primary); }
.sidebar-brand .brand-sub { font-size: .68rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .06em; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav .nav-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    padding: .5rem 1rem .2rem;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1rem;
    color: rgba(255,255,255,.65);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(192,57,43,.18); color: #fff; border-left-color: var(--primary); }
.admin-content { flex: 1; padding: 0; overflow: auto; }
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.admin-topbar h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--dark); }
.admin-body { padding: 1.5rem; }
.stat-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border-left: 4px solid var(--primary);
}
.stat-icon { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; margin-top: .15rem; }
.btn-primary-admin { background: var(--primary); color: #fff; border: none; }
.btn-primary-admin:hover { background: var(--primary-dark); color: #fff; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { background: none; padding: 0; margin: 0 0 1rem; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 992px) {
    .featured-hero { grid-template-columns: 1fr; }
    .hero-image { min-height: 220px; }
    .admin-sidebar { width: 200px; }
}
@media (max-width: 768px) {
    .masthead-inner { min-height: 56px; }
    .masthead-brand { padding-right: .75rem; }
    .brand-name { font-size: 1.1rem; }
    .masthead-meta { display: none; }
    .strip-img { width: 110px; }
    .strip-img img { height: 100px; }
    .strip-no-img { width: 110px; height: 100px; }
    .nav-links { gap: 0; }
    .nav-links a { font-size: .76rem; padding: .35rem .5rem; }
    .nav-search input { width: 120px; }
    .admin-sidebar { position: fixed; left: -200px; transition: left .25s; }
    .admin-sidebar.open { left: 0; }
}
@media (max-width: 575px) {
    .featured-hero .hero-text { padding: 1.5rem 1rem; }
    .hero-text h2 { font-size: 1.2rem; }
    .site-nav .container { gap: .4rem; }
    .news-strip { flex-direction: column; }
    .strip-img { width: 100%; }
    .strip-img img { width: 100%; height: 200px; }
    .strip-no-img { width: 100%; }
    .strip-body { padding: .75rem; }
    .article-wrap { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .ticker-items { animation: none; }
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }
