/* ========== إعدادات عامة ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f5f7;
  color: #0f172a;
  line-height: 1.7;
  padding-top: 72px; /* لحماية المحتوى من النافبار الثابت */
}

/* إزالة الفراغ عند sides في الشاشات الصغيرة */
body,
html {
  margin: 0;
  padding: 0;
}

/* ========== ألوان وأزرار عامة ========== */

:root {
  --tdc-primary: #0ea5e9;
  --tdc-primary-dark: #0284c7;
  --tdc-accent: #f97316;
  --tdc-bg-soft: #f9fafb;
  --tdc-dark: #020617;
  --tdc-muted: #6b7280;
}

/* أزرار التدرج */
.btn-gradient {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(15, 118, 190, 0.3);
  transition: all 0.25s ease;
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 118, 190, 0.35);
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
}

/* أزرار Outlined */
.btn-outline-primary,
.btn-outline-secondary {
  border-radius: 999px;
  font-weight: 500;
}

/* نصوص عامة */
.body-text {
  font-size: 0.95rem;
  color: #4b5563;
}

/* روابط نصية */
.text-link {
  color: var(--tdc-primary);
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

/* ========== النافبار (فاتح) ========== */

.main-navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  z-index: 1030;
}

.logo-img {
  height: 42px;
  width: auto;
}

.logo-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

.main-nav-links .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: #475569;
  margin-inline: 0.25rem;
  position: relative;
  padding-bottom: 0.25rem;
  transition: color 0.25s ease;
}

.main-nav-links .nav-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.main-nav-links .nav-link:hover {
  color: #0f172a;
}

.main-nav-links .nav-link:hover::after,
.main-nav-links .nav-link.active::after {
  width: 100%;
}

