:root {
  --saffron: #ec5a1e;
  --saffron-soft: #fdeee7;
  --teal: #0e8a78;
  --teal-soft: #e3f3f0;
  --gold: #e8a317;
  --ink: #1c1b22;
  --slate: #4a4a55;
  --muted: #8a8a96;
  --line: #ececef;
  --paper: #ffffff;
  --paper-2: #f7f6f4;
  --cloud: #fbfaf8;
  --shadow-sm: 0 2px 8px rgba(28,27,34,.06);
  --shadow-md: 0 10px 30px rgba(28,27,34,.10);
  --shadow-lg: 0 24px 60px rgba(28,27,34,.16);
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1200px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hide {
    display: none !important;
}

/* Hide scrollbar for horizontal scrolling containers */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Side Dummy Ads Styling */
.ad-slot-side {
  width: 100%;
  height: 305px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ad-slot-side:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--saffron);
}

.ad-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  z-index: 10;
}

/* Ad Slider Styling */
.ad-slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}
.ad-slide.active {
  opacity: 1;
  z-index: 2;
}
.ad-slide a {
  display: block;
  width: 100%;
  height: 100%;
}
.ad-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Horizontal Wide Ad Styling */
.wide-dummy-ad {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  min-height: 88px;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid #d8d8dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-dummy-ad:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.wide-ad-left,
.wide-ad-right {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.wide-ad-left {
  gap: 12px;
  padding: 10px 18px;
  background:
    radial-gradient(circle at 70% 45%, rgba(255,255,255,.9), transparent 38%),
    linear-gradient(90deg, #f9f9f9 0%, #d7d7d9 100%);
}

.wide-ad-title {
  color: #15151a;
  font-family: Arial, Helvetica, sans-serif;
  max-width: 55%;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: .95;
  letter-spacing: .3px;
  z-index: 2;
}

.wide-ad-title span {
  font-size: .65rem;
  font-weight: 800;
}

.wide-ad-cta {
  position: absolute;
  left: 18px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  background: #0a67c9;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .2px;
  z-index: 2;
}

.wide-ad-car {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 84px;
  height: 40px;
  filter: drop-shadow(0 10px 6px rgba(0,0,0,.2));
  transform: scale(0.9);
}

.car-body {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 12px;
  height: 18px;
  border-radius: 52px 42px 18px 18px;
  background: linear-gradient(#48a9ff, #0977dd);
  border: 2px solid #085ca6;
}

.car-body::before {
  content: '';
  position: absolute;
  left: 20px;
  top: -14px;
  width: 36px;
  height: 16px;
  border-radius: 48px 48px 0 0;
  background: linear-gradient(#63bdff, #1684e7);
  border: 2px solid #085ca6;
}

.car-window {
  position: absolute;
  left: 38px;
  top: 7px;
  width: 14px;
  height: 10px;
  border-radius: 12px 12px 2px 2px;
  background: #f4fbff;
  border: 2px solid #085ca6;
  z-index: 2;
}

.wheel {
  position: absolute;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f7f7f7;
  border: 3px solid #33343a;
}

.wheel-left { left: 20px; }
.wheel-right { right: 20px; }

.wide-ad-right {
  padding: 10px 15px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 30%, rgba(0,184,255,.28), transparent 24%),
    repeating-radial-gradient(circle at 74% 65%, rgba(0,164,255,.32) 0 1px, transparent 1px 9px),
    linear-gradient(125deg, #2c2398 0%, #1e2fa6 44%, #071226 100%);
}

.wide-ad-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  margin-right: 8px;
  font-size: 0.8rem;
}

.wide-ad-brand {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
  font-weight: 900;
  line-height: 1;
}

.wide-ad-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.72);
  font-size: .4rem;
  letter-spacing: .6px;
}

.wide-ad-services {
  margin-left: auto;
  display: grid;
  gap: 2px;
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: .55rem;
  line-height: 1.05;
}

.wide-ad-contact {
  position: absolute;
  right: 15px;
  bottom: 10px;
  padding: 5px 11px;
  border-radius: 22px;
  background: #7a24ff;
  color: #fff;
  border-bottom: 2px solid #f4c21f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .55rem;
  font-weight: 900;
}

@media (max-width: 820px) {
  .wide-dummy-ad {
    grid-template-columns: 1fr;
  }

  .wide-ad-left,
  .wide-ad-right {
    min-height: 112px;
  }
}

@media (max-width: 560px) {
  .wide-ad-left {
    padding: 16px 18px 58px;
  }

  .wide-ad-title {
    font-size: 1.22rem;
  }

  .wide-ad-car {
    right: 14px;
    transform: scale(.75);
    transform-origin: right center;
  }

  .wide-ad-right {
    padding: 16px 18px 60px;
  }

  .wide-ad-services {
    font-size: .78rem;
  }
}

/* Compact Header Toggling */
#main-header {
  position: relative !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  background-color: #0f172a !important; /* matches slate-900 */
  transition: all 0.3s ease;
}

#main-header.is-compact {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#main-header .header-topbar {
  max-height: 100px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

#main-header.is-compact .header-topbar {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom-width: 0 !important;
}

