/* ==========================================================================
   News Ticker Stylesheet
   Kram Yog Sewa Sadan Trust
   ========================================================================== */

.news-ticker-bar {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #1b5182;
  height: 44px;
  overflow: hidden;
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.news-ticker-container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Left Badge: Update label */
.news-ticker-badge {
  background: linear-gradient(135deg, #1b5182 0%, #113c63 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 0 22px 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.12);
}

/* Slanted right arrow on badge */
.news-ticker-badge::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 12px solid #113c63;
}

.news-ticker-badge i {
  color: #34d399;
  font-size: 14px;
  animation: pulse-ticker-icon 1.8s infinite ease-in-out;
}

@keyframes pulse-ticker-icon {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Track Wrapper */
.news-ticker-track-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
}

/* Continuous Sliding Track */
.news-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: news-ticker-slide 32s linear infinite;
  will-change: transform;
}

.news-ticker-track-wrapper:hover .news-ticker-track {
  animation-play-state: paused;
}

@keyframes news-ticker-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.news-ticker-group {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.news-ticker-item {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  padding: 0 20px;
  line-height: 1;
}

.news-ticker-item .ticker-org-highlight {
  color: #1b5182;
  font-weight: 700;
  background: rgba(27, 81, 130, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid rgba(27, 81, 130, 0.15);
}

.news-ticker-sep {
  display: inline-flex;
  align-items: center;
  margin: 0 16px;
  color: #13a34a;
  font-size: 11px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .news-ticker-bar {
    height: 40px;
  }
  .news-ticker-badge {
    padding: 0 14px 0 16px;
    font-size: 11.5px;
  }
  .news-ticker-badge span {
    display: inline;
  }
  .news-ticker-badge::after {
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid #113c63;
    right: -10px;
  }
  .news-ticker-item {
    font-size: 13px;
    padding: 0 14px;
  }
  .news-ticker-item .ticker-org-highlight {
    padding: 2px 6px;
    font-size: 12.5px;
  }
}

@media (max-width: 480px) {
  .news-ticker-badge span {
    display: none;
  }
  .news-ticker-badge {
    padding: 0 10px 0 12px;
  }
  .news-ticker-badge::after {
    right: -8px;
    border-left-width: 8px;
  }
}
