/* =====================================================================
   UDHAMPUR NEWS POST - MODERN NEWS PORTAL STYLESHEET
   Clean, Authoritative, Responsive Editorial Design
===================================================================== */

:root {
  --unp-red: #d90429;
  --unp-red-hover: #b00320;
  --unp-red-light: #fef2f2;
  --unp-navy: #0f172a;
  --unp-navy-light: #1e293b;
  --unp-gold: #f59e0b;
  --unp-blue: #0284c7;
  
  --unp-bg: #f8fafc;
  --unp-card-bg: #ffffff;
  --unp-text: #1e293b;
  --unp-text-muted: #64748b;
  --unp-border: #e2e8f0;
  
  --unp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --unp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --unp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --unp-radius: 12px;
  --unp-radius-sm: 6px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --font-heading: 'Oswald', sans-serif;
}

[data-bs-theme="dark"] {
  --unp-bg: #090d16;
  --unp-card-bg: #111827;
  --unp-text: #f3f4f6;
  --unp-text-muted: #9ca3af;
  --unp-border: #1f2937;
  --unp-red-light: rgba(217, 4, 41, 0.15);
  --unp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --unp-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --unp-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Global Reset & Base */
body {
  font-family: var(--font-sans);
  background-color: var(--unp-bg);
  color: var(--unp-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--unp-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-serif {
  font-family: var(--font-serif);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--unp-red);
}

/* --- Top Utility Bar --- */
.top-bar-modern {
  background-color: var(--unp-navy);
  color: #e2e8f0;
  font-size: 0.8125rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-modern a {
  color: #cbd5e1;
}

.top-bar-modern a:hover {
  color: #ffffff;
}

.top-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  font-size: 0.75rem;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.top-social-icon:hover {
  background: var(--unp-red);
  transform: translateY(-2px);
}

/* --- Brand Masthead --- */
.brand-masthead {
  background: var(--unp-card-bg);
  border-bottom: 1px solid var(--unp-border);
  padding: 16px 0;
}

.brand-logo-text {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.brand-logo-text .logo-udhampur {
  color: var(--unp-red);
}

.brand-logo-text .logo-news {
  color: var(--unp-text);
}

.brand-logo-text .logo-post {
  background: var(--unp-red);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--unp-text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* --- Main Navigation Bar --- */
.main-navbar-sticky {
  background: var(--unp-card-bg);
  border-bottom: 2px solid var(--unp-red);
  box-shadow: var(--unp-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.main-navbar-sticky .nav-link {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--unp-text) !important;
  padding: 12px 14px !important;
  border-radius: var(--unp-radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.main-navbar-sticky .nav-link:hover,
.main-navbar-sticky .nav-link.active {
  color: var(--unp-red) !important;
  background-color: var(--unp-red-light);
}

.main-navbar-sticky .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  background: var(--unp-red);
  border-radius: 3px 3px 0 0;
}

/* --- Breaking News Ticker --- */
.breaking-ticker-wrap {
  background: var(--unp-card-bg);
  border: 1px solid var(--unp-border);
  border-radius: var(--unp-radius);
  overflow: hidden;
  box-shadow: var(--unp-shadow-sm);
  display: flex;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 20px;
}

.ticker-badge {
  background: var(--unp-red);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulse-dot 1.4s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 10px #ffffff; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.ticker-marquee {
  flex-grow: 1;
  padding: 0 15px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-marquee a {
  color: var(--unp-text);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-marquee a:hover {
  color: var(--unp-red);
}

/* --- Editorial Cards & Modern Grid --- */
.card-modern {
  background: var(--unp-card-bg);
  border: 1px solid var(--unp-border);
  border-radius: var(--unp-radius);
  overflow: hidden;
  box-shadow: var(--unp-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--unp-shadow-md);
}

.card-modern-img-wrap {
  position: relative;
  overflow: hidden;
  background-color: #0f172a;
  aspect-ratio: 16 / 10;
}

.card-modern-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-modern:hover .card-modern-img-wrap img {
  transform: scale(1.06);
}

.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--unp-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-modern-body {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-modern-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--unp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-modern-excerpt {
  color: var(--unp-text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-modern-meta {
  font-size: 0.75rem;
  color: var(--unp-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--unp-border);
  padding-top: 10px;
  margin-top: auto;
}

/* --- Hero Lead Story --- */
.lead-story-card {
  position: relative;
  border-radius: var(--unp-radius);
  overflow: hidden;
  background: #000;
  height: 480px;
  box-shadow: var(--unp-shadow-md);
}

.lead-story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.lead-story-card:hover img {
  transform: scale(1.04);
  opacity: 0.95;
}

.lead-story-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 24px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  color: #ffffff;
}

.lead-story-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 10px 0;
  color: #ffffff;
}

@media (max-width: 768px) {
  .lead-story-card { height: 360px; }
  .lead-story-title { font-size: 1.3rem; }
  .brand-logo-text { font-size: 1.6rem; }
}

/* --- Carousel Enhancements --- */
.hero-carousel .carousel-item {
  height: 480px;
  border-radius: var(--unp-radius);
  overflow: hidden;
  background-color: #000;
}

.hero-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-carousel .carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 24px;
  text-align: left;
}

@media (max-width: 768px) {
  .hero-carousel .carousel-item { height: 320px; }
}

/* --- Section Headers --- */
.section-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--unp-border);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.section-header-modern h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.section-header-modern h3::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--unp-red);
}

/* --- Trending Ranked List --- */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--unp-border);
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-rank {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--unp-red);
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}

.trending-content {
  flex-grow: 1;
}

.trending-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

/* --- Video Desk / UNP TV --- */
.video-section-dark {
  background: #0f172a;
  border-radius: var(--unp-radius);
  padding: 24px;
  color: #ffffff;
  margin-bottom: 30px;
}

.video-card-modern {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--unp-radius-sm);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.video-card-modern:hover {
  transform: translateY(-4px);
}

.video-thumb-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--unp-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(217, 4, 41, 0.5);
  transition: transform 0.2s ease;
}

.video-card-modern:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
}

/* --- Social Sharing Bar --- */
.social-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  margin: 16px 0;
  border-top: 1px solid var(--unp-border);
  border-bottom: 1px solid var(--unp-border);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 20px;
  color: #ffffff !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
}

.share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.share-btn-whatsapp { background-color: #25d366; }
.share-btn-facebook { background-color: #1877f2; }
.share-btn-twitter  { background-color: #000000; }
.share-btn-telegram { background-color: #229ed9; }
.share-btn-copy     { background-color: #475569; }
.share-btn-native   { background-color: var(--unp-red); }

/* --- Article Detail Styling --- */
.article-header-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 14px 0;
  color: var(--unp-text);
}

@media (max-width: 768px) {
  .article-header-title { font-size: 1.6rem; }
}

.article-content-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--unp-text);
}

.article-paragraph {
  margin-bottom: 1.4rem;
}

.article-paragraph strong {
  color: var(--unp-text);
  font-weight: 700;
}

/* --- Modern Footer --- */
.modern-footer {
  background-color: #0b1120;
  color: #94a3b8;
  border-top: 4px solid var(--unp-red);
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-heading {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--unp-red);
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 10px;
}

.footer-links-list a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links-list a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Floating Back To Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background: var(--unp-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--unp-red-hover);
  transform: translateY(-3px);
  color: #ffffff;
}