#main-header.is-compact .header-mainbar {
  padding-top: 0.5rem !important;   /* Reduce vertical padding */
  padding-bottom: 0.5rem !important;
}

#main-header.is-compact .site-logo {
  height: 2.25rem !important;        /* Scale down logo size */
}

/* Custom News Slider styling */
.news-slider-card {
  width: 100%;
  height: 310px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.news-slides-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.news-slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}

.news-slide-item.active {
  opacity: 1;
  z-index: 2;
}

.news-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
  z-index: 3;
}

.news-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  color: #ffffff;
  z-index: 4;
  display: flex;
  flex-direction: column;
}

.news-slide-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--saffron);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.news-slide-badge.badge-teal {
  background-color: var(--teal);
}

.news-slide-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-slide-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-slide-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Slide Navigation Arrows */
.news-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.news-slider-card:hover .news-slider-arrow {
  opacity: 1;
}

.news-slider-arrow:hover {
  background: #ffffff;
  color: var(--ink);
  transform: translateY(-50%) scale(1.08);
}

.news-slider-arrow.arrow-prev {
  left: 10px;
}

.news-slider-arrow.arrow-next {
  right: 10px;
}

/* Dot Pagination */
.news-slider-dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.news-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-slider-dot.active {
  width: 14px;
  border-radius: 3px;
  background: #ffffff;
}

/* Header Wide Ad Styling */
.header-dummy-ad {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  height: 90px; /* matched theme minimal */
  overflow: hidden;
  border: 1px solid #334155; /* border-slate-700 matches bg-slate-900 */
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-dummy-ad:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.header-ad-left,
.header-ad-right {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.header-ad-left {
  gap: 8px;
  padding: 6px 14px;
  background:
    radial-gradient(circle at 70% 45%, rgba(255,255,255,.9), transparent 38%),
    linear-gradient(90deg, #f9f9f9 0%, #d7d7d9 100%);
}

.header-ad-title {
  color: #15151a;
  font-family: Arial, Helvetica, sans-serif;
  max-width: 55%;
  font-size: 0.95rem; /* restored and scaled */
  font-weight: 900;
  line-height: .95;
  letter-spacing: .1px;
  z-index: 2;
}

.header-ad-title span {
  font-size: 0.52rem; /* scaled up */
  font-weight: 800;
}

.header-ad-cta {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 3px;
  background: #0a67c9;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .65rem; /* restored and scaled */
  font-weight: 900;
  z-index: 2;
}

.header-ad-car {
  position: absolute;
  right: 16px;
  top: 24px;
  width: 58px;
  height: 29px;
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.15));
  transform: scale(1.0); /* restored scale */
  transform-origin: right top;
}

.header-ad-right {
  padding: 6px 12px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 30%, rgba(0,184,255,.2), transparent 24%),
    linear-gradient(125deg, #2c2398 0%, #1e2fa6 44%, #071226 100%);
}

.header-ad-logo {
  width: 32px; /* scaled up */
  height: 32px; /* scaled up */
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255,255,255,.8);
  border-radius: 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  margin-right: 8px;
  font-size: 0.82rem; /* scaled up */
}

