/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

body {
  direction: rtl;
  background-color: #f5f9ff;
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #1C2526;
  color: #fff;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #4FC3F7;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* التنقل */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 5%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease;
}

body.dark-mode nav {
  background: #2C3E50;
}

.logo img {
  height: 40px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #4FC3F7;
  margin: 3px 0;
  transition: all 0.3s ease;
}

body.dark-mode .hamburger span {
  background: #0288D1;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 1.5rem;
}

.nav-menu li a {
  color: #4FC3F7;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

body.dark-mode .nav-menu li a {
  color: #0288D1;
}

.nav-menu li a:hover {
  color: #0288D1;
}

body.dark-mode .nav-menu li a:hover {
  color: #4FC3F7;
}

#theme-toggle {
  background: none;
  border: none;
  color: #4FC3F7;
  font-size: 1.2rem;
  cursor: pointer;
}

body.dark-mode #theme-toggle {
  color: #0288D1;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 250px;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
  }

  body.dark-mode .nav-menu {
    background: #2C3E50;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    margin: 1.5rem 0;
  }
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 80vh; /* زيادة الارتفاع للديسكتوب */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* الفيديو في الخلفية */
  aspect-ratio: 16 / 9; /* نسبة عرض لارتفاع للفيديو */
  opacity: 0.7; /* الحفاظ على الشفافية الحالية */
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-text-box {
  background: rgba(255, 255, 255, 0.3); /* زيادة الشفافية */
  padding: 1.5rem 2rem; /* تقليل padding لشكل مستطيل */
  border-radius: 10px; /* تقليل border-radius لمظهر أنيق */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 500px; /* تصغير العرض */
  width: 90%; /* متجاوب على الموبايل */
  margin: 0 auto;
}

body.dark-mode .hero-text-box {
  background: rgba(44, 62, 80, 0.3); /* شفافية أكثر في الوضع الداكن */
}

.hero-text-box h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); /* تقليل حجم العنوان */
  margin-bottom: 0.8rem;
  color: #333;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .hero-text-box h1 {
  color: #fff;
}

.hero-text-box p {
  font-size: clamp(1rem, 2vw, 1.2rem); /* تقليل حجم النص */
  margin-bottom: 0.8rem;
  color: #333;
}

body.dark-mode .hero-text-box p {
  color: #fff;
}

.hero-text-box .hero-subtitle {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  opacity: 0;
  animation: fadeIn 2s ease-in forwards;
  color: #333;
}

body.dark-mode .hero-text-box .hero-subtitle {
  color: #fff;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.hero-text-box .cta-button {
  display: inline-block;
  padding: 0.7rem 1.5rem; /* تقليل padding للزر */
  background: #4FC3F7;
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .hero-text-box .cta-button {
  background: #0288D1;
  color: #fff;
}

.hero-text-box .cta-button:hover {
  background: #0288D1;
  color: #fff;
}

body.dark-mode .hero-text-box .cta-button:hover {
  background: #4FC3F7;
  color: #fff;
}

@media (max-width: 768px) {
  .hero {
    height: 70vh; /* زيادة الارتفاع على الموبايل */
  }

  .hero-text-box {
    padding: 1rem 1.5rem; /* تقليل padding أكثر على الموبايل */
    max-width: 90%; /* عرض متجاوب */
    border-radius: 8px; /* تقليل border-radius */
  }

  .hero-text-box h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
  }

  .hero-text-box p {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
  }

  .hero-text-box .hero-subtitle {
    font-size: clamp(0.8rem, 1.6vw, 0.9rem);
  }

  .hero-text-box .cta-button {
    padding: 0.6rem 1.2rem;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
  }
}

/* الخدمات */
#services {
  padding: 3rem 5%;
  background: #fff;
}

body.dark-mode #services {
  background: #2C3E50;
}

#services h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #4FC3F7;
}

body.dark-mode #services h2 {
  color: #0288D1;
}

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

.service-card {
  background: #f5f9ff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .service-card {
  background: #34495E;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card h3 {
  font-size: 1.4rem;
  margin: 0.8rem;
  color: #0288D1;
}

body.dark-mode .service-card h3 {
  color: #4FC3F7;
}

.service-card .details {
  padding: 0.8rem;
}

.service-card .details p {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.service-card .more-info {
  display: inline-block;
  margin: 0.8rem;
  color: #4FC3F7;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

body.dark-mode .service-card .more-info {
  color: #0288D1;
}

@media (max-width: 768px) {
  .service-card img {
    height: 150px;
  }
}

/* الحجز */
#booking {
  padding: 3rem 5%;
  background: #f5f9ff;
}

body.dark-mode #booking {
  background: #1C2526;
}

#booking h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #4FC3F7;
}

body.dark-mode #booking h2 {
  color: #0288D1;
}

