/* Instytut Łączności PIB | blok „Usługi – siatka” (wtyczka CMS)
   Wszystkie klasy mają prefiks svc-, więc nie wpływają na istniejące style strony.
   Jednostki w px (root strony ma font-size 21.33px, więc rem skalowałby się inaczej niż w projekcie). */

.svc-section {
  background: var(--c-primary, #233d42);
  color: #ffffff;
  font-family: var(--font, 'Archivo', sans-serif);
  padding: 85px 0 100px;
}
.svc-section a { color: #ffffff; }
.svc-section a:hover { color: #dcede1; }

.svc-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 91px);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.svc-head { display: flex; flex-direction: column; gap: 20px; }
.svc-title {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.svc-title a { text-decoration: none; }
.svc-title__sub { font-weight: 500; color: #dcede1; }
.svc-contact { margin: 0; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.svc-contact strong { color: #ffffff; }

/* Siatka: 6 kolumn; duży kafel = 3 kolumny, mały = 2 kolumny */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 48px 32px;
}
.svc-tile { grid-column: span 2; min-width: 0; }
.svc-tile--large { grid-column: span 3; }
.svc-tile--small { grid-column: span 2; }
/* „Automatycznie”: pierwsze dwa kafle w siatce są duże (nth-of-type pomija elementy
   <template>, którymi CMS opakowuje wtyczki w trybie edycji) */
.svc-tile--auto:nth-of-type(-n+2) { grid-column: span 3; }

.svc-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: #ffffff;
}
a.svc-card:hover { color: #ffffff; }

.svc-shot {
  position: relative;
  aspect-ratio: 1890 / 895;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .25s ease, box-shadow .25s ease;
}
a.svc-card:hover .svc-shot,
a.svc-card:focus-visible .svc-shot { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
a.svc-card:hover .svc-arrow,
a.svc-card:focus-visible .svc-arrow { background: #ffffff; }
a.svc-card:focus-visible { outline: 3px solid #dcede1; outline-offset: 6px; border-radius: 6px; }

.svc-bar {
  height: 16px; flex: 0 0 16px; background: #e9edee;
  display: flex; align-items: center; gap: 4px; padding: 0 7px;
}
.svc-dot { width: 5px; height: 5px; border-radius: 50%; background: #b9c3c5; }
.svc-url {
  margin-left: 6px; flex: 1; height: 10px; border-radius: 5px; background: #ffffff;
  font: 500 7px/10px var(--font, 'Archivo', sans-serif); color: #5b6b6e;
  padding-left: 6px; white-space: nowrap; overflow: hidden;
}
.svc-page { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.svc-page__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Plansza zastępcza, gdy nie wgrano zrzutu ekranu */
.svc-ph {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 8%;
  background: linear-gradient(110deg, #4c6c66 0%, #7d978f 55%, #cfe2d6 100%);
}
.svc-ph__label {
  font: 900 clamp(14px, 1.8vw, 26px)/1.15 var(--font, 'Archivo', sans-serif);
  color: #ffffff; text-align: center;
}

.svc-badge {
  position: absolute; top: 24px; right: 8px;
  background: #e8792e; color: #ffffff;
  font: 700 11px/1 var(--font, 'Archivo', sans-serif);
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px;
}
.svc-badge--planned { background: #dcede1; color: #233d42; }

/* Kafel bez linku (np. usługa planowana) */
.svc-card--static { opacity: .92; }
.svc-card--static .svc-shot { background: #2c4a50; box-shadow: none; border: 1px dashed rgba(220, 237, 225, .55); }

.svc-cap {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 16px;
}
.svc-name { font: 800 19px/1.3 var(--font, 'Archivo', sans-serif); }
.svc-meta { margin-top: 4px; font: 500 15px/1.4 var(--font, 'Archivo', sans-serif); color: rgba(255, 255, 255, .72); }
.svc-arrow {
  flex: 0 0 44px; width: 44px; height: 44px; background: #dcede1; color: #233d42;
  display: flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.svc-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.svc-foot { display: flex; justify-content: flex-end; }
.svc-foot__link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: 6px;
}

/* Tablet: 2 kolumny; telefon: 1 kolumna */
@media (max-width: 900px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-tile,
  .svc-tile--large,
  .svc-tile--small,
  .svc-tile--auto:nth-of-type(-n+2) { grid-column: span 1; }
}
@media (max-width: 600px) {
  .svc-section { padding: 56px 0 64px; }
  .svc-inner { gap: 40px; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .svc-foot { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-shot, .svc-arrow { transition: none; }
  a.svc-card:hover .svc-shot,
  a.svc-card:focus-visible .svc-shot { transform: none; }
}
