/* styles/main.css */
@import 'variables.css';

/* ===== Base & Fade‑in ===== */
body {
  background-color: var(--bg-color);
  color: var(--main-color);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Fallback if JavaScript fails */
noscript body {
  opacity: 1;
}

/* ===== Utility classes ===== */
.text-main {
  color: var(--main-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.bg-main {
  background-color: var(--main-color);
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.border-main {
  border-color: var(--main-color);
}

.border-secondary {
  border-color: var(--secondary-color);
}

/* ===== Offset for sticky header ===== */
html {
  scroll-padding-top: 80px;
}

/* ===== Hero section ===== */
#hero {
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#hero section {
  margin: 0 !important;
  display: flex;
}

/* ===== Wave animation ===== */
.waves {
  width: 100%;
  height: 12vh;
  min-height: 120px;
  max-height: 150px;
  display: block;
  position: relative;
  margin-bottom: -2px;
  background: transparent !important;
  pointer-events: none;
}

.waves-container {
  line-height: 0;
  font-size: 0;
}

.parallax>use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax>use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 10s;
  opacity: 0.5;
}

.parallax>use:nth-child(2) {
  animation-delay: -5s;
  animation-duration: 18s;
  opacity: 1;
}

@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }

  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* ===== Marquee (partners) ===== */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  min-width: 100%;
  animation: scroll-left 30s linear infinite;
  animation-play-state: running;
}

.marquee-container {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee:hover .marquee-content {
  animation-play-state: paused;
}

.marquee-item img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - 2rem));
  }
}

[dir="rtl"] .marquee-content {
  animation-name: scroll-right;
}

@keyframes scroll-right {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(100% + 2rem));
  }
}

/* ===== Product grid transitions ===== */
#product-grid>div {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== Button Styles ===== */
button.bg-main,
a.bg-main,
[role="button"].bg-main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

button.bg-main:hover,
a.bg-main:hover,
[role="button"].bg-main:hover {
  background-color: var(--white) !important;
  color: var(--main-color) !important;
}

button.border.border-main,
a.border.border-main,
[role="button"].border.border-main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

button.border.border-main:hover,
a.border.border-main:hover,
[role="button"].border.border-main:hover {
  background-color: var(--main-color) !important;
  color: var(--white) !important;
  border-color: var(--main-color) !important;
}

button.bg-white.text-main,
a.bg-white.text-main,
[role="button"].bg-white.text-main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

button.bg-white.text-main:hover,
a.bg-white.text-main:hover,
[role="button"].bg-white.text-main:hover {
  background-color: var(--main-color) !important;
  color: var(--white) !important;
}

/* CTA Button */
.btn-cta {
  background-color: var(--secondary-color);
  color: var(--main-color);
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 20px -10px rgba(245, 158, 11, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta:hover {
  background-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -10px rgba(255, 255, 255, 0.2);
}

.btn-cta i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-cta:hover i {
  transform: translateX(4px);
}

/* ===== Navigation Link Underline Effect ===== */
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
  transform: translateX(0);
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-link {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--secondary-color);
  letter-spacing: 0.3em;
}

.mobile-menu.active {
  max-height: 500px !important;
}

/* ===== Hero Carousel ===== */
#hero-carousel {
  position: relative;
  z-index: 2;
  min-height: 320px;
}

.carousel-slide {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.carousel-slide.opacity-0 {
  pointer-events: none;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .carousel-slide img {
    object-position: right center;
  }
}

@media (max-width: 1023px) {
  .carousel-slide img {
    object-position: center;
  }
}

.carousel-controls-hidden {
  display: none;
}

#carousel-prev,
#carousel-next {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

@media (max-width: 767px) {

  #carousel-prev,
  #carousel-next {
    display: none;
  }
}

#carousel-dots button:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.hero-bg-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== Tech/Engineering Styles ===== */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.glow-blue {
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

