/*
 * Phase 1 visual enrichment.
 * Structural rules adapted from the licensed Niwax sources:
 * - header-v2.html and header-v4.html fixed navigation patterns
 * - modern-agency.html .hero-section.hero-creative-agenc2
 * All selectors are scoped to the ASFIT body class and project-specific names.
 */

/* Header structure */
.asfit-niwax .nw-header-v2 {
  position: sticky;
  top: 0;
  z-index: 300;
  min-height: 94px;
  transition:
    min-height 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.asfit-niwax .nw-header-v2.nw-header--overlay {
  position: fixed;
  right: 0;
  left: 0;
}

.asfit-niwax .nw-header-v2-inner {
  width: min(calc(100% - 48px), 1480px);
  min-height: 94px;
  transition: min-height 220ms ease;
}

.asfit-niwax .nw-site-logo {
  position: relative;
  width: clamp(208px, 16vw, 236px);
  height: 58px;
}

.asfit-niwax .nw-site-logo img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-50%);
  transition: opacity 180ms ease;
}

.asfit-niwax .nw-logo-light {
  opacity: 0;
}

.asfit-niwax .nw-header-v2 .site-nav {
  gap: clamp(18px, 2vw, 30px);
}

.asfit-niwax .nw-header-v2 .nav-list {
  gap: clamp(2px, 0.5vw, 8px);
}

.asfit-niwax .nw-header-v2 .nav-link,
.asfit-niwax .nw-header-v2 .dropdown-toggle {
  min-height: 46px;
  padding-inline: clamp(11px, 1vw, 16px);
}

.asfit-niwax .nw-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.asfit-niwax .nw-header-inquiry {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  border: 1px solid;
  border-radius: 50%;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.asfit-niwax .nw-header-inquiry img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.asfit-niwax .nw-header-v2 .header-cta {
  min-height: 54px;
  padding-inline: clamp(22px, 2vw, 30px);
}

.asfit-niwax .nw-mobile-nav-head,
.asfit-niwax .nw-mobile-nav-actions {
  display: none;
}

.asfit-niwax .nw-nav-backdrop {
  display: none;
}

/* Services mega menu */
.asfit-niwax .nw-mega-menu-v2 {
  top: 94px;
  width: min(1320px, calc(100vw - 32px));
  max-height: calc(100vh - 112px);
  overflow: hidden auto;
}

.asfit-niwax .nw-mega-menu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 0.34fr);
  align-items: stretch;
}

.asfit-niwax .nw-mega-service-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  max-width: none;
  padding: 30px;
}

.asfit-niwax .nw-mega-service-area .mega-menu-column {
  min-width: 0;
  padding: 0;
}

.asfit-niwax .nw-mega-service-area .mega-menu-heading {
  display: block;
  margin: 0 0 12px;
}

.asfit-niwax .nw-mega-service-area .mega-menu-heading p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.asfit-niwax .nw-mega-service-area .mega-menu-list {
  gap: 7px;
}

.asfit-niwax .nw-mega-service-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 12px;
}

.asfit-niwax .nw-mega-service-link::before {
  display: none;
}

.asfit-niwax .nw-mega-service-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.asfit-niwax .nw-mega-service-icon img {
  width: 37px;
  height: 37px;
  object-fit: contain;
}

.asfit-niwax .nw-mega-service-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.asfit-niwax .nw-mega-service-copy strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.asfit-niwax .nw-mega-service-copy small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.asfit-niwax .nw-mega-project-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 34px 30px;
}

.asfit-niwax .nw-mega-project-card::after {
  content: "";
  position: absolute;
  right: -62px;
  bottom: -84px;
  width: 190px;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.12;
}

.asfit-niwax .nw-mega-project-card > * {
  position: relative;
  z-index: 1;
}

.asfit-niwax .nw-mega-project-card > img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.asfit-niwax .nw-mega-project-kicker {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.asfit-niwax .nw-mega-project-card h2,
.asfit-niwax .nw-mega-project-card p {
  margin: 0;
}

.asfit-niwax .nw-mega-project-card h2 {
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  line-height: 1.15;
}

.asfit-niwax .nw-mega-project-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.asfit-niwax .nw-mega-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 4px;
}

.asfit-niwax .nw-mega-project-actions a {
  font-size: 0.88rem;
  font-weight: 900;
}

