/* ===================================
   الأسفار الذهبية - Home Page Styles
   Optimized for Performance
   =================================== */

/* Fix Horizontal Scroll */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
}

/* Fix Container Overflow */
.container, .container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

.row {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.main {
  overflow-x: hidden;
  max-width: 100%;
}

.badge {
  font-size: 0.8em;
  padding: 0.4em 0.8em;
}

/* Professional Carousel Styles */
.professional-carousel-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 650px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Professional Typewriter Styles */
.typewriter-main {
  margin: 30px 0;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  padding: 0 15px;
}

.typewriter-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #666666;
  margin-bottom: 15px;
  font-family: 'Zain', 'Cairo', sans-serif;
  letter-spacing: 1px;
  opacity: 0.9;
  max-width: 100%;
  word-wrap: break-word;
}

.typewriter-text {
  font-size: 3.5rem;
  font-weight: 900;
  color: #d4af37;
  margin: 0;
  font-family: 'Zain', sans-serif;
  text-align: center;
  letter-spacing: 2px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-shadow: 2px 2px 8px rgba(212, 175, 55, 0.3);
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.typewriter-text::after {
  content: '|';
  color: #d4af37;
  font-weight: 900;
  animation: blink 1s infinite;
  margin-left: 5px;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

.carousel-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}

.professional-carousel {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}

.professional-carousel .swiper-slide {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-slide-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-slide-content .container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0 15px;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 251, 252, 0.95);
  z-index: 1;
}

.carousel-text {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #000000;
  padding: 40px 20px;
  animation: fadeInUp 1s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #000000;
  text-shadow: none;
  line-height: 1.3;
  font-family: 'Zain', 'Cairo', 'Reem Kufi Fun', sans-serif;
  text-align: center;
  letter-spacing: 0.5px;
  max-width: 100%;
  word-wrap: break-word;
}

.carousel-description {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 30px;
  color: #333333;
  text-shadow: none;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  text-align: center;
  font-family: 'Zain', sans-serif;
  word-wrap: break-word;
  padding: 0 15px;
}

.carousel-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0 15px;
}

.btn-carousel-primary,
.btn-carousel-secondary {
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Zain', sans-serif;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.5px;
}

.btn-carousel-primary {
  background: #d4af37;
  color: #000000;
  border: 2px solid #d4af37;
}

.btn-carousel-primary:hover {
  background: #c29d2e;
  border-color: #c29d2e;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  color: #000000;
}

.btn-carousel-secondary {
  background: transparent;
  color: #000000;
  border: 2px solid #d4af37;
}

.btn-carousel-secondary:hover {
  background: #d4af37;
  color: #000000;
  border-color: #d4af37;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* Navigation Buttons */
.carousel-nav-btn {
  width: 60px;
  height: 60px;
  background: rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  transition: all 0.3s ease;
  margin: 0 10px;
}

.carousel-nav-btn:after {
  font-size: 24px;
  color: #d4af37;
  font-weight: 700;
}

.carousel-nav-btn:hover {
  background: #d4af37;
  transform: scale(1.1);
}

.carousel-nav-btn:hover:after {
  color: #000000;
}

/* Pagination */
.carousel-pagination {
  bottom: 30px !important;
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  padding: 0 15px;
}

.carousel-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(212, 175, 55, 0.4);
  opacity: 1;
  transition: all 0.3s ease;
}

.carousel-pagination .swiper-pagination-bullet-active {
  width: 40px;
  border-radius: 6px;
  background: #d4af37;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Services Articles Styles */
.services-articles {
  padding: 60px 0;
}

.service-article {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-article:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
}

.article-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  flex-shrink: 0;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-article:hover .article-image img {
  transform: scale(1.05);
}

.article-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.8) 0%, rgba(194, 157, 46, 0.6) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 15px;
}

.article-category {
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Zain', sans-serif;
}

.article-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #333333;
  margin-bottom: 15px;
  font-family: 'Zain', sans-serif;
  line-height: 1.3;
}

.article-excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: #666666;
  margin-bottom: 20px;
  font-family: 'Zain', sans-serif;
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.article-date,
.article-read-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: #888888;
  font-family: 'Zain', sans-serif;
}

.article-date i,
.article-read-time i {
  color: #d4af37;
  font-size: 1rem;
}

.btn-article-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  background: linear-gradient(135deg, #d4af37 0%, #c29d2e 100%);
  color: #000000;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Zain', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  margin-top: auto;
  align-self: flex-start;
}

.btn-article-read:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: #000000;
}

.btn-article-read i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-article-read:hover i {
  transform: translateX(-3px);
}

