/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f7f3ff 45%, #ffffff 100%);
}

/* ---------- Container (1600px, side padding removed on wide screens) ---------- */
.container-x {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) {
  .container-x {
    padding-inline: 2rem;
  }
}
@media (min-width: 1664px) {
  .container-x {
    padding-inline: 0;
  }
}

/* ---------- Header ---------- */
#header.scrolled,
#header:has(#mobileMenu:not(.hidden)) {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(76, 29, 149, 0.08);
}

.nav-link {
  position: relative;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  transition:
    color 0.2s,
    background 0.2s;
}
.nav-link:hover {
  color: #4c1d95;
}
.nav-link.active {
  color: #4c1d95;
  background: #ece4fb;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: #4c1d95;
}

.mobile-link {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid #ece4fb;
}

/* ---------- Hero ---------- */
.hero-swiper {
  position: relative;
  height: 740px;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .hero-swiper {
    height: 760px;
  }
}

.hero-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform: scale(1.12);
  transition: transform 7s ease-out;
}
@media (min-width: 1024px) {
  .hero-bg-img {
    object-position: right center;
  }
}
.hero-slide.swiper-slide-active .hero-bg-img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(247, 243, 255, 0.6) 0%,
    rgba(247, 243, 255, 0) 20%,
    rgba(247, 243, 255, 0.8) 36%,
    rgba(247, 243, 255, 0.95) 55%,
    rgba(247, 243, 255, 0.97) 100%
  );
}
@media (min-width: 1024px) {
  .hero-overlay {
    background: linear-gradient(
      90deg,
      rgba(247, 243, 255, 0.95) 0%,
      rgba(247, 243, 255, 0.75) 28%,
      rgba(247, 243, 255, 0.2) 48%,
      rgba(247, 243, 255, 0) 60%
    );
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-top: 5rem;
  padding-bottom: 8rem;
}
@media (min-width: 1024px) {
  .hero-content {
    align-items: center;
    padding-bottom: 4rem;
  }
}

/* text animation */
.hero-anim {
  opacity: 0;
  transform: translateY(36px);
}
.hero-slide.swiper-slide-active .hero-anim {
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* controls */
.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 1024px) {
  .hero-controls {
    bottom: 6rem;
  }
}

.hero-pagination {
  display: flex;
  gap: 0.5rem;
}
.hero-pagination .swiper-pagination-bullet {
  width: 28px;
  height: 4px;
  margin: 0 !important;
  border-radius: 4px;
  background: #c9b6f2;
  opacity: 1;
  transition:
    width 0.4s,
    background 0.4s;
}
.hero-pagination .swiper-pagination-bullet-active {
  width: 60px;
  background: #4c1d95;
}

.hero-nav {
  display: none;
  gap: 0.6rem;
}
@media (min-width: 1024px) {
  .hero-nav {
    display: flex;
  }
}

/* ---------- Stats ---------- */
.stats-wrap {
  position: relative;
  z-index: 20;
  margin-top: -3.5rem;
}

.shadow-card {
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.12);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.1rem 0.5rem;
}
@media (min-width: 640px) {
  .stat {
    flex-direction: row;
    text-align: left;
    gap: 0.9rem;
    padding: 1.1rem 1rem;
  }
}
@media (min-width: 1024px) {
  .stat {
    padding: 0.5rem 1rem;
  }
}
@media (max-width: 1023px) {
  .stat:nth-child(odd) {
    border-right: 1px solid #ece4fb;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid #ece4fb;
  }
}
.stat > i {
  font-size: 1.5rem;
  color: #4c1d95;
}
@media (min-width: 1024px) {
  .stat > i {
    font-size: 1.9rem;
  }
}
.stat b {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #4c1d95;
  line-height: 1.1;
}
@media (min-width: 1024px) {
  .stat b {
    font-size: 1.6rem;
  }
}
.stat span {
  font-size: 0.7rem;
  color: #64748b;
}

/* ---------- Section label ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #4c1d95;
}
.section-label span {
  width: 2.2rem;
  height: 2px;
  background: #4c1d95;
}
/* ---------- Testimonials ---------- */
.quote-mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.8rem;
  border-radius: 9999px;
  background: #ece4fb;
  color: #4c1d95;
  font-size: 0.8rem;
}
.nav-circle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: #fff;
  color: #4c1d95;
  font-size: 0.8rem;
  box-shadow: 0 6px 18px rgba(76, 29, 149, 0.15);
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-circle:hover {
  background: #4c1d95;
  color: #fff;
}
@media (max-width: 1023px) {
  .testi-prev,
  .testi-next {
    display: none;
  }
}

