/* Ahao Modern Horizontal Slider */
.ahao-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 850px;
  margin: 25px auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.ahao-slider-viewport {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  border-radius: 10px;
  background: #080808;
}

@media (max-width: 768px) {
  .ahao-slider-viewport {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .ahao-slider-viewport {
    height: 250px;
  }
}

.ahao-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  will-change: transform, opacity, filter;
}

.ahao-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}

.ahao-slide.to-left,
.ahao-slide.to-right {
  visibility: visible;
  z-index: 2;
}

.ahao-slide.from-right {
  animation: ahao-slide-in-right 0.78s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ahao-slide.from-left {
  animation: ahao-slide-in-left 0.78s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ahao-slide.to-left {
  animation: ahao-slide-out-left 0.72s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ahao-slide.to-right {
  animation: ahao-slide-out-right 0.72s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ahao-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(22%) scale(1.08);
    filter: blur(8px) brightness(0.7);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes ahao-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-22%) scale(1.08);
    filter: blur(8px) brightness(0.7);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes ahao-slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0) brightness(1);
  }
  to {
    opacity: 0;
    transform: translateX(-16%) scale(1.05);
    filter: blur(6px) brightness(0.55);
  }
}

@keyframes ahao-slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0) brightness(1);
  }
  to {
    opacity: 0;
    transform: translateX(16%) scale(1.05);
    filter: blur(6px) brightness(0.55);
  }
}

.ahao-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
}

.ahao-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 10px;
  transform: scale(1);
  transition: filter 0.3s ease;
}

.ahao-slide.active .ahao-slide-img {
  animation: ahao-kenburns 9s ease-out forwards;
}

@keyframes ahao-kenburns {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.1) translate(-1.2%, -0.8%);
  }
}

.ahao-slide-link:hover .ahao-slide-img {
  filter: brightness(1.05);
}

.ahao-slider-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 10px;
  opacity: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(77, 166, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(155, 81, 224, 0.16) 52%,
    transparent 65%
  );
}

.ahao-slider-viewport.is-swiping::after {
  animation: ahao-swipe-flare 0.7s ease-out;
}

@keyframes ahao-swipe-flare {
  from {
    opacity: 0;
    transform: translateX(-40%);
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(40%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ahao-slide.from-right,
  .ahao-slide.from-left,
  .ahao-slide.to-left,
  .ahao-slide.to-right,
  .ahao-slide.active .ahao-slide-img,
  .ahao-slider-viewport.is-swiping::after {
    animation: none !important;
  }
  .ahao-slide.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Full Size Action Button (Icon Only - Corners) */
.ahao-fullsize-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ahao-fullsize-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ahao-fullsize-btn:hover {
  background: #0088cc;
  border-color: #4da6ff;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(77, 166, 255, 0.6);
  transform: scale(1.1);
}

/* Navigation Arrows */
.ahao-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ahao-slider-arrow.prev {
  left: 15px;
}

.ahao-slider-arrow.next {
  right: 15px;
}

.ahao-slider-arrow:hover {
  background: rgba(77, 166, 255, 0.85);
  border-color: #80c0ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(77, 166, 255, 0.6);
  transform: translateY(-50%) scale(1.1);
}

/* Filmstrip Thumbnails Bar */
.ahao-slider-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(77, 166, 255, 0.4) rgba(0, 0, 0, 0.2);
}

.ahao-slider-thumbs::-webkit-scrollbar {
  height: 6px;
}

.ahao-slider-thumbs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.ahao-slider-thumbs::-webkit-scrollbar-thumb {
  background: rgba(77, 166, 255, 0.4);
  border-radius: 3px;
}

.ahao-thumb-item {
  flex: 0 0 110px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  box-sizing: border-box;
  background: #111;
}

.ahao-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ahao-thumb-item:hover {
  opacity: 0.9;
  border-color: rgba(77, 166, 255, 0.5);
}

.ahao-thumb-item.active {
  opacity: 1;
  border-color: #4da6ff;
  box-shadow: 0 0 12px rgba(77, 166, 255, 0.7);
  transform: scale(1.04);
}
