/* Оформление сайта protoavg.ru. Одно и то же в опубликованных страницах и в окне редактора.
   Все правила внутри .pa, чтобы не задевать интерфейс Puck. */
@import url("/assets/fonts/fonts.css");

.pa {
  --navy: #1f2740;
  --dark: #2c3650;
  --text: #2e323a;
  --accent: #a3312a;
  --link: #24508f;
  --muted: #6a707c;
  --soft: #f3f4f7;
  --line: #dadde4;
  --white: #fff;
  --serif: "PT Serif", Georgia, serif;
  --sans: "PT Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1140px;
  --radius: 12px;

  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}
.pa *, .pa *::before, .pa *::after { box-sizing: border-box; }
:where(.pa) :where(img) { max-width: 100%; height: auto; display: block; }
:where(.pa) :where(a) { color: var(--link); }
:where(.pa) :where(a:hover) { color: var(--accent); }
/* базовые правила без веса (:where), чтобы классы блоков могли их переопределить */
:where(.pa) :where(h1, h2, h3, h4) { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 0; }
:where(.pa) :where(p) { margin: 0 0 .8em; }
:where(.pa) :where(p:last-child) { margin-bottom: 0; }

.pa-wrap { width: 100%; max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 0 20px; }
.pa-wrap--narrow { max-width: 900px; }
.pa-section { padding: 80px 0; }
.pa-section--white { background: var(--white); }
.pa-section--soft { background: var(--soft); }
.pa-section--dark { background: var(--dark); color: #fff; }
.pa-section--dark h1, .pa-section--dark h2, .pa-section--dark h3 { color: #fff; }
.pa-section__title { font-size: 34px; margin-bottom: 32px; }
.pa-section__title--center { text-align: center; }
.pa-muted { color: var(--muted); font-size: 15px; }

/* текст из визуального редактора */
.pa-rich > :first-child { margin-top: 0; }
.pa-rich > :last-child { margin-bottom: 0; }
.pa-rich ul, .pa-rich ol { margin: 0 0 .8em; padding-left: 1.3em; }
.pa-rich li { margin-bottom: .3em; }
.pa-rich h2 { font-size: 28px; margin: 1.2em 0 .5em; }
.pa-rich h3 { font-size: 22px; margin: 1.1em 0 .4em; }
.pa-rich blockquote { margin: 1em 0; padding: .6em 1.2em; border-left: 3px solid var(--accent); background: var(--soft); }

/* кнопки */
.pa-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: 15px; line-height: 1.2;
  text-decoration: none; transition: background .15s, color .15s;
  background: var(--accent); color: #fff;
}
.pa a.pa-btn { color: #fff; }
.pa a.pa-btn:hover { background: var(--navy); color: #fff; }
.pa a.pa-btn--soft { background: var(--soft); color: var(--link); }
.pa a.pa-btn--soft:hover { background: var(--accent); color: #fff; }
.pa-section--soft a.pa-btn--soft, .pa-card a.pa-btn--soft { background: #e8ebf1; }
.pa-section--soft a.pa-btn--soft:hover, .pa-card a.pa-btn--soft:hover { background: var(--accent); }

.pa-card { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(20, 30, 50, .07); padding: 28px; }

/* ---- шапка ---- */
.pa-header { background: var(--navy); color: #fff; position: relative; z-index: 20; }
.pa-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.pa-header__brand { font-family: var(--serif); font-weight: 700; font-size: 19px; color: #fff; text-decoration: none; line-height: 1.25; }
.pa a.pa-header__brand, .pa a.pa-header__brand:hover { color: #fff; }
.pa-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.pa-burger { display: none; }
.pa-menu { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pa-menu li { position: relative; list-style: none; }
.pa-menu a { display: block; padding: 10px 12px; border-radius: 6px; color: rgba(255, 255, 255, .9); text-decoration: none; font-size: 16px; }
.pa .pa-menu a:hover, .pa .pa-menu .is-active > a { color: #fff; background: rgba(255, 255, 255, .1); }
.pa-menu .has-sub > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg);
}
.pa-submenu {
  position: absolute; top: 100%; right: 0; min-width: 250px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(20, 30, 50, .18);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.pa-menu li:hover > .pa-submenu, .pa-menu li:focus-within > .pa-submenu { opacity: 1; visibility: visible; transform: none; }
.pa .pa-submenu a { color: var(--text); padding: 9px 12px; }
.pa .pa-submenu a:hover, .pa .pa-submenu .is-active > a { background: var(--soft); color: var(--link); }

/* ---- подвал ---- */
.pa-footer { background: #161c2e; color: rgba(255, 255, 255, .8); padding: 32px 0; font-size: 15px; }
.pa-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.pa-footer__name { font-family: var(--serif); font-weight: 700; font-size: 19px; color: #fff; }
.pa-footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.pa .pa-footer a { color: #fff; text-decoration: none; }
.pa .pa-footer a:hover { text-decoration: underline; color: #fff; }
.pa-footer__address { margin-top: 4px; }

/* ---- блоки ---- */

/* шапка главной */
.pa-hero { position: relative; color: #fff; text-align: center; background: var(--navy) center / cover no-repeat; }
.pa-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 39, 64, .45), rgba(31, 39, 64, .85)); }
.pa-hero__inner { position: relative; min-height: 540px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 14px; padding: 72px 20px; }
.pa-hero__photo { width: 190px; height: 190px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.pa .pa-hero__title { color: #fff; font-size: 46px; }
.pa-hero__subtitle { font-size: 20px; color: rgba(255, 255, 255, .88); }

/* заголовок страницы */
.pa-pagehead { background: var(--dark); color: #fff; padding: 56px 0; }
.pa .pa-pagehead a { color: rgba(255, 255, 255, .75); text-decoration: none; font-size: 15px; }
.pa .pa-pagehead a:hover { color: #fff; }
.pa .pa-pagehead h1 { color: #fff; font-size: 44px; margin-top: 6px; }

/* календарь */
.pa-calendar { font-size: 16px; }
.pa-calendar__day { font-weight: 700; margin: 10px 0 8px; }
.pa-calendar__saints { color: var(--muted); font-size: 15px; }
.pa-placeholder { padding: 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 15px; }

/* текст и картинка */
.pa-split { display: flex; align-items: center; gap: 48px; }
.pa-split--reverse { flex-direction: row-reverse; }
.pa-split__text { flex: 1 1 55%; }
.pa-split__media { flex: 1 1 45%; }
.pa-split__media img { border-radius: var(--radius); width: 100%; }
.pa-split__title { font-size: 36px; margin-bottom: 16px; }
.pa-split__title--accent { color: var(--accent) !important; }

/* визитка */
.pa-profile { display: flex; align-items: center; gap: 48px; }
.pa-profile__photo { flex: 0 0 320px; }
.pa-profile__photo img { width: 320px; height: 380px; object-fit: cover; border-radius: var(--radius); }
.pa .pa-profile__name { color: #fff; font-size: 44px; margin-bottom: 16px; }
.pa-profile__lead { font-size: 20px; color: rgba(255, 255, 255, .92); margin-bottom: 16px; }
.pa-profile__small { font-size: 15px; color: rgba(255, 255, 255, .68); }

/* таймлайн */
.pa-timeline { max-width: 860px; margin: 0 auto; }
.pa-timeline__item { display: flex; gap: 24px; }
.pa-timeline__date { flex: 0 0 24%; text-align: right; font-family: var(--serif); font-weight: 700; color: var(--accent); font-size: 16px; padding-top: 2px; }
.pa-timeline__text { flex: 1; border-left: 3px solid var(--line); padding: 0 0 32px 28px; position: relative; }
.pa-timeline__text::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.pa-timeline__item:last-child .pa-timeline__text { padding-bottom: 0; }

/* сетка с галочками */
.pa-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pa-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pa-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pa-grid--cards { gap: 24px; }
.pa-check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; color: var(--navy); }
.pa-check::before { content: ""; flex: 0 0 auto; width: 16px; height: 9px; margin-top: 5px; border: solid var(--accent); border-width: 0 0 3px 3px; transform: rotate(-45deg); }

/* плитки-ссылки */
.pa .pa-tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--navy); transition: transform .15s, box-shadow .15s; }
.pa .pa-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 30, 50, .12); color: var(--navy); }
.pa-tile img { width: 48px; height: 48px; object-fit: contain; }
.pa-tile__title { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.3; }
/* только в редакторе: плитка ведёт на страницу, снятую с публикации */
.pa .pa-tile--hidden { opacity: .55; border: 1px dashed var(--line); }
.pa-tile__note { font-size: 14px; color: var(--muted); }

/* нумерованный список */
.pa-numlist__item { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pa-numlist__num { flex: 0 0 84px; font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--line); }
.pa-numlist__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pa-numlist__title { font-size: 19px; }

/* нумерованная сетка */
.pa-numgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.pa-numgrid__item { display: flex; gap: 16px; align-items: flex-start; }
.pa-numgrid__badge { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.pa-numgrid__body { flex: 1; min-width: 0; }
.pa-numgrid__title { font-size: 17px; margin-bottom: 6px; }

/* список с кнопками */
.pa-rows { display: flex; flex-direction: column; }
.pa-rows--cards { gap: 20px; }
.pa-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pa-rows--plain .pa-row { padding: 22px 0; border-bottom: 1px solid var(--line); }
.pa-row__body { flex: 1; min-width: 0; }
.pa-row__title { font-size: 19px; margin-bottom: 8px; }
.pa-row .pa-btns { flex: 0 0 auto; }

/* картинка и текст поочерёдно */
.pa-zigzag { display: flex; flex-direction: column; gap: 56px; }
.pa-zigzag__item { display: flex; align-items: center; gap: 40px; }
.pa-zigzag__item:nth-child(even) { flex-direction: row-reverse; }
.pa-zigzag__media { flex: 0 0 45%; }
.pa-zigzag__media img { width: 100%; height: 260px; object-fit: cover; border-radius: var(--radius); }
.pa-zigzag__body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.pa-zigzag__title { font-size: 22px; }

/* карточки с картинками */
.pa-imgcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.pa-imgcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 20, 30, .12); }
.pa-imgcard__img { width: 100%; height: 190px; object-fit: cover; background: var(--soft); }
.pa-imgcard__body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px 20px 22px; }
.pa-imgcard__title { font-size: 18px; }

/* цитата */
.pa-quote { max-width: 900px; margin: 0 auto; text-align: center; }
.pa-quote__text { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.45; color: #fff; }
.pa-quote__author { margin-top: 16px; font-family: var(--serif); font-weight: 700; color: rgba(255, 255, 255, .8); }

/* видео */
.pa-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }

/* плашка */
.pa-pinned { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pa-pinned__text { font-size: 20px; }

@media (max-width: 1024px) {
  .pa-grid, .pa-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pa-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; margin-right: -10px; flex-shrink: 0; cursor: pointer; }
  .pa-burger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
  .pa-nav-toggle:checked + .pa-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .pa-nav-toggle:checked + .pa-burger span:nth-child(2) { opacity: 0; }
  .pa-nav-toggle:checked + .pa-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .pa-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 8px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .pa-nav-toggle:checked ~ .pa-nav { display: block; }
  .pa-menu { flex-direction: column; }
  .pa-menu .has-sub > a::after { display: none; }
  .pa-submenu { position: static; opacity: 1; visibility: visible; transform: none; background: none; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .pa .pa-submenu a { color: rgba(255, 255, 255, .75); }
  .pa .pa-submenu a:hover, .pa .pa-submenu .is-active > a { background: rgba(255, 255, 255, .08); color: #fff; }
}

@media (max-width: 767px) {
  .pa { font-size: 16px; }
  .pa-section { padding: 48px 0; }
  .pa-wrap { padding: 0 16px; }
  .pa-section__title { font-size: 26px; margin-bottom: 24px; }
  .pa-header__brand { font-size: 15px; }
  .pa-hero__inner { min-height: 420px; padding: 48px 16px; }
  .pa-hero__photo { width: 150px; height: 150px; }
  .pa .pa-hero__title { font-size: 30px; }
  .pa-hero__subtitle { font-size: 17px; }
  .pa-pagehead { padding: 36px 0; }
  .pa .pa-pagehead h1 { font-size: 30px; }
  .pa-split, .pa-split--reverse, .pa-profile, .pa-zigzag__item, .pa-zigzag__item:nth-child(even) { flex-direction: column; align-items: stretch; gap: 24px; }
  .pa-split__title { font-size: 28px; }
  .pa-profile__photo { flex: none; }
  .pa-profile__photo img { width: 100%; height: 340px; }
  .pa .pa-profile__name { font-size: 30px; }
  .pa-profile__lead { font-size: 18px; }
  .pa-timeline__item { flex-direction: column; gap: 6px; }
  .pa-timeline__date { flex: none; text-align: left; }
  .pa-timeline__text { padding: 0 0 24px 20px; }
  .pa-grid, .pa-numgrid { grid-template-columns: minmax(0, 1fr); }
  .pa-numlist__num { flex-basis: 56px; font-size: 30px; }
  .pa-row, .pa-pinned { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pa-zigzag { gap: 40px; }
  .pa-zigzag__media { flex: none; }
  .pa-zigzag__media img { height: 200px; }
  .pa-quote__text { font-size: 20px; }
  .pa-card { padding: 22px; }
  .pa-footer__inner { flex-direction: column; align-items: flex-start; }
}
