:root {
  --bg: #f6f3f0;
  --surface: #ffffff;
  --surface-alt: #f0f5fa;
  --text: #1d2530;
  --muted: #4d5b6c;
  --primary: #7b5d4c;
  --primary-hover: #634939;
  --border: #d8e2ee;
  --ok: #13795b;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

section[id] {
  scroll-margin-top: 130px;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: static;
  background: transparent;
  padding-top: 0.8rem;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ebe3dc;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(82, 61, 47, 0.08);
  backdrop-filter: blur(8px);
}

.brand img {
  width: 250px;
  height: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
}

.mobile-nav-icon,
.mobile-btn-icon {
  display: none;
}

.main-nav a:hover {
  color: var(--primary);
}

.mobile-menu-wrap {
  display: none;
  position: relative;
}

.mobile-menu-btn {
  border: 1px solid #d9cec6;
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  width: 44px;
  height: 40px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  width: 210px;
  background: #fff;
  border: 1px solid #e6dad1;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(56, 42, 33, 0.12);
  padding: 0.45rem;
  z-index: 40;
}

.mobile-menu a {
  display: block;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-menu a:hover {
  background: rgba(123, 93, 76, 0.08);
}

.hero {
  padding: 1.2rem 0 2.4rem;
}

.hero .container {
  background: linear-gradient(180deg, #f7f2ee 0%, #f3ece6 100%);
  border: 1px solid #eadfd7;
  border-radius: 26px;
  box-shadow: 0 16px 35px rgba(82, 61, 47, 0.08);
  padding: 1.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.35rem;
  align-items: stretch;
}

.hero-copy {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(2rem, 2.2vw + 1rem, 3.45rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-text {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 1rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
}

.hero-visual {
  position: relative;
  min-height: 500px;
  background: #efe8e2;
  border: 1px solid #e3d7ce;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(79, 62, 49, 0.12);
}

.doctor-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  display: block;
}

.hero-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-visual .hero-card {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: min(300px, calc(100% - 1.6rem));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  border: 1px solid #e7ddd5;
}

.hero-card-premium {
  box-shadow: 0 8px 20px rgba(69, 50, 38, 0.12);
  padding: 0.9rem 1rem;
}

.hero-card h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1rem;
  color: #2f3f52;
}

.hero-card li + li {
  margin-top: 0.22rem;
}

.section {
  padding: 2.8rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.5rem, 1vw + 1rem, 2rem);
  margin: 0 0 0.9rem;
}

.section-note {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 64ch;
}

.doctor-lead {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cards-benefits {
  margin-top: 0.8rem;
}

.doctor-focus-grid {
  margin-top: 0.8rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.diploma-grid {
  margin-top: 0.9rem;
  align-items: stretch;
}

.diploma-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 330px;
}

.diploma-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #177ec2 0%, #75b4df 100%);
}

.diploma-card h3 {
  margin: 0.15rem 0 0.45rem;
  min-height: 2.8em;
}

.diploma-card p {
  margin: 0;
  color: var(--muted);
}

.diploma-preview {
  margin-top: 0.7rem;
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e4d8cf;
  padding: 0.25rem;
}

.feature-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.38rem;
  color: #2f3f52;
}

.approach-chain {
  margin: 0.35rem 0 0.65rem;
  font-weight: 700;
  color: var(--primary);
}

.diploma-year {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
}

.steps {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.step h3 {
  margin: 0.45rem 0 0.35rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e3f0fb;
  color: var(--primary);
  font-weight: 700;
}

.form {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

label,
legend {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 0.72rem 0.78rem;
  border: 1px solid #c8d6e6;
  border-radius: 10px;
  font: inherit;
}

select {
  width: 100%;
  padding: 0.72rem 0.78rem;
  border: 1px solid #c8d6e6;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 82px;
  padding: 0.72rem 0.78rem;
  border: 1px solid #c8d6e6;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

input:focus {
  outline: 2px solid rgba(23, 126, 194, 0.2);
  border-color: var(--primary);
}

select:focus {
  outline: 2px solid rgba(23, 126, 194, 0.2);
  border-color: var(--primary);
}

textarea:focus {
  outline: 2px solid rgba(23, 126, 194, 0.2);
  border-color: var(--primary);
}

.visit-type label,
.consent {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}

.visit-type input,
.consent input {
  width: auto;
}

.questionnaire {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin: 0.65rem 0 1rem;
  background: #f8fbff;
}

.dynamic-fields {
  border-left: 2px solid rgba(23, 126, 194, 0.28);
  padding-left: 0.75rem;
  margin-bottom: 0.55rem;
}

.security-block {
  margin: 1rem 0 0.75rem;
  border: 1px dashed #b7cbe1;
  border-radius: 12px;
  padding: 0.85rem;
}

.security-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.bot-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hidden {
  display: none;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 0.68rem 1.1rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  width: fit-content;
  border-radius: 12px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.form-message {
  margin-top: 0.9rem;
  min-height: 1.4rem;
}

.form-message.success {
  color: var(--ok);
}

.form-message.error {
  color: var(--error);
}

.site-footer {
  padding: 1.4rem 0;
  color: var(--muted);
  background: #edf2f7;
  border-top: 1px solid var(--border);
}

.mobile-bottom-nav {
  display: none;
}

@media (min-width: 901px) {
  .mobile-menu-wrap {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }
}

.cta-section {
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.cta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-radius: 18px;
  border: 1px solid #e7dbd2;
  background: linear-gradient(130deg, #fbf7f3 0%, #f2e9e2 100%);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 10px 24px rgba(83, 63, 49, 0.08);
}

.auth-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.auth-form-lead {
  margin: 0 0 0.95rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-switch {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.cabinet {
  margin-top: 1rem;
}

.cabinet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.cabinet-head h3 {
  margin: 0;
}

.cabinet-grid {
  margin-bottom: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.data-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.5rem;
}

.muted {
  color: var(--muted);
}

.faq-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  section[id] {
    scroll-margin-top: 24px;
  }

  .site-header {
    position: static;
    padding-top: 0.45rem;
  }

  .nav-wrap {
    padding: 0.8rem;
    border-radius: 14px;
    gap: 0.5rem;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    display: flex;
    justify-content: flex-start;
  }

  .brand img {
    width: 190px;
  }

  .main-nav {
    display: none;
  }

  .mobile-nav-icon {
    display: none;
  }

  .mobile-menu-wrap {
    display: block;
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-visual {
    min-height: 460px;
  }

  .hero .container {
    padding: 1rem;
    border-radius: 18px;
  }

  h1 {
    font-size: clamp(1.9rem, 7vw, 2.5rem);
  }

  .hero-text {
    font-size: 1.03rem;
  }

  .hero-copy .btn-primary {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
  }

  .mobile-btn-icon {
    display: inline-block;
    line-height: 1;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-top: 1px solid #e8ddd6;
    box-shadow: 0 -8px 20px rgba(56, 42, 33, 0.08);
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.2rem;
    border-radius: 10px;
  }

  .mobile-bottom-nav a span[aria-hidden="true"] {
    font-size: 1.06rem;
    line-height: 1;
  }

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-visual .hero-card {
    position: static;
    margin: 0.6rem;
    width: calc(100% - 1.2rem);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cabinet-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}
