/* NexaStruct — services & portfolio enhancements */

.ns-page-intro {
  max-width: 820px;
  margin: 0 auto 40px;
  text-align: center;
  color: #555;
  font-size: 17px;
  line-height: 1.7;
}

.ns-representative-note {
  background: #f4f6f8;
  border-left: 4px solid #ffbd34;
  padding: 14px 18px;
  margin: 0 0 36px;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}

.ns-service-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.ns-service-grid .ns-service-card-col {
  width: 25%;
  padding: 12px;
  box-sizing: border-box;
}

.ns-service-grid .ns-service-card {
  width: 100%;
}

.ns-project-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -14px;
}

.ns-project-grid .ns-project-card {
  width: 50%;
  padding: 14px;
  box-sizing: border-box;
  border-radius: 8px;
}

.ns-service-card,
.ns-project-card-inner {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.ns-service-card:hover,
.ns-project-card-inner:hover {
  box-shadow: 0 12px 32px rgba(6, 22, 58, 0.08);
  border-color: #d8d8d8;
  transform: translateY(-2px);
}

.ns-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eef1f4;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.ns-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ns-service-card:hover .ns-card-media img,
.ns-project-card-inner:hover .ns-card-media img {
  transform: scale(1.03);
}

.ns-card-body {
  padding: 22px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ns-card-number {
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #ffbd34;
  font-weight: 500;
  margin-bottom: 6px;
}

.ns-card-title {
  font-size: 20px;
  font-weight: 500;
  color: #06163a;
  margin: 0 0 10px;
  line-height: 1.35;
}

.ns-card-title a {
  color: inherit;
  text-decoration: none;
}

.ns-card-title a:hover,
.ns-card-title a:focus {
  color: #ffbd34;
}

.ns-card-text {
  font-size: 15px;
  line-height: 1.65;
  color: #666;
  margin: 0 0 16px;
  flex: 1;
}

.ns-card-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.ns-card-tags {
  margin-bottom: 14px;
}

.ns-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  color: #f4f6f8;
  background: #1b253a;
  border: 1px solid #e4e7eb;
  border-radius: 50px;
}

.ns-card-link {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #06163a;
  align-self: flex-start;
}

.ns-card-link:hover,
.ns-card-link:focus {
  color: #ffbd34;
  text-decoration: none;
}

.ns-card-link:focus {
  outline: 2px solid #ffbd34;
  outline-offset: 2px;
}

.ns-filter-bar {
  text-align: center;
  margin-bottom: 20px;
}

.ns-filter-bar button {
  background: #fff;
  border: 1px solid #ddd;
  color: #06163a;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 16px;
  border-radius: 50px;
  margin: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ns-filter-bar button:hover,
.ns-filter-bar button:focus {
  border-color: #ffbd34;
  outline: none;
}

.ns-filter-bar button.is-active {
  background: #06163a;
  border-color: #06163a;
  color: #fff;
}

.ns-service-detail {
  padding: 48px 0 0;
  border-top: 1px solid #ececec;
  margin-top: 48px;
  scroll-margin-top: 100px;
}

.ns-service-detail:first-of-type {
  border-top: none;
  margin-top: 24px;
  padding-top: 0;
}

.ns-service-detail h3 {
  font-size: 26px;
  color: #06163a;
  margin: 0 0 12px;
}

.ns-service-detail .ns-detail-lead {
  max-width: 720px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
}

.ns-service-list {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding: 0 0 0 18px;
  color: #444;
  line-height: 1.8;
}

/* Homepage: 8 services in two columns */
.ns-home-services .ns-service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 0;
}

.ns-home-services .ns-service-grid .ns-service-card-col {
  width: auto;
  padding: 0;
}

.ns-home-services .ns-service-card {
  border-radius: 8px;
  overflow: hidden;
}

.ns-home-services .ns-card-media {
  border-radius: 0;
  aspect-ratio: 2 / 1;
}

/* Homepage: featured projects in two columns; image height 2/3 of default 4:3 */
.ns-home-projects .ns-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.ns-home-projects .ns-project-grid .ns-project-card {
  width: auto;
  max-width: none;
  padding: 0;
}

.ns-home-projects .ns-project-card-inner {
  border-radius: 8px;
  overflow: hidden;
}

.ns-home-projects .ns-card-media {
  aspect-ratio: 4 / 2;
}

.ns-project-detail-hero {
  position: relative;
  min-height: 360px;
  background: #06163a;
  display: flex;
  align-items: flex-end;
}

.ns-project-detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.ns-project-detail-hero .container {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 48px;
}

.ns-project-detail-hero h1 {
  color: #fff;
  font-size: 36px;
  margin: 0 0 8px;
}

.ns-project-detail-hero .ns-hero-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  max-width: 640px;
}

.ns-info-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 32px 0;
  border: 1px solid #e8e8e8;
  background: #fafafa;
}

.ns-info-grid dt {
  width: 30%;
  padding: 14px 18px;
  font-weight: 600;
  color: #06163a;
  border-bottom: 1px solid #ececec;
  margin: 0;
}

.ns-info-grid dd {
  width: 70%;
  padding: 14px 18px;
  margin: 0;
  border-bottom: 1px solid #ececec;
  color: #555;
}

.ns-scope-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px 24px;
  padding: 0;
  list-style: none;
}

.ns-scope-list li {
  width: 33.333%;
  padding: 8px;
  box-sizing: border-box;
}

.ns-scope-list li span {
  display: block;
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 14px 16px;
  font-size: 15px;
  color: #06163a;
  height: 100%;
}

.ns-gallery {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.ns-gallery a {
  width: 33.333%;
  padding: 10px;
  box-sizing: border-box;
  display: block;
}

.ns-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #e8e8e8;
  background: #eef1f4;
}

.ns-related .ns-project-card {
  width: 33.333%;
}

@media (max-width: 1199px) {
  .ns-service-grid .ns-service-card-col {
    width: 50%;
  }
  #ns-projects-grid .ns-project-card,
  .ns-related .ns-project-card {
    width: 50%;
  }
}

@media (max-width: 767px) {
  .ns-home-services .ns-service-grid {
    grid-template-columns: 1fr;
  }

  .ns-home-projects .ns-project-grid {
    grid-template-columns: 1fr;
  }

  .ns-service-grid .ns-service-card-col,
  #ns-projects-grid .ns-project-card,
  .ns-related .ns-project-card {
    width: 100%;
  }
  .ns-service-list {
    columns: 1;
  }
  .ns-scope-list li,
  .ns-gallery a {
    width: 100%;
  }
  .ns-info-grid dt,
  .ns-info-grid dd {
    width: 100%;
  }
  .ns-project-detail-hero h1 {
    font-size: 28px;
  }
}
