/* =============================================================
   Components CSS — Extracted from front_header.php
   Shared components used across all pages
   ============================================================= */

/* ── Keyframes for Animations ───────────────────────────────── */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growUnderline {
  from {
    width: 0;
  }
  to {
    width: 100px;
  }
}

/* الشريط الاخباري (من اليسار لليمين) */
@keyframes ticker-scroll {
  0% {
    transform: translateX(-80%);
  }
  100% {
    transform: translateX(80%);
  }
}

/* ── تأثيرات الحركة المحسّنة (Compositor-Only) ──────────────── */

/* نبض بطيء */
@keyframes pulse-slow {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

/* طفو هادئ */
@keyframes float-gentle {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* دوران خفيف مستمر */
@keyframes rotate-subtle {
  0% {
    transform: scale(1.02) rotate(-1deg);
  }
  50% {
    transform: scale(1.02) rotate(1deg);
  }
  100% {
    transform: scale(1.02) rotate(-1deg);
  }
}

/* تذبذب السطوع — محسّن: يستخدم opacity بدلاً من filter: brightness */
@keyframes brightness-wave {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
  100% {
    opacity: 1;
  }
}

/* ── الشريط الإخباري المتحرك ────────────────────────────────── */
.ticker-wrap {
  position: fixed;
  bottom: 0px;
  left: 0;
  width: 100%;
  overflow: hidden;
  background-color: var(--color2);
  color: #f8f9fa;
  padding: 10px 0;
  z-index: 1001;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  direction: ltr;
}

.ticker-move {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  will-change: transform;
  align-items: center;
}

.ticker-item {
  padding: 0 1rem;
  font-size: 1.25rem;
  font-weight: normal;
  display: inline-block;
}

.ticker-item a {
  color: #f8f9fa;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.ticker-wrap:hover .ticker-move {
  animation-play-state: paused;
  cursor: default;
}

/* ── Modal أنماط النافذة المنبثقة ─────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.6);
  padding-top: 20px;
  direction: rtl;
}

.modal-content {
  background-color: rgb(245, 244, 244);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 95%;
  max-width: 700px;
  border-radius: 10px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-image {
  max-width: 100%;
  height: auto;
  max-height: 450px;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
}

.close-button {
  color: #aaa;
  position: absolute;
  left: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-content .text-content {
  direction: rtl;
}

.modal-content .description,
.modal-content .details,
.modal-content .develop,
.modal-content .price {
  margin-top: 15px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 8px;
  background-color: #f8f8f8;
  border: 1px solid #eee;
}

.modal-content .develop {
  background-color: var(--color1, #f0f0f0);
  color: var(--color-text-on-color1, white);
}

.modal-content .price {
  background-color: var(--color3, #e0e0e0);
  text-align: center;
}

.modal-content h2 {
  text-align: center;
  color: var(--color2, #333);
  margin-bottom: 20px;
}

/* ── شريط التصنيفات القابل للتمرير ──────────────────────────── */
.category-navbar {
  margin-bottom: 20px;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.categories-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
  cursor: grab;
  margin: 0 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 30px;
}

.categories-container.grabbing {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.categories-container.grabbing .category-tag {
  pointer-events: none;
}

.categories-container::-webkit-scrollbar {
  display: none;
}

.category-tag {
  flex: 0 0 auto;
  padding: 12px 28px;
  margin: 0 8px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.category-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  filter: brightness(110%);
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.nav-button:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#scroll-right {
  right: -15px;
}
#scroll-left {
  left: -15px;
}

.nav-button svg {
  width: 20px;
  height: 20px;
  fill: #555;
}

/* ── Header أنماط الهيدر ──────────────────────────────────────── */
header .container {
  padding-top: 15px;
}

header .container .logo img {
  width: 120px;
  height: 70px;
  margin-top: 12px;
}

header .container ul a {
  color: white;
  font-size: 17px;
  position: relative;
  cursor: pointer;
}

header .container ul a:hover {
  color: var(--color3);
  font-size: 18px;
  font-weight: bold;
  transition: 0.3s;
}

@media (max-width: 850px) {
  header .container .menu-modal {
    display: none;
    padding: 60px;
    width: 100%;
    height: 100vh;
    position: absolute;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    top: 0;
    left: 0;
    background-color: rgba(27, 27, 27, 0.555);
    z-index: 9;
  }

  header .container ul {
    flex-direction: column;
    gap: 40px;
  }

  header .container ul a {
    font-size: 19px;
  }

  header .container #close-btn {
    display: block;
    position: absolute;
    right: 30px;
  }

  header .container .menu-btn {
    display: block;
  }
}
