/**
 * About Us Page
 * Layout from archive.css (sidebar-left, main, sidebar-right). Here: content and blocks only.
 */

body.page-template-page-about-php {
  background-color: var(--color-background-alt);
  background-image: url(../../img/backing.png);
  background-repeat: repeat;
  background-position: top left;
}

.page-about__main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.page-about__wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: #F6F6F6;
}

/* ========== First block (header, as contacts) ========== */
.page-about__first-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-about__first-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.page-about__title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 38px;
  line-height: 40px;
  color: #303030;
  margin: 0;
}

.page-about__text-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-about__intro {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  margin: 0;
}

.page-about__intro--purple {
  color: #6E4F95;
}

.page-about__intro--gray {
  color: #4D4D4D;
}

.page-about__first-content .page-about__title + .page-about__text-block {
  margin-top: 0;
}

/* ========== Section (Why We Exist, etc.) ========== */
.page-about__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-about__section-title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 32px;
  line-height: 32px;
  color: #303030;
  margin: 0;
}

.page-about__section-lead {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: #4D4D4D;
  margin: 0;
}

.page-about__section-p {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: #4D4D4D;
  margin: 0;
}

/* 4 cards block */
.page-about__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
  border-radius: 18px;
  background: #FFFFFF;
}

.page-about__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1 1 180px;
  min-width: 0;
}

.page-about__card-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.page-about__card-text {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  color: #000000;
  text-align: center;
  margin: 0;
}

/* Quote block (gray background) */
.page-about__quote-block {
  padding: 16px 24px;
  border-radius: 18px;
  background: #F1F1F1;
}

.page-about__quote {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  color: #6E4F95;
  font-style: italic;
  margin: 0;
}

.page-about__quote--center {
  text-align: center;
}

/* List block (What You'll Find) — общий белый блок у .page-about__list-row */
.page-about__list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 24px;
  border-radius: 18px;
  background: #FFFFFF;
  overflow: visible;
}

.page-about__list-block {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Картинка: абсолютное позиционирование — выше list-row, ниже list-block */
.page-about__list-block-img-wrap {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translate(50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.page-about__list-block-img {
  display: block;
  max-height: 280px;
  width: auto;
  height: auto;
  max-width: min(50vw, 320px);
  object-fit: contain;
}

@media (max-width: 1265px) {
  .page-about__list-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .page-about__list-item:nth-child(1) .page-about__list-text,
  .page-about__list-item:nth-child(2) .page-about__list-text,
  .page-about__list-item:nth-child(3) .page-about__list-text,
  .page-about__list-item:nth-child(4) .page-about__list-text,
  .page-about__list-item:nth-child(5) .page-about__list-text {
    max-width: none !important;
    width: 100%;
  }

  .page-about__list-block-img-wrap {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    order: 2;
    text-align: center;
  }
}

.page-about__list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-about__list-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.page-about__list-text {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  color: #4D4D4D;
  margin: 0;
}

@media (min-width: 1266px) {
  .page-about__list-item:nth-child(1) .page-about__list-text { max-width: 471px; }
  .page-about__list-item:nth-child(2) .page-about__list-text { max-width: 400px; }
  .page-about__list-item:nth-child(3) .page-about__list-text { max-width: 372px; }
  .page-about__list-item:nth-child(4) .page-about__list-text { max-width: 372px; }
  .page-about__list-item:nth-child(5) .page-about__list-text { max-width: 450px; }
}

.page-about__classifieds-block {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  border-radius: 18px;
  background: #F5E8EF;
}

.page-about__classifieds-img-wrap {
  flex-shrink: 0;
}

.page-about__classifieds-img {
  display: block;
  max-width: 215px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-left: -40px;
}

.page-about__classifieds-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.page-about__classifieds-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-about__classifieds-svg {
  flex-shrink: 0;
}

.page-about__classifieds-title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 22px;
  line-height: 32px;
  color: #303030;
}

.page-about__classifieds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-about__classifieds-list-item {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: #4D4D4D;
  padding-bottom: 8px;
  border-bottom: 1px solid #F7ADD2;
}

.page-about__classifieds-list-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.page-about__quote-block--last {
  margin-top: 0;
}

/* ===========================================
 * RESPONSIVE (breakpoints: 576, 768, 992, 1100)
 * =========================================== */

@media (min-width: 768px) {
  .page-about__classifieds-block {
    flex-direction: row;
    align-items: center;
  }

  .page-about__classifieds-img-wrap {
    max-width: 215px;
  }
}

@media (max-width: 1165px) {
  .page-about__classifieds-block {
    flex-direction: column-reverse;
    align-items: center;
  }

  .page-about__classifieds-img {
    margin-left: 0;
  }
}

@media (max-width: 1100px) {
  .page-about__cards {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .page-about__card {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (max-width: 767px) {

  .page-about__first-block {
    gap: 12px;
  }

  .page-about__title {
    font-size: 28px;
    line-height: 32px;
  }

  .page-about__intro {
    font-size: 18px;
    line-height: 24px;
  }

  .page-about__section-title {
    font-size: 26px;
    line-height: 32px;
  }

  .page-about__cards {
    padding: 16px;
    border-radius: 14px;
    gap: 12px;
  }

  .page-about__quote-block {
    padding: 16px;
    border-radius: 14px;
  }

  .page-about__list-row {
    flex-direction: column-reverse;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
  }

  .page-about__list-block-img-wrap {
    position: static;
    transform: none;
    order: -1;
    text-align: center;
  }

  .page-about__list-block-img {
    max-height: 200px;
  }

  .page-about__classifieds-block {
    padding: 16px;
    border-radius: 14px;
    gap: 20px;
  }

  .page-about__classifieds-img {
    max-width: 100%;
  }

  .page-about__classifieds-title {
    font-size: 22px;
    line-height: 32px;
  }

  .page-about__main {
    gap: 24px;
  }
}

@media (max-width: 575px) {

  .page-about__title {
    font-size: 38px;
    line-height: 40px;
  }

  .page-about__section-title {
    font-size: 32px;
    line-height: 32px;
  }

  .page-about__intro--gray {
    font-size: 16px;
    line-height: 20px;
 }

  
  .page-about__cards {
    margin-right: 0;
  }

  .page-about__list-row,
  .page-about__classifieds-block,
  .page-about__quote-block {
    padding: 24px 16px;
    border-radius: 18px;
  }

  .page-about__quote-block {
    padding: 16px 24px;
  }

  .page-about__main {
    gap: 24px;
  }

  .page-about__list-block-img {
    max-width: 304px;
    min-height: 256px;
  }
}

@media (min-width: 992px) {

  .page-about__card {
    flex: 1 1 calc(25% - 12px);
  }
}
