/*
Theme Name: Прокапать
Author: Slava Khripushin
Author URI: https://t.me/s_khripushin
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* City select (header dropdown) */
.city-select {
  position: relative;
  display: inline-flex;
  margin-bottom: 8px;
}
.city-select__trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  user-select: none;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #e0e6f0;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.city-select__trigger:hover {
  border-color: #2260cc;
  box-shadow: 0 0 0 3px rgba(34,96,204,.08);
}
.city-select__name { font-weight: 600; }
.city-select__chevron { transition: transform .2s; }
.city-select.open .city-select__chevron { transform: rotate(180deg); }
.city-select__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  overflow: hidden;
  z-index: 300;
  min-width: 150px;
}
.city-select.open .city-select__dropdown { display: block; }
.city-opt {
  display: block;
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background .15s;
}
.city-opt:hover { background: #f0f4ff; }
.city-opt.active { color: #2260cc; font-weight: 700; }

/* City popup (first visit) */
.city-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.city-popup.visible { opacity: 1; }
.city-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.city-popup__box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px 48px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.city-popup__icon { margin-bottom: 12px; }
.city-popup__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111;
}
.city-popup__desc {
  font-size: 14px;
  color: #777;
  margin: 0 0 28px;
  line-height: 1.5;
}
.city-popup__list {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.city-popup__btn {
  flex: 1;
  padding: 16px 12px;
  border: 2px solid #e0e6f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  color: #222;
  transition: .2s;
}
.city-popup__btn:hover {
  border-color: #2260cc;
  background: #f0f4ff;
}
.city-popup__btn-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
@media (max-width: 480px) {
  .city-popup__box { padding: 30px 20px; }
  .city-popup__list { flex-direction: column; }
}

/* City content toggle */
body.city-moscow .yaroslavl-only { display: none; }
body.city-yaroslavl .moscow-only { display: none; }

.manager {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  z-index: 100;
  border-radius: 25px;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  box-shadow: 0px 16px 59px 0px rgba(83, 86, 95, 0.1), 0px 66px 107px 0px rgba(83, 86, 95, 0.09), 0px 148px 145px 0px rgba(83, 86, 95, 0.05), 0px 264px 171px 0px rgba(83, 86, 95, 0.01);
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  transition: .25s; }
  .manager-photo {
    width: 80px;
    height: 80px;
    border-radius: 100%;
    object-fit: cover;
    object-position: center; }
  .manager-name {
    font-weight: 600;
    line-height: 1.25;
    margin-top: 10px; }
  .manager-spec {
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 15px;
    font-weight: 500; }
  .manager-whatsapp {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-weight: 700;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #7DC76B;
    box-shadow: 4px 3px 13px 0px rgba(255, 255, 255, 0.25) inset;
    color: #fff;
    font-size: 13px; }

  .manager-phone {
    font-size: 18px;
    font-weight: 600; }
    .manager-phone i {
      opacity: 0.1;
      font-style: normal; }
  .manager-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 40;
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 9L27 27M9 27L27 9L9 27Z' stroke='%2318181B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center/cover; }
  .manager.hide {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    pointer-events: none; }
  .manager-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    border-top-left-radius: 40px; }
    .manager-icon::before {
      content: '';
      position: absolute;
      top: 6px;
      right: 6px;
      width: 16px;
      height: 16px;
      border-radius: 100%;
      background: #7dc76b;
      border: 3px solid #fff;
      animation: online 2s linear infinite; }
    .manager-icon img {
      width: 80px;
      height: 80px;
      border-radius: 100%;
      object-fit: cover;
      object-position: center;
      cursor: pointer;
      box-shadow: 0px 16px 59px 0px rgba(83, 86, 95, 0.1), 0px 66px 107px 0px rgba(83, 86, 95, 0.09), 0px 148px 145px 0px rgba(83, 86, 95, 0.05), 0px 264px 171px 0px rgba(83, 86, 95, 0.01);
      border: 3px solid #fff; }
    .manager-icon span {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: 100%;
      pointer-events: none; }
      .manager-icon span::before, .manager-icon span::after {
        content: '';
        display: block;
        position: absolute;
        border: 2px solid #7dc76b;
        left: -20px;
        right: -20px;
        top: -20px;
        bottom: -20px;
        border-radius: 50%;
        opacity: 0;
        animation: pulse 1.8s linear infinite; }
      .manager-icon span::after {
        animation-delay: .5s; }

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0; }
  50% {
    opacity: .4; }
  100% {
    transform: scale(1.2);
    opacity: 0; } }

