.af-departments {
  --af-departments-title-desktop: 50px;
  --af-departments-title-mobile: 30px;
  --af-department-title: 22px;
  --af-department-text: 13px;
  --af-department-contact: 13px;
  padding: 84px max(48px, calc((100vw - 1260px) / 2));
  background: #f7f8fa;
  color: var(--ink, #0a1730);
}

.af-departments__heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  align-items: end;
  gap: 70px;
}

.af-departments__kicker {
  grid-column: 1 / -1;
  margin: 0 0 -42px;
  color: var(--red, #e0262f);
  font-size: var(--fs-sectionEyebrow, 11px);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.af-departments__title {
  max-width: 760px;
  margin: 0;
  color: var(--ink, #0a1730);
  font-size: var(--af-departments-title-desktop);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.af-departments__intro {
  max-width: 560px;
  margin: 0;
  color: var(--muted, #667085);
  font-size: var(--fs-sectionDescriptionDesktop, 17px);
  line-height: 1.7;
}

.af-departments__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 1120px;
  margin: 46px auto 0;
}

.af-department {
  flex: 0 1 calc((100% - 42px) / 4);
  min-width: 0;
  min-height: 260px;
  padding: 24px 22px;
  border: 1px solid var(--line, #dce2ea);
  background: #fff;
}

.af-department__image {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 0 22px;
  object-fit: contain;
}

.af-department__placeholder {
  display: grid;
  place-items: center;
  border: 1px solid #f1a5aa;
  color: var(--red, #e0262f);
  font-size: 23px;
  font-weight: 900;
}

.af-department__title {
  margin: 0;
  color: var(--ink, #0a1730);
  font-size: var(--af-department-title);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.af-department__description {
  min-height: 64px;
  margin: 13px 0 0;
  color: var(--muted, #667085);
  font-size: var(--af-department-text);
  line-height: 1.65;
}

.af-department__links {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.af-department__link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  color: var(--ink, #0a1730);
  font-size: var(--af-department-contact);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.af-department__link:hover,
.af-department__link:focus-visible {
  color: var(--red, #e0262f);
}

.af-department__link-icon {
  display: grid;
  flex: 0 0 23px;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #f0a2a7;
  color: var(--red, #e0262f);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 1060px) {
  .af-departments { padding: 68px 28px; }
  .af-departments__heading { grid-template-columns: 1fr; gap: 22px; }
  .af-departments__kicker { grid-column: auto; margin-bottom: 0; }
  .af-department { flex-basis: calc((100% - 14px) / 2); }
}

@media (max-width: 620px) {
  .af-departments { padding: 56px 18px; }
  .af-departments__title { font-size: var(--af-departments-title-mobile); }
  .af-departments__intro { font-size: var(--fs-sectionDescriptionMobile, 15px); }
  .af-departments__grid { margin-top: 38px; }
  .af-department { flex-basis: 100%; min-height: 0; padding: 25px 23px; }
  .af-department__description { min-height: 0; }
}

/* Wyśrodkowany blok danych kontaktowych na czerwonym tle. */
#contact.contact-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 0;
  padding: 48px 32px;
}

#contact .contact-lead {
  display: none;
}

#contact .contact-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 1100px);
  margin: 0 auto;
  border-top: 1px solid #ffffff52;
  border-bottom: 1px solid #ffffff52;
  align-content: initial;
}

#contact .contact-details > div {
  min-height: 112px;
  padding: 25px 34px;
  border-top: 0;
  border-left: 1px solid #ffffff52;
  align-content: center;
}

#contact .contact-details > div:first-child {
  border-left: 0;
}

#contact .af-contact-map-link {
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: opacity 160ms ease, text-decoration-color 160ms ease;
}

#contact .af-contact-map-link:hover {
  text-decoration-color: currentColor;
}

#contact .af-contact-map-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

#contact .af-contact-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  margin-top: 7px;
  padding: 0 17px;
  border: 1px solid #fff;
  background: #fff;
  color: var(--red, #e0262f);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

#contact .af-contact-map-button:hover {
  background: transparent;
  color: #fff;
}

#contact .af-contact-map-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 760px) {
  #contact.contact-section {
    padding: 38px 22px;
  }

  #contact .contact-details {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
  }

  #contact .contact-details > div {
    min-height: 0;
    padding: 20px 8px;
    border-top: 1px solid #ffffff52;
    border-left: 0;
  }

  #contact .contact-details > div:first-child {
    border-top: 0;
  }
}

/* Mniejszy odstęp między tytułem kategorii a kafelkami oferty. */
.offer-categories-block .category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  border: 0;
}

.offer-categories-block .category-card {
  box-sizing: border-box;
  flex: 0 1 calc((100% - 40px) / 5);
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 118px;
  padding: 14px 12px;
  border: 1px solid #ccd3dc;
}

.offer-categories-block .category-card > span {
  font-size: 10.5px;
}

.offer-categories-block .category-card h4 {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.16;
}

.offer-categories-block .category-card p {
  font-size: 10.5px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .offer-categories-block .category-card {
    flex-basis: calc((100% - 30px) / 4);
  }
}

@media (max-width: 900px) {
  .offer-categories-block .category-card {
    flex-basis: calc((100% - 20px) / 3);
  }
}

@media (max-width: 680px) {
  .offer-categories-block .category-card {
    flex-basis: calc((100% - 10px) / 2);
    min-height: 0;
  }
}

@media (max-width: 450px) {
  .offer-categories-block .category-card {
    flex-basis: 100%;
  }
}