.asfit-niwax .nw-mega-menu-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 28px;
  text-align: left;
}

.asfit-niwax .nw-mega-menu-footer span {
  font-size: 0.91rem;
  font-weight: 600;
}

/* Modern Agency hero composition */
.asfit-niwax .nw-home-hero-v2 {
  position: relative;
  overflow: hidden;
  min-height: min(880px, 100vh);
}

.asfit-niwax .nw-home-hero-v2-grid {
  width: min(calc(100% - 48px), 1360px);
  grid-template-columns: minmax(0, 0.98fr) minmax(500px, 1.02fr);
  align-items: center;
  gap: clamp(48px, 6vw, 92px);
  padding-block: clamp(142px, 12vh, 170px) clamp(86px, 9vh, 112px);
}

.asfit-niwax .nw-home-hero-v2-copy {
  position: relative;
  z-index: 4;
  max-width: 700px;
}

.asfit-niwax .nw-home-hero-v2-copy .asfs-hero-actions {
  margin-top: 4px;
}

.asfit-niwax .nw-hero-capability-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  max-width: 570px;
  margin-top: 4px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 18px;
}

.asfit-niwax .nw-hero-capability-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.asfit-niwax .nw-hero-capability-icon img {
  width: 37px;
  height: 37px;
  object-fit: contain;
}

.asfit-niwax .nw-hero-capability-card p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.asfit-niwax .nw-hero-capability-card strong {
  font-size: 0.96rem;
  line-height: 1.25;
}

.asfit-niwax .nw-hero-capability-card span {
  font-size: 0.87rem;
  line-height: 1.5;
}

.asfit-niwax .nw-home-hero-v2-media {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 650px;
  justify-self: stretch;
}

.asfit-niwax .nw-home-hero-v2-media .imgac {
  position: absolute;
  overflow: hidden;
  width: min(56%, 350px);
  aspect-ratio: 2 / 3;
}

.asfit-niwax .nw-home-hero-v2-media .imgac img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asfit-niwax .nw-home-hero-v2-media .nw-hero-photo-primary {
  z-index: 2;
  top: 0;
  left: 1%;
  border-radius: 12px 12px 12px 100px;
}

.asfit-niwax .nw-home-hero-v2-media .nw-hero-photo-secondary {
  z-index: 1;
  right: 0;
  bottom: 0;
  border-radius: 12px 12px 100px 12px;
}

.asfit-niwax .nw-hero-dot-texture {
  position: absolute;
  z-index: 0;
  top: 6%;
  right: 7%;
  width: 178px;
  height: 178px;
  background: url("../vendor/niwax-selected/shapes/dot-pattern.png") repeat;
  opacity: 0.54;
}

.asfit-niwax .nw-hero-gradient-orb {
  position: absolute;
  z-index: 0;
  right: 14%;
  bottom: 17%;
  width: 250px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(2px);
}

