/* Extra site styles not covered by Tailwind */
html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }

/* Smooth image loading */
img { transition: opacity 0.3s; }

/* Selection color */
::selection { background: #b61628; color: white; }

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  border-radius: 0;
  background: #111;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 900ms ease, transform 2400ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slider-dots,
.hero-slider-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-slider-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  z-index: 10;
  pointer-events: none;
}

.hero-slide-caption {
  max-width: min(720px, 72%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.hero-slide-caption.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide-caption:not(.is-active) {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
}

.hero-slide-caption h2 {
  color: #fff;
  font-size: clamp(24px, 3vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  margin: 0 0 10px;
}

.hero-slide-caption p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 620px;
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.65;
  letter-spacing: 0;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.45);
  margin: 0;
}

.hero-slider-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.hero-slider-dot.is-active {
  width: 52px;
  background: #fff;
}

.hero-slider-control {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 160ms ease, border-color 160ms ease;
}

.hero-slider-control:hover {
  background: rgba(182, 22, 40, 0.92);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Group companies — orbital bubble cluster */
.orbit-layout {
  position: relative;
  margin-top: 44px;
}

.orbit {
  position: relative;
  width: min(560px, 92vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* Decorative concentric rings */
.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  pointer-events: none;
}
.orbit::before { width: 88%; height: 88%; }
.orbit::after { width: 56%; height: 56%; }

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  height: 30%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(182, 22, 40, 0.07), rgba(182, 22, 40, 0) 70%);
  border: 1px dashed rgba(182, 22, 40, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.orbit-core-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.7;
  color: #cbd5e1;
  text-align: center;
  padding: 0 8px;
}

.orbit-bubble {
  position: absolute;
  left: calc(50% + var(--x, 0) * 1%);
  top: calc(50% + var(--y, 0) * 1%);
  width: var(--size, 68px);
  height: var(--size, 68px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 1;
  text-decoration: none;
}
.orbit.is-in .orbit-bubble {
  animation: orbit-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.045s);
}
.orbit-bubble:hover,
.orbit-bubble.is-active { z-index: 3; }

.orbit-bubble-float {
  display: block;
  width: 100%;
  height: 100%;
  animation: orbit-float var(--float, 6s) ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.53s);
  will-change: transform;
}

.orbit-bubble-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease, opacity 0.3s ease;
}
.orbit-bubble-inner.is-mono {
  background: linear-gradient(135deg, #ffffff, #fbe9ec);
}

.orbit-bubble-logo {
  width: 66%;
  height: 66%;
  object-fit: contain;
}

.orbit-bubble-mono {
  font-family: 'Almarai', sans-serif;
  font-weight: 800;
  font-size: calc(var(--size, 68px) * 0.36);
  color: #b61628;
  line-height: 1;
}

/* Hover / active bubble — the other bubbles keep full opacity (no dimming) */
.orbit-bubble:hover .orbit-bubble-inner,
.orbit-bubble:focus-visible .orbit-bubble-inner,
.orbit-bubble.is-active .orbit-bubble-inner {
  transform: scale(1.2);
  box-shadow: 0 16px 36px rgba(182, 22, 40, 0.24), 0 4px 12px rgba(0, 0, 0, 0.10);
}

/* Detail panel on the right */
.orbit-panel {
  position: absolute;
  top: 50%;
  right: 0;
  width: 310px;
  max-width: 84vw;
  transform: translateY(-50%) translateX(18px);
  opacity: 0;
  visibility: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.13);
  text-align: start;
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.orbit-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.orbit-panel-logo {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  background: #f7f7f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
  font-family: 'Almarai', sans-serif;
  font-weight: 800;
  font-size: 30px;
  color: #b61628;
}
.orbit-panel-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.orbit-panel-logo.is-mono {
  background: linear-gradient(135deg, #ffffff, #fbe9ec);
}

.orbit-panel-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b61628;
  margin-bottom: 10px;
}
.orbit-panel-name {
  font-size: 22px;
  font-weight: 900;
  color: #111;
  line-height: 1.25;
  margin-bottom: 12px;
}
.orbit-panel-desc {
  font-size: 14px;
  line-height: 1.75;
  color: #6b7280;
}
.orbit-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
  border-bottom: 1px solid #111;
  padding-bottom: 4px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.orbit-panel-link:hover {
  color: #b61628;
  border-color: #b61628;
}

@keyframes orbit-float {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(5px); }
}
@keyframes orbit-pop {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Stack the panel below the circle on narrower screens */
@media (max-width: 1023px) {
  .orbit-panel {
    position: relative;
    z-index: 5;
    top: auto;
    right: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    width: min(440px, 92vw);
    margin: 48px auto 0;
  }
  .orbit-panel:not(.is-active) { opacity: 1; }
}

@media (max-width: 640px) {
  .orbit { width: 86vw; }
  .orbit-bubble { --size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit .orbit-bubble { animation: none; opacity: 1; }
  .orbit-bubble-float { animation: none; }
}
.service-card-title,
.project-card-title,
.group-card-title,
.service-card-desc,
.project-card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card-title {
  -webkit-line-clamp: 1;
}

.project-card-title,
.group-card-title {
  -webkit-line-clamp: 2;
}

.service-card-desc,
.project-card-desc {
  -webkit-line-clamp: 2;
}

@media (max-width: 640px) {
  .hero-slider {
    border-radius: 0;
  }

  .hero-slider .absolute.bottom-5 {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }

  .hero-slider-copy {
    left: 12px;
    right: 12px;
    bottom: 18px;
  }

  .hero-slide-caption {
    max-width: 86%;
  }

  .hero-slide-caption h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .hero-slide-caption p {
    display: none;
  }

  .hero-slider-dot {
    width: 20px;
  }

  .hero-slider-dot.is-active {
    width: 32px;
  }

  .hero-slider-control {
    width: 30px;
    height: 30px;
  }
}

/* ============================================================
   Mobile polish + card sliders (phones)
   ============================================================ */

/* Card-heavy grids become horizontal swipe sliders on phones */
@media (max-width: 767px) {
  .mobile-slider {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.9rem !important;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
  }
  .mobile-slider::-webkit-scrollbar { display: none; }

  .mobile-slider > * {
    flex: 0 0 86% !important;
    max-width: 86% !important;
    width: 86% !important;
    scroll-snap-align: center;
  }
  /* Slider cards stay visible (a horizontal scroller shouldn't wait on the
     vertical scroll-reveal observer to un-hide off-screen cards) */
  .mobile-slider > .reveal,
  .mobile-slider > .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }

  /* A small hint that content scrolls sideways */
  .mobile-slider-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #b0b0b0;
  }
}
.mobile-slider-hint { display: none; }

