/*
Theme Name: Центр Ортопедии Смоленск
Theme URI: https://www.cop-smolensk.ru/
Author: Центр Ортопедии Смоленск
Description: Доступная и лёгкая тема для сайта центра протезирования.
Version: 0.2.0
Text Domain: centr-ortho
*/

:root {
  --color-primary: #0b5f93;
  --color-primary-dark: #123b55;
  --color-brand-light: #74b9f2;
  --color-accent: #08735b;
  --color-text: #172b38;
  --color-text-muted: #526875;
  --color-background: #ffffff;
  --color-surface: #f3f8fb;
  --color-border: #c9d9e3;
  --color-focus: #ffbf47;
  --container: 1180px;
  --radius: 16px;
  --shadow: 0 12px 36px rgba(18, 59, 85, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-primary-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed !important;
  z-index: 1001;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  clip: auto;
  background: var(--color-primary-dark);
  color: #fff;
}

.narrow {
  max-width: 780px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  transform: translateY(-160%);
  background: var(--color-primary-dark);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  min-height: 86px;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--color-primary-dark);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.site-brand img,
.custom-logo {
  width: auto;
  max-height: 66px;
}

.site-brand-text {
  max-width: 190px;
}

.menu-toggle {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--color-primary-dark);
}

.menu-toggle svg {
  width: 25px;
  height: 25px;
}

.site-nav {
  width: 100%;
  padding-bottom: 16px;
}

.js .site-nav:not(.is-open) {
  display: none;
}

.site-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.site-nav .sub-menu {
  margin-left: 18px;
}

.site-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: var(--color-surface);
  color: var(--color-primary);
}

.header-phone {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover {
  background: #065c49;
  color: #fff;
}

.button-secondary {
  border-color: var(--color-primary);
  background: #fff;
  color: var(--color-primary);
}

.button-secondary:hover {
  border-color: var(--color-primary-dark);
  background: var(--color-surface);
  color: var(--color-primary-dark);
}

.hero {
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(116, 185, 242, 0.28), transparent 34%),
    linear-gradient(145deg, #f7fbfe 0%, #eef7fc 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--color-primary-dark);
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
}

.hero-lead,
.section-lead {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions,
.section-actions {
  display: flex;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-surface {
  background: var(--color-surface);
}

.section-heading {
  margin-bottom: 34px;
}

.cards {
  display: grid;
  gap: 18px;
}

.card {
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 750;
}

.steps {
  counter-reset: process;
}

.step {
  position: relative;
  padding-top: 70px;
}

.step::before {
  position: absolute;
  top: 22px;
  left: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  content: counter(process);
  counter-increment: process;
  font-weight: 800;
  line-height: 38px;
  text-align: center;
}

.split {
  display: grid;
  align-items: center;
  gap: 32px;
}

.feature-panel {
  padding: clamp(28px, 5vw, 48px);
  border-radius: 24px;
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.feature-panel h2,
.feature-panel a {
  color: #fff;
}

.feature-panel .button-secondary {
  color: var(--color-primary-dark);
}

.page-header {
  padding: 50px 0 30px;
  background: var(--color-surface);
}

.content-area {
  padding: 48px 0 80px;
}

.entry-content > * {
  max-width: 780px;
}

.entry-content > .alignwide {
  max-width: var(--container);
}

.entry-content li + li {
  margin-top: 8px;
}

.post-list {
  display: grid;
  gap: 20px;
}

.site-footer {
  padding: 48px 0 100px;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.86);
}

.site-footer a,
.site-footer h2 {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-title {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav li + li {
  margin-top: 7px;
}

.mobile-call {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: 16px;
  left: 16px;
  box-shadow: 0 8px 30px rgba(8, 115, 91, 0.28);
}

@media (min-width: 700px) {
  body {
    font-size: 18px;
  }

  .cards-2,
  .split,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    min-height: 96px;
    flex-wrap: nowrap;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav,
  .js .site-nav:not(.is-open) {
    display: block;
    width: auto;
    margin-left: auto;
    padding-bottom: 0;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
  }

  .site-nav li {
    position: relative;
  }

  .site-nav .sub-menu {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    display: none;
    width: max-content;
    min-width: 250px;
    max-width: 320px;
    margin: 0;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav li:hover > .sub-menu,
  .site-nav li:focus-within > .sub-menu {
    display: flex;
  }

  .header-phone {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .mobile-call {
    display: none;
  }

  .site-footer {
    padding-bottom: 48px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
