/* Raya Al Maskeen - Hero Widget Styles */
.ram-hero {
  position: relative;
  color: #ffffff;
  overflow: hidden;
}

.ram-hero--slider {
  width: 100%;
}

.ram-hero--slider .ram-hero__track {
  position: relative;
  min-height: 500px; /* Ensure container has height */
}

.ram-hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}

.ram-hero__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Animation Elements --- */
.ram-hero__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  --shape-width-top: 60%;
  --shape-width-bottom: 40%;
  clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); /* Start collapsed */
}

.ram-hero__title, .ram-hero__subtitle, .ram-hero__desc {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.ram-hero__actions .ram-hero__btn {
  opacity: 0;
  transform: translateX(-50px);
}

/* --- Enter Animation --- */
.ram-hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.ram-hero__slide.is-active .ram-hero__overlay {
  animation: anim-extend 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.ram-hero__slide.is-active .ram-hero__title,
.ram-hero__slide.is-active .ram-hero__subtitle,
.ram-hero__slide.is-active .ram-hero__desc {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

.ram-hero__slide.is-active .ram-hero__btn {
  animation: anim-slide-in-left 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.9s;
}

/* --- Exit Animation --- */
.ram-hero__slide.is-leaving {
  opacity: 0;
  transform: scale(0.95);
  z-index: 0;
}

.ram-hero__slide.is-leaving .ram-hero__title,
.ram-hero__slide.is-leaving .ram-hero__subtitle,
.ram-hero__slide.is-leaving .ram-hero__desc,
.ram-hero__slide.is-leaving .ram-hero__btn {
  opacity: 0;
  transition-delay: 0s;
}

/* --- Keyframes --- */
@keyframes anim-extend {
  from {
    clip-path: polygon(0 0, 0 0, 0 0, 0 0);
  }
  to {
    clip-path: polygon(0 0, var(--shape-width-top) 0, var(--shape-width-bottom) 100%, 0% 100%);
  }
}

@keyframes anim-slide-in-left {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}



/* --- Base Styles (No Animation Logic) --- */
.ram-hero__title {
  margin: 0 0 10px;
  font-size: 48px;
  line-height: 1.2;
}

.ram-hero__subtitle {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 500;
}

.ram-hero__desc {
  margin: 0 0 24px;
  font-size: 18px;
  max-width: 600px;
}

.ram-hero__actions .ram-hero__btn {
  display: inline-block;
  padding: 14px 28px;
  background: #ff6b6b;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background .3s;
}
.ram-hero__actions .ram-hero__btn:hover { background: #ff4f4f; }

/* --- Slider Navigation --- */
.ram-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: background .3s, color .3s, opacity .3s, visibility .3s;
}

.ram-hero:hover .ram-hero__nav {
  opacity: 1;
  visibility: visible;
}

.ram-hero__nav:hover { 
  background: #fff; 
  color: #000; 
}
.ram-hero__nav--prev { left: 30px; }
.ram-hero__nav--next { right: 30px; }

/* --- Responsive --- */
@media (max-width: 767px) {
  .ram-hero__slide { padding: 80px 15px; min-height: 400px; }
  .ram-hero__title { font-size: 32px; }
  .ram-hero__subtitle { font-size: 20px; }
  .ram-hero__nav { width: 40px; height: 40px; }
  .ram-hero__nav--prev { left: 15px; }
  .ram-hero__nav--next { right: 15px; }
}