section {
  position: relative;
  background-image: radial-gradient(rgba(10, 22, 51, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

.btn-tech {
  background: linear-gradient(135deg, #0a1633 0%, #162a5a 100%);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.btn-tech::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-tech:hover::after {
  left: 100%;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(10, 22, 51, 0.05);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--main-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ===== Reveal Animation ===== */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Responsive Grid Fixes ===== */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid>div:last-child:nth-child(3) {
    grid-column: span 2;
    justify-self: center;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== Hero Dynamic Animations ===== */

/* Animated gradient background (smooth shifting colors) */
@keyframes gradient-xy {

  0%,
  100% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }
}

.animate-gradient-xy {
  background-size: 200% 200%;
  animation: gradient-xy 15s ease infinite;
}

/* Slow pulse for floating orbs */
@keyframes pulse-slow {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 8s ease-in-out infinite;
}

/* Floating motion */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Fade-in-up animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  /* start invisible */
}

.animation-delay-200 {
  animation-delay: 0.4s;
}

.animation-delay-400 {
  animation-delay: 0.8s;
}

.animation-delay-600 {
  animation-delay: 0.12s;
}

/* Fade-in-right for carousel */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 3;
    transform: translateX(0);
  }
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.brand {
  font-size: 0.80rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.25rem;
}












/* styles/rtl.css - RTL overrides for Arabic version */
[dir="rtl"] {
  text-align: right;
}

/* Header adjustments */
[dir="rtl"] .header-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .company-name {
  left: auto;
  right: 111px;
  text-align: right;
}

[dir="rtl"] .logo-group {
  order: 1;
}

[dir="rtl"] .desktop-nav {
  order: 0;
}

[dir="rtl"] .nav-links {
  padding-right: 0;
}

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .btn-cta i {
  transform: rotate(180deg);
}

[dir="rtl"] .btn-cta:hover i {
  transform: translateX(-4px) rotate(180deg);
}

/* Mobile drawer slides from left instead of right */
[dir="rtl"] .mobile-drawer {
  right: auto;
  left: -100%;
}

[dir="rtl"] .mobile-drawer.active {
  left: 0;
  right: auto;
}

[dir="rtl"] .close-trigger-icon {
  right: auto;
  left: 20px;
}

/* Marquee (partners strip) - reverse direction */
[dir="rtl"] .marquee-content {
  animation-name: scroll-right;
}

[dir="rtl"] .marquee-container {
  mask-image: linear-gradient(to left, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to left, transparent, black 10%, black 90%, transparent);
}

/* Hero section text alignment */
[dir="rtl"] .slogan {
  text-align: center;
}

/* Highlight cards - keep text centered but adjust icon margins */
[dir="rtl"] .group.text-center {
  text-align: center;
}

/* Footer adjustments */
[dir="rtl"] footer .grid {
  text-align: right;
}

[dir="rtl"] footer .flex.gap-4 {
  justify-content: flex-start;
}

[dir="rtl"] footer .border-t .flex {
  flex-direction: row-reverse;
}

@media (max-width: 640px) {
  [dir="rtl"] footer .border-t .flex {
    flex-direction: column;
  }
}

/* Reveal animation from right instead of left */
[dir="rtl"] .reveal-left {
  transform: translateX(30px);
}

[dir="rtl"] .reveal-left.active {
  transform: translateX(0);
}

/* Counter numbers – keep LTR inside RTL */
[dir="rtl"] .counter {
  unicode-bidi: isolate;
  direction: ltr;
  display: inline-block;
}

/* Fix carousel arrow positions if needed */
[dir="rtl"] #carousel-prev,
[dir="rtl"] #carousel-next {
  transform: scaleX(-1);
}

/* Arrow icon on "View Gallery" in RTL */
[dir="rtl"] .fa-arrow-right-long {
  transform: rotate(180deg);
}

[dir="rtl"] .group:hover .fa-arrow-right-long {
  transform: translateX(-4px) rotate(180deg);
}

/* Language switcher spacing */
[dir="rtl"] .lang-switch {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* Fix for absolute positioned elements */
[dir="rtl"] .waves {
  direction: ltr;
  /* keep wave animation LTR */
}