/* ── بلوك خدمات المبنى ── */
.building-services-block {
  --bs-blue: #1b355b;
  --bs-brown: #a0874c;
  --bs-brown-dark: #7a5a2a;
  --bs-gold: #a0874c;
  --bs-cream: #f6f3ed;
  --bs-gray: #ececec;
  padding: 0 !important;
  background: var(--bs-cream);
  position: relative;
  overflow: visible;
}

/* خلفية زخرفية */
.building-services-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(160, 135, 76, 0.08), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(27, 53, 91, 0.06), transparent 40%);
  pointer-events: none;
}
.building-services-block::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("/assets/img/%D8%B4%D8%B9%D8%A7%D8%B1%20%D8%A7%D9%84%D9%88%D9%82%D9%81%20%D8%B4%D9%81%D8%A7%D9%81%D8%A7.png");
  background-size: 140px;
  background-repeat: repeat;
  pointer-events: none;
  animation: bs-watermark 50s linear infinite;
}
@keyframes bs-watermark {
  0% { background-position: 0 0; }
  100% { background-position: 280px 200px; }
}

/* ── الهيدر (بدون شريط أزرق) ── */
.bs-header {
  background: transparent;
  padding: 52px 0 0;
  position: relative;
  z-index: 2;
  border: none;
}
.bs-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.bs-header__title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bs-header__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bs-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(160, 135, 76, 0.45);
  animation: bs-icon-pulse 3s ease-in-out infinite;
}
@keyframes bs-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.bs-header h2 {
  margin: 0;
  color: var(--bs-blue);
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 800;
}
.bs-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: #fff;
  border: 2px solid var(--bs-brown);
  color: var(--bs-blue);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 10px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s, color 0.3s;
  box-shadow: 0 4px 14px rgba(160, 135, 76, 0.15);
}
.bs-view-all i {
  font-size: 0.85rem;
  transition: transform 0.3s;
}
.bs-view-all:hover {
  background: var(--bs-brown);
  color: #fff;
  border-color: var(--bs-brown);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(160, 135, 76, 0.35);
}
.bs-view-all:hover i { transform: translateX(-4px); }
[dir="ltr"] .bs-view-all:hover i { transform: translateX(4px); }

.bs-header__line {
  height: 4px;
  background: linear-gradient(90deg, var(--bs-brown), #c9a96e, var(--bs-brown));
  background-size: 200% 100%;
  animation: bs-line-flow 4s linear infinite;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.building-services-block.is-visible .bs-header__line {
  transform: scaleX(1);
}
@keyframes bs-line-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── الجسم والشبكة ── */
.bs-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 40px 88px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.bs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px;
  align-items: end;
  padding-top: 64px;
  overflow: visible;
}

/* ── البطاقة ── */
.bs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 112px 28px 36px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(27, 53, 91, 0.08);
  box-shadow: 0 8px 28px rgba(27, 53, 91, 0.08);
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
              box-shadow 0.45s ease,
              border-color 0.3s;
  opacity: 0;
  transform: translateY(40px);
  overflow: visible;
  cursor: pointer;
}
.bs-card.is-visible {
  animation: bs-card-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.bs-card:nth-child(1).is-visible { animation-delay: 0.1s; }
.bs-card:nth-child(2).is-visible { animation-delay: 0.22s; }
.bs-card:nth-child(3).is-visible { animation-delay: 0.34s; }
.bs-card:nth-child(4).is-visible { animation-delay: 0.46s; }
@keyframes bs-card-enter {
  to { opacity: 1; transform: translateY(0); }
}

/* بطاقات مميزة (أزرق) */
.bs-card--featured {
  background: linear-gradient(160deg, var(--bs-blue) 0%, #254a7a 100%);
  border-color: transparent;
  padding: 120px 28px 44px;
  min-height: 320px;
  box-shadow: 0 16px 40px rgba(27, 53, 91, 0.28);
  transform: translateY(40px);
}
.bs-card--featured.is-visible {
  animation-name: bs-card-enter-featured;
}
@keyframes bs-card-enter-featured {
  to { opacity: 1; transform: translateY(-16px); }
}
.bs-card--featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.12), transparent 55%);
  pointer-events: none;
}
.bs-card--featured::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.06), transparent 30%);
  animation: bs-glow-spin 8s linear infinite;
  pointer-events: none;
}
@keyframes bs-glow-spin {
  to { transform: rotate(360deg); }
}

