/* =====================================================================
   Лаванда — визуальный слой 2026 (направление «А»: типографика, фото, простая структура)
   Подключается после my.css. Убрать слой = убрать одну строку <link> в чанке lav.head.
   Приоритет решений: понятность → доступность → скорость → узнаваемость → декор.
   ===================================================================== */

/* ---------- 1. Шрифты (свои, с кириллицей; без запросов к сторонним серверам) ---------- */
@font-face { font-family: "Lav Manrope"; src: url("/library/fonts/lav-manrope-cyr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lav Manrope"; src: url("/library/fonts/lav-manrope-lat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lav Cormorant"; src: url("/library/fonts/lav-cormorant-cyr.woff2") format("woff2"); font-weight: 600 700; font-display: optional; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lav Cormorant"; src: url("/library/fonts/lav-cormorant-lat.woff2") format("woff2"); font-weight: 600 700; font-display: optional; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 2. Токены ---------- */
:root {
  --lav-green: #335a44;        /* основной (визитка) */
  --lav-green-deep: #2b4c3a;   /* панели, нажатие */
  --lav-sage: #597e6b;         /* второстепенный */
  --lav-sage-tint: #eaf0eb;    /* подложки */
  --lav-cream: #fcfaf4;        /* фон */
  --lav-ink: #22322a;          /* основной текст: 13.9:1 на кремовом */
  --lav-ink-soft: #46524b;     /* второстепенный текст: 8:1 */
  --lav-line: #e7e3d7;
  --lav-radius: 14px;
  --lav-font-text: "Lav Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --lav-font-display: "Lav Cormorant", Georgia, "Times New Roman", serif;
  /* текучая шкала: телефон → большой экран */
  --lav-fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --lav-fs-h1: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);
  --lav-fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --lav-fs-h3: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
}

/* ---------- 3. Типографика ---------- */
body, button, input, select, textarea,
#header, #header .header-menu a, .c-button, .lv, .lv button { font-family: var(--lav-font-text); }
body { color: var(--lav-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

#page-content, #page-content p, #page-content li, .various-content p, .various-content li { font-size: var(--lav-fs-body); line-height: 1.6; }
#page-content p, .various-content p { color: var(--lav-ink-soft); }
#page-content p strong, .various-content p strong { color: var(--lav-ink); }

/* крупные заголовки — антиква, как подпись «Красота и забота» на визитке */
#page-header h1, #core h1:not(.lv-sr-h1),
.various-content h2, #core section > header h2, .lv-reviews h2, .lv-cert .lv-cert__title {
  font-family: var(--lav-font-display); font-weight: 600; text-transform: none; letter-spacing: 0;
  color: var(--lav-green); line-height: 1.08; text-wrap: balance; hyphens: manual;
}
#page-header h1 { font-size: var(--lav-fs-h1); }
.various-content h2, #core section > header h2 { font-size: var(--lav-fs-h2); }
.various-content h3, .various-content h4 { font-family: var(--lav-font-text); font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--lav-ink); font-size: var(--lav-fs-h3); line-height: 1.3; }
#core section > header .subtitle { font-family: var(--lav-font-text); font-style: normal; color: var(--lav-ink-soft); font-size: 1rem; }

/* слайдер: заголовки антиквой, без капслока */
#main-slider .slide h1, #main-slider .slide h2, #main-slider .various-content h2 {
  font-family: var(--lav-font-display); font-weight: 600; text-transform: none; letter-spacing: 0;
  font-size: clamp(2.3rem, 1.6rem + 3.6vw, 4.4rem); line-height: 1.02; color: var(--lav-green); -webkit-text-stroke: 0;
}
#main-slider .slide pre { font: inherit; margin: 0; padding: 0; border: 0; background: none; white-space: pre-wrap; overflow: visible; color: inherit; }
#main-slider .slide h3, #main-slider .slide h3 pre { font-family: var(--lav-font-text); font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--lav-ink); }

/* ---------- 4. Фирменная деталь №1: веточка вместо вертикальной черты у заголовков ---------- */
.various-content h2 { position: relative; padding-left: 68px; }
.various-content h2:before {
  content: ""; display: block; position: absolute; left: 0; top: 0.3em; width: 56px; height: 23px;
  background: url("/library/css/lav-branch.png?v=1") left center / contain no-repeat !important;
  -webkit-mask: none; mask: none;
}
@media (max-width: 600px) {
  .various-content h2 { padding-left: 54px; }
  .various-content h2:before { width: 44px; height: 18px; top: 0.28em; }
}
#main-slider .various-content h2 { padding-left: 0; }
#main-slider .various-content h2:before, .various-content .c-cta-message h2:before { display: none; }

/* ---------- 5. Фирменная деталь №2: мягкая дуга шапки, как на визитке (телефон) ---------- */
@media (max-width: 991px) {
  #header .header-bg { border-bottom-left-radius: 50% 26px; border-bottom-right-radius: 50% 26px; }
}

/* ---------- 6. Кнопки ---------- */
.c-button, a.c-button, button.c-button {
  font-family: var(--lav-font-text); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 1rem;
  min-height: 48px; padding: 12px 22px; line-height: 1.2; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.c-button:active { transform: translateY(1px) scale(.99); }

/* ---------- 7. Карточки: единый стиль ---------- */
.c-pricing-table, .c-service, .lv-cert__card {
  border-radius: var(--lav-radius); overflow: hidden; background: #fff;
  border: 1px solid var(--lav-line); box-shadow: none; transition: box-shadow .2s ease, transform .2s ease;
}
.c-pricing-table:hover, .c-service:hover { box-shadow: 0 8px 24px rgba(34, 50, 42, .08); }
.c-pricing-table .table-content h4, .c-service .service-title { font-family: var(--lav-font-text); font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--lav-ink); }
.c-service .service-title a { color: var(--lav-ink); }
.c-accordion > li { border-radius: var(--lav-radius); }
.c-accordion .accordion-title { font-family: var(--lav-font-text); text-transform: none; letter-spacing: 0; }

/* ---------- 8. Доступность ---------- */
:focus-visible { outline: 3px solid var(--lav-sage); outline-offset: 3px; border-radius: 6px; }
#header :focus-visible { outline-color: #fcfaf4; }
.lv-skip { position: absolute; left: 12px; top: -60px; z-index: 100000; background: var(--lav-green); color: #fff !important; padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .15s; }
.lv-skip:focus { top: 12px; }
.lv-trust { flex: 1 1 100%; margin: 4px 0 0; text-align: center; color: #fff; opacity: .92; font-size: 13.5px; line-height: 1.45; }
.lv-trust a { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 992px) { .lv-trust { display: none; } }

/* ---------- 9. Движение: только если человек не просил его уменьшить ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* плавный переход между страницами (Chrome/Edge 126+, Safari 18.2+; в остальных — обычная загрузка) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

  /* лёгкое проявление карточек при прокрутке (Chrome 115+, Safari 26+); без поддержки — карточки сразу видны */
  @supports (animation-timeline: view()) {
    .c-pricing-table, .c-service, .lv-cat, .lv-cert__card, .lv-reviews__wrap {
      animation: lavReveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%;
    }
    @keyframes lavReveal { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 10. Точечные поправки ---------- */
#page-content .lv-cert__card .lv-cert__price { font-size: 1.5rem; line-height: 1.2; font-weight: 700; color: var(--lav-green); }
#page-content .lv-cert__card p { font-size: 1rem; }
#page-content .lv-cert .lv-cert__lead { font-size: 1.0625rem; color: var(--lav-ink); }
/* дуга видна: на телефоне фон самого блока шапки прозрачный, зелёный — у .header-bg */
@media (max-width: 991px) { #header { background: transparent !important; } }

/* ---------- 11. Шапка: простой текст без теней; блок с данными ИП ---------- */
#header, #header * { text-shadow: none !important; }
#header .header-contact .item-inner, #header .header-contact a, #header .header-contact dt, #header .header-contact dd { font-weight: 400; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
#header .header-contact a[href^="tel:"], #header .header-contact dt { font-weight: 600; }
#header .lv-legal { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.88) !important; }

/* ---------- 12. Карточки акций: единый квадратный формат, афиша целиком, фон — размытое продолжение ---------- */
.lv-promo-img { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: #efeaf3; border: 0 !important; }
.lv-promo-img::before { content: ""; position: absolute; inset: -30px; background: var(--img) center / cover no-repeat; filter: blur(18px) saturate(1.05); opacity: .8; }
.lv-promo-img img { position: relative; display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; }
.c-pricing-table .table-header .lv-promo-img { border-radius: 0; }

/* ---------- 13. Картинки в тексте страниц: пропорции сохраняются на любой ширине ---------- */
#page-content img[height], .various-content img[height], .article-content img[height] { max-width: 100%; height: auto; }
#page-content .lv-promo-img img, .various-content .lv-promo-img img { height: 100% !important; }

/* ---------- 14. Окно согласия на cookie ---------- */
.lv-cookie { position: fixed; z-index: 100000; right: 20px; bottom: 20px; max-width: 420px; background: var(--lav-cream); color: var(--lav-ink); border: 1px solid var(--lav-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(34,50,42,.18); padding: 18px 20px; font-family: var(--lav-font-text); font-size: 14.5px; line-height: 1.5; text-align: left; }
.lv-cookie[hidden] { display: none !important; }
.lv-cookie p { margin: 0 0 12px; color: var(--lav-ink); font-size: 14.5px; }
.lv-cookie a { color: var(--lav-green); text-decoration: underline; text-underline-offset: 2px; }
.lv-cookie__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.lv-cookie__btn { min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--lav-green); background: transparent; color: var(--lav-green); font: 600 14.5px/1.2 var(--lav-font-text); cursor: pointer; }
.lv-cookie__btn--main { background: var(--lav-green); color: #fff; }
.lv-cookie__btn:hover { filter: brightness(.95); }
@media (max-width: 600px) { .lv-cookie { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 16px; } .lv-cookie__btn { flex: 1 1 auto; } }
.lv-cookie p.lv-cookie__title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.lv-cookie__btns .lv-cookie__btn { flex: 1 1 0; padding-top: 8px; padding-bottom: 8px; }
.lv-cookie__btn span { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; line-height: 1.3; opacity: .85; }
.lv-cookie p.lv-cookie__note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; opacity: .85; }
@media (max-width: 600px) { .lv-cookie__btn span { font-size: 11.5px; } .lv-cookie p.lv-cookie__note { font-size: 12px; } }

/* ---------- 15. Левое меню: надпись видна при наведении, подменю не уходит под нижний блок ---------- */
#header .header-menu > ul > li > span > a:hover, #header .header-menu > ul > li.m-hover > span > a { color: #fff !important; }
@media (min-width: 992px) {
  #header .header-menu .sub-menu > li.m-active a { color: var(--lav-green) !important; }
}
@media (min-width: 1200px) {
  #header .header-navigation:hover { z-index: 40; }
  #header .header-menu > ul > li:nth-last-child(-n+3) > .sub-menu { top: auto; bottom: 0; margin: 0 0 -10px -1px; }
  #header .header-menu > ul > li:nth-last-child(-n+3) > .sub-menu::before { top: auto; bottom: 16px; }
}

/* ---------- 16. Просмотр фото (Magnific Popup): современный вид ---------- */
.mfp-bg { background: #16241c !important; opacity: .94 !important; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .mfp-bg { background: rgba(22,36,28,.88) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 1 !important; } }
.mfp-wrap.mfp-fade .mfp-content { transition: opacity .25s ease, transform .25s ease; opacity: 0; transform: scale(.97); }
.mfp-wrap.mfp-fade.mfp-ready .mfp-content { opacity: 1; transform: none; }
.mfp-image-holder .mfp-content { max-width: min(1100px, 92vw); }
.mfp-figure:after { display: none !important; }
.mfp-figure figure { margin: 0; }
img.mfp-img { padding: 0 !important; margin: 64px auto 56px !important; max-height: calc(100vh - 140px) !important; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.45); background: #22322a; }
.mfp-figure .mfp-bottom-bar { margin-top: -48px; position: absolute; left: 0; right: 0; top: 100%; display: flex; justify-content: center; }
.mfp-title { display: none; }
.mfp-counter { position: static !important; color: rgba(255,255,255,.85) !important; font: 500 13px/1 var(--lav-font-text) !important; letter-spacing: .04em; background: rgba(255,255,255,.12); padding: 7px 12px; border-radius: 999px; }
.mfp-wrap .mfp-close, .mfp-wrap .mfp-arrow { width: 48px !important; height: 48px !important; border-radius: 50% !important; opacity: 1 !important; border: 1px solid rgba(255,255,255,.18) !important; color: #fff !important; cursor: pointer; transition: background-color .2s ease, transform .2s ease; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mfp-wrap .mfp-close { background: rgba(255,255,255,.12) !important; position: fixed !important; top: 16px !important; right: 16px !important; padding: 0 !important; text-align: center !important; font: 300 30px/44px var(--lav-font-text) !important; }
.mfp-wrap .mfp-close:hover { background: rgba(255,255,255,.24) !important; }
.mfp-wrap .mfp-arrow { position: fixed !important; top: 50% !important; margin: -24px 0 0 !important; background-color: rgba(255,255,255,.12) !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 20px 20px !important; }
.mfp-wrap .mfp-arrow:hover { background-color: rgba(255,255,255,.24) !important; }
.mfp-wrap .mfp-arrow-left { left: 24px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") !important; }
.mfp-wrap .mfp-arrow-right { right: 24px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") !important; }
.mfp-wrap .mfp-arrow:before, .mfp-wrap .mfp-arrow:after { display: none !important; }
.mfp-wrap .mfp-arrow:active { transform: scale(.94); }
html.lv-mfp-open .lv-cookie { display: none !important; }
@media (max-width: 767px) {
  .mfp-image-holder .mfp-content { max-width: 100vw; }
  img.mfp-img { margin: 72px auto 64px !important; max-height: calc(100vh - 150px) !important; border-radius: 12px; }
  .mfp-wrap .mfp-arrow { top: auto !important; bottom: 18px !important; margin: 0 !important; width: 44px !important; height: 44px !important; }
  .mfp-wrap .mfp-arrow-left { left: calc(50% - 110px) !important; }
  .mfp-wrap .mfp-arrow-right { right: calc(50% - 110px) !important; }
  .mfp-figure .mfp-bottom-bar { top: auto; bottom: 0; position: fixed; margin: 0; padding-bottom: 30px; pointer-events: none; }
  .mfp-wrap .mfp-close { top: 12px !important; right: 12px !important; width: 44px !important; height: 44px !important; line-height: 40px !important; }
}

/* ---------- 17. Страница мастера: пустые разделы «Примеры работ», «Сертификаты» не показываем ---------- */
.lv-album:not(:has(img)) { display: none; }
