:root {
  --primary-color: #4a6cf7;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --background_color: #0b192c;
  --light-background: #1e3e62;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: var(--background_color);
  color: #333;
}
.top-bar {
  background-color: #1e3e62;
  color: #e0e0e0;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: 48px;
}
/* Navbar Styling */
.navbar-custom {
  background-color: #1e3e62;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
}

.navbar-brand img {
  height: 70px;
  transition: all 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.nav-link {
  position: relative; /* required for ::after positioning */
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  color: #e0e0e0;
  text-decoration: none;
}

/* Hover background + text color */
.nav-link a :hover {
  background-color: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
}

.nav-link-custom {
  color: #fff !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

/* Animated underline */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px; /* adjust depending on padding */
  width: 0%;
  height: 2px;
  background-color: var(--background_color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%; /* expands smoothly */
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
 
}

.hero-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
   cursor: pointer;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem;
  color: white;
}

.hero-badge {
  background-color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Featured News */
#featuredNewsContainer {
  position: relative;
  overflow: hidden;
}

.featured-batch {
  transition: opacity 1s ease;
}

.featured-batch.hidden {
  opacity: 0;
}

/* News Cards */
.news-card {
  border: none;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  height: 100%;
  cursor: pointer;
  background-color: var(--light-background);
  color: var(--light-color);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-card-img {
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

.news-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

/* Weather Widget */
.weather-widget {
  background: linear-gradient(135deg, #4e54c8, #8f94fb);
  border-radius: 0.5rem;
  color: white;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.weather-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hourly-weather-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 1rem 0;
    scrollbar-width: none;
}

.hour-item {
    min-width: 80px;
    flex: 0 0 auto;
    text-align: center;
}


/* Trending Section */
.trending-list {
  list-style: none;
  padding: 0;
}

.trending-item {
  border-bottom: 1px solid var(--light-color);
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

.trending-item:hover {
  background-color: var(--light-background);
  padding-left: 0.5rem;
}

.trending-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background-color: var(--primary-color);
  color: white;
}

/* Modal Styles */
.modal-content {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.success-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-modal-content {
  background: white;
  border-radius: 16px;
  text-align: center;
  animation: popupScale 0.3s ease-out;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.success-checkmark {
  font-size: 48px;
  color: #4caf50;
  margin-bottom: 10px;
  animation: checkBounce 0.5s ease-in-out;
}

/* News Detail Page */
#newsDetailPage {
  display: none;
}

.news-detail-hero {
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 2rem;
}

.news-detail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem;
  color: white;
}

.news-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.news-meta {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
  margin: 2rem 0;
}

.author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.related-news-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.related-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Back to News Button */
.back-to-news {
  /* position: sticky; */
  top: 100px;
  z-index: 100;
}

/* Animations */
@keyframes popupScale {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkBounce {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Footer */
.footer {
  background-color: var(--light-background);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    height: 350px;
  }

  .news-detail-hero {
    height: 350px;
  }

  .navbar-brand img {
    height: 40px;
  }
}

/* Custom utilities */
.text-gradient {
  background: linear-gradient(90deg, #007bff, #6610f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hover-lift {
  transition: all 0.3s ease;
  background-color: var(--light-background);
  color: var(--light-color);
}

.hover-lift:hover {
  transform: translateY(-3px);
  background-color: var(--light-background);
}

.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.news-ticker {
  height: 400px;
  overflow: hidden;
  position: relative;
}

.ticker-item {
  padding: 10px 0;
}
