/* ==========================================================================
   SANSANI KHABAR — AD BANNER SLIDER & FULLSCREEN LIGHTBOX SYSTEM
   ========================================================================== */
.cgm-ad-banner-section {
  width: 100%;
  position: relative;
  z-index: 15;
}

/* Header Placement: Placed right before Sticky Navbar */
.cgm-ad-placement-header {
  background: #ffffff;
  padding: 0.65rem 0 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.cgm-ad-placement-header .cgm-ad-img-box {
  height: 110px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (max-width: 768px) {
  .cgm-ad-placement-header {
    padding: 0.45rem 0 0.65rem;
  }
  .cgm-ad-placement-header .cgm-ad-img-box {
    height: 80px;
  }
}

/* News Detail Placement: Placed right after Article Content Body */
.cgm-ad-placement-news_detail {
  margin: 2rem 0 1.5rem;
  padding: 0;
}

.cgm-ad-placement-news_detail .cgm-ad-img-box {
  height: 200px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (max-width: 768px) {
  .cgm-ad-placement-news_detail .cgm-ad-img-box {
    height: 135px;
  }
}

/* Slider Container */
.cgm-ad-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.cgm-ad-slider-container:hover {
  box-shadow: 0 8px 24px rgba(186, 27, 27, 0.12);
  border-color: rgba(186, 27, 27, 0.25);
}

.cgm-ad-slider-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.cgm-ad-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.cgm-ad-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
}

/* Ad Card */
.cgm-ad-card {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  outline: none;
  overflow: hidden;
}

.cgm-ad-img-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.cgm-ad-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.cgm-ad-card:hover .cgm-ad-img {
  transform: scale(1.02);
}

/* Badges on Ad Card */
.cgm-ad-card-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cgm-ad-card:hover .cgm-ad-card-badge {
  background: #ba1b1b;
  transform: translateY(-1px);
}

.cgm-ad-expand-icon {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0.9;
}

.cgm-ad-sponsor-label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  pointer-events: none;
}

/* Navigation Chevrons */
.cgm-ad-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.cgm-ad-slider-container:hover .cgm-ad-arrow {
  opacity: 1;
  pointer-events: auto;
}

.cgm-ad-arrow:hover {
  background: #ba1b1b;
  color: #ffffff;
  border-color: #ba1b1b;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(186, 27, 27, 0.35);
}

.cgm-ad-arrow-prev {
  left: 12px;
}

.cgm-ad-arrow-next {
  right: 12px;
}

/* Dots Indicator */
.cgm-ad-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
}

.cgm-ad-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cgm-ad-dot.is-active {
  background: #ffffff;
  width: 22px;
}

/* Auto-slide Progress Bar */
.cgm-ad-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 4;
}

.cgm-ad-progress-fill {
  height: 100%;
  width: 0%;
  background: #ba1b1b;
  transition: width linear;
}

/* ==========================================================================
   FULLSCREEN IMAGE LIGHTBOX OVERLAY
   ========================================================================== */
body.cgm-ad-lightbox-open {
  overflow: hidden !important;
}

.cgm-ad-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cgm-ad-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.94);
  backdrop-filter: blur(12px);
  animation: cgmFadeIn 0.25s ease;
}

.cgm-ad-lightbox-dialog {
  position: relative;
  z-index: 2;
  width: 95vw;
  max-width: 1100px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  animation: cgmZoomIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cgm-ad-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
}

.cgm-ad-lightbox-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
}

.cgm-ad-lightbox-counter {
  background: rgba(186, 27, 27, 0.35);
  color: #fca5a5;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(186, 27, 27, 0.5);
}

.cgm-ad-lightbox-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cgm-ad-lightbox-close-btn:hover {
  background: #ba1b1b;
  transform: scale(1.08) rotate(90deg);
}

.cgm-ad-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 320px;
  max-height: 70vh;
  overflow: hidden;
  padding: 1rem;
}

.cgm-ad-lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.cgm-ad-lightbox-img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.cgm-ad-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.cgm-ad-lb-arrow:hover {
  background: #ba1b1b;
  border-color: #ba1b1b;
  transform: translateY(-50%) scale(1.12);
}

.cgm-ad-lb-prev {
  left: 16px;
}

.cgm-ad-lb-next {
  right: 16px;
}

.cgm-ad-lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
}

.cgm-ad-lightbox-details {
  flex: 1 1 300px;
}

.cgm-ad-lightbox-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.cgm-ad-lightbox-meta {
  color: #94a3b8;
  font-size: 0.85rem;
}

.cgm-ad-lightbox-actions {
  flex-shrink: 0;
}

.cgm-ad-lightbox-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #ba1b1b 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(186, 27, 27, 0.4);
  transition: all 0.25s ease;
}

.cgm-ad-lightbox-cta:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.55);
}

@keyframes cgmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cgmZoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
