/* ═══════════════════════════════════════════════════════════════
   OJM — أسطورة الجزيرة · Emerald + Amber · 70% White
   هوية فخمة: أخضر زيتي غامق + برتقالي كهرماني (CTA فقط)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --emerald: #064e3b;
  --emerald-dark: #022c22;
  --amber: #f59e0b;
  --amber-hover: #d97706;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-400: #a1a1aa;
  --gray-600: #52525b;
  --gray-900: #18181b;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ─── Reveal (أنيميشن تفاعلي عند النزول والطلوع — كل الصفحات) ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-child {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.visible .reveal-child { opacity: 1; transform: translateY(0); }
.reveal.visible .reveal-child:nth-child(1) { transition-delay: 0.08s; }
.reveal.visible .reveal-child:nth-child(2) { transition-delay: 0.16s; }
.reveal.visible .reveal-child:nth-child(3) { transition-delay: 0.24s; }
.reveal.visible .reveal-child:nth-child(4) { transition-delay: 0.32s; }
.reveal.visible .reveal-child:nth-child(5) { transition-delay: 0.4s; }
.reveal.visible .reveal-child:nth-child(6) { transition-delay: 0.48s; }
.reveal.visible .reveal-child:nth-child(7) { transition-delay: 0.56s; }
.reveal.visible .reveal-child:nth-child(8) { transition-delay: 0.64s; }
.reveal.visible .reveal-child:nth-child(9) { transition-delay: 0.72s; }
.reveal.visible .reveal-child:nth-child(10) { transition-delay: 0.8s; }

/* ─── Sections ─── */
.section { padding: 5rem 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 480px) {
  .section { padding: 2.5rem 0; }
  .container { padding-left: 0.875rem; padding-right: 0.875rem; }
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
}
.section-title .italic-accent { color: var(--emerald); }
.section-subtitle {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--amber);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  border-radius: 9999px;
  transition: box-shadow 0.25s var(--ease), transform 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--gray-900);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--gray-400); background: var(--gray-50); }

/* ─── Service card (خلفية بيضاء، أيقونة خضراء، خط برتقالي عند Hover) ─── */
.service-card-lux {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s var(--ease);
}
.service-card-lux::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.service-card-lux:hover {
  border-color: var(--gray-200);
  box-shadow: 0 12px 40px rgba(6, 78, 59, 0.08);
}
.service-card-lux:hover::after { transform: scaleX(1); }

.service-card-lux .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(6, 78, 59, 0.1);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.service-card-lux .card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.service-card-lux .card-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.service-card-lux .card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.service-card-lux .card-pill {
  padding: 4px 10px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
}

/* ─── Stats ─── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.stat-item { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--emerald); display: block; }
.stat-label { font-size: 0.8125rem; color: var(--gray-600); margin-top: 0.25rem; }

/* ─── Value / Why Us cards ─── */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.value-card {
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.value-card:hover {
  border-color: rgba(6, 78, 59, 0.2);
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.06);
}
.value-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}
.value-text { font-weight: 500; color: var(--gray-900); font-size: 0.9375rem; line-height: 1.5; }

/* ─── Gallery ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  overflow: hidden;
  aspect-ratio: 4/3;
  border-radius: 12px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
  border-color: var(--emerald);
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.1);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }

/* ─── Split layout ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-img {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.split-img:hover img { transform: scale(1.02); }

/* ─── Contact cards ─── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  border-color: var(--amber);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.1);
}
.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--amber);
}
.contact-card h3 { font-size: 1rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.5rem; }
.contact-card p { font-size: 0.9375rem; color: var(--gray-600); }
.contact-card a { color: var(--amber); font-weight: 600; }
.contact-link { text-decoration: none; transition: opacity 0.2s, color 0.2s; }
.contact-link:hover { opacity: 0.9; text-decoration: underline; }
.contact-link:active { opacity: 0.8; }

/* ─── Page hero (داخلي) ─── */
.page-hero {
  padding: 8rem 0 4rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.page-hero .section-label { color: var(--emerald); }
.page-hero .section-title { margin-bottom: 0.5rem; }

/* ─── Banner gradient (تواصل) ─── */
.banner-gradient {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 50%, rgba(245, 158, 11, 0.4) 100%);
}
.banner-gradient .section-label { color: rgba(255,255,255,0.9); }
.banner-gradient .section-title { color: #fff; }
.banner-gradient .section-subtitle { color: rgba(255,255,255,0.9); }

/* ─── CTA block ─── */
.cta-block {
  padding: 4rem 0;
  background: rgba(245, 158, 11, 0.06);
  border-top: 1px solid rgba(245, 158, 11, 0.12);
}

/* ─── Pill (about) ─── */
.pill {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
  transition: border-color 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--emerald); color: var(--emerald); }

/* ─── Divider ─── */
.divider { height: 1px; background: var(--gray-200); margin: 3rem 0; }

/* ─── Abstract shape (إطار فني للصورة في الهيرو) ─── */
.hero-shape {
  border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}
.hero-shape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; }
  .split-img { order: -1; }
}
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .stats-row { gap: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* أقل ثقلاً لمن يفضلون تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible, .reveal-child,
  .hero-image-3d, .portfolio-carousel-card, .about-section.reveal .about-reveal-item,
  .services-intro.reveal .reveal-child, .services-section.reveal .reveal-child {
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .reveal .reveal-child { opacity: 1; transform: none; }
}
