/* ============================================================
   Ingenious — Custom CSS
   Tailwind handles layout; this file covers:
   - Smooth scroll
   - Navbar scroll behaviour
   - Mobile nav animation
   - FAQ accordion
   - Active nav link highlight
============================================================ */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* navbar height */
}

/* ---- Navbar scroll state --------------------------------- */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#navbar.scrolled {
  background-color: #fafafa;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  border-bottom-color: #e5e5e5;
}

/* ---- Mobile nav ------------------------------------------ */
#mobile-nav {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

#mobile-nav.mobile-nav-hidden {
  display: flex;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

#mobile-nav.mobile-nav-open {
  display: flex;
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
}

/* ---- Active nav link ------------------------------------- */
.nav-link.active,
.nav-link:hover {
  color: #1e1b38;
}

/* ---- FAQ accordion --------------------------------------- */
/* All answers start closed via max-height (no display:none,
   so CSS transitions work correctly) */
.faq-answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding-bottom 0.25s ease;
}

.faq-answer.open {
  max-height: 400px;
  opacity: 1;
  padding-bottom: 1.5rem; /* 24px */
}

/* ---- Service card image hover ---------------------------- */
.service-img img {
  transition: transform 0.5s ease;
}

.service-img:hover img {
  transform: scale(1.03);
}

/* ---- Industry scroll — hide native scrollbar ------------ */
#industries-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#industries-scroll::-webkit-scrollbar {
  display: none;
}

/* ---- Industry card hover --------------------------------- */
.bg-white {
  transition: box-shadow 0.2s ease;
}

.bg-white:hover {
  box-shadow: 0 4px 16px rgba(30, 27, 56, 0.08);
}

/* ---- Why us card hover ----------------------------------- */
article.bg-white {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

article.bg-white:hover {
  box-shadow: 0 4px 20px rgba(30, 27, 56, 0.1);
  transform: translateY(-2px);
}

/* ---- Responsive adjustments ----------------------------- */

/* Ensure hero headline stays on 3 lines on desktop */
@media (min-width: 1280px) {
  #home h1 {
    max-width: 494px;
  }
}

/* Stats divider only on md+ */
@media (max-width: 767px) {
  .stats-divider {
    display: none;
  }
}

/* Scroll offset for in-page anchors when navbar is fixed */
section[id] {
  scroll-margin-top: 72px;
}

/* ---- Fade-up scroll animation ---------------------------- */
[data-fade] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-fade] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
