/* =========================
   COOU Green Design System
   ========================= */

/* --- Tokens --- */
:root{
  --ink:#101828; --muted:#667085; --bg:#f6f7fb;
  --coou:#1f7a3e; --coou-2:#2fbf71; --coou-3:#0b4f1f;
  --coou-4:#e6f4ea; --soft:#f8f9fa; --stroke:#e4e7ec;
}

/* --- Base --- */
html,body{height:100%}
body{background:var(--bg); color:var(--ink)}
a{text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%; display:block}

/* --- Utilities --- */
.text-muted-ink{color:var(--muted)!important}
.bg-soft{background:var(--soft)!important}
.bg-coou{background:var(--coou)!important}
.text-coou{color:var(--coou)!important}
.border-stroke{border-color:var(--stroke)!important}
.rounded-12{border-radius:12px}
.rounded-14{border-radius:14px}
.rounded-16{border-radius:16px}
.shadow-soft{box-shadow:0 6px 22px rgba(0,0,0,.06)}

/* --- Buttons --- */
.btn-success{background:#2e7d32;border:none}
.btn-success:hover{background:#256a2a}
.btn-outline-coou{border:1px solid var(--stroke); color:var(--ink); background:#fff}
.btn-outline-coou:hover{background:#eefaf2; border-color:#bde4c9}

/* --- Cards --- */
.card{border:none;border-radius:12px;box-shadow:0 6px 22px rgba(0,0,0,.06)}
.side-card{background:#fff;border:1px solid var(--stroke);border-radius:14px;padding:1rem}

/* --- Forms --- */
.form-text small{opacity:.9}

/* --- Image helpers --- */
.preview-container img{
  width:100px;height:100px;object-fit:cover;margin:6px;
  border:2px solid #2e7d32;border-radius:6px
}
.img-container{position:relative;display:inline-block}
.remove-btn{
  position:absolute;top:-6px;right:-6px;background:#dc3545;color:#fff;border:none;
  border-radius:50%;width:20px;height:20px;font-size:12px
}

/* Legacy .thumb had 3 different meanings.
   Keep .thumb as avatar, and expose explicit sizes to avoid conflicts. */
.thumb{width:48px;height:48px;object-fit:cover;border-radius:50%;border:1px solid #e5e7eb}
.thumb-sm{width:64px;height:48px;object-fit:cover;border-radius:4px;border:1px solid #eee}
.thumb-lg{width:140px;height:110px;object-fit:cover;border:2px solid #ffc107;border-radius:6px}

/* --- Status / badges --- */
.badge-scheduled{background:#6f42c1}
.badge-published,.badge-active{background:#198754}
.badge-draft,.badge-inactive{background:#6c757d}
.badge-pending{background:#fd7e14}

/* =========================
   Page: News Listing
   ========================= */

.hero-spot {
  position: relative; min-height: 520px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg,#0b4f1f,#0a3f19 60%, #062a11);
  box-shadow: 0 12px 40px rgba(16,24,40,.18);
}
.hero-spot .bg-img{
  position:absolute; inset:0; background-size:cover; background-position:center;
  filter: saturate(1.05) contrast(1.02) brightness(.92);
  transform: scale(1.04); transition: transform 800ms cubic-bezier(.2,.9,.2,1);
}
.hero-spot:hover .bg-img{ transform: scale(1.07); }
.hero-spot .scrim{ position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.1) 0%,rgba(0,0,0,.55) 60%,rgba(0,0,0,.88) 100%); }
.hero-spot .content{
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end;
  padding:22px; color:#fff; z-index:2;
}
.hero-spot .kpis{ display:flex; gap:.75rem; flex-wrap:wrap; }
.hero-spot .kpis .pill{
  display:inline-flex; align-items:center; gap:.45rem; background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.25); border-radius:999px; padding:.32rem .6rem; font-size:.85rem;
  backdrop-filter: blur(6px);
}
.hero-spot .title{ font-size:clamp(1.6rem,2vw + 1.2rem,2.6rem); font-weight:800; text-shadow:0 4px 12px rgba(0,0,0,.45); }
.hero-spot .lead{ opacity:.95; font-size:1.02rem; }

.hero-search {
  margin-top: 14px;
  background: rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.25);
  border-radius:12px; padding:10px; backdrop-filter: blur(6px);
}
.hero-search .form-control{
  background: rgba(255,255,255,.9); border:0; border-radius:10px;
}

.quick-cats .chip{ margin-right:.35rem; margin-bottom:.35rem; }
.sticky-toolbar { position: sticky; top: 72px; z-index: 20; }

.hero-wrap{
  position:relative;padding:48px 0;overflow:hidden;color:#fff;
  background:linear-gradient(135deg,#0b4f1f,#0a3f19 60%,#062a11)
}
.hero-title{font-weight:800;letter-spacing:.2px}
.hero-sub{color:rgba(255,255,255,.85)}

.toolbar{
  background:#fff;border:1px solid var(--stroke);border-radius:14px;padding:.75rem 1rem;
  box-shadow:0 10px 30px rgba(16,24,40,.06)
}
.toolbar .btn-toggle{
  border:1px solid var(--stroke);background:#fff;border-radius:10px;padding:.375rem .6rem
}
.btn-toggle.active{background:#eefaf2;border-color:#bde4c9}

.news-card{
  background:#fff;border:1px solid #eef0f3;border-radius:16px;overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease;height:100%
}
.news-card:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(16,24,40,.08)}
.news-thumb{width:100%;height:220px;object-fit:cover;background:var(--coou-4)}
.chip{
  display:inline-block;border:1px solid #e5e7eb;border-radius:999px;padding:.12rem .55rem;
  font-size:.75rem;color:#0f5132;margin-right:.25rem;margin-bottom:.25rem;background:#f4fbf6
}
.views-badge{background:var(--coou);color:#fff;border-radius:999px;padding:.2rem .55rem;font-size:.75rem}

.list-item{
  background:#fff;border:1px solid #eef0f3;border-radius:16px;padding:14px;
  display:flex;gap:14px;align-items:stretch
}
.list-thumb{width:240px;height:150px;object-fit:cover;border-radius:12px;background:var(--coou-4)}
.list-body h5{margin:0 0 .35rem 0;font-weight:700}
.list-meta{color:var(--muted);font-size:.875rem}

/* =========================
   Page: News Single
   ========================= */
#progress-bar{position:fixed;top:0;left:0;height:4px;background:#28a745;width:0%;z-index:2000}

.news-hero{
  position:relative;height:450px;background-size:cover;background-position:center;border-radius:15px;
  overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,0.2)
}
.news-hero-gradient{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,0.3) 20%,rgba(0,0,0,0.85) 100%);z-index:1}
.news-hero-overlay{position:absolute;bottom:20px;left:20px;right:20px;z-index:2;color:#fff}
.news-title{font-size:clamp(1.6rem,2vw + 1rem,2.4rem);font-weight:800;margin-bottom:.5rem;text-shadow:0 3px 6px rgba(0,0,0,.55)}
.news-meta{font-size:.95rem;opacity:.95}

.news-content{font-size:1.05rem;line-height:1.8;color:#222}
.news-content p{margin-bottom:1rem}
.news-content img{max-width:100%;border-radius:8px;margin:1rem 0}

/* Sidebar sections */
.sidebar-section{
  background:#f8f9fa;padding:18px;border-radius:12px;margin-bottom:2rem;
  box-shadow:0 0 10px rgba(0,0,0,0.05)
}
.sidebar-section h5{
  border-bottom:3px solid #28a745;padding-bottom:8px;margin-bottom:1rem;font-weight:700;color:#198754
}
.sidebar-news-item{display:flex;gap:.75rem;margin-bottom:14px}
.sidebar-news-item img{width:64px;height:64px;object-fit:cover;border-radius:8px}
.sidebar-news-date{font-size:.85rem;color:#888}

/* Category chips */
.cat-badge{background:#dff5e3;color:#198754;border:1px solid #b7e5c0;font-weight:600}

/* Reporter card */
.reporter-card{background:#fff;border:1px solid #e7ebef;border-radius:14px;padding:16px}
.reporter-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;background:#e6f2ea;display:block}
.rep-initials{
  width:72px;height:72px;border-radius:50%;background:var(--coou);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.1rem
}
.rep-label{font-size:.8rem;text-transform:uppercase;color:#6c757d;letter-spacing:.04em}
.rep-chip{
  display:inline-flex;align-items:center;gap:.4rem;border:1px solid #dfe6e1;border-radius:999px;
  padding:.25rem .55rem;font-size:.8rem;background:#f3faf6;color:#1b6b3a
}

/* “More stories” cards */
.story-card{
  border:0;box-shadow:0 2px 10px rgba(0,0,0,0.06);border-radius:12px;overflow:hidden;height:100%;
  position:relative;transition:transform 240ms cubic-bezier(.2,.9,.2,1), box-shadow 240ms ease;background:#fff
}
.story-card:hover,.story-card:focus-within{
  transform:translateY(-8px) scale(1.015);box-shadow:0 18px 40px rgba(16,52,31,0.12);z-index:5
}
.story-thumb-wrap{position:relative;overflow:hidden;display:block;height:160px;background:#e9ecef}
.story-thumb{
  width:100%;height:100%;object-fit:cover;display:block;transition:transform 600ms cubic-bezier(.2,.9,.2,1), filter 300ms ease;
  transform-origin:center;backface-visibility:hidden
}
.story-card:hover .story-thumb,.story-card:focus-within .story-thumb{transform:scale(1.08);filter:brightness(0.92)}
.thumb-overlay{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,0.0) 10%, rgba(0,0,0,0.30) 60%);opacity:0;transition:opacity 220ms ease
}
.story-card:hover .thumb-overlay,.story-card:focus-within .thumb-overlay{opacity:1}
.thumb-overlay .overlay-icon{
  color:#fff;background:rgba(0,0,0,0.28);padding:10px 12px;border-radius:999px;font-size:18px;
  transform:translateY(6px);transition:transform 220ms ease
}
.story-card:hover .thumb-overlay .overlay-icon,.story-card:focus-within .overlay-icon{transform:translateY(0)}

@media (min-width:992px){.sticky-col{position:sticky;top:88px}}