/*
 * Súbor: css/components/cross-page-cta.css
 * Obsah: Spoločné CTA medzi službami: rozloženie, nadpis, voliteľné logo nad tlačidlom bez viditeľného čierneho podkladu, samostatný svetlý pás so štandardným primárnym tlačidlom všetkých služieb, potrubia a mobilné zoznamy.
 * Použitie: sluzba-havarie.html (odkaz na prípojky), sluzba-pripojky.html (odkaz na havárie).
 * Zapojenie: Jeden <link rel="stylesheet" href="css/components/cross-page-cta.css"> pred paletou každej stránky.
 * Závislosti: css/general/base.css (.btn, .container). Vlastné farby cieľovej služby sú nezávislé od témy hostiteľskej stránky.
 * Varianty: .cross-page-cta--connections, .cross-page-cta--emergency.
 * Farby: --cross-page-cta-blue a --cross-page-cta-yellow sú spoločné tokeny aj pre príslušné palety stránok.
 */
:root {
  --cross-page-cta-blue: #13BFEA;
  --cross-page-cta-yellow: #F3C100;
}

.cross-page-cta {
  --cross-page-cta-background: #243142;
  --cross-page-cta-accent: var(--cross-page-cta-blue);
  padding-block: 36px;
  background: var(--cross-page-cta-background);
  color: #fff;
}

.cross-page-cta--emergency {
  --cross-page-cta-accent: var(--cross-page-cta-yellow);
}

.cross-page-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cross-page-cta__copy { max-width: 760px; }

.cross-page-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 16px;
  max-width: 100%;
}

.cross-page-cta__logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  /* Zdrojový obrázok má čierny podklad; screen ho vizuálne zlúči s pozadím CTA. */
  mix-blend-mode: screen;
}

.cross-page-cta__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--cross-page-cta-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cross-page-cta__eyebrow::before {
  content: "";
  flex: 0 0 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--cross-page-cta-accent);
}

.cross-page-cta h2 {
  margin-bottom: 10px;
  color: var(--cross-page-cta-accent);
  font-size: clamp(24px, 2.6vw, 32px);
}

.cross-page-cta__copy > p:not(.cross-page-cta__eyebrow) {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* Specificity keeps destination colors above the host page's primary-button palette. */
.cross-page-cta .btn.btn--primary.cross-page-cta__button {
  flex-shrink: 0;
  border-color: var(--cross-page-cta-accent);
  background: var(--cross-page-cta-accent);
  color: var(--cross-page-cta-background);
  white-space: normal;
  text-align: center;
}

.cross-page-cta .btn.btn--primary.cross-page-cta__button:hover {
  border-color: color-mix(in srgb, var(--cross-page-cta-accent) 80%, white);
  background: color-mix(in srgb, var(--cross-page-cta-accent) 80%, white);
}

.cross-page-cta .cross-page-cta__button:focus-visible {
  outline: 3px solid var(--cross-page-cta-accent);
  outline-offset: 5px;
}

.cross-page-cta-footer {
  padding-block: clamp(32px, 4vw, 56px);
  background: var(--bg);
  text-align: center;
}

.cross-page-cta__services {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cross-page-cta__services li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  padding: 20px 14px;
  border: 1px solid color-mix(in srgb, var(--cross-page-cta-accent) 35%, var(--cross-page-cta-background));
  border-radius: 12px;
  background: color-mix(in srgb, var(--cross-page-cta-accent) 10%, var(--cross-page-cta-background));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.cross-page-cta--emergency .cross-page-cta__services li { min-height: 156px; }

.cross-page-cta__types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.cross-page-cta__service-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--cross-page-cta-background);
}

.cross-page-cta__services img { width: 40px; height: 40px; }
.cross-page-cta__illustration { display: block; width: 100%; height: auto; margin-top: 28px; }

/* Continuous, full-width pipes; labels remain live, accessible HTML text. */
.cross-page-cta__pipes {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 8px 0;
  list-style: none;
}

.cross-page-cta__pipe {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 20px;
  border-block: 1px solid rgb(255 255 255 / 18%);
  box-shadow: inset 0 3px 4px rgb(255 255 255 / 12%),
    inset 0 -5px 7px rgb(0 0 0 / 24%), 0 6px 12px rgb(0 0 0 / 18%);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.cross-page-cta__pipe--sewer {
  min-height: 78px;
  background: linear-gradient(#ad4a1f, #ed9b57 30%, #dc803b 52%, #a6441b);
  color: #301709;
  font-size: clamp(18px, 2vw, 24px);
}

/* Two socket collars reinforce the larger diameter of the sewer pipe. */
.cross-page-cta__pipe--sewer::before,
.cross-page-cta__pipe--sewer::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: clamp(16px, 2.2vw, 30px);
  border: 1px solid #a74d25;
  border-radius: 4px;
  background: linear-gradient(#bd5d2e, #f1a66c 33%, #d27a40 60%, #94401c);
  box-shadow: 3px 0 5px rgb(0 0 0 / 24%), inset 3px 0 2px rgb(255 255 255 / 18%);
}

.cross-page-cta__pipe--sewer::before { left: 12%; }
.cross-page-cta__pipe--sewer::after { right: 12%; }

.cross-page-cta__pipe--water {
  background: linear-gradient(#091b27, #25485c 35%, #142f40 60%, #081820);
  color: #6bd8ff;
  border-block-color: #2787ad;
}

.cross-page-cta__pipe--gas {
  background: linear-gradient(#ac7907, #ffe379 28%, #f4c533 55%, #bd8a10);
  color: #352706;
}

.cross-page-cta__pipe--electric {
  background: repeating-linear-gradient(90deg, transparent 0 5px, rgb(53 5 5 / 35%) 5px 7px, rgb(255 191 169 / 25%) 7px 9px),
    linear-gradient(#7f1916, #e85b49 30%, #c4372e 60%, #7f1916);
  color: #fff;
}

.cross-page-cta__pipe--electric span {
  padding: 2px 12px;
  border-radius: 3px;
  background: #9b2822;
}

@media (max-width: 767px) {
  .cross-page-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cross-page-cta__services {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .cross-page-cta__services li {
    grid-column: span 2;
    padding: 14px 6px;
    gap: 8px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.3;
  }

  .cross-page-cta__services li:nth-child(3n + 1):nth-last-child(2) { grid-column: 2 / span 2; }
  .cross-page-cta__services li:nth-child(3n + 2):last-child { grid-column: 4 / span 2; }
  .cross-page-cta--emergency .cross-page-cta__services li { min-height: 104px; }
  .cross-page-cta__service-icon { width: 40px; height: 40px; border-radius: 8px; }
  .cross-page-cta__services img { width: 26px; height: 26px; }
  .cross-page-cta__types { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cross-page-cta__illustration { margin-top: 20px; }
  .cross-page-cta__pipes { gap: 14px; margin-top: 24px; }
  .cross-page-cta__pipe { min-height: 40px; }
  .cross-page-cta__pipe--sewer { min-height: 64px; }
  .cross-page-cta__pipe--sewer::before { left: 4%; }
  .cross-page-cta__pipe--sewer::after { right: 4%; }
}
