:root {
    --primary: #2c3e50;
    --secondary: #e74c3c;
    --accent: #3498db;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --text-light: #7f8c8d;
    --white: #fff;
    --black: #000;
    --success: #27ae60;
    --warning: #f39c12;
    --error: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Tajawal', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light);
}

body[dir="rtl"] {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    text-align: right;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

body[dir="rtl"] .section-header {
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

.section-header p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Header Styles */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

body[dir="rtl"] #header {
    left: auto;
    right: 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

body[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

.language-switcher select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--primary);
    background-color: var(--white);
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: var(--transition);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

body[dir="rtl"] .mobile-menu {
    right: auto;
    left: -100%;
}

.mobile-menu.active {
    right: 0;
}

body[dir="rtl"] .mobile-menu.active {
    left: 0;
    right: auto;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu .language-switcher {
    margin-top: auto;
}

.mobile-menu .language-switcher select {
    width: 100%;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.95)), url('../assets/images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    color: var(--white);
}

body[dir="rtl"] .hero {
    flex-direction: row-reverse;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

body[dir="rtl"] .hero-content {
    padding-right: 0;
    padding-left: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--secondary);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    background-repeat: no-repeat;
    background-size: contain;
}

.hero-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 100%;
}

/* Stats Section */
.stats {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    border-radius: 8px;
    background-color: var(--light);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 4rem 2rem;
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.service-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
  font-weight: 500;
}

.service-link:hover {
  color: #c0392b;
}

/* ===== PROCESS SECTION ===== */
.process {
  padding: 4rem 2rem;
  background-color: var(--white);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step-counter;
}

.step {
  position: relative;
  padding: 2rem;
  background-color: var(--light);
  border-radius: 8px;
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

body[dir="rtl"] .step-number {
  left: auto;
  right: 20px;
}

.step-content h3 {
  color: var(--primary);
  margin-top: 1rem;
}

.step-content p {
  color: var(--text-light);
}

/* ===== QUOTE SECTION ===== */
.quote {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.95)), url('../assets/images/quote-bg.webp');
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.quote-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}

.quote-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.quote-content p {
  margin-bottom: 2rem;
}

.benefits-list {
  margin-bottom: 2rem;
}

.benefits-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.benefits-list i {
  color: var(--secondary);
}

.quote-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-submit {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-submit:hover {
  background-color: #c0392b;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  display: none;
}

.form-message.success {
  background-color: rgba(39, 174, 96, 0.1);
  color: var(--success);
  display: block;
}

.form-message.error {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--error);
  display: block;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
  padding: 4rem 2rem;
  background-color: var(--light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial-text::before {
  content: '"';
  font-size: 3rem;
  color: var(--secondary);
  opacity: 0.2;
  position: absolute;
  top: -20px;
  left: -10px;
}

body[dir="rtl"] .testimonial-text::before {
  left: auto;
  right: -10px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.author-info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== FAQ SECTION ===== */
.faq {
  padding: 4rem 2rem;
  background-color: var(--white);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--light);
  cursor: pointer;
}

.faq-question span {
  font-weight: 500;
  color: var(--primary);
}

.faq-question i {
  color: var(--secondary);
  transition: var(--transition);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-light);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 4rem 2rem;
  background-color: var(--light);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.contact-info p {
  margin-bottom: 2rem;
  color: var(--text-light);
}

.contact-method {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-details h4 {
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.contact-details a {
  color: var(--text);
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--secondary);
}

.contact-details p {
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 4rem 2rem 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col {
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--secondary);
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary);
}

body[dir="rtl"] .footer-col h4::after {
  left: auto;
  right: 0;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

body[dir="rtl"] .footer-col ul li a:hover {
  padding-left: 0;
  padding-right: 5px;
}

.footer-col ul li i {
  margin-right: 0.5rem;
  color: var(--secondary);
}

body[dir="rtl"] .footer-col ul li i {
  margin-right: 0;
  margin-left: 0.5rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: var(--transition);
}

body[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 2rem;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(231, 76, 60, 0.2);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 2rem;
  }

  body[dir="rtl"] .hero-content {
    padding-left: 0;
  }

  .hero-image {
    margin-top: 2rem;
  }

  .cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .quote-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .quote-content {
    text-align: center;
  }

  .benefits-list {
    display: inline-block;
    text-align: left;
  }

  body[dir="rtl"] .benefits-list {
    text-align: right;
  }

  .contact-info {
    text-align: center;
  }

  .contact-method {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  body[dir="rtl"] .footer-col h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .footer-col ul li a:hover {
    padding-left: 0;
  }

  body[dir="rtl"] .footer-col ul li a:hover {
    padding-right: 0;
  }
}

@media (max-width: 576px) {
  #header {
    padding: 1rem;
  }

  .hero {
    padding: 6rem 1rem 2rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    bottom: 1rem;
    right: 1rem;
  }

  body[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 1rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  #header,
  .mobile-menu-btn,
  .whatsapp-float,
  footer {
    display: none !important;
  }

  body {
    background: none !important;
    color: #000 !important;
  }

  .hero,
  .stats,
  .services,
  .process,
  .quote,
  .testimonials,
  .faq,
  .contact {
    padding: 1rem 0 !important;
    background: none !important;
  }

  .section-header h2::after {
    display: none;
  }

  .btn {
    display: none !important;
  }

  a::after {
    content: " (" attr(href) ") ";
    font-size: 0.8em;
    font-weight: normal;
  }
}