/* Оформление старого plastica.pro (2013): те же цвета, шрифты и картинки, но на гриде, с мобильной версией и без jQuery.
   Шрифт заголовков в старом CSS был Myriad Pro, которого у посетителей нет: браузеры показывали Times, его и оставили */
:root {
  --teal: #56a0ab;
  --teal-dark: #2c8693;
  --teal-text: #37737b;
  --salmon: #d98670;
  --salmon-light: #ec9078;
  --salmon-dark: #c77964;
  --salmon-text: #c3735d;
  --heading: #c1735e;
  --grey: #e3e3e3;
  --page: #f3f3f3;
  --text: #343434;
  --display: "Times New Roman", Times, "Liberation Serif", serif;
  --body: Arial, "Liberation Sans", Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.35 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--salmon); outline-offset: 2px; }
.container { width: min(950px, 100% - 2rem); margin-inline: auto; }

/* Шапка: на фоне светлая полоса и бирюзовая с узором, круглый логотип заходит на обе */
.site-header { background: url("/assets/header-7c8993c6.jpg") 0 0 repeat-x; }
.site-header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: start; column-gap: 15px; padding-top: 8px; }
.site-header__logo img { display: block; width: 148px; height: 148px; }
.site-header__slogan { margin: 44px 0 0; color: #fff; font: 30px/68px var(--display); }
.site-header__phone { margin: 44px 0 0; color: #fff; font: 23px/68px var(--display); white-space: nowrap; }
.site-header__phone a { color: inherit; text-decoration: none; }
.site-header__phone a span { color: #86d2dd; }
.burger { display: none; }

/* Меню */
.site-nav { grid-column: 1 / -1; margin: 9px 0 24px; }
.site-nav__list { display: flex; margin: 0; padding: 0; list-style: none; background: var(--salmon); }
.site-nav__list > li { position: relative; flex: 1; text-align: center; }
.site-nav__list > li > a { display: block; color: #fff; font: 17px/35px var(--display); }
.site-nav__list > li > a:hover { text-decoration: none; }
.site-nav__list > li.is-current::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; translate: -50% 0;
  border: 6px solid transparent; border-width: 6px 10px 0; border-top-color: var(--salmon);
}
.site-nav__dropdown {
  display: none; position: absolute; z-index: 10; top: 100%; left: 50%; translate: -50% 0; width: 680px;
  margin: 0; padding: 15px; list-style: none; columns: 3 200px; column-gap: 20px; text-align: left;
  background: var(--salmon-light); box-shadow: 0 1px 4px rgb(0 0 0 / .3), 0 0 40px rgb(0 0 0 / .1) inset;
}
.site-nav__services:hover .site-nav__dropdown, .site-nav__services:focus-within .site-nav__dropdown { display: block; }
.site-nav__dropdown li { break-inside: avoid; }
.site-nav__dropdown a { display: inline-block; padding: 5px 10px; color: #fff; font: 15px/16px var(--display); text-decoration: none; }
.site-nav__dropdown a:hover { text-decoration: underline; }

/* Колонки: слева панель «Особенности» или «Услуги», справа содержимое */
.columns { display: grid; grid-template-columns: 265px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { margin-bottom: 4px; }
.panel__title { position: relative; margin: 0; padding: 0 0 0 30px; background: var(--teal); color: #fff; font: 23px/44px var(--display); font-weight: normal; }
.panel__body { margin: 0; padding: 15px 10px; background: var(--grey); }

.features__list { list-style: none; }
.features__list li {
  display: flex; align-items: center; min-height: 46px; margin-bottom: 2px; padding-left: 60px;
  color: #313131; font: 16px/18px var(--display);
  background: var(--icon) 10px 50% no-repeat, url("/assets/line-left-c7f8146c.png") 60px 100% no-repeat;
}
.features__quality { --icon: url("/assets/icons/quality-febdfb8a.png"); }
.features__discount { --icon: url("/assets/icons/discount-759f9ef0.png"); }
.features__location { --icon: url("/assets/icons/location-f74e996b.png"); }
.features__bonus { --icon: url("/assets/icons/bonus-93aec013.png"); }
.features__dentaspa { --icon: url("/assets/icons/dentaspa-008d54d5.png"); }

.services-menu ul { margin: 0; padding: 0; list-style: none; }
.services-menu li, .services-menu__group-title { margin-left: 28px; padding: 8px 0; background: url("/assets/line-left-c7f8146c.png") 0 100% no-repeat; }
.services-menu li a, .services-menu__group-title { color: #303030; font: 16px/1.15 var(--display); text-decoration: none; }
.services-menu li a:hover { text-decoration: underline; }
.services-menu li.is-current { padding-left: 12px; background: url("/assets/icons/li-arrows-fca38f4c.png") 0 50% no-repeat, url("/assets/line-left-c7f8146c.png") 0 100% no-repeat; }
.services-menu li.is-current a { color: #3e8691; }
.services-menu__group-title { display: block; width: calc(100% - 28px); border: 0; text-align: left; cursor: pointer; }
.services-menu__group-title::after { content: " ▾"; color: var(--teal); }
.services-menu__group ul { display: none; }
.services-menu__group.is-open ul { display: block; }
.services-menu__group li { margin-left: 43px; }

/* Главная */
.intro { display: grid; grid-template-columns: 324px minmax(0, 1fr); margin-bottom: 23px; }
.intro__text { padding: 20px; background: var(--grey); color: var(--teal-text); font: 13px/1.15 var(--body); }
.intro__text p { margin: 0; }
.intro__image { display: block; width: 100%; height: 100%; object-fit: cover; }

.consultation { margin: 0 0 24px 37px; }
.consultation__title { margin: 0; color: var(--teal-dark); font: 23px/44px var(--display); font-weight: normal; }

.doctor { display: grid; grid-template-columns: 95px minmax(0, 1fr); column-gap: 20px; margin-bottom: 15px; }
.doctor__photo { grid-row: span 3; }
.doctor__photo img { display: block; }
.doctor__name { margin: 0 0 8px; font: 600 18px/1.2 var(--display); }
.doctor__name a { color: var(--teal-dark); text-decoration: none; }
.doctor p { margin: 0; color: #2e2e2e; font: 13px/1.15 var(--body); }
.doctor .doctor__more, .more-link { text-align: right; }
.doctor__more a, .more-link a { color: var(--salmon-text); font: 13px var(--body); }

.before-after { margin-top: 40px; }
.before-after__slide { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.before-after__slide[hidden] { display: none; }
.before-after__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; }
.before-after__pair img { display: block; width: 100%; }
.before-after figcaption { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 4px; font: 21px/43px var(--body); text-align: center; }
.before-after figcaption span:first-child { background: #d6d6d6; color: #494949; }
.before-after figcaption span:last-child { background: var(--teal); color: #fff; }
.more-link { margin: 25px 0 0; }

/* Внутренние страницы */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0 .4em; margin: 0 0 15px; padding: 0; list-style: none; color: var(--teal); font: 700 13px var(--body); }
.breadcrumbs li:not(:last-child)::after { content: "→"; margin-left: .4em; color: var(--text); font-weight: 400; }
.breadcrumbs a { color: var(--text); font-weight: 400; }
.page-title { margin: 0 0 20px; color: var(--teal); font: 27px/1.2 var(--display); font-weight: normal; }

.text { font: 15px/1.35 var(--body); }
.text::after { content: ""; display: table; clear: both; }
.text p { margin: 0 0 15px; text-align: justify; hyphens: auto; }
.text ul, .text ol { margin: 10px 0 15px 25px; padding: 0; }
.text li { margin-bottom: 4px; }
.text li p { margin-bottom: 4px; }
.text h2 { margin: 22px 0 10px; color: var(--heading); font: 18px/1.3 var(--body); }
.text h2:first-child { margin-top: 0; }
.text .left { float: left; margin: 0 20px 15px 0; }
.text .right { float: right; margin: 0 0 15px 20px; }
.text .center { text-align: center; }
.text img.center { display: block; margin-inline: auto; }

.portfolio-link { display: inline-block; margin: 15px 0 20px; padding-left: 70px; color: var(--teal); font: 18px/66px var(--display); background: url("/assets/icons/link-to-portfolio-f56a7250.png") 0 0 no-repeat; }

.section-title { margin: 25px 0 5px; color: var(--heading); font: 21px/1.2 var(--display); font-weight: normal; }
.service-list { margin: 0 0 20px; padding: 0; list-style: none; }
.service-list li { padding: 12px 0; border-bottom: 1px solid var(--grey); }
.service-list h3 { margin: 0 0 4px; font: 19px/1.2 var(--display); font-weight: normal; }
.service-list p { margin: 0; color: #555; font-size: 13px; }

/* Фото до и после */
.gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.gallery-card { display: block; color: var(--teal-dark); text-decoration: none; }
.gallery-card img { display: block; width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 5px; }
.gallery-card__title { display: block; margin-top: 6px; font: 17px/1.2 var(--display); }
.gallery-card:hover .gallery-card__title { text-decoration: underline; }
.gallery-card__count { display: block; color: #777; font-size: 13px; }

.gallery-menu ul { margin: 0 0 25px; padding: 0; list-style: none; columns: 3 190px; column-gap: 10px; }
.gallery-menu li { position: relative; margin-bottom: 6px; padding-left: 10px; break-inside: avoid; }
.gallery-menu li::before { content: ""; position: absolute; top: 5px; left: 0; border: 4px solid transparent; border-left: 5px solid var(--teal); }
.gallery-menu a { color: #3e8691; }
.gallery-menu li.is-current::before { border-left-color: var(--salmon); }
.gallery-menu li.is-current a { color: var(--salmon); text-decoration: none; }

.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; margin: 0; padding: 0; list-style: none; }
.case__link { position: relative; display: block; overflow: hidden; border: 1px solid var(--grey); border-radius: 5px; background: #fff; text-decoration: none; }
.case__link[hidden] { display: none; }
.case__link img { display: block; width: 100%; aspect-ratio: 2; object-fit: cover; }
.case__labels { display: flex; justify-content: space-between; padding: 0 6px; background: var(--salmon); color: #fff; font: 15px/21px var(--display); }
.case__more { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 3px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; }
.gallery-about { margin: 25px 0 0; }

/* Заявка */
.inquiry-form { display: flex; flex-direction: column; }
.inquiry-form label { margin-bottom: 3px; color: #3f3f3f; font: 14px var(--display); }
.inquiry-form input:not([type="submit"]), .inquiry-form textarea {
  width: 100%; margin-bottom: 10px; padding: 10px; border: 1px solid #acacac; border-radius: 5px;
  background: #fff; color: #1a171b; font: 15px var(--body);
}
.inquiry-form textarea { min-height: 72px; resize: vertical; }
.inquiry-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inquiry-form__errors { margin: 0 0 10px; color: #c0392b; }
.field_with_errors { display: contents; }
.field_with_errors input, .field_with_errors textarea { border-color: #c0392b; }
.button { align-self: flex-end; padding: 5px 14px; border: 0; border-radius: 5px; background: var(--salmon); color: #fff; font: 16px var(--display); cursor: pointer; }
.button:hover { background: var(--salmon-dark); }

/* Подвал */
.site-footer { margin-top: 10px; border-bottom: 7px solid var(--teal); font: 13px/22px var(--body); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 20px; padding: 20px 0; background: url("/assets/line-left-c7f8146c.png") 0 0 no-repeat, url("/assets/line-right-af95fff7.png") 100% 0 no-repeat; }
.site-footer p { margin: 0; color: #2e2e2e; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a span { color: var(--teal); font-weight: 700; }

/* Просмотр фото */
.lightbox { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / .85); }
.lightbox__image { max-width: 92vw; max-height: 86vh; background: #fff; box-shadow: 0 0 20px #000; }
.lightbox__counter { position: fixed; right: 0; bottom: 12px; left: 0; margin: 0; color: #fff; font-size: 14px; text-align: center; }
.lightbox form { margin: 0; }
.lightbox__prev, .lightbox__next, .lightbox__close {
  position: fixed; width: 48px; height: 64px; border: 0; border-radius: 4px;
  background: rgb(0 0 0 / .45); color: #fff; font: 40px/1 var(--body); cursor: pointer;
}
.lightbox__prev { top: 50%; left: 10px; translate: 0 -50%; }
.lightbox__next { top: 50%; right: 10px; translate: 0 -50%; }
.lightbox__close { top: 10px; right: 10px; height: 48px; }
.lightbox [hidden] { display: none; }

/* Узкий компьютер и планшет */
@media (max-width: 989px) {
  .site-header__slogan { font-size: 24px; }
  .site-header__label { display: none; }
}

/* Телефон */
@media (max-width: 767px) {
  .container { width: 100%; }
  .site-header { background: none; }
  .site-header__inner { position: relative; grid-template-columns: auto minmax(0, 1fr); padding: 0 0 4px; background: url("/assets/header-mobile-bc91aeff.jpg") center / cover; }
  .site-header__logo img { width: 65px; height: 65px; margin: 2px 0 0 15px; }
  .site-header__slogan { margin: 0; font: 18px/69px var(--display); }
  .site-header__phone { grid-column: 1 / -1; margin: 3px 0 0; font: 17px/24px var(--display); text-align: center; }
  .site-header__label { display: inline; }
  .burger { display: block; position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
  .burger span { display: block; height: 4px; margin-bottom: 6px; background: #fff; transition: transform .3s, opacity .3s; }
  .is-open > .burger span:nth-child(1), .is-open > .panel__title .burger span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .is-open > .burger span:nth-child(2), .is-open > .panel__title .burger span:nth-child(2) { opacity: 0; }
  .is-open > .burger span:nth-child(3), .is-open > .panel__title .burger span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
  .site-nav { display: none; margin: 4px 0 0; }
  .is-open > .site-nav { display: block; }
  .site-nav__list { display: block; }
  .site-nav__list > li + li { border-top: 1px solid rgb(255 255 255 / .35); }
  .site-nav__list > li.is-current::after, .site-nav__dropdown { display: none !important; }

  .intro, .columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .columns__main { padding: 10px; }
  .services-menu .panel__title { padding-left: 70px; }
  .consultation__title { margin-bottom: 8px; font-size: 21px; line-height: 1.25; }
  .services-menu__toggle { top: 8px; left: 27px; }
  .services-menu__body { display: none; }
  .services-menu.is-open .services-menu__body { display: block; }
  .consultation { margin: 0 0 24px; }
  .text p { text-align: left; }
  .text .left, .text .right { float: none; display: block; margin: 0 auto 15px; }
  .before-after__slide { grid-template-columns: minmax(0, 1fr); }
  .gallery-menu ul { columns: 2 140px; }
  .cases, .gallery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .site-footer__inner { flex-direction: column; align-items: center; }
}
