/* AVENTECH Innovation — uslugi.css
   Wspólny plik CSS dla 5 landingów usługowych:
     /projektowanie-maszyn/
     /automatyzacja-produkcji/
     /dokumentacja-techniczna/
     /inzynieria-odwrotna/
     /doradztwo-techniczne/

   Klasy generyczne — działają dla każdego landingu:
     .service-hero, .service-hero-inner, .service-hero-lead, .service-hero-cta
     .service-section (+ .is-surface dla alternującego tła)
     .service-intro (self-contained answer / lead pod H2)
     .service-section-label (uppercase label nad listą)
     .service-list (+ .service-list-2col)
     .feature-grid / .feature-card (kategorie, karty)
     .differentiators / .differentiator (sekcja wyróżników, stacked)
     .service-quote (blockquote)

   Klasy NIE konfliktują z home.css (.hero, .proof, .services itd.).
   Wyłącznie zmienne z tokens.css. Reuse .btn/.container/.section-py.
*/

/* ==========================================================================
   1) HERO (ciemne tło, placeholder docelowego visualu)
   ========================================================================== */
.service-hero {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  min-height: clamp(420px, 60vh, 600px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.service-hero-inner {
  padding-block: var(--space-12);
  width: 100%;
  position: relative;
  z-index: 1;
}

.service-hero h1 {
  color: var(--color-text-inverse);
  font-size: var(--fs-4xl);
  max-width: 24ch;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.service-hero-lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-base);
  color: var(--color-grey-300);
  max-width: 72ch;
  margin-bottom: var(--space-8);
}

.service-hero-lead strong {
  color: var(--color-text-inverse);
  font-weight: var(--fw-semibold);
}

.service-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Override .btn-outline w hero (jasna ramka na ciemnym tle) */
.service-hero .btn-outline {
  color: var(--color-text-inverse);
  border-color: var(--color-text-inverse);
}

.service-hero .btn-outline:hover {
  background: var(--color-orange);
  color: var(--color-text-inverse);
  border-color: var(--color-orange);
  filter: none;
}

@media (max-width: 768px) {
  .service-hero { min-height: 50vh; }
  .service-hero-inner { padding-block: var(--space-10); }
}

/* ==========================================================================
   2) SECTION — generyczna sekcja landingu (alternujące tła)
   ========================================================================== */
.service-section {
  background: var(--color-bg);
}

.service-section.is-surface {
  background: var(--color-bg-surface);
}

.service-section h2 {
  max-width: 32ch;
  margin-bottom: var(--space-5);
  line-height: var(--lh-tight);
}

.service-section h3 {
  font-size: var(--fs-2xl);
  margin: var(--space-10) 0 var(--space-5);
  max-width: 36ch;
  line-height: var(--lh-tight);
}

.service-section > .container > p {
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

.service-section > .container > p strong {
  font-weight: var(--fw-semibold);
}

/* ==========================================================================
   3) INTRO — self-contained answer pod H2
   ========================================================================== */
.service-intro {
  font-size: var(--fs-md) !important;
  color: var(--color-text-muted) !important;
  max-width: 72ch !important;
  margin-bottom: var(--space-8) !important;
  line-height: var(--lh-base);
}

.service-intro strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

/* ==========================================================================
   4) SECTION LABEL — uppercase nad listami
   ========================================================================== */
.service-section-label {
  font-family: var(--font-heading) !important;
  font-size: var(--fs-xs) !important;
  font-weight: var(--fw-semibold) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange) !important;
  margin: var(--space-6) 0 var(--space-3) !important;
}

/* ==========================================================================
   5) LIST — pomarańczowa kreska jako marker (spójnie z homepage)
   ========================================================================== */
.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8);
}

.service-list li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 2px;
  background: var(--color-orange);
}

.service-list li strong {
  font-weight: var(--fw-semibold);
}

/* 2-kolumnowa wersja dla długich list (np. 14 punktów zakresu) */
.service-list-2col {
  columns: 2;
  column-gap: var(--space-10);
}

