@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap");

body {
  font-family: "Cairo", sans-serif;
  min-width: 0;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

img,
svg,
video {
  max-width: 100%;
}

.container {
  width: 100%;
  min-width: 0;
}

[data-aos] {
  will-change: transform, opacity;
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #1e3a8a;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e40af;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Infinite Partners Slider --- */
@keyframes marquee-ltr {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

.animate-marquee {
  animation: marquee-rtl 25s linear infinite;
}

.animate-marquee img {
  height: 120px;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  opacity: 0.7;
  transition: 0.3s linear;
  cursor: pointer;
  border-radius: 1rem;
}
.animate-marquee img:hover {
  opacity: 1;
}

/* Automatically switch direction when English (LTR) is active */
html[dir="ltr"] .animate-marquee {
  animation: marquee-ltr 25s linear infinite;
}

/* Pause the animation on hover */
.group:hover .animate-marquee {
  animation-play-state: paused;
}

.container {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}
@media screen and (max-width: 768px) {

  nav .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  nav .flex.items-center.gap-8 {
    gap: 0.75rem;
  }

  #mobile-menu {
    max-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #mobile-menu.max-h-\[500px\] {
    max-height: calc(100dvh - 5rem);
  }

  [data-aos="fade-left"],
  [data-aos="fade-right"] {
    transform: translate3d(0, 24px, 0);
  }

  [data-aos="fade-left"].aos-animate,
  [data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
  }

  section,
  main,
  footer {
    max-width: 100%;
  }
}

/* --- Floating Labels (On Border Style) --- */
.floating-group {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.floating-input,
.floating-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  /* Equal padding top and bottom so text sits naturally in the center */
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background-color: #fff;
  outline: none;
  transition: border-color 0.3s ease;
  appearance: none;
}

.floating-input:focus,
.floating-select:focus {
  border-color: #1e3a8a;
}

/* Hide placeholder initially */
.floating-input::placeholder {
  color: transparent;
  transition: color 0.3s ease;
}

/* Show placeholder text only on focus */
.floating-input:focus::placeholder {
  color: #94a3b8;
}

.floating-label {
  position: absolute;
  top: 50%;
  right: 1rem; /* RTL default */
  transform: translateY(-50%);
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  pointer-events: none;
  transition: all 0.2s ease-out;
  transform-origin: right top;

  /* Add background color and slight padding to mask the border behind it */
  background-color: #fff;
  padding: 0 0.3rem;
  margin-right: -0.3rem; /* Offsets the padding so it aligns perfectly with the input text */
}

/* Dynamic Direction Support (LTR) */
html[dir="ltr"] .floating-label {
  right: auto;
  left: 1rem;
  transform-origin: left top;
  margin-right: 0;
  margin-left: -0.3rem;
}

/* Trigger the floating effect: move to top: 0 and keep vertically centered on the border */
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label,
.floating-select ~ .floating-label {
  top: 0;
  transform: translateY(-50%) scale(0.85);
}

/* Highlight the label color on focus */
.floating-input:focus ~ .floating-label,
.floating-select:focus ~ .floating-label {
  color: #1e3a8a;
}
