/*
Theme Name: Zav Clinic
Theme URI: https://zavclinic.ru/
Author: Zav Clinic
Description: Custom editable WordPress theme for Zav Clinic.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: zavclinic
*/

:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --soft: #f7f9fc;
  --blue: #3558f5;
  --blue-dark: #223bc2;
  --blue-soft: #eef2ff;
  --navy: #0d1425;
  --mint: #eaf9f2;
  --green: #16805c;
  --radius: 24px;
  --shadow: 0 20px 55px rgba(16, 24, 40, 0.1);
  --container: min(1180px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: var(--container); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { width: auto; height: auto; clip: auto; padding: 12px 18px; background: #fff; z-index: 9999; top: 8px; left: 8px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.contact-strip { border-bottom: 1px solid #edf0f7; background: #fbfcff; }
.contact-strip__inner { min-height: 42px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; font-size: 14px; }
.contact-strip__address { color: var(--muted); }
.contact-strip__center { justify-self: center; font-weight: 800; color: var(--blue-dark); padding: 5px 14px; border-radius: 999px; background: var(--blue-soft); white-space: nowrap; }
.contact-strip__phones { justify-self: end; display: flex; align-items: center; gap: 14px; }
.contact-strip__phones a { font-weight: 800; white-space: nowrap; }
.contact-strip__phones a:first-child { color: var(--blue); }
.nav-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-logo img { width: 142px; max-height: 58px; object-fit: contain; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; font-size: 15px; font-weight: 650; }
.main-nav a { position: relative; padding: 8px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px; background: var(--blue); transition: right .2s ease; }
.main-nav a:hover::after, .main-nav .current-menu-item a::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-call { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 800; box-shadow: 0 10px 26px rgba(53,88,245,.24); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 14px; background: #fff; align-items: center; justify-content: center; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 22px; height: 2px; background: var(--ink); content: ""; position: relative; }
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

.hero { position: relative; min-height: 630px; display: grid; align-items: center; overflow: hidden; background: var(--navy); color: #fff; }
.hero__slides, .hero__slide, .hero__overlay { position: absolute; inset: 0; }
.hero__slide { opacity: 0; transition: opacity .8s ease; background-size: cover; background-position: center; }
.hero__slide.is-active { opacity: 1; }
.hero__overlay { background: linear-gradient(90deg, rgba(5,11,24,.88) 0%, rgba(5,11,24,.62) 48%, rgba(5,11,24,.34) 100%); }
.hero__content { position: relative; z-index: 2; width: min(800px, 100%); padding: 90px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.hero .eyebrow { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.hero h1 { margin: 0; max-width: 780px; font-size: clamp(42px, 6vw, 76px); line-height: 1.04; letter-spacing: -.045em; }
.hero__lead { max-width: 690px; margin: 24px 0 0; color: rgba(255,255,255,.86); font-size: clamp(18px, 2vw, 22px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: #fff; background: var(--blue); box-shadow: 0 14px 34px rgba(53,88,245,.3); }
.button--light { color: var(--ink); background: #fff; }
.button--outline { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.hero__note { margin-top: 22px; color: rgba(255,255,255,.7); font-size: 14px; }
.hero__dots { position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero__dot { width: 10px; height: 10px; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); padding: 0; }
.hero__dot.is-active { width: 34px; border-radius: 99px; background: #fff; }

.case-marquee { width: 100%; max-width: 100vw; overflow: hidden; contain: paint; border-bottom: 1px solid #dfe6ff; background: var(--blue); color: #fff; }
.case-marquee__track { width: max-content; display: flex; gap: 48px; padding: 13px 0; animation: marquee 28s linear infinite; font-weight: 800; letter-spacing: .01em; }
.case-marquee__track span::before { content: "✦"; margin-right: 18px; opacity: .72; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.section { padding: 96px 0; }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy); color: #fff; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 38px; }
.section-heading h2, .page-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.section-heading p { max-width: 650px; margin: 12px 0 0; color: var(--muted); }
.section--navy .section-heading p { color: rgba(255,255,255,.7); }
.link-arrow { color: var(--blue); font-weight: 800; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(16,24,40,.05); }
.card__media { aspect-ratio: 4/3; overflow: hidden; background: #eef1f6; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card__media img { transform: scale(1.035); }
.card__body { padding: 26px; }
.card h3 { margin: 0 0 10px; font-size: 23px; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); }

.doctor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.doctor-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.doctor-card__photo { aspect-ratio: 4/5; background: #e8eef8; overflow: hidden; }
.doctor-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.doctor-card__body { padding: 22px; }
.doctor-card h2, .doctor-card h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; }
.doctor-card p { margin: 0; color: var(--muted); font-size: 15px; }

.feature-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: stretch; }
.feature-split__image { min-height: 460px; border-radius: 30px; overflow: hidden; }
.feature-split__image img { width: 100%; height: 100%; object-fit: cover; }
.feature-split__content { padding: 54px; border-radius: 30px; background: var(--navy); color: #fff; }
.feature-split__content h2 { margin: 0 0 18px; font-size: clamp(34px, 4vw, 50px); line-height: 1.06; }
.feature-split__content p { color: rgba(255,255,255,.74); }
.feature-list { list-style: none; margin: 28px 0; padding: 0; }
.feature-list li { position: relative; padding: 9px 0 9px 30px; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; top: 9px; color: #7bf0c4; font-weight: 900; }

.price-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.price-filter { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 750; }
.price-filter.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.price-search { width: 100%; max-width: 520px; min-height: 52px; margin-bottom: 24px; padding: 0 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.price-section { margin-bottom: 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.price-section__title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 21px 24px; background: #f8faff; font-size: 22px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 17px 22px; border-top: 1px solid #edf0f4; text-align: left; vertical-align: top; }
.price-table th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.price-table th:last-child, .price-table td:last-child, .price-table th:nth-last-child(2), .price-table td:nth-last-child(2) { text-align: right; white-space: nowrap; }
.price-code { color: var(--muted); font-size: 12px; margin-top: 4px; }
.member-price { color: var(--green); font-weight: 850; }
.price-note { padding: 18px 22px; border-radius: 16px; background: var(--mint); color: #145d46; }

.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.case-card { position: relative; overflow: hidden; border-radius: 22px; background: #e9edf3; }
.case-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.case-card__caption { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(10,17,31,.82); color: #fff; backdrop-filter: blur(8px); font-weight: 700; }

.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.review-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.review-stars { color: #ffb400; letter-spacing: 2px; }
.review-card blockquote { margin: 16px 0; }
.review-card cite { color: var(--muted); font-style: normal; font-weight: 750; }
.review-form { max-width: 760px; margin-top: 40px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 14px; border: 1px solid #d0d5dd; border-radius: 12px; background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }

.page-hero { padding: 82px 0 64px; background: linear-gradient(135deg, #f0f4ff, #fff 58%, #eefaf6); }
.page-hero p { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 19px; }
.prose { max-width: 850px; }
.prose h2 { margin-top: 42px; font-size: 32px; }
.prose h3 { margin-top: 28px; font-size: 24px; }
.prose p, .prose li { color: #344054; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 12px; text-align: left; }
.doctor-single { display: grid; grid-template-columns: minmax(280px, 390px) 1fr; gap: 50px; align-items: start; }
.doctor-single__photo { position: sticky; top: 150px; border-radius: 28px; overflow: hidden; background: #e8edf5; }
.doctor-single__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; }

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 22px; }
.contact-card { padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.contact-card h2 { margin-top: 0; }
.contact-phone { display: block; margin: 10px 0; color: var(--blue); font-size: 22px; font-weight: 850; }
.map-frame { width: 100%; min-height: 460px; border: 0; border-radius: 24px; }

.site-footer { padding: 64px 0 30px; background: var(--navy); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { width: 150px; filter: brightness(0) invert(1); }
.site-footer h3 { margin: 0 0 14px; font-size: 17px; }
.site-footer p, .site-footer li, .site-footer a { color: rgba(255,255,255,.68); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 8px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.45); font-size: 13px; }

.cookie-banner { position: fixed; z-index: 200; left: 20px; right: 20px; bottom: 18px; display: none; max-width: 760px; margin: 0 auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.cookie-banner.is-visible { display: block; }
.cookie-banner p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

@media (max-width: 1080px) {
  .main-nav { position: fixed; inset: 120px 20px auto; display: none; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; gap: 8px; }
  .main-nav a { display: block; padding: 10px; }
  .menu-toggle { display: inline-flex; }
  .doctor-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  :root { --container: min(100% - 28px, 680px); --radius: 20px; }
  .contact-strip__inner { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 0; }
  .contact-strip__address { display: none; }
  .contact-strip__center { justify-self: start; font-size: 12px; padding-inline: 10px; }
  .contact-strip__phones { justify-self: end; gap: 8px; font-size: 12px; }
  .contact-strip__phones a:not(:first-child) { display: none; }
  .nav-row { min-height: 66px; }
  .site-logo img { width: 116px; }
  .header-call { display: none; }
  .main-nav { inset: 110px 14px auto; }
  .hero { min-height: 610px; }
  .hero__content { padding: 72px 0; }
  .hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .hero__actions .button { flex: 1 1 180px; }
  .section { padding: 68px 0; }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 28px; }
  .cards, .doctor-grid, .case-grid, .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-split, .contact-grid, .doctor-single { grid-template-columns: 1fr; }
  .feature-split__image { min-height: 320px; }
  .feature-split__content { padding: 34px 26px; }
  .doctor-single__photo { position: static; max-width: 430px; }
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 18px; border-top: 1px solid #edf0f4; }
  .price-table td { padding: 4px 0; border: 0; }
  .price-table td:first-child { grid-row: 1 / span 2; padding-right: 16px; }
  .price-table td:nth-child(2), .price-table td:nth-child(3) { text-align: right; }
}

@media (max-width: 520px) {
  .contact-strip__inner { grid-template-columns: 1fr; }
  .contact-strip__center, .contact-strip__phones { justify-self: center; }
  .hero { min-height: 620px; }
  .hero h1 { font-size: clamp(34px, 9.5vw, 40px); }
  .hero__actions { flex-direction: column; }
  .hero__actions .button { width: 100%; flex: 0 0 auto; }
  .cards, .doctor-grid, .case-grid, .reviews-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 60px 0 46px; }
  .card__body, .doctor-card__body { padding: 20px; }
  .price-section__title { font-size: 19px; }
  .price-table tr { grid-template-columns: 1fr; }
  .price-table td:first-child { grid-row: auto; padding-right: 0; }
  .price-table td:nth-child(2), .price-table td:nth-child(3) { text-align: left; }
  .footer-bottom { flex-direction: column; }
}

body.zav-a11y { font-size: 19px; }
body.zav-a11y img:not(.site-logo img) { filter: grayscale(1); }
body.zav-a11y .button, body.zav-a11y a:focus, body.zav-a11y button:focus { outline: 3px solid #000; outline-offset: 3px; }