.service-list-2col li {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media (max-width: 768px) {
  .service-list-2col { columns: 1; }
}

/* ==========================================================================
   6) FEATURE GRID — karty kategorii (np. 5 typów maszyn w sekcji 3)
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-card {
  background: var(--color-bg);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-orange);
}

.is-surface .feature-card {
  background: var(--color-bg);
}

.feature-card h4 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3);
  line-height: var(--lh-tight);
}

.feature-card p {
  color: var(--color-text);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  margin: 0;
}

.feature-card p strong {
  font-weight: var(--fw-semibold);
}

@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   7) DIFFERENTIATORS — wyróżniki (stacked, sekcja „Dlaczego Aventech")
   ========================================================================== */
.differentiators {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.differentiator {
  background: var(--color-bg);
  padding: var(--space-6);
  border-left: 3px solid var(--color-orange);
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.is-surface .differentiator {
  background: var(--color-bg);
}

.differentiator h3 {
  font-size: var(--fs-xl);
  margin: 0 0 var(--space-3);
  line-height: var(--lh-tight);
  max-width: none;
}

.differentiator > p {
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  margin: 0 0 var(--space-3);
  max-width: 72ch;
}

.differentiator > p:last-child {
  margin-bottom: 0;
}

.differentiator > p strong {
  font-weight: var(--fw-semibold);
}

/* ==========================================================================
   8) SERVICE QUOTE — blockquote z cytatem (np. „0,01 mm / 1500 kg")
   ========================================================================== */
.service-quote {
  margin: var(--space-4) 0 0;
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-surface);
  border-left: 4px solid var(--color-orange);
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--color-text);
  line-height: var(--lh-base);
}

.is-surface .service-quote {
  background: var(--color-bg);
}

.service-quote p {
  margin: 0;
}

/* ==========================================================================
   9) PROCESS — timeline 7 kroków (numerowane)
   Tu numeracja jest częścią UX kroku (sekwencja w czasie), więc <ol>.
   ========================================================================== */
.service-process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.service-process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-5);
  align-items: flex-start;
  position: relative;
}

/* Pionowa linia łącząca kroki */
.service-process-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: calc(-1 * var(--space-6));
  width: 2px;
  background: var(--color-border);
}

.service-process-number {
  width: 56px;
  height: 56px;
  background: var(--color-orange);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  line-height: 1;
  position: relative;
  z-index: 1;
}

.service-process-content {
  padding-top: var(--space-2);
}

.service-process-content h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-2);
  line-height: var(--lh-tight);
}

.service-process-duration {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-surface);
  border-left: 2px solid var(--color-orange);
}

.is-surface .service-process-duration {
  background: var(--color-bg);
}

.service-process-content p {
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  margin: 0;
  max-width: 72ch;
}

@media (max-width: 600px) {
  .service-process-step {
    grid-template-columns: 44px 1fr;
    gap: var(--space-4);
  }
  .service-process-step:not(:last-child)::before {
    left: 21px;
    top: 44px;
  }
  .service-process-number {
    width: 44px;
    height: 44px;
    font-size: var(--fs-md);
  }
}

/* ==========================================================================
   10) INDUSTRIES — 3 podsekcje segmentów klientów
   ========================================================================== */
.service-industries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-industry {
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-orange);
}

.is-surface .service-industry {
  background: var(--color-bg);
}

.service-industry h3 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-3);
  line-height: var(--lh-tight);
  max-width: none;
}

.service-industry p {
  color: var(--color-text);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  margin: 0;
}

.service-industry p strong {
  font-weight: var(--fw-semibold);
}

@media (max-width: 1024px) {
  .service-industries { grid-template-columns: 1fr; }
}

/* ==========================================================================
   11) CASES — 3 karty case study tekstowe (bez zdjęć)
   ========================================================================== */
.service-cases {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.service-case {
  background: var(--color-bg);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-orange);
}

.is-surface .service-case {
  background: var(--color-bg);
}

.service-case h3 {
  font-size: var(--fs-xl);
  margin: 0 0 var(--space-4);
  line-height: var(--lh-tight);
  max-width: none;
}

.service-case dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-surface);
  border-left: 3px solid var(--color-orange);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.is-surface .service-case dl {
  background: var(--color-bg);
}

.service-case dt {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
  padding-top: 0.2em;
}

.service-case dd {
  margin: 0;
  color: var(--color-text);
}

.service-case dd strong {
  font-weight: var(--fw-semibold);
}

.service-cases-cta {
  margin-top: var(--space-8);
  display: flex;
  justify-content: flex-start;
}

/* ==========================================================================
   12) FAQ — natywne <details>/<summary>, własne style (NIE z home.css)
   ========================================================================== */
.service-faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-faq-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-orange);
  transition: box-shadow var(--transition-base);
}

.is-surface .service-faq-item {
  background: var(--color-bg);
}

.service-faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.service-faq-item summary {
  list-style: none;
  padding: var(--space-4) var(--space-12) var(--space-4) var(--space-5);
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  transition: background var(--transition-base);
}

.service-faq-item summary::-webkit-details-marker {
  display: none;
}

.service-faq-item summary:hover {
  background: var(--color-bg-surface);
}

.is-surface .service-faq-item summary:hover {
  background: var(--color-bg);
  opacity: 0.92;
}

