/* ===== KLA Nexus — Services Listing + Detail ===== */
/* Loaded by: tech.blade.php, services.blade.php, service-detail.blade.php */

/* --- Pagehero --- */
.pagehero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.pagehero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
}
.pagehero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 10%, rgba(238, 242, 247, .4));
  z-index: 1;
}
.pagehero .wrap {
  position: relative;
  z-index: 2;
  padding: 64px 28px 56px;
}
.pagehero h1 {
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  text-transform: uppercase;
  max-width: 720px;
  margin-top: 10px;
}

/* --- Breadcrumb --- */
.crumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
  margin-bottom: 16px;
}
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--accent); }

/* --- Filter bar --- */
.filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  padding: 10px 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #160a00;
}
.filterbar .count {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* --- Service grid --- */
.svcgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.svc {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: .25s;
  box-shadow: 0 8px 24px rgba(16, 42, 80, .05);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.svc:hover {
  border-color: var(--accent);
  box-shadow: 0 18px 44px rgba(16, 42, 80, .12);
}
.svc .pic {
  height: 210px;
  position: relative;
  overflow: hidden;
}
.svc .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s;
}
.svc:hover .pic img { transform: scale(1.07); }
.svc .pic::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 18, 38, .5));
}
.svc .pic .cat {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--steel);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .05em;
  padding: 7px 14px;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.svc .body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.svc .ic {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #160a00;
  font-size: 22px;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
  margin: -46px 0 14px;
  position: relative;
  z-index: 3;
  border: 3px solid var(--bg-2);
}
.svc h3 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: none;
}
.svc p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
  flex: 1;
}
.svc .more {
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.svc:hover .more { color: var(--accent); }
.svc.hide { display: none; }

.empty {
  display: none;
  text-align: center;
  padding: 72px 20px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.empty.show { display: block; }
.empty .e-ic {
  font-size: 48px;
  margin-bottom: 14px;
}

/* --- CTA band --- */
.ctaband {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ctaband img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .22;
}
.ctaband::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-2), rgba(255, 255, 255, .55));
  z-index: 1;
}
.ctaband .wrap {
  position: relative;
  z-index: 2;
  padding: 72px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.ctaband h2 {
  font-size: clamp(26px, 3.6vw, 42px);
  max-width: 640px;
}
.ctaband h2 em {
  font-style: normal;
  color: var(--accent);
}
.ctaband p {
  color: var(--muted);
  margin-top: 10px;
}

/* --- Service hero (detail page) --- */
.svhero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.svhero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
}
.svhero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 12%, rgba(238, 242, 247, .55));
  z-index: 1;
}
.svhero .wrap {
  position: relative;
  z-index: 2;
  padding: 60px 28px 56px;
}
.svhero .cat {
  display: inline-block;
  background: var(--steel);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .05em;
  padding: 7px 14px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.svhero h1 {
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 900;
  text-transform: none;
  max-width: 860px;
}

/* --- Article layout (detail page) --- */
.svlayout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
.svbody p {
  margin-bottom: 16px;
  color: #34465a;
  font-size: 16.5px;
}
.svbody h2 {
  font-size: 24px;
  text-transform: none;
  margin: 32px 0 16px;
}
.svbody figure { margin: 24px 0; }
.svbody figure img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.svbody ul {
  margin: 0 0 16px 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.svbody ul li {
  position: relative;
  padding-left: 30px;
  color: #34465a;
}
.svbody ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
}
.svbody ul li b { color: var(--text); }

.desc-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.desc-imgs img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* --- Steps (.no divs must be EMPTY — CSS counter generates 01, 02 …) --- */
.steps {
  display: grid;
  gap: 0;
  margin: 20px 0 8px;
  counter-reset: s;
}
.step {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step .no {
  counter-increment: s;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #160a00;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
}
.step .no::before { content: counter(s, decimal-leading-zero); }
.step .c b {
  display: block;
  font-size: 16.5px;
  text-transform: none;
  margin-bottom: 3px;
}
.step .c span {
  color: var(--muted);
  font-size: 14.5px;
}

/* --- Sidebar --- */
.svside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 20px;
}
.cardbox {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 24px;
}
.cardbox.hl { border-top: 3px solid var(--accent); }
.cardbox h3 {
  font-size: 18px;
  text-transform: none;
  margin-bottom: 12px;
}
.cardbox p {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 18px;
}
.cardbox .btn {
  width: 100%;
  justify-content: center;
}
.cardbox .ph {
  font-size: 22px;
  font-weight: 700;
  color: var(--steel);
  margin-top: 14px;
  display: block;
}
.otherlist {
  list-style: none;
  display: grid;
  gap: 2px;
}
.otherlist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text);
  transition: .2s;
  text-decoration: none;
}
.otherlist li:last-child a { border-bottom: 0; }
.otherlist a:hover { color: var(--accent); }
.otherlist a.on {
  color: var(--accent);
  font-weight: 500;
}

/* --- Related section --- */
.related {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.related .top { margin-bottom: 36px; }

/* --- Responsive --- */
@media (max-width: 960px) {
  .svlayout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .svside { position: static; }
  .svcgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
  .desc-imgs { grid-template-columns: 1fr; }
  .svcgrid { grid-template-columns: 1fr; }
}