/* ---------- CTA ---------- */
.cta-banner {
  background: linear-gradient(100deg, #3b1585 0%, #5b2cc4 55%, #8b5cf6 100%);
}

/* ---------- Footer ---------- */
.footer-col h5 {
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.footer-col ul {
  display: grid;
  gap: 0.6rem;
  font-size: 0.8rem;
}
.footer-col li i {
  color: #fff;
  width: 1rem;
}
.footer-col a {
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #fff;
}

.social {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 0.45rem;
  font-size: 0.85rem;
  color: #fff;
  transition:
    background 0.2s,
    color 0.2s;
}
.social:hover {
  background: #fff;
  color: #1b1456;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
/* ---------- Team ---------- */
.tn-grad {
  background: linear-gradient(100deg, #4c1d95 0%, #7c3aed 60%, #d9b86c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tn-card {
  position: relative;
  outline: none;
}
.tn-card:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 4px;
}
.tn-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.tn-card:hover .tn-photo > img,
.tn-card:focus-within .tn-photo > img {
  transform: scale(1.07);
}
.tn-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(150deg, #4c1d95, #1b1456);
}

/* ===== Leaders ===== */
.tn-lead {
  overflow: hidden;
  border-radius: 2.5rem;
  background: #1b1456;
  box-shadow: 0 26px 60px rgba(18, 13, 61, 0.28);
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.6s;
}
.tn-lead:hover,
.tn-lead:focus-within {
  transform: translateY(-10px);
  box-shadow: 0 42px 84px rgba(76, 29, 149, 0.4);
}
.tn-lead.tn-gold {
  box-shadow:
    0 0 0 1px rgba(232, 207, 148, 0.9),
    0 0 0 7px rgba(217, 184, 108, 0.18),
    0 26px 60px rgba(18, 13, 61, 0.3);
}
.tn-lead.tn-gold:hover,
.tn-lead.tn-gold:focus-within {
  box-shadow:
    0 0 0 1px #e8cf94,
    0 0 0 8px rgba(217, 184, 108, 0.26),
    0 42px 84px rgba(217, 184, 108, 0.4);
}
.tn-lead .tn-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
/* bottom fade so the glass box is readable */
.tn-lead .tn-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(18, 13, 61, 0) 40%,
    rgba(18, 13, 61, 0.55) 70%,
    rgba(18, 13, 61, 0.95) 100%
  );
  pointer-events: none;
}
/* glass sweep on hover */
.tn-lead .tn-photo::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: skewX(-15deg);
  pointer-events: none;
}
.tn-lead:hover .tn-photo::before {
  left: 140%;
  transition: left 1.1s ease;
}

