/* Smile Plus — доводка: меню з випадним підменю, єдині кнопки, великий H1, стримана анімація */

/* Меню: пункт «Послуги» має підменю */
.menu,.menu .sub-menu{list-style:none;margin:0;padding:0}
.menu>li{position:relative}
.menu .menu-item-has-children>a::after{content:"";display:inline-block;margin-left:7px;width:6px;height:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);opacity:.8}
@media(min-width:1000px){
  .menu{flex-wrap:nowrap}
  .menu a{white-space:nowrap}
  .menu .sub-menu{position:absolute;left:0;top:100%;min-width:270px;padding:8px;background:var(--gd);border-radius:0 0 14px 14px;box-shadow:0 20px 40px rgba(0,0,0,.28);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s,transform .2s,visibility .2s;z-index:60}
  .menu li:hover>.sub-menu,.menu li:focus-within>.sub-menu{opacity:1;visibility:visible;transform:none}
  .menu .sub-menu a{padding:10px 14px;font-weight:500;font-size:.92rem}
}
@media(max-width:999px){
  .menu .sub-menu{padding:0 0 6px 14px}
  .menu .sub-menu a{padding:9px 8px;font-weight:500;font-size:.95rem;opacity:.9}
  .menu .menu-item-has-children>a::after{display:none}
}

/* Кнопки: один вигляд на всьому сайті */
.btn,.wpcf7 input[type=submit]{font-family:inherit;font-weight:700;text-transform:uppercase;letter-spacing:.04em;border-width:2px;min-height:50px;line-height:1.2}
.btn:hover,.wpcf7 input[type=submit]:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,74,66,.18)}
.btn:active{transform:none;box-shadow:none}
.btn:focus-visible,a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid var(--mint);outline-offset:2px}

/* Відступ кнопки «Усі статті» */
.cards+.center{margin-top:44px}

/* Шапка внутрішніх сторінок: компактніша */
.page-hero{padding:22px 0 28px}
.page-hero h1{font-size:clamp(1.7rem,3vw,2.4rem);line-height:1.15;margin:8px 0 0}
@media(max-width:700px){.page-hero{padding:16px 0 20px}.page-hero h1{font-size:1.6rem}}

/* Шапка сторінок і блок «У вас з’явилися запитання»: одна світла пляма рухається праворуч по фону,
   ліва частина (заголовок) лишається спокійною.
   Тільки CSS і лише transform (GPU, без JS, картинок і blur) — завантаження сторінки не уповільнює. */
.page-hero,.cta{position:relative;overflow:hidden;isolation:isolate}
.page-hero .wrap,.cta .wrap{position:relative;z-index:2}
.page-hero::before,.cta::before{
  content:"";position:absolute;pointer-events:none;z-index:1;
  top:-70%;bottom:-70%;left:54%;right:-12%;
  background:radial-gradient(closest-side,rgba(120,220,198,.55) 0,rgba(120,220,198,.22) 55%,transparent 100%);
  animation:hero-spot 14s ease-in-out infinite alternate;
  will-change:transform;
}
/* у блоці з формою пляма м’якша — щоб білі підписи полів лишалися контрастними */
.cta::before{
  top:-60%;bottom:-60%;
  background:radial-gradient(closest-side,rgba(120,220,198,.34) 0,rgba(120,220,198,.14) 55%,transparent 100%);
  animation-duration:17s;
}
@keyframes hero-spot{
  0%{transform:translate3d(-14%,-10%,0) scale(.9)}
  50%{transform:translate3d(10%,12%,0) scale(1.1)}
  100%{transform:translate3d(18%,-8%,0) scale(.95)}
}
@media(max-width:700px){.page-hero::before,.cta::before{left:38%;right:-30%;opacity:.7}}

