/* uwords Dergi — Slider Styles */

/* ============================================
   Hero Slider
   ============================================ */

.hero-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  height: 100%;
}

@media (min-width: 1024px) {
  .hero-slides {
    aspect-ratio: 21 / 9;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease-out;
}

.hero-slide.active .hero-slide-img {
  transform: scale(1.05);
}

/*
 * Hero pagination dots: the clickable button is 44×44 (WCAG 2.5.8/2.5.5
 * compliant) and transparent; the visible 3px bar is rendered via ::before
 * so the original visual is preserved while the hit area is usable on touch.
 */
.hero-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-dot::before {
  content: "";
  width: 32px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hero-dot.active::before {
  background: #FBBA00;
  width: 48px;
}

.hero-dot:hover::before {
  background: rgba(251,186,0,0.6);
}

.hero-dot:focus-visible::before {
  background: rgba(251,186,0,0.9);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

/* Fallback for browsers without backdrop-filter support (older Safari,
 * in-app iOS browsers): stronger solid background so the arrow stays
 * visible against bright hero imagery. */
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .hero-arrow {
    background: rgba(29,29,27,0.55);
  }
}

.hero-arrow:hover {
  background: #FBBA00;
  border-color: #FBBA00;
  color: #1D1D1B;
}

.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.1);
  z-index: 10;
}

.hero-progress-bar {
  height: 100%;
  background: #FBBA00;
  width: 0%;
  transition: width 0.1s linear;
}

.hero-progress-bar.running {
  animation: heroProgress 5s linear forwards;
}

@keyframes heroProgress {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ============================================
   Featured Slider (Son Yazılar)
   ============================================ */

.featured-slides {
  position: relative;
}

.featured-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  width: 100%;
}

.featured-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.featured-slide .grid {
  height: 100%;
}

.featured-thumb {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  min-height: 44px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  padding: 0;
  background: none;
}

.featured-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.featured-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(29,29,27,0.5);
  transition: all 0.3s ease;
}

.featured-thumb.active {
  border-color: var(--uw-dark);
  box-shadow: 0 0 0 2px var(--uw-yellow);
}

.featured-thumb.active .featured-thumb-overlay {
  background: transparent;
}

.featured-thumb.active .featured-thumb-img {
  opacity: 1;
}

.featured-thumb:not(.active) .featured-thumb-img {
  opacity: 0.6;
}

.featured-thumb:hover .featured-thumb-overlay {
  background: rgba(29,29,27,0.2);
}

.featured-thumb:hover .featured-thumb-img {
  opacity: 0.9;
}

.featured-thumb-sweep {
  position: absolute;
  inset: 0;
  background: rgba(251,186,0,0.25);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 2;
  pointer-events: none;
}

.featured-thumb-sweep.running {
  animation: thumbSweep 5s linear forwards;
}

@keyframes thumbSweep {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/*
 * Featured pagination dots: 44×44 transparent button, visible bar via ::before.
 * Mirrors the hero-dot pattern so both sliders meet WCAG 2.5.8 touch targets.
 */
.featured-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.featured-dot::before {
  content: "";
  width: 24px;
  height: 3px;
  background: rgba(29,29,27,0.25);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.featured-dot.active::before {
  background: #1D1D1B;
  width: 36px;
}

.featured-dot:hover::before {
  background: rgba(251,186,0,0.9);
}

.featured-dot:focus-visible::before {
  background: rgba(251,186,0,0.9);
}

.featured-progress {
  height: 2px;
  background: var(--uw-gray-200);
  border-radius: 1px;
  overflow: hidden;
}

.featured-progress-bar {
  height: 100%;
  background: var(--uw-yellow);
  width: 0%;
  border-radius: 1px;
}

.featured-progress-bar.running {
  animation: featuredProgress 5s linear forwards;
}

@keyframes featuredProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* ============================================
   Reduced motion + hover/pause states
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: opacity 0.3s ease;
  }
  .hero-slide-img {
    transition: none;
  }
  .hero-slide.active .hero-slide-img {
    transform: none;
  }
  .featured-slide {
    transition: opacity 0.2s ease;
  }
  /* Progress bars are kept running even under prefers-reduced-motion
     because they convey slider state — they're informational,
     not decorative. */
}