/* Badge */
.tn-badge {
  position: absolute;
  z-index: 5;
  top: 1.5rem;
  inset-inline-start: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: #4c1d95;
  box-shadow: 0 8px 20px rgba(76, 29, 149, 0.45);
}
.tn-badge-gold {
  color: #3d2a08;
  background: linear-gradient(120deg, #f6e6b4, #d9b86c 55%, #b8923f);
  box-shadow: 0 8px 20px rgba(217, 184, 108, 0.5);
}

/* Glass info box */
.tn-glass {
  position: absolute;
  z-index: 4;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border-radius: 1.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition:
    background 0.4s,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tn-lead:hover .tn-glass,
.tn-lead:focus-within .tn-glass {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}
.tn-glass h3 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.tn-glass .tn-rule {
  display: block;
  margin-top: 0.6rem;
  height: 3px;
  width: 2.5rem;
  border-radius: 3px;
  background: #a78bfa;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tn-gold .tn-glass .tn-rule {
  background: linear-gradient(90deg, #f6e6b4, #d9b86c);
}
.tn-lead:hover .tn-glass .tn-rule {
  width: 4.5rem;
}
.tn-glass p {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}
.tn-go {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition:
    background 0.3s,
    color 0.3s;
}
.tn-go i {
  transform: rotate(-45deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tn-lead:hover .tn-go {
  background: #fff;
  color: #1b1456;
}
.tn-lead:hover .tn-go i {
  transform: rotate(0deg);
}

/* ===== Social (vertical, top side) ===== */
.tn-social {
  position: absolute;
  z-index: 6;
  top: 1.5rem;
  inset-inline-end: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tn-dept .tn-social {
  top: 0.8rem;
  inset-inline-end: 0.8rem;
}
.tn-social a {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  font-size: 0.82rem;
  color: #4c1d95;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(18, 13, 61, 0.28);
  opacity: 0;
  transform: translateX(24px) scale(0.6);
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.2s,
    color 0.2s;
}
.tn-dept .tn-social a {
  width: 2.05rem;
  height: 2.05rem;
  font-size: 0.74rem;
}
.tn-card:hover .tn-social a,
.tn-card:focus-within .tn-social a {
  opacity: 1;
  transform: none;
}
.tn-card:hover .tn-social a:nth-child(1) {
  transition-delay: 0.04s;
}
.tn-card:hover .tn-social a:nth-child(2) {
  transition-delay: 0.1s;
}
.tn-card:hover .tn-social a:nth-child(3) {
  transition-delay: 0.16s;
}
.tn-card:hover .tn-social a:nth-child(4) {
  transition-delay: 0.22s;
}
.tn-social a:hover {
  background: #4c1d95;
  color: #fff;
  transform: scale(1.12) !important;
  transition-delay: 0s !important;
}
.tn-gold .tn-social a:hover {
  background: #b8923f;
}
@media (hover: none) {
  .tn-social a {
    opacity: 1;
    transform: none;
  }
}

/* ===== Department cards ===== */
.tn-swiper {
  padding: 18px 8px 22px;
  margin-inline: -8px;
}
.tn-swiper .swiper-slide {
  height: auto;
}
.tn-dept {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.1rem 1.1rem 1.4rem;
  border-radius: 2rem;
  background: #fff;
  border: 1px solid rgba(236, 228, 251, 0.9);
  box-shadow: 0 8px 24px rgba(76, 29, 149, 0.06);
  overflow: hidden;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s,
    border-color 0.4s;
}
.tn-dept:hover,
.tn-dept:focus-within {
  transform: translateY(-8px);
  border-color: #c4b5fd;
  box-shadow: 0 28px 56px rgba(76, 29, 149, 0.18);
}
.tn-dept::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #4c1d95, #7c3aed, #d9b86c);
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tn-dept:hover::after,
.tn-dept:focus-within::after {
  transform: scaleX(1);
}
.tn-dept .tn-photo {
  position: relative;
  aspect-ratio: 3 / 3.7;
  overflow: hidden;
  border-radius: 1.4rem;
  background: linear-gradient(150deg, #ece4fb, #d6c6f6);
}
.tn-idx {
  position: absolute;
  z-index: 5;
  top: 0.8rem;
  inset-inline-start: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #4c1d95;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tn-meta {
  margin-top: 1.1rem;
  text-align: center;
}
.tn-meta h4 {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1b1456;
}
.tn-meta .tn-rule {
  display: block;
  margin: 0.6rem auto 0.55rem;
  height: 2px;
  width: 2rem;
  border-radius: 2px;
  background: #4c1d95;
  transition: width 0.5s;
}
.tn-dept:hover .tn-rule {
  width: 3.5rem;
  background: #7c3aed;
}
.tn-meta p {
  min-height: 2.45rem;
  font-size: 0.76rem;
  line-height: 1.6;
  font-weight: 500;
  color: #64748b;
}

/* ===== Carousel controls ===== */
.tn-nav button {
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  font-size: 0.85rem;
  color: #1b1456;
  background: #fff;
  border: 1px solid rgba(27, 20, 86, 0.18);
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.3s;
}
.tn-nav button:hover {
  color: #fff;
  background: #1b1456;
  border-color: #1b1456;
  transform: translateY(-2px);
}
.tn-nav button.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.tn-nav button.swiper-button-lock,
.tn-nav:has(.swiper-button-lock) {
  display: none;
}

.tn-progress.swiper-pagination-progressbar {
  position: relative !important;
  width: 100%;
  height: 3px;
  margin-top: 0.8rem;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(76, 29, 149, 0.12);
}
.tn-progress .swiper-pagination-progressbar-fill {
  background: linear-gradient(90deg, #4c1d95, #7c3aed) !important;
}
.tn-progress.swiper-pagination-lock {
  display: none !important;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .tn-lead,
  .tn-dept,
  .tn-photo > img,
  .tn-glass {
    transition: none;
  }
}
/* ---------- Services ---------- */
.sv-more {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s;
}
.sv-more > div {
  min-height: 0;
  overflow: hidden;
}
/* desktop with hover: small cards reveal the description on hover */
@media (hover: hover) and (min-width: 1024px) {
  .sv-card:not(.sv-wide) .sv-more {
    grid-template-rows: 0fr;
    opacity: 0;
  }
  .sv-card:not(.sv-wide):hover .sv-more,
  .sv-card:not(.sv-wide):focus-visible .sv-more {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}
/* ---------- Clients ---------- */
.clients-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.clients-swiper {
  width: 100%;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 10%,
    #000 90%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 10%,
    #000 90%,
    transparent
  );
}
.clients-swiper .swiper-wrapper {
  transition-timing-function: linear !important; /* حركة مستمرة بدون تقطيع */
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
}
.client-logo img {
  max-height: 64px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.7;
}