.booking-form {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .booking-form {
  background: #34495E;
}

.booking-form input,
.booking-form select,
.booking-form button {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border-radius: 5px;
  border: 1px solid #4FC3F7;
  font-size: 0.9rem;
}

body.dark-mode .booking-form input,
body.dark-mode .booking-form select,
body.dark-mode .booking-form button {
  border: 1px solid #0288D1;
  background: #2C3E50;
  color: #fff;
}

.booking-form input:invalid {
  border-color: #D32F2F;
}

.schedule-table {
  margin-bottom: 1rem;
  display: none;
}

.schedule-table h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #4FC3F7;
}

body.dark-mode .schedule-table h3 {
  color: #0288D1;
}

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th {
  background: #4FC3F7;
  color: #fff;
  padding: 0.5rem;
  font-size: 0.9rem;
}

body.dark-mode .schedule-table th {
  background: #0288D1;
}

.schedule-table td {
  padding: 0.5rem;
  text-align: center;
}

.schedule-table button {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.schedule-table button.available {
  background: #4FC3F7;
  color: #fff;
}

body.dark-mode .schedule-table button.available {
  background: #0288D1;
}

.schedule-table button.booked {
  background: #D32F2F;
  color: #fff;
  cursor: not-allowed;
}

.schedule-table button.selected {
  background: #0288D1;
}

body.dark-mode .schedule-table button.selected {
  background: #4FC3F7;
}

.schedule-table button.available:hover {
  background: #0288D1;
}

body.dark-mode .schedule-table button.available:hover {
  background: #4FC3F7;
}

@media (max-width: 768px) {
  .booking-form {
    padding: 1rem;
  }

  .schedule-table th,
  .schedule-table td {
    font-size: 0.7rem;
    padding: 0.3rem;
  }

  .schedule-table button {
    font-size: 0.7rem;
    padding: 0.4rem;
  }
}

/* معرض الصور */
#gallery {
  padding: 3rem 5%;
  background: #fff;
}

body.dark-mode #gallery {
  background: #2C3E50;
}

#gallery h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #4FC3F7;
}

body.dark-mode #gallery h2 {
  color: #0288D1;
}

.gallery-swiper {
  width: 100%;
  height: 200px;
}

.gallery-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.gallery-swiper .swiper-slide img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .gallery-swiper {
    height: 150px;
  }
}

/* لماذا نحن */
#why-us {
  padding: 3rem 5%;
  background: #f5f9ff;
}

body.dark-mode #why-us {
  background: #1C2526;
}

#why-us h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #4FC3F7;
}

body.dark-mode #why-us h2 {
  color: #0288D1;
}

.why-us-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.why-us-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .why-us-card {
  background: #34495E;
}

.why-us-card h3 {
  font-size: 1.2rem;
  color: #0288D1;
  margin-bottom: 0.5rem;
}

body.dark-mode .why-us-card h3 {
  color: #4FC3F7;
}

.why-us-card p {
  font-size: 0.9rem;
}

/* الخريطة */
#contact {
  padding: 3rem 5%;
  background: #f5f9ff;
}

body.dark-mode #contact {
  background: #1C2526;
}

#contact h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #4FC3F7;
}

body.dark-mode #contact h2 {
  color: #0288D1;
}

#contact p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #333;
}

body.dark-mode #contact p {
  color: #fff;
}

#map {
  height: 400px;
  border-radius: 10px;
  margin-top: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* زر التوجيه في نافذة الخريطة */
.map-direction-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #4FC3F7;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: background 0.3s ease;
}

body.dark-mode .map-direction-btn {
  background: #0288D1;
}

.map-direction-btn:hover {
  background: #0288D1;
}

body.dark-mode .map-direction-btn:hover {
  background: #4FC3F7;
}

/* زر العودة للأعلى */
#back-to-top {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: #4FC3F7;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s ease;
}

body.dark-mode #back-to-top {
  background: #0288D1;
}

#back-to-top.show {
  display: block;
  opacity: 1;
}

/* الفوتر */
footer {
  background: #fff;
  color: #4FC3F7;
  padding: 0.8rem;
  text-align: center;
}

body.dark-mode footer {
  background: #2C3E50;
  color: #0288D1;
}

.footer-content {
  max-width: 500px;
  margin: 0 auto;
}

.footer-content p {
  font-size: 0.8rem;
}

.social-links a {
  color: #4FC3F7;
  text-decoration: none;
  margin: 0 0.8rem;
  font-size: 0.8rem;
}

body.dark-mode .social-links a {
  color: #0288D1;
}

.social-links a:hover {
  color: #0288D1;
}

body.dark-mode .social-links a:hover {
  color: #4FC3F7;
}