/* General spacing / sizing tuning for phones */
@media (max-width: 640px) {
  /* Tighter side gutters */
  .px-10 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  /* Calmer vertical rhythm for big sections */
  .py-32 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
  .py-28 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
  .py-24 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .py-20 { padding-top: 2.75rem !important; padding-bottom: 2.75rem !important; }
  /* Roomy inner paddings shrink */
  .p-16 { padding: 1.5rem !important; }
  .p-10 { padding: 1.5rem !important; }
  /* Big display titles ease down so they don't overflow narrow screens */
  .text-5xl { font-size: 2.4rem !important; line-height: 1.12 !important; }
  /* Services z-pattern blocks don't need a 550px min height on phones */
  section .min-h-\[550px\] { min-height: 0 !important; }
}

/* Taller hero on phones — 16/5 is too short on a narrow screen */
@media (max-width: 640px) {
  .hero-slider { aspect-ratio: 16 / 11; }
}

/* Group page: highlight the company scrolled-to from the homepage pyramid */
.group-item-card.is-highlight {
  border-color: #b61628;
  box-shadow: 0 0 0 3px rgba(182, 22, 40, 0.28), 0 22px 55px rgba(182, 22, 40, 0.16);
  animation: group-card-pulse 1.5s ease 2;
}
@keyframes group-card-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(182, 22, 40, 0.28), 0 22px 55px rgba(182, 22, 40, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(182, 22, 40, 0.38), 0 22px 55px rgba(182, 22, 40, 0.24); }
}
