/* ============================================================
   Дополнительные стили сайта «Партнёры Уфа»
   Палитра: слоновая кость и бронза
   Добавлено поверх сборки: фотография автора, выравнивание первого
   экрана, галочка согласия в форме и ссылки на документы.
   ============================================================ */

/* --- Первый экран: текст поднимаем к верху, фото не растягивает строку --- */
[data-component="hero-section"] .grid {
  align-items: start !important;
}

/* --- Карточка с деловым фото --- */
.ac-portrait-card {
  position: relative;
  max-width: 420px;
  margin: 0 0 1.75rem auto;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E3D9C7;
  box-shadow: 0 24px 50px -30px rgba(23, 25, 29, 0.28);
}

.ac-portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 50%;
}

.ac-portrait-card figcaption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  background: #F6F2EA;
  border-top: 1px solid #E3D9C7;
  font-size: 0.75rem;
  line-height: 1.2;
}

.ac-portrait-card figcaption strong {
  font-weight: 600;
  color: #17191D;
}

.ac-portrait-card figcaption span {
  color: #6C6357;
}

/* --- Фотография вместо инициалов «АС» в шапке и подвале --- */
.ac-avatar-photo {
  background-size: cover !important;
  background-position: 50% 50% !important;
  background-repeat: no-repeat;
  color: transparent !important;
  text-indent: -9999px;
}

/* --- Галочка согласия на обработку персональных данных --- */
.ac-consent {
  margin: 1rem 0 0.25rem;
}

.ac-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.ac-consent__box {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: #A97B3F;
  cursor: pointer;
}

.ac-consent__text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #6C6357;
}

.ac-consent__text a {
  color: #8C6239;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ac-consent__error {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #9C5340;
}

.ac-consent__offer {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #6C6357;
}

.ac-consent__offer a {
  color: #8C6239;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ловушка для ботов: поле есть в разметке, но человек его не видит */
.ac-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --- Сообщение при неудачной отправке формы --- */
.ac-form-error {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  background: rgba(156, 83, 64, 0.10);
  border: 1px solid rgba(156, 83, 64, 0.35);
  color: #9C5340;
}

/* --- Встроенная форма Яндекса (вариант Б2, включается в custom.js) ---
   Форма приходит в рамке iframe, поэтому внутри неё действуют стили Яндекса.
   Здесь задаём только внешнюю рамку, чтобы блок совпал с карточками сайта. */
.ac-yandex-form {
  margin: 0;
}

/* Высота рамки подобрана по фактическим замерам отрендеренной формы Яндекса.
   Форма — обычная страница, поэтому её высота зависит от ширины колонки, а извне
   её не узнать (чужой домен, измерять внутри нельзя). Замеры: при ширине 1536
   форма занимает 824 точки, при 540 — 886, при 390 — 1024. Отсюда ступени ниже.
   Если рамка окажется выше формы, снизу останется белое поле — оно безвредно,
   высоту можно уменьшить. Если кнопка «Отправить» снова подрежется — увеличить. */
.ac-yandex-form iframe {
  display: block;
  width: 100%;
  min-height: 950px;
  border: 1px solid #E3D9C7;
  border-radius: 1.25rem;
  background: #FFFFFF;
  box-shadow: 0 24px 50px -30px rgba(23, 25, 29, 0.28);
}

/* Чем уже колонка, тем выше форма: текст переносится на больше строк */
@media (max-width: 1023px) {
  .ac-yandex-form iframe {
    min-height: 980px;
  }
}

@media (max-width: 767px) {
  .ac-yandex-form iframe {
    min-height: 1000px;
  }
}

@media (max-width: 479px) {
  .ac-yandex-form iframe {
    min-height: 1110px;
  }
}

/* --- Ссылки на документы и упоминание cookie в подвале --- */
.ac-legal {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #E3D9C7;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #6C6357;
}

.ac-legal a {
  color: #8C6239;
  text-decoration: none;
}

.ac-legal a:hover {
  text-decoration: underline;
}

.ac-legal__sep {
  margin: 0 0.4rem;
  color: #C39A5E;
}

.ac-legal__note {
  margin: 0.6rem 0 0;
  font-size: 0.7rem;
  color: #6C6357;
}

/* --- Мобильные и планшеты --- */
@media (max-width: 1023px) {
  .ac-portrait-card {
    max-width: 340px;
    margin: 0 auto 1.5rem auto;
  }
}

/* ============================================================
   Контакты: звонок, Telegram, MAX
   Палитра та же — слоновая кость и бронза. Цвета берутся из
   переменных темы, поэтому кнопки совпадают с остальным сайтом
   и автоматически попадают в нужный оттенок.
   ============================================================ */

/* Маленькая квадратная кнопка с иконкой — шапка и подвал */
.ac-c-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--surface-2, #efe7d9);
  color: var(--text-secondary, #4a443c);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.ac-c-icon:hover {
  background: var(--primary-soft, rgba(140, 98, 57, 0.14));
  color: var(--primary, #8c6239);
}

.ac-c-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

/* Широкая кнопка с подписью — мобильное меню */
.ac-c-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface-2, #efe7d9);
  color: var(--primary, #8c6239);
  border: 1px solid rgba(140, 98, 57, 0.3);
  text-decoration: none;
  transition: background 0.2s ease;
}

.ac-c-full:hover {
  background: var(--primary-soft, rgba(140, 98, 57, 0.14));
}

.ac-c-full svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

/* Карточка контакта — блок контактов.
   Стиль повторяет соседнюю карточку WhatsApp: та же подложка и рамка. */
.ac-c-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--surface-2, #efe7d9);
  border: 1px solid var(--border-strong, rgba(23, 25, 29, 0.16));
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.ac-c-card:hover {
  border-color: rgba(140, 98, 57, 0.4);
}

.ac-c-card__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--primary-soft, rgba(140, 98, 57, 0.14));
  color: var(--primary, #8c6239);
}

.ac-c-card__ic svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.ac-c-card__txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ac-c-card__t {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #17191d);
  line-height: 1.3;
}

.ac-c-card__s {
  font-size: 0.75rem;
  color: var(--text-muted, #6c6357);
  line-height: 1.4;
}

/* ============================================================
   Шапка: четыре канала связи
   Контейнер шапки ограничен классом max-w-7xl (1280 точек), поэтому
   на широком экране запас места не растёт. Три новые иконки его почти
   исчерпали — «FAQ» упирался в кнопку WhatsApp. Ниже: иконки делаем
   компактнее, перед группой кнопок добавляем воздух, меню немного
   поджимаем. Только для широких экранов, где всё это появляется.
   ============================================================ */

@media (min-width: 1280px) {
  .ac-header-actions {
    margin-left: 1.25rem;
  }

  .ac-header-actions .ac-c-icon {
    width: 2rem;
    height: 2rem;
  }

  header nav {
    gap: 1.25rem !important;
  }
}

/* До 1280 точек на всё места не хватает: иконки в шапке не показываем,
   чтобы не ломать существующую вёрстку. Они остаются в выпадающем меню,
   в блоке контактов и в подвале. */
@media (max-width: 1279px) {
  .ac-header-actions .ac-c-icon {
    display: none !important;
  }
}
