:root{
  --brand:#d61f26;
  --ink:#0f172a;
}
::selection {
  background: var(--brand);
  color: #fff;
}
::-moz-selection {
  background: var(--brand);
  color: #fff;
}
/* Selection Lock (Prevent copying text) */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body{background:#f6f7fb;color:var(--ink);}
.topbar{background:linear-gradient(90deg,#fff, #fff);}
.navbar-brand{letter-spacing:.2px}
.badge.bg-danger{background:var(--brand)!important;}
.hero-card{
  border:0;
  background:linear-gradient(180deg,#ffffff, #ffffff);
  box-shadow:0 10px 30px rgba(2,6,23,.08);
}
.headline-title{
  font-weight:800;
  line-height:1.05;
  letter-spacing:-.4px;
}
.news-card{
  border:0;
  background:#fff;
  box-shadow:0 8px 24px rgba(2,6,23,.06);
  transition:transform .15s ease, box-shadow .15s ease;
}
.news-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(2,6,23,.10);}
.news-thumb{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  background:#e9eef8;
}
/* Hero: media stretches to match text column — cover fills, no empty band under image */
.hero-card > .row{
  align-items:stretch;
}
.hero-card > .row > .col-md-6:first-child{
  display:flex;
  flex-direction:column;
}
.hero-card > .row > .col-md-6:first-child > a{
  position:relative;
  overflow:hidden;
  flex:1 1 auto;
  display:block;
  min-height:200px;
  aspect-ratio:16/9;
}
@media (min-width:768px){
  .hero-card > .row > .col-md-6:first-child > a{
    aspect-ratio:unset;
    min-height:0;
  }
}
.hero-card .news-thumb{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  aspect-ratio:unset;
  object-fit:cover;
}
.section-title{
  font-weight:800;
  letter-spacing:-.3px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.25rem .6rem;
  border-radius:999px;
  background:rgba(214,31,38,.08);
  color:var(--brand);
  font-weight:700;
  font-size:.8rem;
}
.byline{color:#64748b}
.link-ink{color:var(--ink);text-decoration:none}
.link-ink:hover{color:var(--brand)}

/* Article layout and media responsiveness */
.article-layout{
  align-items:flex-start;
}
.article-main article{
  overflow:hidden;
}
.article-sidebar .sidebar-card{
  position:sticky;
  top:1rem;
}
.sidebar-thumb{
  width:72px;
  height:72px;
  object-fit:cover;
  flex-shrink:0;
  background:#e9eef8;
}

.content img{
  max-width:100%;
  height:auto;
  border-radius:.5rem;
  display:block;
}

.content video,
.article-video{
  width:100%;
  max-width:100%;
  height:auto;
  max-height:min(70vh, 720px);
  display:block;
  margin-inline:auto;
  border-radius:.5rem;
  object-fit:contain;
  background:#000;
}

.content iframe{
  width:100%;
  max-width:100%;
  aspect-ratio:16/9;
  height:auto;
  border:0;
  border-radius:.5rem;
  display:block;
}

.content .article-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  gap:.75rem;
  margin:1rem 0;
}
.content .article-gallery figure{
  margin:0;
}
.content .article-gallery img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
}

@media (max-width: 991.98px){
  .article-sidebar .sidebar-card{
    position:static;
  }
}

/* ===== Theme (dark/light) ===== */
body[data-theme="dark"]{
  --ink:#e5e7eb;
  --page-bg:#0b1220;
  --surface:#0f172a;
  --thumb-bg:#111827;
  --muted:#94a3b8;
  background:var(--page-bg) !important;
  color:var(--ink) !important;
}

body[data-theme="dark"] .topbar{
  background:linear-gradient(90deg,var(--surface), var(--surface));
}

body[data-theme="dark"] .link-ink{
  color:var(--ink) !important;
}

body[data-theme="dark"] .section-title{
  color:var(--ink) !important;
}

body[data-theme="dark"] .hero-card{
  background:linear-gradient(180deg,var(--surface), var(--surface));
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}

body[data-theme="dark"] .news-card{
  background:var(--surface);
  box-shadow:0 10px 30px rgba(0,0,0,.20);
}

body[data-theme="dark"] .news-thumb{
  background:var(--thumb-bg);
}
body[data-theme="dark"] .sidebar-thumb{
  background:var(--thumb-bg);
}

body[data-theme="dark"] .byline{
  color:var(--muted);
}

body[data-theme="dark"] .text-secondary{
  color:var(--muted) !important;
}

body[data-theme="dark"] .pill{
  background:rgba(214,31,38,.18);
}

/* Search / article backgrounds */
body[data-theme="dark"] .bg-white{
  background:var(--surface) !important;
}

/* Pagination */
body[data-theme="dark"] .pagination .page-link{
  background:transparent;
  border-color:rgba(148,163,184,.35);
  color:var(--ink);
}
body[data-theme="dark"] .pagination .page-link:hover{
  border-color:rgba(214,31,38,.55);
  color:var(--ink);
}
body[data-theme="dark"] .pagination .page-item.active .page-link{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}
body[data-theme="dark"] .pagination .page-item.disabled .page-link{
  opacity:.55;
}

/* Borders */
body[data-theme="dark"] .border-secondary{
  border-color:rgba(148,163,184,.35) !important;
}

/* Breaking News Ticker */
.ticker-wrap {
  background: var(--brand);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}
.ticker-title {
  background: #fff;
  color: var(--brand);
  padding: 0 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-right: 15px;
  display: inline-block;
  border-radius: 4px;
}
.ticker-content {
  display: inline-block;
  animation: ticker-animation 30s linear infinite;
  padding-left: 100%;
}
.ticker-content:hover {
  animation-play-state: paused;
}
@keyframes ticker-animation {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.ticker-item {
  display: inline-block;
  margin-right: 40px;
  color: #fff;
  text-decoration: none;
}
.ticker-item:hover {
  color: #fff;
  text-decoration: underline;
}
.ticker-item::before {
  content: "•";
  margin-right: 10px;
}

.btn-danger, .bg-danger {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-outline-danger {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-outline-danger:hover {
  background-color: var(--brand) !important;
  color: #fff !important;
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(214, 31, 38, 0.25);
}
