/* ==================== Global Styles ==================== */
:root {
  --primary-gold: #d4af37;
  --dark-blue: #0a1628;
  --medium-blue: #1a2f4a;
  --light-gold: #f4e4c1;
  --cream: #faf8f3;
  --accent-teal: #2d7a7a;
  --text-dark: #1a1a1a;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: linear-gradient(135deg, var(--cream) 0%, #ffffff 100%);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ==================== Navbar Styles ==================== */
.navbar {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--medium-blue) 100%) !important;
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-brand-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}


.navbar-brand-text {
  font-family: 'Amiri', serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary-gold) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-brand:hover .navbar-brand-text {
  color: var(--light-gold) !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-gold);
  transition: all 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
  right: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-gold) !important;
  transform: translateY(-2px);
}

/* ==================== Hero Section ==================== */
.hero-section {
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(26, 47, 74, 0.9) 100%),
              url('https://images.unsplash.com/photo-1564769610165-1f1b6c70e75e?w=1920&h=1080&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: 'Amiri', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8941f 100%);
  border: none;
  color: var(--dark-blue);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 0.4s both;
  cursor: pointer;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #e8c14f 0%, var(--primary-gold) 100%);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Carousel Section ==================== */
.carousel-section {
  padding: 5rem 0;
  background: #f8f9fa;
}

.section-title {
  font-family: 'Amiri', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  position: relative;
  display: inline-block;
}

/* Carousel Container */
#mainCarousel {
  max-width: 100%;
  direction: rtl;
}

.carousel-inner {
  border-radius: 20px;
  overflow: hidden;
}

.carousel-item {
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

/* Carousel Caption - ALWAYS VISIBLE */
.carousel-caption {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  left: 0 !important;
  padding: 3rem 2rem 2rem !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%) !important;
  text-align: center !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
}

.carousel-caption h5 {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-gold);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.8rem;
}

.carousel-caption p {
  font-size: 1.2rem;
  color: #ffffff;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.9);
}

/* Carousel Controls - FIXED POSITIONING */
.carousel-control-prev {
  left: 20px !important;
  right: auto !important;
  width: 50px;
  z-index: 15;
}

.carousel-control-next {
  right: 20px !important;
  left: auto !important;
  width: 50px;
  z-index: 15;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  padding: 0.5rem;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Carousel Indicators */
.carousel-indicators {
  margin-bottom: 1.5rem;
  z-index: 15;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-gold);
  opacity: 0.5;
  border: 2px solid #fff;
  margin: 0 5px;
}

.carousel-indicators .active {
  opacity: 1;
  transform: scale(1.2);
}

/* ==================== Feature Cards ==================== */
.features-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
}

.feature-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: none;
  box-shadow: var(--shadow-soft);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.feature-card img {
  height: 250px;
  object-fit: cover;
  transition: all 0.4s ease;
}

.feature-card:hover img {
  transform: scale(1.1);
}

.card-img-wrapper {
  overflow: hidden;
  position: relative;
}

.card-img-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: var(--primary-gold);
  opacity: 0;
  transition: all 0.4s ease;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.feature-card:hover .card-img-overlay-icon {
  opacity: 0.9;
}

.feature-card .card-body {
  padding: 2rem;
}

.feature-card .card-title {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

.feature-card .card-text {
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-btn {
  padding: 0.7rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
  background: transparent;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feature-btn:hover {
  background: var(--primary-gold);
  color: white;
  transform: scale(1.05);
}

/* ==================== Stats Section ==================== */
.stats-section {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--medium-blue) 100%);
  color: white;
  padding: 4rem 0;
  margin: 5rem 0;
}

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-icon {
  font-size: 3rem;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Cairo', sans-serif;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ==================== Footer ==================== */
footer {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--medium-blue) 100%);
  color: var(--light-gold);
  padding: 2.5rem 0;
  margin-top: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer p {
  font-weight: 300;
  letter-spacing: 0.5px;
}

footer a:hover {
  color: var(--primary-gold) !important;
}

.social-icons a {
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .carousel-item img {
    height: 350px;
  }

  .carousel-caption {
    padding: 2rem 1rem 1.5rem !important;
  }

  .carousel-caption h5 {
    font-size: 1.5rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .carousel-item img {
    height: 300px;
  }

  .carousel-caption h5 {
    font-size: 1.2rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }
}

/* ==================== Smooth Scrolling ==================== */
html {
  scroll-behavior: smooth;
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8941f;
}

/* ==================== Islamic Pattern Background ==================== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.02) 35px, rgba(212, 175, 55, 0.02) 70px);
  pointer-events: none;
  z-index: -1;
}