/* تأثيرات إضافية للموقع */
.animated-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animated-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* تأثيرات تحميل الصفحة */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary-color);
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* تأثيرات الصور */
.image-hover-effect {
  overflow: hidden;
  position: relative;
}

.image-hover-effect img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.image-hover-effect:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.image-hover-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.image-hover-effect:hover::after {
  opacity: 1;
}

/* تأثيرات الأزرار */
.btn-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(214, 40, 40, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(214, 40, 40, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(214, 40, 40, 0);
  }
}

/* تأثيرات العناوين */
.title-animation {
  position: relative;
  display: inline-block;
}

.title-animation::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.5s ease;
}

.title-animation:hover::before {
  width: 100%;
}

/* تأثيرات البطاقات */
.card-hover {
  transition: all 0.4s ease;
  position: relative;
  top: 0;
}

.card-hover:hover {
  top: -10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* تأثيرات الأيقونات */
.icon-rotate {
  transition: transform 0.4s ease;
}

.icon-rotate:hover {
  transform: rotate(20deg);
}

/* تأثيرات الخلفية المتحركة */
.animated-bg {
  position: relative;
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  z-index: -1;
  animation: backgroundMove 30s linear infinite;
}

@keyframes backgroundMove {
  0% {
    transform: rotate(0) translate(0, 0);
  }
  100% {
    transform: rotate(360deg) translate(0, 0);
  }
}

/* تأثيرات النص */
.text-reveal {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.text-reveal.visible span {
  transform: translateY(0);
  opacity: 1;
}

/* تأثيرات التمرير السلس */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* تأثيرات التنقل */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.page-transition.active {
  transform: translateY(0);
}

/* تأثيرات الشريط الجانبي */
.sidebar-animation {
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.sidebar-animation.active {
  transform: translateX(0);
}

/* تأثيرات الظل */
.shadow-pulse {
  animation: shadowPulse 3s infinite;
}

@keyframes shadowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* تأثيرات الشرائح */
.slide-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
}

.slide-controls {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.slide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.2);
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slide-dot.active {
  background-color: var(--primary-color);
}

/* تأثيرات العد */
.counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-block;
}

/* تأثيرات الكتابة */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

/* تأثيرات التكبير */
.zoom-on-hover {
  transition: transform 0.3s ease;
}

.zoom-on-hover:hover {
  transform: scale(1.1);
}

/* تأثيرات الظل النصي */
.text-shadow-effect {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: text-shadow 0.3s ease;
}

.text-shadow-effect:hover {
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

/* تأثيرات الحدود */
.border-animation {
  position: relative;
}

.border-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.border-animation:hover::before {
  width: 100%;
}

.border-animation::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.border-animation:hover::after {
  width: 100%;
}

/* تأثيرات الخلفية المتدرجة */
.gradient-animation {
  background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 600% 600%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
