/* ===================================================
   Bin Sulaiman Contracting Company — Custom Styles
   =================================================== */

html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

::selection { background: #F47E47; color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #F47E47; border-radius: 10px; }

/* ---------------------------------------------------
   Reveal-on-scroll
--------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* ---------------------------------------------------
   Hero pattern / diagonal accents
--------------------------------------------------- */
.hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.12) 1px, transparent 0);
  background-size: 22px 22px;
}
.diagonal-accent {
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.diagonal-accent-b {
  clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%);
}

/* ---------------------------------------------------
   Cards
--------------------------------------------------- */
.service-card { transition: transform .35s ease, box-shadow .35s ease; }
.service-card:hover { transform: translateY(-6px); }

.project-card img, .gallery-item img { transition: transform .6s ease; }
.project-card:hover img, .gallery-item:hover img { transform: scale(1.08); }

/* ---------------------------------------------------
   Marquee (clients)
--------------------------------------------------- */
/* Force LTR box/flex math inside the marquee regardless of page
   direction, so the translateX loop math is always predictable.
   Visual scroll direction is controlled independently below. */
.marquee-wrap {
  direction: ltr;
}
.marquee-track {
  display: flex;
  width: max-content;
  direction: ltr;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee-track.marquee-reverse { animation-direction: reverse; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

/* ---------------------------------------------------
   Floating whatsapp gentle bounce
--------------------------------------------------- */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-bounce-slow { animation: bounce-slow 2.6s ease-in-out infinite; }

/* ---------------------------------------------------
   Lightbox
--------------------------------------------------- */
#lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(16,19,25,0.95);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ---------------------------------------------------
   Number counters use this class for JS targeting
--------------------------------------------------- */
.counter { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------
   Generic horizontal carousel (projects, etc.)
--------------------------------------------------- */
.carousel-track {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------
   Gallery masonry-ish grid
--------------------------------------------------- */
.gallery-grid { columns: 1; column-gap: 1rem; }
@media (min-width: 640px)  { .gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .gallery-grid { columns: 3; } }
.gallery-grid .gallery-item { break-inside: avoid; margin-bottom: 1rem; }

/* Filter buttons active state handled via JS toggling Tailwind classes */

/* ---------------------------------------------------
   Form focus states
--------------------------------------------------- */
input:focus, select:focus, textarea:focus { outline: none; }

/* Print niceties (project table) */
@media print {
  header, footer, #lightbox, .no-print { display: none !important; }
}
