/**
 * BuyFast UAE - Hero Slider Stylesheet
 * Scoped, responsive, RTL-ready & accessible
 */

:root {
  --hs-navy: #091957;
  --hs-navy-dark: #05134b;
  --hs-blue: #1747e8;
  --hs-blue-deep: #0b2cae;
  --hs-orange: #ff6b00;
  --hs-orange-hover: #ff7e1c;
  --hs-gold: #ffcf43;
}

.hero-slider-section {
  padding-block: 16px 24px;
}

.hero-slider {
  position: relative;
  min-height: 430px;
  aspect-ratio: 2.88 / 1;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(115deg, #071957, #1237bd);
  box-shadow: 0 20px 50px rgba(12, 36, 114, 0.16);
  isolation: isolate;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s;
  display: grid;
  grid-template-columns: 48% 52%;
  align-items: center;
  background: linear-gradient(105deg, #091957 0%, #1034ad 60%, #1747e8 100%);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 19, 75, 0.96) 0%, rgba(8, 31, 112, 0.88) 35%, rgba(9, 38, 140, 0.32) 62%, rgba(7, 20, 66, 0.04) 100%);
  z-index: 1;
  pointer-events: none;
}

html[dir="rtl"] .hero-slide {
  grid-template-columns: 52% 48%;
}

html[dir="rtl"] .hero-slide::before {
  background: linear-gradient(270deg, rgba(5, 19, 75, 0.96) 0%, rgba(8, 31, 112, 0.88) 35%, rgba(9, 38, 140, 0.32) 62%, rgba(7, 20, 66, 0.04) 100%);
}

.hero-slide-art {
  position: absolute;
  inset: 0 0 0 26%;
  background-size: cover;
  background-position: center;
  transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1.015);
}

html[dir="rtl"] .hero-slide-art {
  inset: 0 26% 0 0;
}

.hero-slide.active .hero-slide-art {
  transform: scale(1.06);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 56px);
  color: #ffffff;
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: var(--hs-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "✦";
  font-size: 14px;
  color: var(--hs-gold);
}

.hero-slide-content h1 {
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.05;
  letter-spacing: -1.6px;
  margin: 18px 0 14px;
  font-weight: 850;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(5, 19, 75, 0.4);
}

html[dir="rtl"] .hero-slide-content h1 {
  letter-spacing: 0;
  line-height: 1.25;
}

.hero-slide-content p {
  max-width: 440px;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.6;
  color: #e3ebff;
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(2, 11, 48, 0.35);
}

.hero-btn-primary {
  background: var(--hs-orange);
  color: #ffffff !important;
}

.hero-btn-primary:hover {
  background: var(--hs-orange-hover);
}

.hero-btn-secondary {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}

.hero-trust {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  color: #d8e5ff;
  font-size: 12.5px;
  font-weight: 600;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
}

.hero-trust span::before {
  content: "✓";
  color: #6ee7a8;
  margin-inline-end: 6px;
  font-weight: 900;
}

.hero-discount {
  position: absolute;
  z-index: 3;
  inset-inline-end: 7%;
  top: 17%;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--hs-orange);
  border: 4px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(7, 23, 70, 0.45);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  transform: rotate(7deg);
  transition: transform 0.3s ease;
  pointer-events: none;
}

html[dir="rtl"] .hero-discount {
  transform: rotate(-7deg);
}

.hero-discount strong {
  font-size: 30px;
  line-height: 1.02;
  font-weight: 900;
}

.hero-slide.active .hero-discount {
  animation: heroBadgeIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-slider:hover .hero-discount {
  transform: rotate(0deg) scale(1.04);
}

@keyframes heroBadgeIn {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(7deg);
  }
}

html[dir="rtl"] @keyframes heroBadgeIn {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(12deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-7deg);
  }
}

.hero-controls {
  position: absolute;
  z-index: 5;
  inset-block-end: 18px;
  inset-inline-end: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(7, 25, 87, 0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  padding: 0;
}

.hero-arrow:hover,
.hero-arrow:focus-visible {
  background: var(--hs-orange);
  border-color: #ffffff;
  transform: scale(1.06);
  outline: none;
}

.hero-dots {
  display: flex;
  gap: 6px;
  margin: 0 6px;
  align-items: center;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot[aria-current="true"] {
  width: 26px;
  background: #ffffff;
}

.hero-dot:hover:not([aria-current="true"]) {
  background: rgba(255, 255, 255, 0.85);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-slider-section {
    padding-block: 10px 18px;
  }
  .hero-slider {
    aspect-ratio: auto;
    min-height: 570px;
  }
  .hero-slide {
    display: block;
  }
  .hero-slide-art {
    inset: 0;
    background-position: 62% center;
  }
  html[dir="rtl"] .hero-slide-art {
    inset: 0;
    background-position: 38% center;
  }
  .hero-slide::before {
    background: linear-gradient(90deg, rgba(5, 19, 75, 0.95), rgba(8, 31, 112, 0.75) 58%, rgba(9, 38, 140, 0.25)),
                linear-gradient(0deg, rgba(5, 19, 75, 0.45), transparent 50%);
  }
  html[dir="rtl"] .hero-slide::before {
    background: linear-gradient(270deg, rgba(5, 19, 75, 0.95), rgba(8, 31, 112, 0.75) 58%, rgba(9, 38, 140, 0.25)),
                linear-gradient(0deg, rgba(5, 19, 75, 0.45), transparent 50%);
  }
  .hero-slide-content {
    padding: 44px 28px;
    max-width: 600px;
  }
  .hero-discount {
    inset-inline-end: 5%;
    top: auto;
    inset-block-end: 84px;
    width: 92px;
    height: 92px;
  }
  .hero-discount strong {
    font-size: 25px;
  }
  .hero-controls {
    inset-inline-end: 16px;
    inset-block-end: 16px;
  }
  .hero-trust {
    max-width: 440px;
  }
}

@media (max-width: 560px) {
  .hero-slider {
    min-height: 590px;
    border-radius: 16px;
  }
  .hero-slide-content {
    padding: 28px 18px;
  }
  .hero-slide-content h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin-top: 14px;
  }
  .hero-slide-content p {
    font-size: 13.5px;
    max-width: 290px;
    margin-bottom: 18px;
  }
  .hero-eyebrow {
    font-size: 10px;
    padding: 5px 11px;
  }
  .hero-btn {
    min-height: 42px;
    padding: 0 15px;
    font-size: 12.5px;
  }
  .hero-trust {
    gap: 8px;
    font-size: 10.5px;
    max-width: 270px;
    margin-top: 18px;
  }
  .hero-discount {
    width: 78px;
    height: 78px;
    inset-inline-end: 14px;
    inset-block-end: 72px;
    font-size: 9.5px;
    border-width: 3px;
  }
  .hero-discount strong {
    font-size: 22px;
  }
  .hero-controls {
    inset-inline-end: 12px;
    inset-block-end: 12px;
  }
  .hero-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  .hero-slider,
  .hero-slide,
  .hero-slide-art,
  .hero-discount,
  .hero-btn,
  .hero-dot,
  .hero-arrow {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
  .hero-slide-art {
    transform: none !important;
  }
  .hero-slide.active .hero-slide-art {
    transform: none !important;
  }
  .hero-discount {
    transform: none !important;
  }
}