/* بطاقات عادية */
.bs-card--light {
  background: var(--bs-gray);
  min-height: 290px;
}

/* لمعان عند المرور */
.bs-card__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.bs-card:hover .bs-card__shine { transform: translateX(120%); }

.bs-card:hover {
  transform: translateY(-14px) !important;
  box-shadow: 0 22px 48px rgba(160, 135, 76, 0.22);
  border-color: rgba(160, 135, 76, 0.55);
}
.bs-card--featured:hover {
  transform: translateY(-22px) !important;
  box-shadow: 0 28px 56px rgba(27, 53, 91, 0.38);
}

/* الأيقونة — كاملة وواضحة فوق البطاقة */
.bs-card__icon {
  position: absolute;
  top: -54px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.45s cubic-bezier(0.34, 1.5, 0.64, 1), box-shadow 0.35s, border-color 0.3s;
  overflow: visible;
}
.bs-card__icon-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(160, 135, 76, 0.4);
  animation: bs-ring-spin 12s linear infinite;
  transition: border-color 0.3s, opacity 0.3s;
}
@keyframes bs-ring-spin {
  to { transform: rotate(360deg); }
}
.bs-card--featured .bs-card__icon {
  border: 5px solid var(--bs-blue);
  box-shadow: 0 8px 24px rgba(27, 53, 91, 0.25);
}
.bs-card--light .bs-card__icon {
  border: 5px solid var(--bs-blue);
  box-shadow: 0 6px 18px rgba(27, 53, 91, 0.12);
}
.bs-card__icon i {
  font-size: 2.4rem;
  color: var(--bs-blue);
  line-height: 1;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.64, 1), color 0.3s;
}
.bs-card:hover .bs-card__icon {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 12px 32px rgba(160, 135, 76, 0.4);
  border-color: var(--bs-brown);
}
.bs-card:hover .bs-card__icon i {
  transform: scale(1.05);
  color: var(--bs-brown);
}
.bs-card:hover .bs-card__icon-ring {
  border-color: var(--bs-brown);
  opacity: 1;
}

/* النصوص */
.bs-card__title {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}
.bs-card--featured .bs-card__title { color: #fff; }
.bs-card--light .bs-card__title { color: var(--bs-blue); }

.bs-card__desc {
  margin: 0 0 20px;
  font-size: 1.02rem;
  line-height: 1.7;
  position: relative;
  z-index: 2;
  flex: 1;
}
.bs-card--featured .bs-card__desc { color: rgba(255, 255, 255, 0.88); }
.bs-card--light .bs-card__desc { color: #555; }

.bs-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--bs-brown);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s, color 0.3s;
  position: relative;
  z-index: 2;
}
.bs-card--featured .bs-card__arrow { color: rgba(255,255,255,0.9); }
.bs-card:hover .bs-card__arrow {
  opacity: 1;
  transform: translateY(0);
  color: var(--bs-brown);
}
.bs-card--featured:hover .bs-card__arrow {
  color: #e8c98a;
}

/* رقم ترتيبي */
.bs-card__num {
  position: absolute;
  top: 14px;
  inset-inline-start: 16px;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.06;
  color: var(--bs-blue);
  z-index: 1;
  transition: opacity 0.35s;
}
.bs-card--featured .bs-card__num { color: #fff; opacity: 0.1; }
.bs-card:hover .bs-card__num { opacity: 0.14; }

/* ── استجابة ── */
@media (max-width: 1024px) {
  .bs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 56px 40px;
    padding-top: 56px;
  }
  .bs-card--featured.is-visible,
  .bs-card--featured { transform: translateY(0); }
  .bs-card--featured.is-visible { animation-name: bs-card-enter; }
}

@media (max-width: 560px) {
  .bs-body { padding: 56px 20px 64px; }
  .bs-header__inner { padding: 0 20px 18px; }
  .bs-grid { grid-template-columns: 1fr; gap: 64px; padding-top: 52px; }
  .bs-card, .bs-card--featured, .bs-card--light {
    min-height: auto;
    padding: 104px 24px 32px;
  }
  .bs-card__icon {
    width: 96px;
    height: 96px;
    top: -48px;
  }
  .bs-card__icon i { font-size: 2.3rem; }
}

/* LTR */
.lang-en .bs-header__inner { flex-direction: row; }
.lang-en .bs-card__desc { text-align: center; }
