/* ====================================
   NewsPortal - Main Stylesheet
   ==================================== */
:root {
  --primary:     #dc2626;
  --primary-dark:#b91c1c;
  --dark:        #111827;
  --gray:        #6b7280;
  --light-gray:  #f3f4f6;
  --border:      #e5e7eb;
  --font-news:   'Playfair Display', Georgia, serif;
  --font-ui:     'Inter', sans-serif;
  --radius:      0.5rem;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --ticker-h:    40px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
body {
  font-family: var(--font-ui);
  background: var(--light-gray);
  color: var(--dark);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: inherit; }

/* ---- Dark Mode ---- */
[data-bs-theme="dark"] {
  --bs-body-bg: #0f172a;
  --bs-body-color: #e2e8f0;
  --light-gray: #1e293b;
  --border: #334155;
}
[data-bs-theme="dark"] .bg-white  { background: #1e293b !important; }
[data-bs-theme="dark"] .bg-light  { background: #273348 !important; }
[data-bs-theme="dark"] .text-dark { color: #e2e8f0 !important; }
[data-bs-theme="dark"] body       { background: #0f172a; }
[data-bs-theme="dark"] .site-header { background: #1e293b !important; }
[data-bs-theme="dark"] .news-card   { background: #1e293b; }

/* ---- Breaking Ticker ---- */
.breaking-ticker {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label { font-size: .7rem; white-space: nowrap; letter-spacing: .05em; }
.ticker-wrap  { overflow: hidden; position: relative; }
.ticker-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-content:hover { animation-play-state: paused; }
.ticker-item {
  color: var(--dark);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s;
}
.ticker-item:hover { color: var(--primary); }
@keyframes ticker-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ---- Header ---- */
.site-header { background: #fff; z-index: 1030; }
.navbar .nav-link {
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem .75rem;
  color: var(--dark);
  border-radius: var(--radius);
  transition: all .2s;
  position: relative;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--primary); }
.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: .75rem; right: .75rem;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.search-input { border-radius: 20px; min-width: 200px; }
.social-icon { font-size: 1rem; transition: color .2s; }
.social-icon:hover { color: var(--primary) !important; }

/* ---- Featured Section ---- */
.featured-section { background: var(--light-gray); }
.featured-carousel { height: 420px; }
.carousel-img-wrap { height: 420px; overflow: hidden; }
.carousel-img-wrap img { height: 420px; object-fit: cover; }
.carousel-caption {
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  bottom: 0; left: 0; right: 0;
  text-align: left !important;
  border-radius: 0 0 var(--radius) var(--radius);
}
.carousel-caption h3 { font-family: var(--font-news); font-size: 1.3rem; line-height: 1.3; }
.news-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---- News Cards ---- */
.news-card {
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow);
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,.1);
}
.news-img { transition: transform .4s ease; }

/* ====== (Pichle se continue) ====== */

.news-card:hover .news-img { transform: scale(1.05); }

/* ---- Section Headings ---- */
.section-title {
  font-family: var(--font-news);
  font-size: 1.4rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin-top: 6px;
  border-radius: 2px;
}
.section-accent {
  display: inline-block;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--primary);
  flex-shrink: 0;
}
.section-header { border-bottom: 2px solid var(--border); padding-bottom: .75rem; margin-bottom: 1.25rem; }

/* ---- Badge Tag ---- */
.badge-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--light-gray);
  color: var(--dark);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid var(--border);
}
.badge-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Sidebar ---- */
.sidebar-widget {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.widget-header { padding-bottom: .75rem; border-bottom: 2px solid var(--border); }
.widget-icon { font-size: .95rem; border-radius: 6px !important; }
.trending-item:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.trending-num { font-family: var(--font-news); line-height: 1; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- Post Article ---- */
.post-title { font-family: var(--font-news); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.3; }
.post-content { font-size: 1.05rem; line-height: 1.9; }
.post-content h2, .post-content h3 { font-family: var(--font-news); margin-top: 2rem; margin-bottom: 1rem; }
.post-content p { margin-bottom: 1.4rem; }
.post-content img { width: 100%; height: auto; border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  background: var(--light-gray);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray);
}

/* ---- Social Share Buttons ---- */
.btn-facebook  { background: #1877f2; color: #fff; border: none; }
.btn-twitter   { background: #000;    color: #fff; border: none; }
.btn-whatsapp  { background: #25d366; color: #fff; border: none; }
.btn-telegram  { background: #2ca5e0; color: #fff; border: none; }
.btn-facebook:hover  { background: #166fe5; color: #fff; }
.btn-twitter:hover   { background: #333;    color: #fff; }
.btn-whatsapp:hover  { background: #20b858; color: #fff; }
.btn-telegram:hover  { background: #1a8fc4; color: #fff; }

/* ---- Footer ---- */
.site-footer      { background: #1a1a2e; color: #cbd5e1; }
.footer-brand     { font-size: 1.5rem; color: #fff; }
.footer-heading   { color: #e2e8f0; font-size: .8rem; letter-spacing: .08em; }
.footer-links a   { color: #94a3b8; font-size: .9rem; text-decoration: none; transition: color .2s; display: block; padding: 3px 0; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom    { background: #111827; color: #6b7280; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: .95rem;
  text-decoration: none;
  transition: all .2s;
}
.social-btn.facebook  { background: #1877f2; color: #fff; }
.social-btn.twitter   { background: #111;    color: #fff; }
.social-btn.youtube   { background: #ff0000; color: #fff; }
.social-btn.instagram { background: #e1306c; color: #fff; }
.social-btn:hover     { opacity: .85; transform: translateY(-2px); }

/* ---- Hover Helpers ---- */
.hover-red:hover { color: var(--primary) !important; }
.hover-card { transition: box-shadow .2s; }
.hover-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1) !important; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(220,38,38,.4);
  text-decoration: none;
  opacity: 0; pointer-events: none;
  transition: all .3s;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover   { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ---- Breaking / Trending Badges ---- */
.badge-breaking { background: var(--primary); }
.badge-trending { background: #f59e0b; color: #000; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .featured-carousel, .carousel-img-wrap, .carousel-img-wrap img { height: 260px !important; }
  .carousel-caption h3 { font-size: 1rem; }
  .post-title { font-size: 1.5rem; }
  .section-title { font-size: 1.2rem; }
}
@media (max-width: 576px) {
  .breaking-ticker { height: auto; min-height: var(--ticker-h); }
  .post-content { font-size: .97rem; }
}

/* ---- Skip Link (Accessibility) ---- */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--primary); color: #fff;
  padding: 8px 16px; z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---- Video Cards ---- */
.video-card {
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.video-card:hover { transform: translateY(-3px); }

/* ---- Pagination ---- */
.pagination .page-link {
  color: var(--primary);
  border-radius: var(--radius) !important;
  margin: 0 2px;
  border: 1px solid var(--border);
}
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Alert / Toasts ---- */
.alert-success { border-left: 4px solid #22c55e; }
.alert-danger  { border-left: 4px solid var(--primary); }

/* ---- Category Badge colors on nav hover ---- */
.navbar .nav-link:hover { color: var(--cat-color, var(--primary)); }