.asfit-niwax .nw-home-hero-v2-media .shpdzz {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.asfit-niwax .nw-home-hero-v2-media .shpdez1 {
  bottom: 3%;
  left: 4%;
  width: 88px;
  height: 88px;
  border-radius: 16px 50% 16px 50%;
}

.asfit-niwax .nw-home-hero-v2-media .shpdez2 {
  top: 2%;
  left: 47%;
  width: 122px;
  height: 122px;
  border-radius: 50% 18px 50% 18px;
}

.asfit-niwax .nw-home-hero-v2-media .shpdez3 {
  top: 33%;
  right: 3%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.asfit-niwax .nw-home-hero-v2-media .shpdez4 {
  bottom: 9%;
  left: 42%;
  width: 94px;
  height: 56px;
  border-radius: 18px 50% 18px 50%;
}

.asfit-niwax .nw-hero-service-badges {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.asfit-niwax .nw-hero-service-badge {
  position: absolute;
  display: inline-grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 56px;
  max-width: 210px;
  padding: 8px 13px 8px 9px;
  border: 1px solid;
  border-radius: 15px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  pointer-events: auto;
}

.asfit-niwax .nw-hero-service-badge > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
}

.asfit-niwax .nw-hero-service-badge img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.asfit-niwax .nw-hero-service-badge:nth-child(1) {
  top: 12%;
  left: -5%;
}

.asfit-niwax .nw-hero-service-badge:nth-child(2) {
  top: 7%;
  right: -3%;
}

.asfit-niwax .nw-hero-service-badge:nth-child(3) {
  right: -5%;
  bottom: 15%;
}

.asfit-niwax .nw-hero-service-badge:nth-child(4) {
  bottom: 7%;
  left: -5%;
}

@media (max-width: 1280px) {
  .asfit-niwax .nw-header-v2-inner {
    width: min(calc(100% - 32px), 1280px);
  }

  .asfit-niwax .nw-site-logo {
    width: 194px;
  }

  .asfit-niwax .nw-header-v2 .nav-link,
  .asfit-niwax .nw-header-v2 .dropdown-toggle {
    padding-inline: 9px;
    font-size: 0.91rem;
  }

  .asfit-niwax .nw-header-inquiry {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .asfit-niwax .nw-header-v2 .header-cta {
    min-height: 50px;
    padding-inline: 20px;
    font-size: 0.92rem;
  }

  .asfit-niwax .nw-home-hero-v2-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
    gap: 42px;
  }

  .asfit-niwax .nw-home-hero-v2-media {
    min-height: 610px;
  }

  .asfit-niwax .nw-hero-service-badge:nth-child(1),
  .asfit-niwax .nw-hero-service-badge:nth-child(4) {
    left: -1%;
  }

  .asfit-niwax .nw-hero-service-badge:nth-child(2),
  .asfit-niwax .nw-hero-service-badge:nth-child(3) {
    right: -1%;
  }
}

@media (max-width: 1100px) {
  .asfit-niwax .nw-header-v2,
  .asfit-niwax .nw-header-v2-inner {
    min-height: 78px;
  }

  .asfit-niwax .nw-site-logo {
    width: 190px;
    height: 50px;
  }

  .asfit-niwax .nw-site-logo img {
    height: 50px;
  }

  .asfit-niwax .nw-header-actions {
    display: none;
  }

  .asfit-niwax .nw-header-v2 .menu-toggle {
    display: inline-flex;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
  }

  .asfit-niwax .nw-header-v2 .site-nav {
    position: fixed;
    z-index: 410;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(430px, calc(100vw - 28px));
    max-width: none;
    max-height: 100dvh;
    display: flex;
    gap: 16px;
    padding: 0 20px 26px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    transform: translateX(105%);
    visibility: hidden;
    transition:
      transform 240ms ease,
      visibility 240ms ease;
  }

  .asfit-niwax.nav-open .nw-header-v2 .site-nav,
  body.nav-open.asfit-niwax .nw-header-v2 .site-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .asfit-niwax .nw-mobile-nav-head {
    position: sticky;
    z-index: 4;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
    margin-inline: -20px;
    padding: 12px 20px;
    border-bottom: 1px solid;
  }

  .asfit-niwax .nw-mobile-nav-logo img {
    width: 184px;
    height: 46px;
    object-fit: contain;
  }

  .asfit-niwax .nw-mobile-nav-close {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid;
    border-radius: 50%;
    background: transparent;
  }

  .asfit-niwax .nw-mobile-nav-close::before,
  .asfit-niwax .nw-mobile-nav-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .asfit-niwax .nw-mobile-nav-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .asfit-niwax .nw-mobile-nav-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .asfit-niwax .nw-header-v2 .nav-list {
    gap: 6px;
  }

  .asfit-niwax .nw-header-v2 .nav-link,
  .asfit-niwax .nw-header-v2 .dropdown-toggle {
    min-height: 50px;
    padding-inline: 15px;
    font-size: 1rem;
  }

  .asfit-niwax .nw-mega-menu-v2 {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 6px;
    overflow: hidden;
  }

  .asfit-niwax .nw-mega-menu-layout {
    grid-template-columns: 1fr;
  }

  .asfit-niwax .nw-mega-service-area {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
  }

  .asfit-niwax .nw-mega-service-area .mega-menu-column {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .asfit-niwax .nw-mega-service-area .mega-menu-heading {
    margin: 0 0 6px;
    padding: 0 7px;
  }

  .asfit-niwax .nw-mega-service-link {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 58px;
    padding: 8px;
  }

  .asfit-niwax .nw-mega-service-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .asfit-niwax .nw-mega-service-icon img {
    width: 30px;
    height: 30px;
  }

  .asfit-niwax .nw-mega-service-copy small {
    display: none;
  }

  .asfit-niwax .nw-mega-project-card,
  .asfit-niwax .nw-mega-menu-footer {
    display: none;
  }

  .asfit-niwax .nw-mobile-nav-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
  }

  .asfit-niwax .nw-mobile-nav-actions .header-cta,
  .asfit-niwax .nw-mobile-meeting-link {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
  }

  .asfit-niwax .nw-nav-backdrop {
    position: fixed;
    z-index: 390;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 220ms ease,
      visibility 220ms ease;
  }

  body.nav-open.asfit-niwax .nw-nav-backdrop {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .asfit-niwax .nw-home-hero-v2 {
    min-height: auto;
  }

  .asfit-niwax .nw-home-hero-v2-grid {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-block: 128px 76px;
  }

  .asfit-niwax .nw-home-hero-v2-copy {
    max-width: 820px;
  }

  .asfit-niwax .nw-home-hero-v2-media {
    width: min(100%, 720px);
    min-height: 620px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .asfit-niwax .nw-header-v2,
  .asfit-niwax .nw-header-v2-inner {
    min-height: 72px;
  }

  .asfit-niwax .nw-header-v2-inner {
    width: min(calc(100% - 28px), 600px);
  }

  .asfit-niwax .nw-site-logo {
    width: 172px;
    height: 45px;
  }

  .asfit-niwax .nw-site-logo img {
    height: 45px;
  }

  .asfit-niwax .nw-header-v2 .menu-toggle {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .asfit-niwax .nw-header-v2 .site-nav {
    width: min(400px, calc(100vw - 18px));
    padding-inline: 14px;
  }

  .asfit-niwax .nw-mobile-nav-head {
    min-height: 74px;
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .asfit-niwax .nw-mobile-nav-logo img {
    width: 170px;
  }

  .asfit-niwax .nw-home-hero-v2-grid {
    width: min(calc(100% - 30px), 600px);
    gap: 36px;
    padding-block: 106px 58px;
  }

  .asfit-niwax .nw-home-hero-v2-copy .asfs-page-title {
    font-size: clamp(2.55rem, 12vw, 3.45rem);
    line-height: 1.02;
  }

  .asfit-niwax .nw-home-hero-v2-copy .asfs-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .asfit-niwax .nw-home-hero-v2-copy .asfs-btn {
    width: 100%;
  }

  .asfit-niwax .nw-hero-capability-card {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 11px 12px;
  }

  .asfit-niwax .nw-hero-capability-icon {
    width: 48px;
    height: 48px;
  }

  .asfit-niwax .nw-home-hero-v2-media {
    min-height: 560px;
  }

  .asfit-niwax .nw-home-hero-v2-media .imgac {
    width: min(62%, 245px);
  }

  .asfit-niwax .nw-home-hero-v2-media .nw-hero-photo-primary {
    left: 0;
  }

  .asfit-niwax .nw-home-hero-v2-media .nw-hero-photo-secondary {
    top: 74px;
    right: 0;
    bottom: auto;
  }

  .asfit-niwax .nw-hero-dot-texture {
    top: 3%;
    right: 1%;
    width: 118px;
    height: 118px;
  }

  .asfit-niwax .nw-home-hero-v2-media .shpdez1,
  .asfit-niwax .nw-home-hero-v2-media .shpdez2,
  .asfit-niwax .nw-home-hero-v2-media .shpdez3,
  .asfit-niwax .nw-home-hero-v2-media .shpdez4,
  .asfit-niwax .nw-hero-gradient-orb {
    display: none;
  }

  .asfit-niwax .nw-hero-service-badges {
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .asfit-niwax .nw-hero-service-badge,
  .asfit-niwax .nw-hero-service-badge:nth-child(n) {
    position: static;
    min-width: 0;
    max-width: none;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 50px;
    padding: 7px 9px 7px 7px;
    font-size: 0.7rem;
  }

  .asfit-niwax .nw-hero-service-badge > span {
    width: 32px;
    height: 32px;
  }

  .asfit-niwax .nw-hero-service-badge img {
    width: 25px;
    height: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asfit-niwax .nw-header-v2,
  .asfit-niwax .nw-header-v2-inner,
  .asfit-niwax .nw-site-logo img,
  .asfit-niwax .nw-header-v2 .site-nav,
  .asfit-niwax .nw-nav-backdrop {
    transition: none;
  }
}
