/* ============================================
   Mahraj Scaffoldings — Modern Design System v2
   ============================================ */
:root {
  --brand-red: #dc2626;
  --brand-red-dark: #b91c1c;
  --brand-red-deep: #7f1d1d;
  --brand-ink: #0b1220;
  --brand-ink-2: #0f172a;
  --brand-amber: #f59e0b;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

html { scroll-behavior: smooth; }

/* ============================================
   PAGE PRELOADER — fast, minimal
   ============================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--brand-ink);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-grid { display: none; }
.loader-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
  animation: loaderPulse 1.4s ease-in-out infinite;
  z-index: 1;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
}
.loader-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
  z-index: 1;
}
.loader-bars span {
  display: block;
  width: 6px;
  border-radius: 3px;
  background: var(--brand-red);
  animation: loaderBars 0.9s ease-in-out infinite;
}
.loader-bars span:nth-child(1) { animation-delay: 0s; }
.loader-bars span:nth-child(2) { animation-delay: 0.1s; }
.loader-bars span:nth-child(3) { animation-delay: 0.2s; }
.loader-bars span:nth-child(4) { animation-delay: 0.3s; }
.loader-bars span:nth-child(5) { animation-delay: 0.4s; }
@keyframes loaderBars {
  0%, 100% { height: 10px; opacity: 0.4; }
  50% { height: 36px; opacity: 1; }
}
.loader-text {
  z-index: 1;
  color: #94a3b8;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
}
.loader-text b { color: var(--brand-red); }

/* ============================================
   TICKER BAR — fixed overflow, smooth
   ============================================ */
.ticker-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, var(--brand-red-deep) 0%, var(--brand-red) 50%, var(--brand-red-deep) 100%);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 13px;
  padding: 8px 0;
  z-index: 60;
  will-change: auto;
  contain: layout style;
}
.ticker-shine { display: none; }
.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 60s linear infinite;
  will-change: transform;
}
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
.ticker-content {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  font-size: inherit;
}
.ticker-icon {
  margin-right: 8px;
  color: #fde68a;
  font-size: 12px;
}
.ticker-sep {
  display: inline-block;
  color: rgba(255,255,255,0.35);
  font-size: 8px;
  padding: 0 4px;
}
@media (max-width: 640px) {
  .ticker-wrap { font-size: 11px; padding: 6px 0; }
  .ticker-item { padding: 0 14px; }
}

/* ============================================
   HEADER — glassmorphism sticky
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ============================================
   MOBILE NAV — full-screen overlay
   ============================================ */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 101;
  width: min(320px, 85vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out-expo);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.mobile-nav-panel.open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-nav-panel nav {
  display: flex;
  flex-direction: column;
}
.mobile-nav-panel .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  width: 100%;
}
.mobile-nav-panel .nav-link:hover,
.mobile-nav-panel .nav-link.active {
  background: #fef2f2;
  color: var(--brand-red);
}
.mobile-nav-panel .nav-link i {
  width: 20px;
  text-align: center;
  color: var(--brand-red);
}

/* ============================================
   HERO SLIDER — modern crossfade + Ken Burns
   ============================================ */
.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--brand-ink);
}
.hero-slides {
  position: relative;
  width: 100%;
  min-height: 520px;
}
@media (min-width: 768px) { .hero-slides { min-height: 640px; } }
@media (min-width: 1024px) { .hero-slides { min-height: 700px; } }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  will-change: opacity;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Background with Ken Burns zoom */
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.12);
  transition: transform 8s ease-out;
  will-change: transform;
}
.hero-slide.active .hero-slide-bg {
  transform: scale(1);
}

/* Dark overlay — fixed gradient for text readability */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 18, 32, 0.93) 0%, rgba(11, 18, 32, 0.75) 50%, rgba(11, 18, 32, 0.5) 100%);
}
@media (max-width: 768px) {
  .hero-slide-overlay {
    background:
      linear-gradient(180deg, rgba(11, 18, 32, 0.88) 0%, rgba(11, 18, 32, 0.7) 60%, rgba(11, 18, 32, 0.88) 100%);
  }
}

/* Grid pattern */
.hero-slide-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Content entry animation */
.hero-slide-content {
  position: relative;
  z-index: 3;
  opacity: 0;
  transform: translateY(20px);
}
.hero-slide.active .hero-slide-content {
  animation: heroFadeIn 0.7s ease-out 0.15s forwards;
}
@keyframes heroFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Slider dots — modern pill style */
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 6;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  cursor: pointer;
  transition: all 0.35s var(--ease-out-expo);
  padding: 0;
}
.hero-dot.active {
  width: 32px;
  background: var(--brand-red);
  border-color: var(--brand-red);
}
.hero-dot:hover:not(.active) {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.15);
}

/* Slider arrows — modern frosted */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s ease;
}
.hero-arrow:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: translateY(-50%) scale(1.05);
}
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
@media (min-width: 1024px) { .hero-arrow { display: flex; } }

/* Progress bar */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  z-index: 6;
}
.hero-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-amber));
  border-radius: 0 2px 2px 0;
}
.hero-progress-bar.run {
  animation: heroProgress 5s linear forwards;
}
@keyframes heroProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-shine:hover::after { left: 120%; }

/* ============================================
   CARD LIFT — smooth hover
   ============================================ */
.card-lift {
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-lift:hover { transform: translateY(-5px); }

/* ============================================
   LINE CLAMP
   ============================================ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SCROLLBAR — subtle red
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #dc2626; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b91c1c; }

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE MAP
   ============================================ */
iframe { display: block; }

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-slide-bg { transform: none !important; }
  .ticker-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================
   DESKTOP MEGA MENU
   ============================================ */
.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s var(--ease-out-expo);
  pointer-events: none;
}
.group:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================
   FEATURED STRIP
   ============================================ */
.features-strip {
  background: linear-gradient(135deg, var(--brand-red) 0%, #ef4444 100%);
}

/* ============================================
   COUNTERS (homepage)
   ============================================ */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   HIDE WHATSAPP FLOAT WHEN MOBILE NAV IS OPEN
   ============================================ */
.mobile-nav-overlay.open ~ #wa-float,
body.nav-open #wa-float {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ============================================
   ENSURE MOBILE NAV LINKS ARE BLOCK-LEVEL
   ============================================ */
.mobile-nav-panel nav a.nav-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  width: 100%;
}
