/* style.css */
*{ margin: 0; padding: 0; box-sizing: border-box; }
html, body{ height: 100%; }

body{
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: var(--body-size);
  line-height: var(--body-line);
  min-height: 100vh;
}

.page{
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background: var(--bg-page);
}

.page::before{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-color: rgba(var(--pattern-color) / var(--pattern-opacity));

  -webkit-mask-image: var(--pattern-mask);
  mask-image: var(--pattern-mask);

  -webkit-mask-size: var(--pattern-size) var(--pattern-size);
  mask-size: var(--pattern-size) var(--pattern-size);

  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;

  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.page::after{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-image: var(--grain);
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
}

header, main, footer{
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: auto;
  padding: var(--pad-y) var(--pad-x);
}

.header{ display:flex; align-items:center; justify-content:space-between; }
.logo{ display:flex; align-items:center; gap: calc(var(--space) / 3); font-weight: 600; color: var(--accent); } /* logo (иконка + текст) в акцентном цвете */
.iconify{ width: var(--icon); height: var(--icon); color: currentColor; display: inline-block; }
.lang{ display:flex; gap: var(--gap); }

p, a, .card, .contacts a, .social a, .row span{
  font-size: var(--body-size);
  line-height: var(--body-line);
}

.logo span {
    line-height: 1;
    padding-right: var(--pad-x);
}

span, p{
    overflow-wrap: anywhere;
  word-break: break-word;
}
.lang p{ opacity: var(--muted); transition: var(--t); cursor:pointer; font-weight: 600; white-space: nowrap;}
.lang p:hover{ transform: scale(1.2); }

footer{ display:flex; justify-content:center; }
footer a{ text-decoration:none; color: var(--text); text-align: center; }
.nowrap { white-space: nowrap; }


.hero-container{ container-type: inline-size; }

.hero-container h1{
  font-size: clamp(30px, 12cqi, var(--h1-size));
  line-height: 1.1;
  font-weight: var(--h1-weight);
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}
h2{ font-size: var(--h2-size); font-weight: var(--h2-weight); margin-bottom: var(--h2-space-bottom); }

/* -------------------------
   Заголовки отдельно (новое)
   Можно кастомить отступы так:
   <div class="title-container" style="--title-mt: 48px; --title-mb: 16px">...</div>
-------------------------- */
.title-container{
  margin-top: var(--title-mt, calc(var(--space) * 1.5));
  margin-bottom: var(--title-mb, calc(var(--space) * 1));
}
.title-container h2{
  margin: 0; /* чтобы отступы контролировались контейнером */
}

/* ------------------------- */

.hero-container{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap: var(--space);
  padding-top: var(--hero-pad-top);
  padding-bottom: var(--hero-pad-bottom);
}

.hero-container p{ font-size: var(--moto-text-size); }

button{
  cursor:pointer;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius);
  font-size: var(--btn-text-size);
  border: none;
  color: var(--btn-text-color);
  background: var(--accent);
  transition: var(--t);
}

button:hover{ transform: scale(var(--scale-hover)); }

.text-container{ margin: var(--space) 0; }

/* Быстрый способ выделять важные слова/цены/фразы акцентом */
.accent{ color: var(--accent);
font-weight: 600; }

/* Блоки теперь без "обязательного" отступа сверху,
   потому что заголовки вынесены отдельно и управляют компоновкой.
   Но снизу оставляем логичный отступ (кастомится). */
.services-container,
.list-container,
.contacts-container,
.gallery-container,
.opening-hours-container,
.price-container,
.big-photo-container,
.map-container{
  margin: 0 0 var(--block-mb, var(--space)) 0;
}

.card{
  padding: var(--card-pad);
  border-radius: var(--radius);
  border: var(--card-border-width) solid var(--card-border-color);
  background: var(--card-bg);
}

/* Акцентная карточка (фон “тусклее”, но в оттенке акцента):
   просто добавь class="card card--accent" на конкретный элемент.
   Подходит, чтобы выделять 1–2 пункта, цены, важные шаги, или разные группы карточек разными цветами. */
.card-accent{
  background: var(--accent-card-bg) !important;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--card-border-color)) !important;
}

.services, .list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--space) / 2);
}

.contacts{
  display:flex;
  flex-wrap: wrap;
  gap: calc(var(--space) / 2);
}

.contacts a{
  text-decoration:none;
  color: var(--text);
  transition: var(--t);
  display:inline-flex;
  align-items:center;
  gap: 10px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.contacts a:hover{ transform: scale(1.03); }

.gallery-container{
  position: relative;
  overflow: hidden;
  --gallery-gap: calc(var(--space) / 2);
  --gallery-visible: 3;
  --gallery-side-fade: 92px;

  --gallery-arrow-color: #fff;
  --gallery-edge-strong: rgba(0, 0, 0, 0.34);
  --gallery-edge-soft: rgba(0, 0, 0, 0);

  --gallery-counter-bg: rgba(0,0,0,.42);
  --gallery-counter-color: #fff;
}

@media (max-width: 1024px){
  .gallery-container{
    --gallery-visible: 2;
    --gallery-side-fade: 78px;
  }
}

@media (max-width: 460px){
  .gallery-container{
    --gallery-visible: 1;
    --gallery-side-fade: 64px;
  }
}

.gallery{
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gallery-gap);
  transition: transform .36s ease;
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
}

.gallery.is-dragging{
  transition: none !important;
  cursor: grabbing;
}

.gallery .ph{
  flex: 0 0 calc(
    (100% - (var(--gallery-gap) * (var(--gallery-visible) - 1)))
    / var(--gallery-visible)
  );
  aspect-ratio: 4 / 3;
  height: auto;
  padding: 0;
  overflow: hidden;
}