.header-ad-brand {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem; /* scaled up */
  font-weight: 900;
  line-height: 1;
}

.header-ad-brand span {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-size: .38rem; /* scaled up */
  letter-spacing: .3px;
}

.header-ad-services {
  margin-left: auto;
  display: grid;
  gap: 1px;
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: .56rem; /* scaled up */
  line-height: 1;
  padding-right: 48px; /* leave space for CONTACT US button */
}

.header-ad-contact {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%); /* perfectly centered */
  padding: 4px 10px;
  border-radius: 12px;
  background: #7a24ff;
  color: #fff;
  border-bottom: 1px solid #f4c21f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .52rem; /* scaled up */
  font-weight: 900;
}

/* Category Slider Styles */
.cat-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8; /* slate-400 */
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-block;
}

.cat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.cat-btn.active {
  background: #2563eb; /* blue-600 */
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.cat-scroll-btn {
  opacity: 1;
  transition: opacity 0.25s ease, background-color 0.2s ease;
}

.cat-scroll-btn.opacity-0 {
  opacity: 0;
}

/* Smooth transition wrapper configurations */
.header-ad-container {
  max-height: 100px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.4s ease;
}

.category-slider-container {
  max-height: 80px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
}

/* Smooth collapsing on compact header scrolling */
#main-header.is-compact .header-ad-container {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

#main-header.is-compact .category-slider-container {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-color: transparent !important;
  pointer-events: none;
}

/* Custom Wide Ad and Header Ad Slider Container Hover and Image Fit Styles */
.wide-ad-container {
  width: 100%;
  margin-bottom: 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wide-ad-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.header-ad-container.ad-slider {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.header-ad-container.ad-slider:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.wide-ad-container .ad-slide img,
.header-ad-container .ad-slide img {
  object-fit: cover !important;
}

/* Active Highlight Styling for Mobile Menu Links */
#mobile-menu .nav-link.active,
#mobile-categories-list .nav-link.active {
  background-color: #2563eb !important; /* blue-600 */
  color: #ffffff !important;
}

/* Article Reactions & Sharing Styling */
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--slate);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reaction-btn:hover {
  transform: translateY(-1px);
}

.reaction-btn-like:hover, .reaction-btn-like.active {
  border-color: #2563eb;
  color: #2563eb;
  background-color: #eff6ff;
}

.reaction-btn-dislike:hover, .reaction-btn-dislike.active {
  border-color: #eab308;
  color: #eab308;
  background-color: #fef9c3;
}

.reaction-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  color: #475569;
  border-radius: 9999px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.reaction-btn.active .reaction-count {
  background-color: currentColor;
  color: #fff;
}

/* Comments Styling */
.comments-input-area {
  min-height: 100px;
  width: 100%;
  resize: vertical;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.875rem;
  color: #334155;
  transition: all 0.2s ease;
}

.comments-input-area:focus {
  outline: none;
  background-color: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-card {
  padding: 16px;
  border-radius: 16px;
  background-color: #f8fafc;
  border: 1px solid #f1f5f9;
  margin-top: 12px;
  animation: fadeIn 0.3s ease-in-out;
}

/* Sidebar More News list item styling */
.sidebar-news-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.sidebar-news-item:hover {
  background-color: #f8fafc;
}
.sidebar-news-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Independent scrollable columns on desktop */
@media (min-width: 1024px) {
  .scrollable-column {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  .scrollable-column::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

/* Scrollbar Hiding Utility */
.hide-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.hide-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
