/* =========================================================
   NETCOM PROJECTS GRID
   Mirrors the approved homepage Projects section.
========================================================= */

.nf-projects {
  --nf-bg: #05070B;
  --nf-blue: #1E90FF;
  --nf-cyan: #4DDCFF;
  --nf-white: #FFFFFF;

  position: relative;
  width: 100%;
  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      #05070B 0%,
      #06090F 48%,
      #05070B 100%
    );

  color: #FFFFFF;
  font-family: "Manrope", sans-serif;
  content-visibility: auto;
  contain-intrinsic-size: 1100px;
}

.nf-projects__container {
  width: min(calc(100% - 64px), 1200px);
  margin: 0 auto;
  padding: 60px 0;
}

/* Elementor / theme protection */
.nf-projects a,
.nf-projects a:visited,
.nf-projects a:hover,
.nf-projects a:focus,
.nf-projects a:active {
  color: inherit !important;
  text-decoration: none !important;
  background: transparent !important;
}

/* Heading */
.nf-projects__head {
  max-width: 760px;
  margin-bottom: 62px;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(45px);
  transition:
    opacity .9s cubic-bezier(.22,1,.36,1),
    transform 1s cubic-bezier(.22,1,.36,1),
    filter .8s ease;
}

.nf-projects.is-visible .nf-projects__head {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.nf-projects__head h2 {
  max-width: 720px;
  margin: 0;
  color: #FFFFFF;
  font-size: clamp(40px,4.2vw,62px);
  line-height: 1.05;
  letter-spacing: -.046em;
  font-weight: 650;
}

.nf-projects__head p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(220,227,236,.60);
  font-size: 15px;
  line-height: 1.75;
}

/* Grid */
.nf-projects__grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
}

.nf-project-card--featured {
  grid-column: 1 / -1;
}

/* Card base */
.nf-project-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  background: #080B11 !important;
  opacity: 0;
  filter: blur(7px);
  transform: translateY(55px) scale(.96);
  transition:
    opacity .95s cubic-bezier(.22,1,.36,1),
    transform 1.05s cubic-bezier(.22,1,.36,1),
    filter .85s ease,
    border-color .35s ease,
    box-shadow .35s ease !important;
}

/* Preserve the approved stronger first-card entrance. */
.nf-project-card:nth-child(1) {
  transform: translateY(90px) scale(.94);
}

.nf-project-card:nth-child(2) {
  transform: translate(-75px,55px) scale(.96);
}

.nf-project-card:nth-child(3) {
  transform: translate(75px,55px) scale(.96);
}

.nf-projects.is-visible .nf-project-card {
  opacity: 1;
  filter: blur(0);
  transform: translate(0,0) scale(1);
}

.nf-projects.is-visible .nf-project-card:nth-child(1) {
  transition-delay: .22s;
}

.nf-projects.is-visible .nf-project-card:nth-child(2) {
  transition-delay: .47s;
}

.nf-projects.is-visible .nf-project-card:nth-child(3) {
  transition-delay: .58s;
}

/* Additional future projects also animate cleanly. */
.nf-projects.is-visible .nf-project-card:nth-child(n+4) {
  transition-delay: .18s;
}

/* Card content */
.nf-project-card__content {
  padding: 24px 26px 27px;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .65s ease,
    transform .75s cubic-bezier(.22,1,.36,1);
}

.nf-project-card--featured .nf-project-card__content {
  padding: 26px 30px 30px;
}

.nf-projects.is-visible .nf-project-card .nf-project-card__content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .52s;
}

.nf-projects.is-visible .nf-project-card:nth-child(1) .nf-project-card__content {
  transition-delay: .72s;
}

.nf-projects.is-visible .nf-project-card:nth-child(2) .nf-project-card__content {
  transition-delay: .92s;
}

.nf-projects.is-visible .nf-project-card:nth-child(3) .nf-project-card__content {
  transition-delay: 1.02s;
}

/* Media */
.nf-project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #080B11;
}

.nf-project-card--featured .nf-project-card__media {
  aspect-ratio: 16 / 7.2;
}

.nf-project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .9s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.nf-project-card__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(5,7,11,.02) 0%,
      rgba(5,7,11,.02) 45%,
      rgba(5,7,11,.30) 100%
    );
}

