@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/font/IBMPlexSansArabic-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/font/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --font-arabic: "IBM Plex Sans Arabic", sans-serif;
  --font-english: "Montserrat", sans-serif;
}

[lang="ar"] {
  font-family: var(--font-arabic);
}

[lang="en"] {
  font-family: var(--font-english);
}

p {
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  p {
    font-size: 1.2rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Burger Menu Toggle */
#menu-btn {
  width: 32px;
  height: 32px;
  display: block;
}

#menu-btn .icon-dots,
#menu-btn .icon-close {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
}

#menu-btn .icon-dots {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

#menu-btn .icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8) rotate(-90deg);
}

/* Open State Animations */
#menu-btn.open .icon-dots {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8) rotate(90deg);
}

#menu-btn.open .icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

/* Marquee Animation */
.marquee-container {
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.marquee-content {
  display: flex;
  gap: 2rem; /* Matches gap-8 usually */
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* RTL Support for Marquee */
[dir="rtl"] .marquee-content {
  animation: marquee-rtl 30s linear infinite;
}

[dir="rtl"] .marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Ensure the button stays visible on top of overlay */
#menu-btn {
  z-index: 60; /* Higher than overlay z-50/z-40 */
}
