/* assets/css/slidenews.css */
/* ✅ Slider stabil — tidak melar, tidak loncat */

.news-slider-container {
  width: 100%;
  margin: 0 auto -15px auto;
  padding: 0;
}

.news-slider {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: #000;
}

.slider-header {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
}

.breaking-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  animation: badgePulse 2s ease-in-out infinite;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes badgePulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.news-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.slide-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  text-decoration: none;
  z-index: 1;
}

.slide-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  background-color: #000;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 8s ease-out;
}

.news-slide.active .slide-image {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 100%);
  pointer-events: none;
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  z-index: 10;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.news-slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.news-category {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: rgba(14, 155, 211, 0.9);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.category-politik { background: rgba(239, 68, 68, 0.9); }
.category-ekonomi { background: rgba(34, 197, 94, 0.9); }
.category-olahraga { background: rgba(251, 146, 60, 0.9); }
.category-teknologi { background: rgba(59, 130, 246, 0.9); }
.category-hiburan { background: rgba(168, 85, 247, 0.9); }

.news-title {
  margin: 0 0 12px 0;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.8);
}

.news-title a {
  color: #ffffff;
  text-decoration: none;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.news-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.news-slider:hover .slider-nav {
  opacity: 1;
}

.slider-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 15;
}

.slider-dot {
  position: relative;
  width: 32px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slider-dot.active {
  background: rgba(255, 255, 255, 0.5);
}

.dot-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: white;
  width: 0;
  transition: width 0.1s linear;
}

.slider-dot.active .dot-progress {
  animation: dotProgress 4s linear;
}

@keyframes dotProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
  .news-slider { height: 320px; border-radius: 12px; }
  .slider-header { top: 15px; left: 15px; }
  .breaking-badge { padding: 6px 12px; font-size: 10px; }
  .slide-content { padding: 20px; }
  .news-title { font-size: 35px; }
  .slider-nav { width: 40px; height: 40px; }
  .prev-btn { left: 10px; }
  .next-btn { right: 10px; }
  .slider-dots { bottom: 15px; gap: 8px; }
  .slider-dot { width: 24px; }
}

@media (max-width: 480px) {
  .news-slider { height: 280px; }
  .news-title { font-size: 30px; }
  .news-meta { font-size: 11px; }
}