/* Meta */
.nf-project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.nf-project-card__number {
  color: rgba(255,255,255,.28);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .06em;
}

.nf-project-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nf-project-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: rgba(220,227,236,.50);
  font-size: 8px;
  line-height: 1;
}

/* Lower copy */
.nf-project-card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.nf-project-card__bottom > div {
  min-width: 0;
}

.nf-project-card__bottom h3 {
  max-width: 760px;
  margin: 0;
  color: #FFFFFF;
  font-size: clamp(22px,2.3vw,31px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 600;
}

.nf-project-card--featured .nf-project-card__bottom h3 {
  font-size: clamp(27px,3vw,40px);
}

.nf-project-card__bottom p {
  max-width: 530px;
  margin: 10px 0 0;
  color: rgba(220,227,236,.48);
  font-size: 11px;
  line-height: 1.65;
}

/* Arrow */
.nf-project-card__arrow {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  color: rgba(255,255,255,.50);
  font-size: 14px;
  transition:
    transform .35s cubic-bezier(.22,1,.36,1),
    color .3s ease,
    border-color .3s ease,
    background .3s ease;
}

/* Blue detail line */
.nf-project-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg,var(--nf-blue),var(--nf-cyan));
  box-shadow: 0 0 12px rgba(30,144,255,.35);
  transition: width .65s cubic-bezier(.22,1,.36,1);
}

/* Hover */
.nf-project-card:hover {
  border-color: rgba(77,220,255,.22);
  box-shadow: 0 25px 65px rgba(0,0,0,.25);
}

.nf-project-card:hover::after {
  width: 100%;
}

.nf-project-card:hover .nf-project-card__media img {
  transform: scale(1.025);
}

.nf-project-card:hover .nf-project-card__arrow {
  color: var(--nf-cyan);
  border-color: rgba(77,220,255,.30);
  background: rgba(77,220,255,.045);
  transform: translate(2px,-2px);
}

/* Tablet */
@media (max-width: 1024px) {
  .nf-projects__container {
    width: min(calc(100% - 40px),1200px);
    padding: 60px 0;
  }

  .nf-projects__grid {
    gap: 18px;
  }

  .nf-project-card--featured .nf-project-card__media {
    aspect-ratio: 16 / 8;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .nf-projects__container {
    width: calc(100% - 32px);
    padding: 60px 0;
  }

  .nf-projects__head {
    margin-bottom: 44px;
  }

  .nf-projects__head h2 {
    font-size: clamp(36px,10vw,48px);
  }

  .nf-projects__head p {
    font-size: 14px;
    line-height: 1.65;
  }

  .nf-projects__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .nf-project-card--featured {
    grid-column: auto;
  }

  .nf-project-card__media,
  .nf-project-card--featured .nf-project-card__media {
    aspect-ratio: 4 / 3;
  }

  .nf-project-card__content,
  .nf-project-card--featured .nf-project-card__content {
    padding: 20px;
  }

  .nf-project-card__meta {
    margin-bottom: 18px;
  }

  .nf-project-card__bottom {
    gap: 18px;
  }

  .nf-project-card__bottom h3,
  .nf-project-card--featured .nf-project-card__bottom h3 {
    font-size: 22px;
  }

  .nf-project-card__bottom p {
    font-size: 10px;
  }

  .nf-project-card__arrow {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .nf-project-card:nth-child(1),
  .nf-project-card:nth-child(2),
  .nf-project-card:nth-child(3),
  .nf-project-card:nth-child(n+4) {
    transform: translateY(70px) scale(.95);
  }

  .nf-projects.is-visible .nf-project-card:nth-child(1),
  .nf-projects.is-visible .nf-project-card:nth-child(2),
  .nf-projects.is-visible .nf-project-card:nth-child(3),
  .nf-projects.is-visible .nf-project-card:nth-child(n+4) {
    transform: translateY(0) scale(1);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .nf-project-card__tags span:nth-child(3) {
    display: none;
  }

  .nf-project-card__media,
  .nf-project-card--featured .nf-project-card__media {
    aspect-ratio: 1 / 1;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nf-projects *,
  .nf-projects *::before,
  .nf-projects *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
