/* ===========================================
   LIANA — HERO SLIDER (FINAL PORSCHE VERSION)
   Full Responsive / RTL + Dynamic Colors
=========================================== */

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Base container */
.home-slider {
  position: relative;
  width: 100%;
  height: clamp(600px, 85vh, 900px);
  overflow: hidden;
  background: #000;
  z-index: 1;
  font-family: 'MorabbaPro', sans-serif;
}

/* Header gradient */
.slider-header-gradient {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--header-gradient-height, 140px);
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,var(--header-gradient-opacity, .65)) 0%,
    rgba(0,0,0,0) 100%
  );
  z-index: 3;
  pointer-events: none;
}

/* Slides */
.slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  z-index: 0;
  overflow: hidden;
}
.slide-item.active {
  opacity: 1;
  z-index: 2;
}

/* Media */
.slide-media,
.slide-media .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.slide-media img,
.slide-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease;
  transform-origin: center center;
  will-change: transform;
  max-width: 100%;
}

.slide-item.active img {
  transform: scale(1.06);
}

/* Overlay */
.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,var(--overlay, .35));
  z-index: 2;
  pointer-events: none;
}

/* ============================
   TEXT + CONTENT
============================ */
.slide-content {
  position: absolute;
  max-width: 560px;
  padding: 24px 32px;
  background: rgba(0,0,0,.32);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  color: var(--text-color, #fff);
  text-align: right;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  z-index: 4;
  line-height: 1.7;
}
.slide-item .slide-content { bottom: 72px; right: 72px; }
.slide-item.active .slide-content { opacity: 1; transform: none; }

.slide-title {
  margin: 0 0 8px 0;
  font-size: 42px; /* 🔹 اندازه اصلی حفظ شد */
  font-weight: 800;
  color: var(--title-color, #fff); /* ✅ پویا از Customizer */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-desc {
  margin: 0 0 16px 0;
  font-size: 18px; /* 🔹 اندازه اصلی حفظ شد */
  font-weight: 400;
  color: var(--text-color, #fff); /* ✅ پویا از Customizer */
  line-height: 1.7;
  white-space: normal;
  overflow: visible;
}

/* ============================
   BUTTON
============================ */
.btn-slide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 13px 40px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--btn-bg, transparent);
  color: var(--btn-color, #fff);
  border: 2px solid var(--btn-border, #fff);
  border-radius: 12px;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
  z-index: 5;
}
.btn-slide:hover,
.btn-slide:focus-visible {
  background-color: var(--btn-bg-hover, #fff);
  border-color: var(--btn-bg-hover, #fff);
  color: var(--btn-color-hover, #000);
  transform: translateY(-2px);
}
.btn-slide:active { transform: translateY(-1px) scale(.99); }

/* ============================
   DOTS
============================ */
.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}
.slider-dot {
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: var(--dot-color, rgba(255,255,255,.45));
  cursor: pointer;
  transition: background-color .25s ease, transform .25s ease, opacity .25s ease;
  opacity: .9;
}
.slider-dot:hover { background: var(--dot-hover, #fff); transform: scale(1.05); }
.slider-dot.active { background: var(--dot-active, #f6c045); transform: scale(1.15); opacity: 1; }

/* ============================
   TOGGLE (Play / Pause)
============================ */
.slider-toggle {
  position: absolute;
  bottom: 40px;
  left: 60px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: background .3s ease, transform .3s ease;
}
.slider-toggle:hover { background: rgba(0,0,0,.65); transform: translateY(-1px) scale(1.03); }
.toggle-icon { color: #fff; font-size: 18px; }

/* ===========================================
   MOBILE (≤ 768px)
=========================================== */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden !important; }

  .home-slider, .slider-inner, .slide-item, .slide-media, .slide-media .media {
    overflow: hidden !important;
    max-width: 100vw;
    width: 100%;
  }

  .home-slider { height: 100vh; max-height: 820px; }

  .slide-content {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .slide-title {
    font-size: 24px; /* 🔹 اندازه اصلی حفظ شد */
    color: var(--title-color, #fff);
    margin-bottom: 6px;
    text-align: center;
  }

  .slide-desc {
    font-size: 15px; /* 🔹 اندازه اصلی حفظ شد */
    color: var(--text-color, #fff);
    line-height: 1.8;
    margin: 0 auto 15px;
    max-width: 90%;
    text-align: center;
  }

  .btn-slide {
    width: 100%;
    max-width: 420px;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 10px;
  }

  .slider-dots { bottom: 18px; }
  .slider-toggle { bottom: 18px; left: 18px; width: 40px; height: 40px; }
}

/* ===============================
   MOBILE / DESKTOP TITLE & DESC
=============================== */
.desktop-title, .desktop-desc { display: block !important; }
.mobile-title,  .mobile-desc  { display: none !important; }

@media (max-width: 768px) {
  .desktop-title, .desktop-desc { display: none !important; }
  .mobile-title,  .mobile-desc  { display: block !important; }
}