/* زر النافبار للجوال */
.navbar-toggler {
  border-radius: 999px;
  border-color: #cbd5f5;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ========== الهيدر والسلايدر (خلفية غامقة) ========== */

.header-section {
  margin-top: 0;
  background: transparent;
}

/* السلايدات */
.gradient-slide {
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: #f9fafb;
  position: relative;
  overflow: hidden;
}

/* خلفيات غامقة متدرجة لكل سلايد */
.gradient-slide.slide-1 {
  background: linear-gradient(135deg, #020617 0%, #0f172a 40%, #1e293b 100%);
}

.gradient-slide.slide-2 {
  background: linear-gradient(135deg, #020617 0%, #111827 40%, #1f2937 100%);
}

.gradient-slide.slide-3 {
  background: linear-gradient(135deg, #020617 0%, #0b1120 40%, #1d283a 100%);
}

.gradient-slide.slide-4 {
  background: linear-gradient(135deg, #020617 0%, #111827 40%, #1e293b 100%);
}

.gradient-slide.slide-5 {
  background: linear-gradient(135deg, #020617 0%, #0f172a 40%, #111827 100%);
}

/* محتوى السلايد */
.slide-content {
  padding-block: 4rem;
}

.slide-badge {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: 0.75rem;
}

.hero-title-sm {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 0.75rem;
}

.hero-text {
  font-size: 0.98rem;
  max-width: 500px;
  color: #e5e7eb;
  margin-bottom: 1.25rem;
}

/* أزرار في السلايدر */
.btn-hero {
  font-size: 0.9rem;
}

/* مؤشرات السلايدر */
.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.8);
  border: none;
}

.carousel-indicators .active {
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
}

/* أزرار التبديل في السلايدر */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}

/* ========== العناوين للأقسام ========== */

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.section-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

.card-title-sm,
.section-title-sm {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

/* ========== عن الشركة ========== */

.about-card {
  background-color: #ffffff;
}

/* ========== الشركاء (مربعات متناسقة) ========== */

#partners {
  background-color: #ffffff;
}

.partners-row {
  row-gap: 1rem;
}

.partner-card {
  background-color: #f9fafb;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: rgba(56, 189, 248, 0.7);
}

/* لجعل المربعات متناسقة */
.partner-logo {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ========== المنتجات ========== */

#products {
  background-color: #f3f4f6;
}

.product-card {
  border: none;
  border-radius: 1.2rem;
  padding-top: 1.4rem;
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.product-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #e0f2fe, #f9fafb 50%, #e5e7eb);
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-icon {
  width: 42px;
  height: 42px;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.product-text {
  font-size: 0.85rem;
  color: #6b7280;
}

.badge-text {
  font-size: 0.75rem;
}

/* ========== معرض الصور + لايت بوكس ========== */

#gallery {
  background-color: #ffffff;
}

/* شبكة الصور */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  background-color: #0f172a;
  cursor: pointer;
  text-decoration: none;
}

.gallery-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 ratio */
  overflow: hidden;
}

.gallery-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent 50%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.6rem;
  transition: opacity 0.3s ease;
}

.gallery-label {
  color: #f9fafb;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.gallery-card:hover .gallery-image-wrapper img {
  transform: scale(1.08);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

/* لايت بوكس */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1055;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
  position: absolute;
  top: -32px;
  inset-inline-end: 0;
  background: rgba(15, 23, 42, 0.8);
  color: #f9fafb;
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ========== تواصل + الخريطة ========== */

.contact-map iframe {
  border-radius: 1rem;
}

.contact-card {
  background-color: #ffffff;
}

.contact-box {
  font-size: 0.9rem;
}

/* ========== الفوتر (غامق) ========== */

.footer-sm {
  background-color: #020617;
  color: #e5e7eb;
  font-size: 0.8rem;
}

.footer-sm span {
  color: #e5e7eb;
}

/* ========== سبلاش سكرين للشعار (لو كنت أضفته في الـ HTML) ========== */

.splash-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #0f172a, #020617 55%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.splash-inner {
  text-align: center;
  color: #f9fafb;
}

.splash-logo {
  width: 90px;
  height: auto;
  margin-bottom: 0.75rem;
}

.splash-title {
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.splash-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* يمكن إخفاءه بالجافاسكربت بعد ثواني */
/* مثال JS:
   setTimeout(() => {
      document.querySelector('.splash-screen')?.classList.add('d-none');
   }, 2200);
*/

/* ========== أنيميشن عام (حركية العناصر عند الظهور) ========== */

.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* أنيميشن الهيرو */
@keyframes fadeUpSoft {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUpSoft 0.7s forwards;
}

.animate-fade-up.delay-1 {
  animation-delay: 0.15s;
}

.animate-fade-up.delay-2 {
  animation-delay: 0.3s;
}

/* ========== تجاوب (Responsive) ========== */

/* شاشات أقل من 992px (تابلت وجوال كبير) */
@media (max-width: 991.98px) {
  body {
    padding-top: 64px;
  }

  .main-navbar .navbar-brand {
    max-width: 70%;
  }

  .logo-img {
    height: 36px;
  }

  .logo-title {
    font-size: 0.9rem;
  }

  .logo-subtitle {
    font-size: 0.7rem;
  }

  .slide-content {
    padding-block: 3rem;
    text-align: center;
  }

  .hero-text {
    margin-inline: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .partner-card {
    min-height: 110px;
  }

  .partner-logo {
    max-height: 52px;
  }
}

/* شاشات أقل من 768px (موبايل) */
@media (max-width: 767.98px) {
  .section-title {
    font-size: 1.35rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  .container {
    padding-inline: 1rem;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-title-sm {
    font-size: 1.5rem;
  }

  .body-text {
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    padding-top: 1.1rem;
  }

  .product-icon-wrapper {
    width: 64px;
    height: 64px;
  }

  .product-icon {
    width: 36px;
    height: 36px;
  }

  footer.footer-sm {
    text-align: center;
  }

  .footer-sm .container {
    flex-direction: column !important;
    gap: 0.35rem;
  }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-card {
    min-height: 100px;
  }

  .partner-logo {
    max-height: 48px;
  }
}

/* ===== إصلاح النافبار في الجوال ===== */


/* خلفية بيضاء للقائمة المنسدلة على الجوال */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: #ffffff;
    padding: 0.5rem 0.75rem 0.75rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
    margin-top: 0.4rem;
  }

  .main-nav-links .nav-link {
    padding-block: 0.45rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    margin-inline: 0;
  }

  .main-nav-links .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* ===== زر القائمة في الجوال (الهامبرغر) ===== */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.4rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* نجعل الأيقونة غامقة وواضحة جداً */
/* تغيير لون أيقونة زر القائمة (الخطوط الثلاثة) */
.navbar-light .navbar-toggler-icon {
  width: 1.7rem;
  height: 1.7rem;
  background-size: 100% 100%;
  /* هنا تغيّر اللون عبر stroke='rgba(...)' */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15,23,42,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.6' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* إظهار زر القائمة في الشاشات الصغيرة */
.navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.9);
  border-radius: 0.75rem;
  padding: 0.25rem 0.55rem;
}

/* جعل الخلفية شفافة حتى لا تغطيه ألوان غريبة */
.navbar-toggler:focus,
.navbar-toggler:active {
  box-shadow: none;
  outline: none;
}


/* ===== شاشة الترحيب ===== */
#splashScreen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #0f172a, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #e5e7eb;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splashScreen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-inner {
  text-align: center;
  padding: 1.5rem 2rem;
}

.splash-logo-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  animation: splash-float 1.6s ease-in-out infinite alternate;
}

.splash-logo-wrapper img {
  max-width: 70%;
  height: auto;
}

.splash-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.splash-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* حركة خفيفة للشعار */
@keyframes splash-float {
  from {
    transform: translateY(2px);
  }
  to {
    transform: translateY(-6px);
  }
}

/* في الشاشات الكبيرة نكبر الشعار قليلاً */
@media (min-width: 768px) {
  .splash-logo-wrapper {
    width: 110px;
    height: 110px;
  }

  .splash-title {
    font-size: 1.6rem;
  }

  .splash-subtitle {
    font-size: 1rem;
  }
}