.gallery .ph img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav{
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.gallery-btn{
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--gallery-side-fade);
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.gallery-btn::before{
  content: "";
  position: absolute;
  inset: 0;
}

.gallery-btn.prev{
  left: 0;
}

.gallery-btn.prev::before{
  background: linear-gradient(
    to right,
    var(--gallery-edge-strong) 0%,
    rgba(0,0,0,.16) 42%,
    var(--gallery-edge-soft) 100%
  );
}

.gallery-btn.next{
  right: 0;
}

.gallery-btn.next::before{
  background: linear-gradient(
    to left,
    var(--gallery-edge-strong) 0%,
    rgba(0,0,0,.16) 42%,
    var(--gallery-edge-soft) 100%
  );
}

.gallery-btn span{
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--gallery-arrow-color);
}

.gallery-btn svg{
  width: 26px;
  height: 26px;
  display: block;
}

.gallery-btn[hidden]{
  display: none;
}

.gallery-counter{
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  min-width: 64px;
  padding: 7px 12px;
  border-radius: calc(var(--radius) * 0.6); 
  background: var(--gallery-counter-bg);
  color: var(--gallery-counter-color);
  font-size: 12px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.gallery-container.is-static .gallery-nav,
.gallery-container.is-static .gallery-counter{
  display: none;
}

@media (max-width: 680px){
  .gallery-btn{
    width: 58px;
  }

  .gallery-btn span{
    width: 40px;
    height: 40px;
  }

  .gallery-btn svg{
    width: 24px;
    height: 24px;
  }

  .gallery-counter{
    bottom: 10px;
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (prefers-reduced-motion: reduce){
  .gallery{
    transition: none !important;
  }
}

.ph{
  aspect-ratio: 4 / 3;
  height: auto;
}

.opening-hours{ display:grid; gap: calc(var(--space) / 3); max-width: 520px; }
.row{ display:flex; justify-content: space-between; gap: 12px; }

/* Прейскурант: сетка как у услуг, карточки как у часов (новое) */
.price-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--space) / 2);
  max-width: var(--price-max, 820px);
}

/* Большая фотка (новое) */
.big-photo{
  padding: 0;
  overflow: hidden;
  height: var(--big-photo-h, 360px);
}
.big-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map{ height: 320px; overflow:hidden; padding: 0; }
.map iframe{ width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

.social{
  display:flex;
  flex-wrap: wrap;
  gap: calc(var(--space) / 2);
  margin-top: calc(var(--space) / 2);
}

.social a{
  text-decoration:none;
  transition: var(--t);
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: var(--card-pad);
  border-radius: var(--radius);
  border: var(--card-border-width) solid var(--card-border-color);
  background: var(--card-bg);
  color: var(--text);
}

.social a:hover{ transform: scale(1.03); }

.social .iconify{ width: var(--social-icon); height: var(--social-icon); }

.social a.wa{ background: #25D366; color:#fff; border-color: transparent; }
.social a.tg{ background: #229ED9; color:#fff; border-color: transparent; }
.social a.vb{ background: #7360F2; color:#fff; border-color: transparent; }
.social a.fb{ background: #1877F2; color:#fff; border-color: transparent; }
.social a.tt{ background: #000000; color:#fff; border-color: transparent; }

.services .card{ display:flex; align-items:center; gap: 12px; }
.services .iconify{ width: var(--icon); height: var(--icon); flex-shrink: 0; }
.list .card{ display:flex; align-items:center; gap: 12px; }
.list .iconify{ width: var(--icon); height: var(--icon); flex-shrink: 0; }

.services-container .card{
  border-width: var(--services-card-border-width, var(--card-border-width));
  background: var(--services-card-bg, var(--card-bg));
  color: var(--services-card-text, var(--text));
}

.list-container .card{
  border-width: var(--list-card-border-width, var(--card-border-width));
  background: var(--list-card-bg, var(--card-bg));
  color: var(--list-card-text, var(--text));
}

.contacts-container .card{
  border-width: var(--contacts-card-border-width, var(--card-border-width));
  background: var(--contacts-card-bg, var(--card-bg));
  color: var(--contacts-card-text, var(--text));
}

.opening-hours-container .card{
  border-width: var(--hours-card-border-width, var(--card-border-width));
  background: var(--hours-card-bg, var(--card-bg));
  color: var(--hours-card-text, var(--text));
}

/* Прейскурант отдельно кастомится (новое) */
.price-container .card{
  border-width: var(--price-card-border-width, var(--hours-card-border-width, var(--card-border-width)));
  background: var(--price-card-bg, var(--hours-card-bg, var(--card-bg)));
  color: var(--price-card-text, var(--hours-card-text, var(--text)));
}


/* SEO accordion in HERO */
.hero-seo-toggle{
  cursor: default;
  user-select: none;
}

.hero-seo-accordion{
  margin-top: 10px;
}

.hero-seo-text{
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t, .35s) ease, opacity var(--t, .35s) ease;
}

.hero-seo-accordion.is-open .hero-seo-text{
  opacity: 1;
  max-height: 1200px;
}

.hero-seo-text a{
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ✅ Мобилка: больше иконок видно */
@media (max-width: 680px){
  :root{
    --h1-size: 32px;

    /* меньше размер повторяющегося паттерна = больше иконок на экране */
    --pattern-size: 190px;
    

    /* больше точек в тайле + чуть меньше иконка */
    --pattern-grid: 5;
    --pattern-icon-size: 26px;
  }

  .services{ grid-template-columns: 1fr; }
  .list{ grid-template-columns: 1fr; }
  .price-grid{ grid-template-columns: 1fr; }
  button{ padding: var(--btn-py) 40px; }

  .big-photo{ height: var(--big-photo-h-mobile, 240px); }
}


