body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #E31C2D;
  border-radius: 10px;
}
.text-outline {
  -webkit-text-stroke: 1px rgba(255,255,255,0.2);
  color: transparent;
}
.text-stroke-black {
  -webkit-text-stroke: 1px black;
  color: transparent;
}

#loader {
  background-color: #E31C2D;
}
.loader-grid {
  width: 64px;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  transform: rotate(45deg);
  animation: grid-spin 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
.shape {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  animation: shape-morph 1.5s ease-in-out infinite alternate;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.shape.white { background-color: white; }
.shape.green { background-color: #389A48; }

.shape:nth-child(1) { animation-delay: 0s; transform-origin: bottom right; }
.shape:nth-child(2) { animation-delay: 0.1s; transform-origin: bottom left; }
.shape:nth-child(3) { animation-delay: 0.3s; transform-origin: top right; }
.shape:nth-child(4) { animation-delay: 0.2s; transform-origin: top left; }

@keyframes grid-spin {
  0% { transform: rotate(45deg); }
  50% { transform: rotate(225deg); }
  100% { transform: rotate(405deg); }
}
@keyframes shape-morph {
  0% { transform: scale(1); border-radius: 4px; }
  50% { transform: scale(0.5); border-radius: 50%; }
  100% { transform: scale(1); border-radius: 12px; }
}

html[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee-infinite {
  display: flex;
  width: fit-content;
  animation: marquee 20s linear infinite;
}
@media (max-width: 768px) {
  .animate-marquee-infinite {
    animation: marquee 6s linear infinite;
  }
}

.img-loading {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.img-loaded {
  opacity: 1;
}
.img-placeholder {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
