/* ============================================
   AZM Group — Custom Styles
   ============================================ */

/* iOS viewport height fix */
:root {
  --vh: 1vh;
}

html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scroll caused by off-screen reveal transforms.
   `clip` is preferred — it doesn't establish a scroll container, so
   position: fixed/sticky elsewhere isn't affected. Older browsers fall
   back to `hidden`. */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

/* Stable hero height — avoid iOS/mobile URL-bar jump on first load */
#hero {
  min-height: 100vh;                       /* fallback */
  min-height: calc(var(--vh, 1vh) * 100);  /* JS-computed viewport (resizes with URL bar) */
  min-height: 100svh;                      /* modern browsers — small viewport */
}

/* ============================================
   Hero Overlay Gradient
   Ready for background image — currently adds
   subtle depth to the solid color background.
   ============================================ */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(26, 26, 46, 0.6) 0%,
    rgba(26, 26, 46, 0.85) 50%,
    rgba(26, 26, 46, 0.95) 100%
  );
}

/* ============================================
   Fade-Up Entrance Animation
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.7s ease-out forwards;
}

/* Staggered delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.7s; }

/* ============================================
   Red Divider Expand Animation
   ============================================ */
@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

.divider-expand {
  width: 0;
  animation: expandWidth 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* ============================================
   Scroll Indicator Bounce
   ============================================ */
@keyframes bounceArrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

.bounce-arrow {
  animation: bounceArrow 1.5s ease-in-out infinite;
}

/* ============================================
   Navbar States
   ============================================ */
.navbar-scrolled {
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled .nav-link {
  color: #1A1A2E;
}

.navbar-scrolled .nav-link:hover {
  color: #0A2540;
}

.navbar-scrolled #nav-logo {
  color: #1A1A2E;
}

.navbar-scrolled #menu-toggle {
  color: #1A1A2E;
}

/* ============================================
   Infinite Marquee — Clients Section
   ============================================ */
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-track {
  display: flex;
  width: max-content;
}
.marquee-left .marquee-track {
  animation: marquee-left 30s linear infinite;
}
.marquee-right .marquee-track {
  animation: marquee-right 30s linear infinite;
}
.marquee-slow .marquee-track {
  animation-duration: 40s;
}
.marquee-fast .marquee-track {
  animation-duration: 20s;
}

/* Pause on hover */
.marquee-pause:hover .marquee-track {
  animation-play-state: paused;
}

/* Fade edges */
.marquee-fade {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* Logo placeholder box */
.logo-box {
  width: 200px;
  height: 120px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 16px;
  transition: all 0.3s;
}

/* ============================================
   Scroll-triggered Reveal Animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.92); }
.reveal-zoom  { transform: scale(1.06); }

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.35s; }
.reveal-d4 { transition-delay: 0.5s; }
.reveal-d5 { transition-delay: 0.65s; }
.reveal-d6 { transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Services Expanding Cards (SDC)
   ============================================ */
.sdc-container { width: 100%; }
.sdc-cards-wrapper {
  display: flex;
  gap: 14px;
  height: 520px;
}
.sdc-card {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: flex 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.sdc-card.sdc-active { flex: 3.2; }
.sdc-card-image { position: absolute; inset: 0; }
.sdc-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1s ease;
}
.sdc-card.sdc-active .sdc-card-image img { transform: scale(1); }
.sdc-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,0.15) 0%, rgba(10,37,64,0.55) 55%, rgba(10,37,64,0.92) 100%);
  transition: background 0.5s ease;
}
.sdc-card.sdc-active::after {
  background: linear-gradient(180deg, rgba(10,37,64,0.05) 0%, rgba(10,37,64,0.55) 45%, rgba(10,37,64,0.95) 100%);
}
.sdc-card-content {
  position: absolute; inset: 0;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  z-index: 1;
  transition: padding 0.5s ease;
}
.sdc-card.sdc-active .sdc-card-content {
  padding: 28px 28px;
}
.sdc-card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  margin: 0;
  letter-spacing: -0.01em;
  word-break: break-word;
  transition: font-size 0.5s ease;
}
.sdc-card.sdc-active .sdc-card-title {
  font-size: 22px;
  line-height: 1.15;
}
.sdc-card-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.5s ease;
  margin-top: 0;
}
.sdc-card.sdc-active .sdc-card-details {
  max-height: 260px;
  opacity: 1;
  margin-top: 18px;
}
.sdc-card-description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  margin: 0 0 22px 0;
}
.sdc-learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.sdc-arrow-circle {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(255,255,255,0.75);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.sdc-learn-more-btn:hover .sdc-arrow-circle {
  background: #FF0000;
  border-color: #FF0000;
  transform: translateX(3px);
}
@media (max-width: 900px) {
  .sdc-cards-wrapper {
    flex-direction: column;
    height: auto;
  }
  .sdc-card { min-height: 180px; }
  .sdc-card.sdc-active { flex: none; min-height: 380px; }
  .sdc-card-title { font-size: 20px; }
}

/* ============================================
   Image Lightbox (gallery overlay)
   ============================================ */
.azm-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.94);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: azm-lightbox-fade 0.2s ease-out;
}
.azm-lightbox-overlay.is-open {
  display: flex;
}
@keyframes azm-lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.azm-lightbox-figure {
  max-width: min(94vw, 1400px);
  max-height: 90vh;
  margin: 0;
  text-align: center;
}
.azm-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  border-radius: 10px;
}
.azm-lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  margin-top: 18px;
  letter-spacing: 0.02em;
}
.azm-lightbox-close,
.azm-lightbox-prev,
.azm-lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.azm-lightbox-close:hover,
.azm-lightbox-prev:hover,
.azm-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}
.azm-lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}
.azm-lightbox-prev,
.azm-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 36px;
  line-height: 1;
}
.azm-lightbox-prev:hover,
.azm-lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
}
.azm-lightbox-prev { left: 20px; }
.azm-lightbox-next { right: 20px; }

.azm-lightbox-trigger {
  cursor: zoom-in;
  display: block;
}

@media (max-width: 640px) {
  .azm-lightbox-overlay { padding: 16px; }
  .azm-lightbox-close   { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 22px; }
  .azm-lightbox-prev,
  .azm-lightbox-next    { width: 40px; height: 40px; font-size: 26px; }
  .azm-lightbox-prev    { left: 8px; }
  .azm-lightbox-next    { right: 8px; }
}

/* ============================================
   Project filter chips (Projects archive)
   ============================================ */
.azm-project-filter-btn {
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0A2540;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.azm-project-filter-btn:hover {
  background: #0A2540;
  color: #ffffff;
  border-color: #0A2540;
}
.azm-project-filter-btn.is-active {
  background: #FF0000;
  color: #ffffff;
  border-color: #FF0000;
}

.azm-project-hidden {
  display: none !important;
}

/* Hide scrollbar but keep scroll behavior (used by .azm-gallery-tabs on mobile). */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
