/**
 * Hero Hero Slider Frontend Styles
 * 
 * Lightweight, responsive, and theme-compatible styles
 */

/* Root Variables */
:root {
  --hhs-overlay: 0.45;
  --hhs-height: 75vh;
  --hhs-align: center;
}

/* Main Container */
.hhs-hero {
  position: relative;
  width: 100%;
  height: var(--hhs-height);
  font-family: inherit;
  overflow: hidden;
  border-radius: 0;
}

/* Full Bleed Functionality */
.hhs-full-bleed {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
  width: 100vw;
}

/* Swiper Container */
.hhs-hero .swiper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Swiper Wrapper */
.hhs-hero .swiper-wrapper {
  height: 100%;
}

/* Individual Slide */
.hhs-hero .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background Images */
.hhs-hero .hhs-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform 0.3s ease;
}

/* Image hover effect for better UX */
.hhs-hero .swiper-slide:hover .hhs-bg {
  transform: scale(1.02);
}

/* Dark Overlay */
.hhs-hero .hhs-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, var(--hhs-overlay));
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Content Container */
.hhs-hero .hhs-content {
  position: relative;
  z-index: 3;
  text-align: var(--hhs-align);
  color: #ffffff;
  max-width: 90%;
  width: 100%;
  padding: 0 20px;
  animation: fadeInUp 0.8s ease-out;
}

/* Content Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Headline */
.hhs-hero .hhs-headline {
  margin: 0 0 16px 0;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation-delay: 0.2s;
}

/* Subtext */
.hhs-hero .hhs-subtext {
  margin: 0 0 24px 0;
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.5;
  color: inherit;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation-delay: 0.4s;
}

/* Text alignment variations */
.hhs-hero[style*="--hhs-align: left"] .hhs-subtext {
  margin-left: 0;
}

.hhs-hero[style*="--hhs-align: right"] .hhs-subtext {
  margin-right: 0;
}

/* Button */
.hhs-hero .hhs-button {
  display: inline-block;
  padding: 12px 32px;
  background-color: #007cba;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-shadow: none;
  box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
  position: relative;
  overflow: hidden;
  animation-delay: 0.6s;
  min-width: 120px;
  text-align: center;
}

.hhs-hero .hhs-button:hover,
.hhs-hero .hhs-button:focus {
  background-color: #005a87;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.hhs-hero .hhs-button:active {
  transform: translateY(0);
}

/* Navigation Buttons */
.hhs-hero .swiper-button-prev,
.hhs-hero .swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hhs-hero .swiper-button-prev:after,
.hhs-hero .swiper-button-next:after {
  font-size: 18px;
  font-weight: bold;
  font-family: swiper-icons;
}

/* Fallback icons if Swiper icons don't load */
.hhs-hero .swiper-button-prev:before {
  content: '‹';
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hhs-hero .swiper-button-next:before {
  content: '›';
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Hide default content when our icons are visible */
.hhs-hero .swiper-button-prev:after {
  display: none;
}

.hhs-hero .swiper-button-next:after {
  display: none;
}

.hhs-hero .swiper-button-prev {
  left: 20px;
}

.hhs-hero .swiper-button-next {
  right: 20px;
}

.hhs-hero .swiper-button-prev:hover,
.hhs-hero .swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.hhs-hero .swiper-button-prev:focus,
.hhs-hero .swiper-button-next:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.hhs-hero .swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hhs-hero .swiper-button-disabled:hover {
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
}

/* Pagination */
.hhs-hero .swiper-pagination {
  bottom: 20px;
  z-index: 10;
}

.hhs-hero .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  margin: 0 6px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hhs-hero .swiper-pagination-bullet-active {
  background: #ffffff;
  transform: scale(1.2);
}

.hhs-hero .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* RTL Support */
[dir="rtl"] .hhs-hero .swiper-button-prev {
  right: 20px;
  left: auto;
}

[dir="rtl"] .hhs-hero .swiper-button-next {
  left: 20px;
  right: auto;
}

[dir="rtl"] .hhs-hero .swiper-button-prev:after {
  content: '\e009';
}

[dir="rtl"] .hhs-hero .swiper-button-next:after {
  content: '\e008';
}

/* No Slides State */
.hhs-no-slides {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: #f8f9fa;
  color: #6c757d;
  font-style: italic;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hhs-hero {
    --hhs-height: 60vh;
  }
  
  .hhs-hero .hhs-content {
    max-width: 95%;
    padding: 0 15px;
  }
  
  .hhs-hero .hhs-headline {
    margin-bottom: 12px;
    font-size: clamp(24px, 6vw, 36px);
  }
  
  .hhs-hero .hhs-subtext {
    margin-bottom: 20px;
    font-size: clamp(14px, 2vw, 16px);
  }
  
  .hhs-hero .hhs-button {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 100px;
  }
  
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .hhs-hero .swiper-button-prev {
    left: 10px;
  }
  
  .hhs-hero .swiper-button-next {
    right: 10px;
  }
  
  .hhs-hero .swiper-pagination {
    bottom: 15px;
  }
  
  .hhs-hero .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .hhs-hero {
    --hhs-height: 50vh;
  }
  
  .hhs-hero .hhs-headline {
    font-size: clamp(20px, 5vw, 28px);
  }
  
  .hhs-hero .hhs-button {
    padding: 8px 20px;
    font-size: 13px;
  }
  
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* Large Screens */
@media (min-width: 1200px) {
  .hhs-hero .hhs-content {
    max-width: 1200px;
  }
  
  .hhs-hero .hhs-button {
    padding: 14px 36px;
    font-size: 17px;
  }
  
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next {
    width: 55px;
    height: 55px;
    font-size: 20px;
  }
  
  .hhs-hero .swiper-button-prev {
    left: 30px;
  }
  
  .hhs-hero .swiper-button-next {
    right: 30px;
  }
}

/* High Contrast and Accessibility */
@media (prefers-contrast: high) {
  .hhs-hero .hhs-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
  
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
  }
  
  .hhs-hero .swiper-pagination-bullet {
    border: 1px solid #ffffff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hhs-hero .hhs-bg,
  .hhs-hero .hhs-overlay,
  .hhs-hero .hhs-button,
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next,
  .hhs-hero .swiper-pagination-bullet {
    transition: none;
  }
  
  .hhs-hero .hhs-content {
    animation: none;
  }
  
  .hhs-hero .swiper-slide:hover .hhs-bg {
    transform: none;
  }
}

/* Print Styles */
@media print {
  .hhs-hero {
    height: auto !important;
    overflow: visible;
  }
  
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next,
  .hhs-hero .swiper-pagination {
    display: none;
  }
  
  .hhs-hero .swiper-slide:not(.swiper-slide-active) {
    display: none;
  }
}

@media (max-width: 768px) {
  /* نخفي الأسهم */
  .hhs-hero .swiper-button-prev,
  .hhs-hero .swiper-button-next {
    display: none !important;
  }

  .hhs-hero .hhs-content {
    padding: 0 20px; 
  }
}