/* Рабочий CSS темы.
 * Подтягиваем исходный макетный файл из assets/css/main.css
 * и дальше правим/перекрываем стили уже здесь.
 */
@import url("../assets/css/main.css");

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pill:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  padding: 0 10px;
  font-weight: 700;
}

body.ruyxd-modal-open {
  overflow: hidden;
}

.ruyxd-modal[hidden] {
  display: none !important;
}

.ruyxd-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ruyxd-modal__dialog {
  width: min(720px, 100%);
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 22px 22px 26px;
}

.ruyxd-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ruyxd-modal__title {
  margin: 0;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text-black);
}

.ruyxd-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(132, 11, 172, 0.12);
  color: var(--accent);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ruyxd-modal__close:hover {
  background: rgba(132, 11, 172, 0.18);
}

/* CF7: убираем дефолтные отступы, чтобы форма с нашими классами выглядела как макет. */
.wpcf7 form {
  margin: 0;
}

/* Текстовая область "вопрос" всегда вписывается в карточку/попап. */
textarea.order-form__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  min-height: 110px;
  resize: vertical;
  padding-top: 12px;
  padding-bottom: 12px;
}


.wpcf7-response-output {
  margin: 14px 0 0 !important;
  padding: 10px 14px !important;
  border-radius: 14px;
  font-size: 14px;
}

.wpcf7-not-valid-tip {
  font-size: 12px;
  margin-top: 6px;
}

.wpcf7-spinner {
  display: none;
}

.header-burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.header-burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header.header--menu-open .header-burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header.header--menu-open .header-burger span:nth-child(2) {
  opacity: 0;
}

.header.header--menu-open .header-burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .header {
    position: sticky;
  }

  .sidebar {
    display: none;
  }

  .body {
    margin-left: 0;
    padding-top: 20px;
  }

  .header__inner--main {
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 32px;
    height: auto;
    gap: 24px;
  }

  .header-brand {
    align-items: center;
  }

  .header-main__pic {
    display: none;
  }

  .header-contacts__address {
    display: none;
  }

  .header-contacts {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 16px;
    align-items: start;
  }

  .header-contacts__group {
    width: 100%;
    max-width: 320px;
  }

  .header-contacts__group--address {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 260px;
    gap: 0;
  }

  .header-contacts__group--phones {
    grid-column: 1;
    justify-self: end;
    max-width: 200px;
  }

  .header-contacts__group--action {
    grid-column: 2;
    justify-self: start;
    max-width: 200px;
    gap: 10px;
  }

  .header-contacts__group--address,
  .header-contacts__group--phones,
  .header-contacts__group--action {
    width: 100%;
  }

  .header-contacts__group--address .header-contacts__btn--accent,
  .header-contacts__group--action .header-contacts__btn--primary {
    width: 100%;
  }

  .header-contacts__item {
    padding: 0;
  }

  .header-top--nav {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header__inner--top {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-burger {
    display: inline-flex;
    order: 1;
  }

  .header-search {
    order: 2;
    margin-left: auto;
    width: 190px;
    height: 32px;
  }

  .header-nav {
    order: 3;
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    border-radius: 0;
    overflow: auto;
    z-index: 30;
  }

  .header.header--menu-open .header-nav {
    display: block;
  }

  .header.header--menu-open .header-search {
    display: none;
  }

  .header.header--menu-open .header-burger {
    position: fixed;
    top: 8px;
    left: 16px;
    z-index: 40;
  }

  .header-nav__link {
    display: block;
    padding: 12px 24px;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--text-dark);
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .header-nav__link:last-child {
    border-bottom: none;
  }

  .header-nav__link--active {
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
    padding-left: 56px;
    padding-right: 56px;
  }

  .header-top--categories {
    display: none;
  }

  .header.header--menu-open .header-main {
    display: none;
  }
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1024px) {
  html,
  body {
    overflow-x: hidden;
  }

  body.is-menu-open {
    overflow: hidden;
  }

  .page {
    max-width: 100%;
  }

  .body__container {
    gap: 48px;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .hero__left {
    width: 100%;
    height: auto;
    padding: 0;
    gap: 24px;
  }

  .hero__text {
    width: auto;
    max-width: 640px;
  }

  .hero__title {
    font-size: 36px;
    line-height: 1.15;
    text-align: center;
  }

  .hero__desc {
    width: auto;
    text-align: center;
  }

  .hero__image {
    height: 320px;
  }

  .buy-diploma__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pill {
    padding: 6px 16px;
  }

  .popular-docs {
    height: auto;
  }

  .popular-docs__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .popular-docs__all {
    align-self: flex-end;
  }

  .popular-docs__grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .popular-docs__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }

  .doc-card {
    width: 100%;
    height: auto;
    padding: 12px;
  }

  .doc-card__name {
    width: auto;
    white-space: normal;
    line-height: 1.3;
  }

  .benefits__content {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }

  .benefits__art {
    width: 100%;
    height: auto;
    aspect-ratio: 263 / 398;
  }

  .benefit-card {
    height: auto;
  }

  .steps__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
  }

  .step-card {
    width: 100%;
    height: auto;
    padding: 24px 12px;
  }

  .prices-group__list {
    grid-template-columns: 1fr;
  }

  .price-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .price-card__thumb {
    width: 100%;
    height: 160px;
  }

  .price-card__side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .prices-cta {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .prices-cta__content {
    max-width: 100%;
  }

  .prices-cta__text {
    text-align: center;
    font-size: 18px;
  }

  .prices-cta__side {
    width: 100%;
  }

  .prices-cta__btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .header-search {
    width: 160px;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__image {
    height: 240px;
  }

  .buy-diploma__row {
    grid-template-columns: 1fr;
  }

  .popular-docs__row {
    grid-template-columns: 1fr;
  }

  .steps__row {
    grid-template-columns: 1fr;
  }

  .price-card__side {
    flex-direction: column;
    align-items: flex-start;
  }

  .prices-cta__btn {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .footer__inner {
    padding: 24px 16px;
    gap: 24px;
  }

  .footer-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .footer-nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
    gap: 8px;
  }

  .footer-nav__link--active {
    background: rgba(255, 255, 255, 0.22);
  }

  .footer-bottom {
    width: 100%;
    flex-direction: column;
    gap: 24px;
  }

  .footer-brand {
    width: auto;
  }

  .footer-contacts {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    justify-items: center;
  }

  .footer-contacts__group {
    width: 100%;
    max-width: 320px;
  }

  .footer-contacts__group--meta {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 360px;
    gap: 12px;
  }

  .footer-meta__time,
  .footer-meta__address {
    text-align: center;
  }

  .footer-pay,
  .footer-socials {
    max-width: 100%;
    height: auto;
  }

  .footer-contacts__group--phones,
  .footer-contacts__group--actions {
    align-items: center;
  }

  .footer-contacts__item {
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .footer-contacts {
    grid-template-columns: 1fr;
  }

  .footer-contacts__group--phones,
  .footer-contacts__group--actions {
    grid-column: 1 / -1;
  }
}

