/* RTL Support */
.rtl {
  direction: rtl;
  text-align: right;
}

.rtl nav {
  flex-direction: row-reverse;
}

.rtl .nav-links {
  flex-direction: row-reverse;
}

.rtl .text-left {
  text-align: right;
}

.rtl .text-right {
  text-align: left;
}

@media (max-width: 768px) {
  .rtl .order-1 {
    order: 2;
  }
  
  .rtl .order-2 {
    order: 1;
  }
}

.rtl .space-x-3 > * + * {
  margin-right: 0.75rem;
  margin-left: 0;
}

.rtl .space-x-4 > * + * {
  margin-right: 1rem;
  margin-left: 0;
}

/* Navigation styles */
nav {
  transition: all 0.3s ease;
  backdrop-filter: none; /* Remove blur effect */
  @apply shadow-md;
}

nav:not(.nav-scrolled) {
  background: #0D4139; /* Solid background color */
}

nav:not(.nav-scrolled) .nav-link {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-scrolled {
  background-color: #0D4139; /* Keep solid background when scrolling */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-scrolled .nav-link {
  color: #D1D5DB;
}

.nav-link {
  font-weight: 500;
  font-size: 1.125rem;
  position: relative;
  transition: color 0.3s ease;
  @apply text-white font-medium hover:text-[#A7CE59] transition-colors;
}

.nav-link:hover,
.nav-link.active {
  color: #A7CE59;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #A7CE59;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Navigation */
#nav-links {
  background-color: #0D4139; /* Solid background color */
  backdrop-filter: none; /* Remove blur effect */
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.mobile-nav-link {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: white;
  transition: color 0.3s ease;
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
    color: white;
    font-size: 1.125rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: background-color 0.3s ease;
  }
  .mobile-nav-link:hover {
    background-color: rgba(13, 65, 57, 0.2);
}

.mobile-nav-link:hover {
  color: #A7CE59;
}

/* Language switch button and CTA buttons */
#lang-switch,
.cta-button {
  font-weight: 500;
  font-size: 1.125rem;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

#lang-switch {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.cta-button {
  background-color: transparent;
  border-color: white;
}

#lang-switch:hover,
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(167, 206, 89, 0.2);
  border-color: #A7CE59;
  color: #A7CE59;
}

#lang-switch:active,
.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(167, 206, 89, 0.1);
}

#lang-switch::after,
.cta-button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

#lang-switch:hover::after,
.cta-button:hover::after {
  left: 100%;
}

/* Custom cursor on hover */
#lang-switch:hover,
.cta-button:hover {
  cursor: pointer;
}

/* Focus states for accessibility */
#lang-switch:focus,
.cta-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(167, 206, 89, 0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #lang-switch,
  .cta-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

/* Responsive utilities */
@media (max-width: 1023px) {
  #nav-links {
    position: fixed;
    top: 84px;
    left: 1rem;
    right: 1rem;
    z-index: 50;
    width: calc(100% - 2rem);
  }
  
  .nav-link {
    font-size: 1rem;
  }
  
  .mobile-nav-link {
    text-align: center;
  }
}

/* Hero section */
.bg-gradient-to-b {
  background-image: linear-gradient(
    to bottom,
    rgba(13, 65, 57, 0),
    rgba(13, 65, 57, 0.8)
  );
}

/* RTL specific adjustments */
.rtl .nav-link::after {
  left: auto;
  right: 0;
}

.rtl img.ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

.rtl img.mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* Responsive hero content */
@media (max-width: 768px) {
  .hero-content {
    padding-top: 6rem;
  }
  
  h1[data-translate="heroTitle"] {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  p[data-translate="heroDescription"] {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Base animation classes */
.animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Different animation variants */
.animate-delay-200 {
  transition-delay: 200ms;
}

.animate-delay-400 {
  transition-delay: 400ms;
}

.animate-from-left {
  transform: translateX(-50px);
}

.animate-from-right {
  transform: translateX(50px);
}

.animate-scale {
  transform: scale(0.8);
}

/* Animation classes */
.animate {
  opacity: 0;
  transition: all 1s;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(100px);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-100px);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(50px);
}

/* Animation triggers */
.animate.active {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Add sticky navbar styles */
nav.bg-dark-green {
  background-color: rgba(13, 65, 57, 0.95);
}

nav.shadow-lg {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Add these animation keyframes */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add animation classes */
.animate-slide-left {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight 1s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* Loading screen styles */
#loading-screen {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.main-content {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    opacity: 0;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Add or modify these styles */
[dir="rtl"] .lg\:flex .space-x-8 {
    --tw-space-x-reverse: 0;
    margin-left: calc(2rem * var(--tw-space-x-reverse));
    margin-right: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}

[dir="rtl"] .nav-link {
    margin-left: 1rem;  /* Adjust this value as needed */
}

/* Add padding below navbar */
main {
    padding-top: 180px; /* Adjust this value based on your navbar height */
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
    main {
        padding-top: 120px; /* Smaller padding for mobile */
    }
}

/* Add RTL specific letter spacing adjustment */
[dir="rtl"] [data-translate="heroOil"],
[dir="rtl"] [data-translate="heroCity"] {
    letter-spacing: normal !important; /* Override the large tracking/letter-spacing */
    margin-right: 0; /* Remove any extra spacing */
}

/* Slider styles */
.slider {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slider-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 20;
}

.slider-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider-dot.active {
  background-color: #fff;
}

/* Remove any transform or hide animations */
nav, 
.nav-link,
.mobile-nav-link {
    transform: none !important;
}

/* Animation base styles */
.animate-prepare {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* RTL support for animations */
html[dir="rtl"] .animate-prepare {
    transform: translateY(30px);
}

html[dir="rtl"] .animate-in {
    transform: translateY(0);
}

/* Custom animation variants */
[data-animation="fade-up"].animate-prepare {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animation="fade-in"].animate-prepare {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animation="fade-slide"].animate-prepare {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* RTL support for slide animations */
html[dir="rtl"] [data-animation="fade-slide"].animate-prepare {
    transform: translateX(30px);
}

/* Active states */
[data-animation].animate-in {
    opacity: 1;
    transform: translate(0) scale(1);
}