.service-faq-item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.service-faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--color-orange);
  border: 2px solid var(--color-orange);
}

.service-faq-item[open] summary::after {
  content: "−";
}

.service-faq-answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

.service-faq-answer p {
  margin: 0 0 var(--space-3);
}

.service-faq-answer p:last-child {
  margin-bottom: 0;
}

.service-faq-answer p strong {
  font-weight: var(--fw-semibold);
}

.service-faq-answer a {
  color: var(--color-orange);
  font-weight: var(--fw-semibold);
}

.service-faq-answer a:hover {
  filter: brightness(0.88);
}

.service-faq-answer ul {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
}

.service-faq-answer ul li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
  line-height: var(--lh-base);
}

.service-faq-answer ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 2px;
  background: var(--color-orange);
}

.service-faq-answer ul li strong {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

/* ==========================================================================
   13) CTA — formularz placeholder + dane firmy (2-col)
   ========================================================================== */
.service-cta {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--space-8);
  align-items: start;
}

.service-cta-form {
  min-height: 420px;
  padding: var(--space-10);
  background: var(--color-bg-surface);
  border: 2px dashed var(--color-border);
  border-top: 3px solid var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.is-surface .service-cta-form {
  background: var(--color-bg);
}

.service-cta-form-placeholder {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  margin: 0;
}

.service-cta-form-placeholder strong {
  display: block;
  color: var(--color-text);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.service-cta-info {
  background: var(--color-bg-surface);
  padding: var(--space-8);
  border-top: 3px solid var(--color-orange);
}

.is-surface .service-cta-info {
  background: var(--color-bg);
}

.service-cta-info-name {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  color: var(--color-text);
  margin: 0 0 var(--space-4);
  letter-spacing: 0.02em;
}

.service-cta-identifiers {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-5);
  font-size: var(--fs-sm);
}

.service-cta-identifiers dt {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.service-cta-identifiers dd {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
}

.service-cta-info address {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.service-cta-response {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border-left: 3px solid var(--color-orange);
}

.is-surface .service-cta-response {
  background: var(--color-bg-surface);
}

.service-cta-response strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

@media (max-width: 1024px) {
  .service-cta {
    grid-template-columns: 1fr;
  }
  .service-cta-form {
    min-height: 320px;
    padding: var(--space-8);
  }
}

/* ==========================================================================
   14) OTHER SERVICES — blok linków do pozostałych 4 landingów
   ========================================================================== */
.other-services {
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--color-bg-surface);
  border-top: 3px solid var(--color-orange);
}

.is-surface .other-services {
  background: var(--color-bg);
}

.other-services h3 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-5);
  max-width: none;
}

.other-services-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.other-services-list li {
  padding-left: 0;
}

.other-services-list a {
  display: block;
  padding: var(--space-4);
  background: var(--color-bg);
  border-left: 3px solid var(--color-border);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.is-surface .other-services-list a {
  background: var(--color-bg-surface);
}

.other-services-list a:hover,
.other-services-list a:focus-visible {
  border-left-color: var(--color-orange);
  color: var(--color-orange);
}

.other-services-list a strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  margin-bottom: var(--space-1);
  color: inherit;
}

.other-services-list a .other-services-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .other-services-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   15) MODYFIKATOR: .service-industries--2col
   Dla sekcji z 4 elementami — układ 2×2 zamiast default 3+1.
   Użyte w landingu /dokumentacja-techniczna/ (sekcja „Dla kogo" ma 4 segmenty).
   ========================================================================== */
.service-industries--2col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .service-industries--2col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   16) SERVICE TABLE — generyczna tabela porównawcza/decyzyjna
   Pierwsze użycie: /inzynieria-odwrotna/ (sekcja 6 — rekomendowane metody pomiarowe).
   Industrial styling: cienkie obramowania, thead z pomarańczowym akcentem dolnym,
   hover wierszy. Wrapper .service-table-wrap dla scroll-x na wąskich ekranach.
   ========================================================================== */
.service-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-block: var(--space-6);
  border: 1px solid var(--color-border);
}

.service-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: var(--color-bg);
}

.service-table thead {
  background: var(--color-bg-surface);
  border-bottom: 2px solid var(--color-orange);
}

.service-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  vertical-align: bottom;
}

.service-table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  vertical-align: top;
  line-height: var(--lh-base);
  color: var(--color-text);
}

.service-table td:first-child {
  font-weight: var(--fw-medium);
}

.service-table tbody tr:hover {
  background: var(--color-accent-soft);
}

.service-table strong {
  font-weight: var(--fw-semibold);
}
