/*
 * Súbor: css/components/commercial-services.css
 * Obsah: Spoločná sekcia pre investorov a správcov; používa sa na sanáciách aj stavbe rodinných domov.
 * Použitie: sanacie-stavieb-a-staticke-zabezpecenie.html, rodinne-domy-hruba-stavba-a-holodom.html, rodinne-domy-hruba-stavba-a-holodom-bratislava.html.
 * Zapojenie: Po css/main.css; presné poradie uvádza css/README.md.
 * Závislosti: css/main.css, jeho farebné premenné a triedy komponentu.
 */

.commercial-services {
  padding-block: clamp(48px, 6vw, 88px);
  background: var(--surface);
}

.commercial-services__heading {
  max-width: 1050px;
  margin-bottom: 36px;
}

.commercial-services__heading>p:last-child {
  max-width: 78ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.commercial-services__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}

.commercial-services__photo {
  position: relative;
  min-height: 480px;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--palette-light-alt);
}

.commercial-services__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}

.commercial-services__photo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 24px 24px;
  background: linear-gradient(transparent, rgb(var(--palette-dark-rgb) / 92%));
  color: var(--palette-light);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.commercial-services__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  min-width: 0;
}

.commercial-services__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.commercial-services__feature {
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.commercial-services__feature svg {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.commercial-services__feature h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.3;
}

.commercial-services__feature p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

@media (max-width: 1023px) {
  .commercial-services__layout {
    grid-template-columns: 1fr;
  }

  .commercial-services__photo {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .commercial-services__photo img {
    object-position: center 45%;
  }
}

@media (max-width: 599px) {
  .commercial-services__heading>p:last-child {
    font-size: 16px;
  }

  .commercial-services__photo {
    aspect-ratio: 4 / 3;
  }

  .commercial-services__features {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .commercial-services__content>.btn {
    width: 100%;
  }
}