/* View All Articles Button */
.btn-view-all-articles {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: linear-gradient(135deg, #d4af37 0%, #c29d2e 100%);
  color: #000000;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: 'Zain', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-view-all-articles:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: #000000;
}

.btn-view-all-articles i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-view-all-articles:hover i {
  transform: translateX(-3px);
}

/* FAQ Section Styles */
.faq {
  padding: 80px 0;
  background: #f8fbfc;
}

.faq-item {
  background: #ffffff;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e8f4f8;
}

.faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

/* Car Cards Mobile Optimization */
.car-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.car-info {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* About Section Styles */
.about-content {
  margin-top: 20px;
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #444444;
  margin-bottom: 30px;
  text-align: justify;
  font-family: 'Zain', sans-serif;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #f8fbfc 0%, #e8f4f8 100%);
  border-radius: 15px;
  border-right: 4px solid #d4af37;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 1.5rem;
  color: #000000;
}

.feature-text h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #333333;
  font-family: 'Zain', sans-serif;
}

.about-cta {
  text-align: center;
  margin-top: 25px;
}

.btn-about-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: linear-gradient(135deg, #d4af37 0%, #c29d2e 100%);
  color: #000000;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: 'Zain', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-about-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: #000000;
}

/* More Services Button */
.btn-more-services {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #d4af37 0%, #c29d2e 100%);
  color: #000;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-family: 'Zain', 'Cairo', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  font-size: 0.9rem;
}

.btn-more-services:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: #000;
}

.btn-more-services i {
  font-size: 0.8rem;
}

.btn-about-primary i {
  font-size: 1.3rem;
}

/* RTL Support for Arabic */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  text-align: right;
}

[dir="rtl"] p {
  text-align: right;
}

[dir="rtl"] .btn {
  text-align: right;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 992px) {
  .professional-carousel-section {
    height: 550px;
  }

  .carousel-title {
    font-size: 2.2rem;
  }

  .carousel-description {
    font-size: 1.2rem;
  }

  .typewriter-text {
    font-size: 1.5rem;
  }

  .btn-carousel-primary,
  .btn-carousel-secondary {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .professional-carousel-section {
    height: 500px;
  }

  .carousel-title {
    font-size: 1.8rem;
  }

  .carousel-description {
    font-size: 1rem;
    padding: 0 15px;
  }

  .typewriter-title {
    font-size: 1.8rem;
  }

  .typewriter-text {
    font-size: 2.5rem;
    min-height: 60px;
  }

  .carousel-buttons {
    gap: 15px;
  }

  .btn-carousel-primary,
  .btn-carousel-secondary {
    padding: 10px 25px;
    font-size: 0.95rem;
  }

  .carousel-nav-btn {
    width: 45px;
    height: 45px;
  }

  .carousel-nav-btn:after {
    font-size: 18px;
  }

  .article-image {
    height: 200px;
  }

  .article-content {
    padding: 20px;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .article-excerpt {
    font-size: 0.95rem;
  }

  .article-meta {
    gap: 15px;
  }

  .article-date,
  .article-read-time {
    font-size: 0.85rem;
  }

  .btn-article-read {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .faq {
    padding: 60px 0;
  }

  .car-card img {
    height: 260px !important;
    object-fit: cover !important;
  }

  .car-info {
    padding: 12px !important;
    min-height: 100px !important;
  }

  .car-info h5 {
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
  }

  .car-info h6 {
    font-size: 0.8rem !important;
    margin-bottom: 12px !important;
  }

  .btn-book {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }

  .about-description {
    font-size: 1rem;
    line-height: 1.6;
  }

  .feature-item {
    padding: 12px;
    gap: 12px;
  }

  .feature-icon {
    width: 45px;
    height: 45px;
  }

  .feature-icon i {
    font-size: 1.3rem;
  }

  .feature-text h5 {
    font-size: 1rem;
  }

  .btn-about-primary {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .btn-view-all-articles {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .professional-carousel-section {
    height: 480px;
  }

  .carousel-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .carousel-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .typewriter-title {
    font-size: 1.4rem;
  }

  .typewriter-text {
    font-size: 2rem;
    min-height: 50px;
  }

  .carousel-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn-carousel-primary,
  .btn-carousel-secondary {
    width: 100%;
    max-width: 250px;
  }

  .services-articles {
    padding: 40px 0;
  }

  .article-image {
    height: 180px;
  }

  .article-content {
    padding: 15px;
  }

  .article-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .article-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
  }

  .article-date,
  .article-read-time {
    font-size: 0.8rem;
  }

  .btn-article-read {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .faq {
    padding: 50px 0;
  }

  .car-card img {
    height: 240px !important;
    object-fit: cover !important;
  }

  .car-info {
    padding: 10px !important;
    min-height: 90px !important;
  }

  .car-info h5 {
    font-size: 0.85rem !important;
    margin-bottom: 5px !important;
  }

  .car-info h6 {
    font-size: 0.75rem !important;
    margin-bottom: 10px !important;
  }

  .btn-book {
    padding: 5px 8px !important;
    font-size: 0.75rem !important;
  }

  .features-grid {
    gap: 15px;
  }

  .feature-item {
    padding: 10px;
    gap: 10px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
  }

  .feature-icon i {
    font-size: 1.1rem;
  }

  .feature-text h5 {
    font-size: 0.95rem;
  }

  .btn-about-primary {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .btn-view-all-articles {
    padding: 10px 25px;
    font-size: 0.95rem;
  }
}