/* تنسيق النافذة المنبثقة */
.swal2-popup {
  border-radius: 10px;
  background: #f5f9ff;
  color: #333;
  width: 800px;
  max-width: 90%;
}

body.dark-mode .swal2-popup {
  background: #34495E;
  color: #fff;
}

.swal2-title {
  color: #4FC3F7 !important;
}

body.dark-mode .swal2-title {
  color: #0288D1 !important;
}

.swal2-content {
  text-align: right;
}

.swal2-content p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.swal2-content iframe {
  width: 360px;
  height: 640px;
  border-radius: 10px;
  margin: 1rem auto;
  display: block;
}

.swal2-content .swiper {
  width: 100%;
  height: 200px;
  margin-bottom: 1rem;
}

.swal2-content .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.swal2-content .cta-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #4FC3F7;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .swal2-content .cta-button {
  background: #0288D1;
  color: #fff;
}

.swal2-content .cta-button:hover {
  background: #0288D1;
  color: #fff;
}

body.dark-mode .swal2-content .cta-button:hover {
  background: #4FC3F7;
  color: #fff;
}

@media (max-width: 768px) {
  .swal2-popup {
    width: 90%;
  }

  .swal2-content iframe {
    width: 100%;
    height: 200px;
  }

  .swal2-content .swiper {
    height: 150px;
  }
}
/* أزرار الهيرو الجديدة */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.2rem;
}
.hero-buttons .cta-button.primary-btn {
  background: #4FC3F7;
}
.hero-buttons .cta-button.secondary-btn {
  background: #44bb99;
  color: #fff;
}
.hero-buttons .cta-button.tertiary-btn {
  background: #ffd500;
  color: #222;
}
.hero-buttons .cta-button i {
  margin-left: 7px;
  margin-right: 0;
}

/* نافذة الاستشارة (modal) */
.modal {
  display: none;
  position: fixed;
  z-index: 2100;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.35);
  align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 95vw;
  position: relative;
  box-shadow: 0 6px 40px rgba(0,0,0,0.25);
  animation: fadeDown 0.5s;
  text-align: right;
}
@keyframes fadeDown { from { transform: translateY(-50px); opacity:0; } to { transform:translateY(0); opacity:1;} }
.close, .lightbox-close {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #0288D1;
  z-index: 2;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; color: #0288D1; font-weight: bold; }
.form-group input, .form-group textarea {
  width: 100%; border:1px solid #4FC3F7; border-radius:7px;
  padding: 0.65rem; background: #fafbff;
  font-size: 1rem;
}
.file-upload-area {
  background: #f0f4fa;
  border: 1.5px dashed #4FC3F7;
  border-radius: 8px;
  text-align: center;
  padding: 1.2rem 0.5rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
  color: #0288D1;
  font-size: 1rem;
}
.file-upload-area i { font-size: 1.7rem; color: #44bb99; display: block; margin-bottom: 0.7rem; }
.uploaded-images {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 0.5rem;
}
.uploaded-images img {
  width: 64px; height: 54px; object-fit: cover; border-radius: 8px; border:1px solid #eee;
  box-shadow: 0 2px 6px rgba(44,62,80,0.18);
}
.form-actions {
  display: flex; justify-content: flex-start; gap: 1rem; margin-top: 1.3rem;
}
.submit-btn, .cancel-btn {
  background: #4FC3F7;
  color: #fff;
  border: none; border-radius: 25px;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}
.cancel-btn { background: #bbb; color:#fff; }
.submit-btn:hover { background: #0288D1; }
.cancel-btn:hover { background: #5f6a6a; }

/* Lightbox للصور */
.lightbox {
  display: none; position: fixed; top:0; left:0; width:100vw; height:100vh; background: rgba(0,0,0,0.85);
  justify-content: center; align-items: center; z-index: 3000;
}
.lightbox.active { display: flex; }
.lightbox-content {
  position: relative;
  background: transparent;
  max-width:85vw; max-height:85vh;
  display: flex; flex-direction: column; align-items: center;
}
#lightbox-image {
  max-width: 70vw; max-height: 60vh; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  margin: 1rem 0;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2rem; color: #4FC3F7; background: transparent; border: none; cursor: pointer; z-index: 2;
}
.prev { right: 100%; margin-right: 18px;}
.next { left: 100%; margin-left: 18px;}
.lightbox-counter {
  font-size: 1rem;
  color: #fff;
  background: #0288D1;
  border-radius:16px;
  padding: 2px 14px 4px 14px;
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 4;
}

/* تحسين عرض نافذة الاستشارة على الموبايل */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
  }
  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
    padding: 0.6rem;
  }
  .file-upload-area {
    padding: 1rem 0.5rem;
    font-size: 0.95rem;
  }
  .uploaded-images img {
    width: 48px;
    height: 48px;
  }
  .submit-btn, .cancel-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
  }
}
