/* Global Styles */
:root {
  --primary-blue: #0F3651;
  --accent-green: #10B981;
  --accent-green-hover: #059669;
  --secondary-amber: #FCD34D;
  --bg-light: #F8FAFC;
  --text-dark: #1E293B;
  --text-light: #64748B;
  --white: #FFFFFF;
  --footer-bg: #0F172A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body.font-arabic {
  font-family: 'Cairo', 'Inter', sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-blue);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-green { color: var(--accent-green); }

.btn {
  display: inline-block;
  background-color: var(--accent-green);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-2px);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid #E2E8F0;
}

header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo img {
  height: 75px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--primary-blue);
}

.nav-links a:hover {
  color: var(--accent-green);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-light);
  padding: 0.25rem;
  border-radius: 2rem;
  border: 1px solid #E2E8F0;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--accent-green);
  color: var(--white);
}

.lang-btn:not(.active):hover {
  background: #E2E8F0;
  color: var(--text-dark);
}

/* Hero Slider Section */
.hero-slider-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(15, 54, 81, 0.8), rgba(15, 54, 81, 0.6));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  margin-top: 80px;
}

.hero-title {
  color: var(--white);
  font-size: 4rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #E2E8F0;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.slider-btn:hover {
  background: var(--accent-green);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }


/* Services Section */
.services {
  padding: 100px 0;
  background-color: var(--bg-light);
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.125rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--accent-green);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-desc {
  color: var(--text-light);
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.mt-auto { margin-top: auto; }
.mt-3 { margin-top: 1.5rem; }

.service-list {
  padding-left: 0;
  text-align: left;
}

[dir="rtl"] .service-list {
  text-align: right;
}

.service-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-glass {
  background: rgba(16, 185, 129, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  align-self: flex-start;
}

.btn-glass:hover {
  background: var(--accent-green);
  color: var(--white);
}

[dir="rtl"] .btn-glass {
  align-self: flex-start;
}

/* About Section */
.about {
  padding: 100px 0;
  background-color: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}



.about-subtitle-green {
  color: var(--accent-green);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.about-text {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dark);
}

.feature-icon {
  color: var(--accent-green);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.about-image {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.about-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Contact Section & Footer */
.contact-section {
  padding: 100px 0 50px;
  background-color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  background: var(--bg-light);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-dark);
  text-align: left;
}

[dir="rtl"] .form-group label { text-align: right; }

.form-group input, 
.form-group select, 
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  background: white;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

footer {
  background-color: var(--footer-bg);
  color: var(--white);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-logo {
  height: 75px;
  background-color: var(--white);
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-tagline {
  color: #94A3B8;
  max-width: 300px;
}

.footer-title {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.footer-icon {
  color: var(--white);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94A3B8;
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .nav-links {
    display: none;
  }
  .about-features {
    grid-template-columns: 1fr;
  }
}

/* Gallery Section */
.gallery {
  padding: 100px 0;
  background-color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.video-item .gallery-img {
  filter: brightness(0.7);
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: var(--white);
  opacity: 0.9;
  transition: transform 0.2s, color 0.2s;
}

.video-item:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  color: var(--accent-green);
}

/* Articles Section */
.articles {
  padding: 100px 0;
  background-color: var(--bg-light);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.article-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-img {
  transform: scale(1.05);
}

.article-date {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-green);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2;
}

[dir="rtl"] .article-date {
  right: auto;
  left: 1rem;
}

.article-content {
  padding: 1.5rem;
}

.article-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-desc {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-link {
  color: var(--accent-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.article-link:hover {
  color: var(--accent-green-hover);
}

[dir="rtl"] .article-link i {
  transform: rotate(180deg);
}

/* Modal Consignation */
.custom-modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(15, 54, 81, 0.5); 
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--white);
  margin: 10% auto; 
  padding: 2.5rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #94A3B8;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

[dir="rtl"] .close-modal {
  right: auto;
  left: 1.5rem;
}

.close-modal:hover {
  color: var(--text-dark);
}

.modal-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

[dir="rtl"] .modal-title { padding-right: 0; padding-left: 2rem; }

.modal-list {
  list-style: none;
  padding: 0;
}

.modal-list li {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.5;
  color: var(--text-dark);
}

.modal-list i {
  font-size: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* Odometer Counter Styles */
.odometer-wrapper {
  display: flex;
  background: rgba(15, 54, 81, 0.4);
  color: var(--accent-green);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  height: 1.5em; /* Padding + text */
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.odometer-digit {
  width: 0.7em;
  height: 1.1em;
  text-align: center;
  position: relative;
  overflow: hidden; /* Hide the rest of the strip */
  margin: 0 0.05em;
}

.odometer-strip {
  display: flex;
  flex-direction: column;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.odometer-strip span {
  height: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