/* Відгуки: по одному в ряд, форма відгуку праворуч у сайдбарі */
.reviews{grid-template-columns:1fr;gap:20px}
.reviews-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:40px;align-items:start}
.reviews-aside{position:sticky;top:calc(var(--hh) + 20px)}
.review-form-card{background:#fff;border:1px solid var(--line);border-top:4px solid var(--g);border-radius:var(--r);padding:26px 26px 28px;box-shadow:0 10px 30px rgba(15,74,66,.08)}
.review-form-card h2{margin:0 0 8px;font-size:1.35rem;color:var(--gd)}
.review-form-note{margin:0 0 18px;font-size:.9rem;color:#5a6b68}
.review-form-card label{display:block;font-weight:600;font-size:.92rem;margin-bottom:12px}
.review-form-card input[type=text],.review-form-card textarea{width:100%;margin-top:6px;font-family:inherit}
.review-form-card textarea{min-height:140px;resize:vertical}
.review-form-card .wpcf7-acceptance{display:block;margin:4px 0 16px;font-size:.88rem}
.review-form-card .wpcf7-acceptance label{display:flex;gap:10px;align-items:flex-start;font-weight:400;margin:0}
.review-form-card .wpcf7-acceptance input{margin-top:3px;flex:none}
.review-form-card .wpcf7 input[type=submit]{width:100%}
.hp-field{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
@media(max-width:999px){
  .reviews-layout{grid-template-columns:1fr;gap:32px}
  .reviews-aside{position:static}
}

/* Дата статті */
.post-date{margin:0 0 8px;font-size:.85rem;font-weight:600;letter-spacing:.02em;color:var(--g)}
.post-date::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:8px;vertical-align:middle;opacity:.7}
.post-date--single{margin:0 0 22px;font-size:.95rem}

/* H1 у слайдері: більший на десктопі */
@media(min-width:900px){
  .hero-title{font-size:clamp(2.8rem,5.4vw,4.9rem);line-height:1.08;max-width:980px}
  .hero-text{font-size:1.25rem;max-width:720px}
}
@media(min-width:1500px){.hero-title{font-size:5.2rem}}

/* H1 у два рядки (знак «|» у заголовку в налаштуваннях): кожен рядок не переноситься.
   На десктопі розмір звичайний; на вузьких екранах трохи менший, щоб перший рядок вмістився. */
.hero-title--lines{white-space:nowrap;max-width:none}
@media(max-width:899px){.hero-title--lines{font-size:min(clamp(2rem,4.4vw,3.4rem),calc((100vw - 40px) / 12.8))}}

/* Поява тексту в слайдері */
@keyframes smile-rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
.hero-title,.hero-text,.hero-actions{animation:smile-rise .8s cubic-bezier(.2,.7,.2,1) both}
.hero-text{animation-delay:.12s}
.hero-actions{animation-delay:.24s}

/* Поява блоків при прокручуванні (клас додає motion.js) */
.reveal{opacity:0;transform:translateY(22px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--d,0)*80ms)}
.reveal.is-in{opacity:1;transform:none}

/* «Наші послуги» на головній: блок = висота екрана мінус шапка (і нижня панель на телефоні).
   Плитки рівномірно заповнюють цю висоту; на низьких екранах і дуже довгому вмісті блок просто росте. */
#main>.section:first-child{
  min-height:calc(100vh - var(--hh) - var(--bar));
  min-height:calc(100svh - var(--hh) - var(--bar));
  display:flex;align-items:stretch;
  padding:clamp(20px,4vh,56px) 0;
}
#main>.section:first-child>.wrap{display:flex;flex-direction:column;width:100%}
#main>.section:first-child .section-title{margin-bottom:clamp(14px,3.2vh,34px)}
#main>.section:first-child .tiles{
  flex:1 1 auto;max-height:820px;width:100%;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:minmax(0,1fr);
  gap:clamp(10px,1.8vh,20px);
}
#main>.section:first-child .tile{justify-content:center;min-height:0;padding:clamp(12px,2vh,26px)}
@media(min-width:700px){#main>.section:first-child .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:700px) and (max-width:999px){
  #main>.section:first-child .tile{padding:14px}
  #main>.section:first-child .tile-t{font-size:1.02rem}
  #main>.section:first-child .tile-d{font-size:.86rem}
}
@media(max-width:699px){
  #main>.section:first-child .tile{align-items:center;text-align:center;gap:6px;padding:10px 8px}
  #main>.section:first-child .tile-ic img{width:clamp(34px,6.5vh,52px);height:clamp(34px,6.5vh,52px)}
  #main>.section:first-child .tile-t{font-size:clamp(.82rem,1.9vh,1rem);line-height:1.25}
  #main>.section:first-child .tile-d{display:none}
}
@media(max-height:520px){
  #main>.section:first-child{min-height:0}
  #main>.section:first-child .tiles{grid-auto-rows:auto}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .reveal{opacity:1;transform:none}
}
