/* ====================
  GLOBAL VARIABLES 
===================== */
:root {
  /* Primary Colors */
  --primary-red: #ec5252;
  --secondary-red: #f58585;
  --dark-blue: #233d63;
  
  /* Text Colors */
  --primary-text: #233d63;
  --secondary-text: #7f8897;
  --light-text: #ffffff;
  
  /* Background Colors */
  --primary-background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  --card-background: #ffffff;
  --dark-mode-background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  
  /* Additional (Legacy) */
  --primary-color: var(--primary-red);
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --danger-color: #dc3545;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
}

/* ====================
  GLOBAL STYLES 
===================== */
body {
  font-family: "Noto Sans", "Poppins", sans-serif;
  background: var(--primary-background);
  color: var(--primary-text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* ====================
  TYPOGRAPHY 
===================== */
.fs-35 {
  font-size: 35px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-primary-text {
  color: var(--primary-text) !important;
}

.text-secondary-text {
  color: var(--secondary-text) !important;
}

/* ====================
  HEADER & NAVIGATION 
===================== */
.topbar {
  background-color: var(--light-color);
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.topbar .date-time small {
  color: var(--secondary-text);
}

.header-middle {
  background-color: var(--card-background);
  padding: 25px 0;
  border-bottom: 1px solid #eee;
}

.header-middle .logo img {
  max-height: 60px;
}

.header-middle .ad-banner img {
  max-height: 80px;
  width: 100%;
  object-fit: cover;
}

/* Navbar Styles */
.navbar {
  padding: 12px 25px;
  background-color: var(--dark-blue);
}

.navbar .navbar-toggler {
  border: none;
}

.navbar .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--light-text);
}

.navbar-nav .nav-link {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  margin-right: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

/* Dropdown Menu Styles */
.dropdown-menu {
  background-color: var(--card-background);
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.dropdown-item {
  color: var(--primary-text);
  padding: 12px 25px;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-red);
  color: var(--light-text);
}

/* Social Icons */
.social-icons a {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 15px;
  color: var(--primary-text);
}

.social-icons a:hover {
  color: var(--primary-red) !important;
}

.social-icons-nav a {
  font-size: 16px;
  color: var(--light-text);
  transition: color 0.3s ease;
  margin-left: 15px;
}

.social-icons-nav a:hover {
  color: var(--secondary-red);
}

/* ====================
  COMPONENTS 
===================== */
/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  border-radius: 15px 15px 0 0;
}

.bg-primary-red {
  background-color: var(--primary-red) !important;
}

/* Card Styles */
.card {
  background: var(--card-background);
  border-radius: 8px;
  border: none;
  transition: all 0.3s ease;
  overflow: hidden;
  /* Removed height: 100% to prevent overlap */
  /* height: 100%; */
  margin-bottom: 1rem; /* default spacing */
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/*
  No forced height for .card-img-top.
  We'll show the entire image using object-fit: contain.
*/
.card .card-img-top {
  width: 100%;
  height: auto;
  object-fit: contain; /* no cropping, entire image is shown */
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

.card .card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.card .card-title a {
  color: var(--primary-text);
  transition: color 0.3s ease;
}

.card .card-title a:hover {
  color: var(--primary-red);
}

.card .card-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--secondary-text);
}

.card .article-meta {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.card .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  font-weight: 500;
}

.standard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.primary-btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
  color: var(--light-text);
  transition: all 0.3s ease;
  border: none;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(236, 82, 82, 0.4);
  color: var(--light-text);
}

.outline-btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid var(--dark-blue);
  color: var(--dark-blue);
  transition: all 0.3s ease;
  background: transparent;
}

.outline-btn:hover {
  background-color: var(--dark-blue);
  color: var(--light-text);
}

/* Badge */
.badge {
  padding: 8px 12px;
  font-weight: 500;
  font-size: 13px;
}

/* Standard Transition */
.standard-transition {
  transition: all 0.3s ease;
}

/* ====================
  SPECIFIC COMPONENTS 
===================== */
/* Trending Section */
.trending-section {
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}