@keyframes online {
  0% {
    background: #23d323; }
  40% {
    background: #23d323; }
  50% {
    background: #fff; }
  60% {
    background: #23d323; }
  100% {
    background: #23d323; } }

@keyframes size {
  0% {
    transform: scale(1); }
  50% {
    transform: scale(1.05); }
  100% {
    transform: scale(1); } }

@media(max-width: 576px) {
	.manager,.manager-icon {
        right: 10px;
        bottom: 10px
    }

    .manager-icon::before {
        top: 3px;
        right: 3px;
        border: 2px solid #fff;
        width: 14px;
        height: 14px
    }

    .manager-icon img {
        width: 60px;
        height: 60px;
        border: 2px solid #fff
    }
}
@media (min-width:1024px){
  .header-nav > li{position:relative}
  .header-nav .sub-menu{
    position:absolute;top:100%;left:0;z-index:50;
    display:flex;flex-direction:column;gap:4px;min-width:240px;
    margin:0;padding:20px;list-style:none;
    background:#fff;border-radius:20px;box-shadow:0 2px 20px rgba(0,0,0,.1);
    opacity:0;visibility:hidden;transform:translateY(8px);
    transition:opacity .2s,transform .2s,visibility .2s;
  }
  .header-nav > li:hover > .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
  .header-nav.hide{pointer-events:none}
  .header-nav .sub-menu li{margin:0}
  .header-nav .sub-menu a{
    display:block;padding:12px 16px;border-radius:10px;
    font-size:16px;font-weight:600;letter-spacing:.05em;line-height:normal;
    color:#2f333a;text-decoration:none;white-space:nowrap;text-transform:uppercase;
    transition:background .2s,color .2s;
  }
  .header-nav .sub-menu a:hover,
  .header-nav .sub-menu .current-menu-item>a{color:#5c77b2;background:#f7f9fc}
  .header-nav .sub-menu .sub-menu{top:0;left:100%}
}

@media (min-width:1024px){
  .header-nav > li.mega > .mega-panels{
    position:absolute;top:100%;left:0;z-index:50;
    display:flex;width:795px;max-width:calc(100vw - 40px);height:568px;
    background:#fff;border-radius:20px;overflow:hidden;
    box-shadow:0 2px 20px rgba(0,0,0,.1);
    opacity:0;visibility:hidden;transform:translateY(8px);
    transition:opacity .25s ease,transform .25s ease,visibility .25s ease;pointer-events:none;
  }
  .header-nav > li.mega:hover > .mega-panels{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
  .header-nav.hide > li.mega > .mega-panels{opacity:0;visibility:hidden}

  .mega-left{flex:0 0 420px;width:420px;height:100%;background:#fff;overflow-y:auto;padding:20px}
  .mega-right{flex:0 0 375px;width:375px;height:100%;background:#f7f7f7;overflow-y:auto;padding:20px}

  .mega-panels .sub-menu{
    position:static;z-index:auto;min-width:0;width:auto;
    display:flex;flex-direction:column;gap:6px;
    padding:0;margin:0;background:transparent;border-radius:0;box-shadow:none;
    opacity:1;visibility:visible;transform:none;
  }
  .mega-left > .sub-menu > li{width:100%}
  .mega-left > .sub-menu > li > a{
    display:flex;align-items:center;justify-content:space-between;gap:16px;
    padding:14px 16px;border-radius:10px;
    font-family:"Raleway",Helvetica,sans-serif;font-weight:600;font-size:16px;
    letter-spacing:.05em;line-height:1.25;color:#2f333a;text-transform:uppercase;
    text-decoration:none;white-space:normal;
    transition:background .2s ease,color .2s ease;
  }
  .mega-left > .sub-menu > li > a::after{
    content:"";flex:0 0 auto;width:8px;height:8px;
    border-right:2px solid currentColor;border-bottom:2px solid currentColor;
    transform:rotate(-45deg);opacity:.5;transition:opacity .2s ease;
  }
  .mega-left > .sub-menu > li:hover > a{color:#5c77b2;background:rgba(92,119,178,.08)}
  .mega-left > .sub-menu > li.is-active > a{background:#214798;color:#fff}
  .mega-left > .sub-menu > li.is-active > a::after{opacity:1}
  /* Направления без подпунктов (напр. Гемодиализ) — обычная ссылка без стрелки */
  .mega-left > .sub-menu > li:not(.menu-item-has-children) > a::after{content:none}

  .mega-title{
    margin:0 0 12px;padding:6px 16px 0;
    font-family:"Raleway",Helvetica,sans-serif;font-weight:700;font-size:24px;
    letter-spacing:.05em;line-height:1.25;color:#214798;text-transform:none;
  }
  .mega-right > .sub-menu > li > a{
    display:block;padding:10px 16px;border-radius:10px;
    font-family:"Raleway",Helvetica,sans-serif;font-weight:600;font-size:16px;
    letter-spacing:.05em;line-height:1.3;color:#2f333a;text-transform:none;
    text-decoration:none;white-space:normal;
    transition:background .2s ease,color .2s ease;
  }
  .mega-right > .sub-menu > li > a:hover{color:#5c77b2;background:rgba(92,119,178,.08)}
  /* Правая панель: длинные названия переносятся, не обрезаются */
  .mega-right .sub-menu a{white-space:normal}
  .mega-right > .sub-menu{gap:10px}
  /* Пункты-услуги (4-й уровень) — мелкий обычный текст по макету */
  .mega-right .sub-menu .sub-menu{gap:0}
  .mega-right .sub-menu .sub-menu a{
    padding:5px 16px;font-weight:400;font-size:13px;line-height:21px;
    letter-spacing:.05em;color:#2f333a;text-transform:none;
  }
  .mega-right .sub-menu .sub-menu a:hover{color:#5c77b2;background:rgba(92,119,178,.08)}
  /* Кастомная тонкая полоска-скролл по макету */
  .mega-left,.mega-right{scrollbar-width:thin;scrollbar-color:#214798 #e6e6e7}
  .mega-left::-webkit-scrollbar,.mega-right::-webkit-scrollbar{width:4px}
  .mega-left::-webkit-scrollbar-track,.mega-right::-webkit-scrollbar-track{background:#e6e6e7;border-radius:2px}
  .mega-left::-webkit-scrollbar-thumb,.mega-right::-webkit-scrollbar-thumb{background:#214798;border-radius:2px}
}

@media (min-width:1024px){
  .header-nav > li.mega > a{color:rgba(47,51,58,.5)}
  .header-nav > li.mega:hover > a{color:#5c77b2}
}

.mmenu{display:none}
@media (max-width:1023px){
  .header-nav{display:none!important}
  .mmenu{display:block;position:fixed;inset:0;z-index:10000;background:#fff;transform:translateX(100%);transition:transform .3s ease;overflow:hidden}
  body.mmenu-open{overflow:hidden}
  body.mmenu-open .mmenu{transform:translateX(0)}
  .mmenu-close{position:absolute;top:20px;right:20px;z-index:30;width:40px;height:40px;border:1px solid #5c77b2;border-radius:10px;background:#fff;cursor:pointer;padding:0}
  .mmenu-close::before,.mmenu-close::after{content:"";position:absolute;left:50%;top:50%;width:3px;height:18px;background:#5c77b2;border-radius:2px}
  .mmenu-close::before{transform:translate(-50%,-50%) rotate(45deg)}
  .mmenu-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
  .mmenu-body{position:absolute;inset:0;display:flex;flex-direction:column;padding-top:80px;overflow-y:auto}
  .mmenu-list{list-style:none;margin:0;padding:0 20px;display:flex;flex-direction:column}
  .mmenu-list li{position:relative}
  .mmenu-list li>a{display:flex;align-items:center;min-height:56px;padding:0 16px;border-bottom:1px solid #e6e6e780;font-family:"Raleway",Helvetica,sans-serif;font-weight:600;font-size:14px;letter-spacing:.05em;text-transform:uppercase;color:#2f333a;text-decoration:none}
  .mmenu-list li.menu-item-has-children>a{padding-right:56px}
  .mmenu-arrow{position:absolute;top:0;right:0;width:56px;height:56px;border:0;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
  .mmenu-arrow::before{content:"";width:8px;height:8px;border-right:2px solid #2f333a;border-bottom:2px solid #2f333a;transform:rotate(-45deg)}
  .mmenu-list .sub-menu{list-style:none;margin:0;position:fixed;inset:0;background:#fff;z-index:20;transform:translateX(100%);transition:transform .3s ease;overflow-y:auto;padding:80px 20px 20px}
  .mmenu-list .sub-menu.is-open{transform:translateX(0)}
  .mmenu-back{display:flex;align-items:center;gap:16px;width:100%;min-height:56px;margin-bottom:8px;padding:0 16px;border:0;border-radius:10px;background:#214798;color:#fff;font-family:"Raleway",Helvetica,sans-serif;font-weight:600;font-size:14px;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;text-align:left}
  .mmenu-back::before{content:"";flex:0 0 auto;width:8px;height:8px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg)}
  .mmenu-list .sub-menu .sub-menu li>a{text-transform:none;font-weight:400;font-size:16px}
  .mmenu-list li.bvi-open{margin-top:16px}
  .mmenu-list li.bvi-open>a{color:#5c77b2;text-decoration:underline;text-underline-offset:3px;border-bottom:0;gap:5px}
  .mmenu-list li.bvi-open>a::before{content:"";width:18px;height:18px;flex:0 0 auto;background:url(img/menu/eye.svg) center/contain no-repeat}
  .mmenu-info{margin-top:auto;padding:24px 36px;background:#f7f7f7}
  .mmenu-info__row{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-family:"Raleway",Helvetica,sans-serif;font-size:14px;color:#2f333a}
  .mmenu-info__row img{width:20px;height:20px;flex:0 0 auto}
  .mmenu-info__slogan{margin:8px 0 0;font-family:"Raleway",Helvetica,sans-serif;font-size:14px;letter-spacing:.05em;color:#2f333a80}
}

/* Header top row: city select + BVI (visually impaired) toggle */
.header-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.header-bvi{display:inline-flex;align-items:center;gap:6px;margin-bottom:8px;color:#5c77b2;font-size:13px;font-weight:600;line-height:1.2;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;cursor:pointer;white-space:nowrap}
.header-bvi:hover{color:#214798}
.header-bvi::before{content:"";width:18px;height:18px;flex:0 0 auto;background:url(../img/svg/eye.svg) center/contain no-repeat}
@media (max-width:1023px){.header-bvi{display:none}}