.trending-items {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.trending-items::-webkit-scrollbar {
  display: none;
}

.trending-item {
  flex: 0 0 auto;
  margin-right: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Tabs */
.category-tabs {
  position: relative;
  margin-bottom: 20px;
  background: #fff;
  overflow: hidden;
}

.category-tabs .nav-tabs {
  border: none;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  gap: 0;
  position: relative;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.category-tabs .nav-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs .nav-item {
  flex: 0 0 auto;
  margin: 0;
  position: relative;
  scroll-snap-align: start;
}

.category-tabs .nav-link {
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  color: #666;
  border-radius: 0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
  margin: 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  user-select: none;
}

.category-tabs .nav-link i {
  font-size: 16px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.category-tabs .nav-link.active {
  color: var(--primary-red);
  background-color: transparent;
  border-bottom: 2px solid var(--primary-red);
  font-weight: 600;
}

.category-tabs .nav-link:hover {
  color: var(--primary-red);
}

/* Mobile: Add touch scrolling for nav tabs */
@media (max-width: 767.98px) {
  .category-tabs .nav-link {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .category-tabs .nav-link i {
    font-size: 14px;
    width: 16px;
    height: 16px;
  }
  
  .category-tabs .nav-tabs {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .category-tabs .nav-item {
    scroll-snap-align: start;
  }
  
  .category-tabs .nav-link {
    padding: 10px 15px;
    font-size: 13px;
  }
}

/* Circular Categories */
.circular-categories {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 30px;
}

.circular-categories::-webkit-scrollbar {
  display: none;
}

.circular-category {
  display: inline-block;
  width: 70px;
  margin-right: 15px;
  text-align: center;
}

.circle-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  border: 2px solid var(--primary-red);
  transition: all 0.3s ease;
}

.circle-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(236, 82, 82, 0.3);
}

.circle-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* News Sections */
.news-section {
  margin-bottom: 60px;
}

.news-section .section-header {
  text-align: left;
  margin-bottom: 0;
}

/* Search Bar */
.search-bar {
  margin-bottom: 30px;
}

.search-bar .input-group {
  padding: 12px 25px;
}

.search-bar .form-control {
  font-size: 16px;
}

/* Sidebar Styles */
.sidebar-section .section-header {
  border-radius: 15px 15px 0 0;
}

.list-group-item {
  border-left: none;
  border-right: none;
  padding: 12px 25px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background-color: rgba(236, 82, 82, 0.05);
  color: var(--primary-red);
}

.list-group-item:first-child {
  border-top: none;
}

.list-group-item:last-child {
  border-bottom: none;
}

.categories-grid .card {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.categories-grid .card:hover {
  transform: scale(1.05);
  background-color: var(--primary-red);
  color: var(--light-text);
}

.categories-grid .card i {
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

/* Footer Styles */
footer {
  background-color: var(--dark-blue);
  color: var(--light-text);
  padding: 80px 0 20px;
}

footer h5 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

footer p, footer li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-red) !important;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 60px;
}

.back-to-top {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-red);
  color: var(--light-text);
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(236, 82, 82, 0.5);
}

/* ====================
  DARK MODE STYLES
===================== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-text: #ffffff;
    --secondary-text: #cccccc;
    --primary-background: var(--dark-mode-background);
    --card-background: #2d2d2d;
  }
  
  body {
    background: var(--dark-mode-background);
    color: var(--primary-text);
  }
  
  .topbar, .header-middle {
    background-color: #2d2d2d;
    border-color: #3a3a3a;
  }
  
  .dropdown-menu {
    background-color: #2d2d2d;
  }
  
  .dropdown-item {
    color: var(--light-text);
  }
  
  .standard-card {
    background-color: #2d2d2d;
  }
  
  footer {
    background-color: #1a1a1a;
  }
}

/* ====================
  RESPONSIVE BREAKPOINTS 
===================== */
/* Extra Large: ≥1200px */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Large: ≥992px */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-nav .nav-link {
    padding: 8px 15px;
    font-size: 13px;
  }
  
  .section-title {
    font-size: 28px;
  }
}

/* Medium: ≥768px */
@media (min-width: 768px) and (max-width: 991.98px) {
  section {
    padding: 60px 0;
  }
  
  .header-middle {
    padding: 20px 0;
  }
  
  .navbar-nav .nav-link {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .standard-card {
    padding: 20px;
  }
  
  .trending-item {
    margin-right: 10px;
  }
  
  .circular-category {
    width: 60px;
  }
  
  .circle-icon {
    width: 50px;
    height: 50px;
  }
}

/* Small: ≥576px */
@media (min-width: 576px) and (max-width: 767.98px) {
  section {
    padding: 40px 0;
  }
  
  .topbar .social-icons {
    justify-content: center;
    margin-top: 10px;
  }
  
  .header-middle .logo,
  .header-middle .ad-banner {
    text-align: center;
    margin-bottom: 15px;
  }
  
  .card {
    margin-bottom: 0.75rem; 
  }
  
  .card .card-body {
    padding: 10px 8px;
  }
  
  .card-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  
  .card-text.small {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .category-tabs .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .section-title {
    font-size: 24px;
  }
}

/* Extra Small: <576px */
@media (max-width: 575.98px) {
  section {
    padding: 20px 0;
  }

  .card {
    border: none;
    border-radius: 0;
    margin-bottom: 0.75rem;
  }

  .card .card-body {
    padding: 0.75rem;
  }

  .card .card-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
  }

  .card .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card .article-meta {
    font-size: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.4rem;
    margin-top: 0.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .card .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .header-middle {
    padding: 15px 0;
  }
  
  .standard-card {
    padding: 15px;
  }
  
  .primary-btn, .outline-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .section-header {
    margin-bottom: 20px;
  }
}

/* ====================
  NEW SITE-WRAPPER 
===================== */
.site-wrapper {
  max-width: 1200px; 
  margin: 0 auto;
  /* padding: 0 15px; */
}

/* ================================
   LATEST NEWS CUSTOM DESIGN
   (One big card on the left, 
    stacked items on the right, 
    no border, optional pink date)
================================= */

/* Example class for a pink badge */
.pink-badge {
  background-color: #e91e63; /* Pink color */
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Example class for a dark badge */
.dark-badge {
  background-color: #000;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* Remove border if you had any around the right column in Latest News */
.latest-news-section .col-md-5 > .p-2.h-100 {
  border: none !important; /* remove any leftover border */
  padding: 0.5rem !important;
}

/* Adjust the big card's image to fill width & keep ratio (already done inline) */
.latest-news-section .col-md-7 .card-img-top {
  object-fit: cover; 
  width: 100%;
  height: auto;
}

/* If you want a small margin between stacked items, you can do: */
.latest-news-section .col-md-5 .d-flex.mb-3.pb-2 {
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
}

/* ================================
   LATEST NEWS RESPONSIVE FIXES
================================= */

/* 
   UNCOMMENT ONE of these two blocks 
   to control how your image & text 
   display on very small screens 
   (<576px).
*/

/* --- OPTION A: STACKED LAYOUT (Image on top, text below) ---
@media (max-width: 575.98px) {
  .latest-news-section .col-md-5 .d-flex.mb-3.pb-2 {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .latest-news-section .col-md-5 .flex-shrink-0 {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 0.5rem;
  }
  .latest-news-section .col-md-5 .flex-shrink-0 img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }
  .latest-news-section .col-md-5 .flex-grow-1 {
    width: 100% !important;
  }
  .latest-news-section .col-md-5 .flex-grow-1 h6 {
    font-size: 16px;
    margin-bottom: 0.4rem;
  }
  .latest-news-section .col-md-5 .flex-grow-1 .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .latest-news-section .col-md-5 .flex-grow-1 .badge,
  .latest-news-section .col-md-5 .flex-grow-1 .pink-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}
*/

/* --- OPTION B: SIDE-BY-SIDE (Smaller image on the left, text on the right) ---
@media (max-width: 575.98px) {
  .latest-news-section .col-md-5 .d-flex.mb-3.pb-2 {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .latest-news-section .col-md-5 .flex-shrink-0 {
    width: 60px !important;
    height: 60px !important;
  }
  .latest-news-section .col-md-5 .flex-shrink-0 img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
  }
  .latest-news-section .col-md-5 .flex-grow-1 {
    margin-left: 10px;
    width: calc(100% - 70px) !important;
  }
  .latest-news-section .col-md-5 .flex-grow-1 h6 {
    font-size: 14px;
    margin-bottom: 0.3rem;
  }
  .latest-news-section .col-md-5 .flex-grow-1 .badge,
  .latest-news-section .col-md-5 .flex-grow-1 .pink-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}
*/
/* ====================
   SIDEBAR STYLES
===================== */

/* Sidebar container styling */
.sidebar {
    background-color: var(--card-background);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    padding: 15px;
    margin-bottom: 20px;
}

/* Common styling for each sidebar section */
.sidebar-section {
    margin-bottom: 20px;
}

/* Sidebar section header for consistency */
.sidebar-section .section-header {
    background-color: var(--primary-red);
    color: var(--light-text);
    padding: 10px;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

/* Sidebar slider images */
.sidebar .carousel-inner img {
    border-radius: 4px;
}

/* --------------------------
   POSTS FOR YOU SECTION
--------------------------- */
.sidebar-section .posts-for-you,
.sidebar-section .d-flex {
    /* Adds a subtle border between items */
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Remove border from the last post item */
.sidebar-section .posts-for-you:last-child,
.sidebar-section .d-flex:last-child {
    border-bottom: none;
}

/* Post title styling with hover effect */
.sidebar-section h6 a {
    color: var(--primary-text);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.sidebar-section h6 a:hover {
    color: var(--primary-red);
}

/* Category badge for posts */
.sidebar-section .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}

/* Image styling for posts in the sidebar */
.sidebar-section img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* --------------------------
   LABELS/TAGS SECTION
--------------------------- */
.list-group-item {
    border: none;
    background: transparent;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.list-group-item:hover {
    background-color: rgba(236, 82, 82, 0.1);
}

/* --------------------------
   WIDGETS (Weather, Horoscope, Cricket, Share Market)
--------------------------- */
.weather-widget,
.horoscope-widget,
#score-frame,
.sharemarket-widget {
    padding: 10px;
    background-color: var(--card-background);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --------------------------
   RESPONSIVE ADJUSTMENTS
--------------------------- */
@media (max-width: 576px) {
    .sidebar {
        padding: 10px;
    }
    .sidebar-section .section-header {
        font-size: 0.9rem;
        padding: 8px;
    }
    .list-group-item {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    .sidebar-section h6 a {
        font-size: 0.85rem;
    }
}

/* ========== DESKTOP FIX: SMALLER BADGES ========== */
@media (min-width: 992px) {
  .pink-badge, .badge.bg-dark {
    font-size: 0.75rem;  /* smaller text */
    padding: 0.2rem 0.5rem;
  }
}
