:root {
  --paper: #f6f4ee;
  --surface: #ffffff;
  --surface-soft: #f4efe3;
  --text: #13283a;
  --muted: #657180;
  --line: #e3ded2;
  --green: #0f3a5a;
  --green-dark: #08253d;
  --red: #b9362f;
  --amber: #d8b45c;
  --blue: #123c69;
  --shadow: 0 18px 44px rgba(8, 37, 61, 0.12);
}

* {
  box-sizing: border-box;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(8, 37, 61, 0.14);
  background: linear-gradient(135deg, #d8b45c 0%, #e8c874 58%, #c99d42 100%);
  color: var(--green-dark);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1120px, 100%);
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  min-width: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  object-fit: contain;
}

nav {
  gap: clamp(8px, 2vw, 14px);
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(8, 37, 61, 0.16);
}

nav a:hover {
  background: var(--blue);
  color: #fff;
}

.site-header nav a[href="#consulta"] {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(8, 37, 61, 0.16);
}

.site-header nav a[href="#consulta"]:hover {
  background: var(--blue);
  color: #fff;
}

.site-header .instagram-link {
  width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 37, 61, 0.22);
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
}

.site-header .instagram-link:hover {
  border-color: rgba(8, 37, 61, 0.32);
  background: var(--blue);
  color: #fff;
}

.site-header .instagram-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 37, 61, 0.88) 0%, rgba(8, 37, 61, 0.72) 46%, rgba(8, 37, 61, 0.4) 76%, rgba(8, 37, 61, 0.22) 100%),
    linear-gradient(0deg, rgba(8, 37, 61, 0.5), rgba(8, 37, 61, 0.12));
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/hero-ayuda-legal.jpg?v=20260715195500");
  background-size: cover;
  background-position: center right;
}

.hero-content {
  width: min(780px, calc(100% - 32px));
  margin-left: clamp(16px, 6vw, 84px);
  padding: 70px 0 104px;
  color: #fff;
}

.hero-logo {
  display: block;
  width: clamp(112px, 13vw, 170px);
  height: clamp(112px, 13vw, 170px);
  margin: 0 0 22px;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  object-fit: contain;
}

.hero-center-stack {
  display: grid;
  justify-items: center;
  width: min(820px, 100%);
  margin-top: 24px;
}

.hero-actions + .hero-logo {
  margin-top: 28px;
  margin-bottom: 0;
}

.hero-tribute + .hero-logo {
  margin-top: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0c766;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.hero-copy {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.hero-tribute {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  margin: 18px 0 2px;
  padding: 10px 14px;
  border-left: 3px solid var(--amber);
  background: rgba(8, 37, 61, 0.34);
  color: #fff;
  text-align: left;
}

.hero-center-stack .hero-actions {
  width: 100%;
  justify-content: center;
}

.hero-center-stack .hero-logo {
  margin: 24px 0 0;
}

.tribute-cross {
  color: var(--amber);
  font-size: 22px;
  line-height: 1;
}

.hero-tribute strong,
.hero-tribute small {
  display: block;
}

.hero-tribute strong {
  font-size: 17px;
}

.hero-tribute small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.hero-actions,
.recorder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  background: var(--green);
  color: #fff;
}

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

.hero-actions .primary {
  background: var(--amber);
  color: var(--green-dark);
  box-shadow: 0 14px 30px rgba(216, 180, 92, 0.32);
}

.hero-actions .primary:hover {
  background: #e8c874;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.54);
  color: #fff;
}

.outline-dark {
  border: 1px solid var(--green-dark);
  background: var(--surface);
  color: var(--green-dark);
}

.outline-dark:hover {
  background: var(--surface-soft);
}

.alert-band {
  padding: 16px max(16px, calc((100% - 1120px) / 2));
  background: #e9d08b;
  color: #172a39;
  line-height: 1.5;
  text-align: left;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.intro {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 36px;
}

.steps,
.doctor-grid,
.emergency-grid,
.rescue-grid {
  display: grid;
  gap: 16px;
}

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

.steps article,
.doctor-card,
.form-panel,
.guidance-panel,
.emergency-grid a,
.rescue-grid article,
.contact-section > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps article {
  padding: 22px;
}

.steps span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--green-dark);
  font-weight: 800;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.doctors-section {
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface);
  clip-path: inset(0 -100vmax);
}

.doctor-count {
  justify-self: end;
  display: grid;
  gap: 4px;
  min-width: 170px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doctor-count strong {
  color: var(--green-dark);
  font-size: 42px;
  line-height: 1;
}

.doctor-count span {
  color: var(--muted);
  font-weight: 800;
}

.specialty-browser {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.specialty-toolbar,
.doctor-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
}

.specialty-toolbar {
  grid-template-columns: minmax(0, 820px);
}

.specialty-toolbar h3,
.doctor-list-head h3 {
  margin-bottom: 6px;
  font-size: 26px;
}

.specialty-toolbar p,
.doctor-list-head p {
  margin-bottom: 0;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.case-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.case-topic-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.case-topic-bullet {
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(224, 184, 86, 0.2);
}

.case-topic-item p {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}

.specialty-card {
  display: grid;
  gap: 16px;
  min-height: 176px;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.specialty-card.selected {
  border-color: var(--green);
  outline: 3px solid rgba(13, 120, 104, 0.16);
}

.specialty-card h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.18;
}

.specialty-card p {
  margin-bottom: 0;
  color: var(--blue);
  font-weight: 800;
}

.specialty-card button {
  width: 100%;
}

.doctor-list-head {
  margin: 28px 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.doctor-list-head .button {
  justify-self: end;
}

.doctor-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}

.doctor-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 4px 2px 14px;
}

.doctor-grid:focus {
  outline: 3px solid rgba(231, 186, 75, 0.45);
  outline-offset: 4px;
  border-radius: 10px;
}

.carousel-button {
  width: 48px;
  height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px rgba(8, 36, 58, 0.14);
}

.carousel-button:disabled {
  opacity: .38;
  cursor: default;
}

.doctor-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  align-content: start;
  padding: 20px;
  flex: 0 0 min(360px, calc(100vw - 132px));
  min-height: 250px;
  scroll-snap-align: start;
}

.doctor-card.selected {
  border-color: var(--green);
  outline: 3px solid rgba(13, 120, 104, 0.16);
}

.doctor-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 82px;
}

.doctor-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e7f1fb;
  color: var(--blue);
  font-weight: 900;
}

.doctor-avatar svg {
  width: 28px;
  height: 28px;
  display: block;
}

.specialty {
  color: var(--blue);
  font-weight: 800;
}

.doctor-actions {
  display: grid;
  gap: 10px;
  align-self: end;
}

.meta-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.45;
}

.meta-list strong {
  color: var(--text);
}

.doctor-card button {
  width: 100%;
}

.doctor-card .button.primary {
  background: var(--blue);
}

.doctor-card .button.primary:hover {
  background: #17496a;
}

.doctor-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfbf6;
}

.help-text,
.form-intro {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.doctor-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.doctor-details summary::-webkit-details-marker {
  display: none;
}

.doctor-details summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 20px;
  line-height: 1;
}

.doctor-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.doctor-details[open] summary::after {
  content: "-";
}

.doctor-details .meta-list {
  padding: 14px 16px 16px;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.specialist-section {
  background: #eaf4f1;
  box-shadow: 0 0 0 100vmax #eaf4f1;
  clip-path: inset(0 -100vmax);
  padding-top: 64px;
  padding-bottom: 82px;
}

.consultation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.form-panel,
.guidance-panel {
  padding: clamp(20px, 4vw, 34px);
}

form,
.field-grid {
  display: grid;
  gap: 16px;
}

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

label,
legend {
  color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

input,
select {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1fr);
  gap: 8px;
}

.phone-row select,
.phone-row input {
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(13, 120, 104, 0.18);
  border-color: var(--green);
}

.voice-note {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.icon-button {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  position: relative;
  background: linear-gradient(145deg, #ff2d4f 0%, #e51f43 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(229, 31, 67, 0.28);
  cursor: pointer;
}

.icon-button::before,
.icon-button::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 18px;
  height: 28px;
  opacity: 0.55;
  background:
    linear-gradient(#172333, #172333) left 8px top 8px / 4px 14px no-repeat,
    linear-gradient(#172333, #172333) right 0 top 0 / 4px 28px no-repeat;
  border-radius: 999px;
}

.icon-button::before {
  right: calc(100% + 12px);
}

.icon-button::after {
  left: calc(100% + 12px);
  transform: scaleX(-1);
}

.mic-icon {
  width: 40px;
  height: 40px;
  display: block;
}

.icon-button.recording {
  animation: pulse-recording 1s ease-in-out infinite;
}

.icon-button.recording .mic-icon {
  transform: scale(0.92);
}

@keyframes pulse-recording {
  0%,
  100% {
    box-shadow: 0 12px 24px rgba(229, 31, 67, 0.28);
  }

  50% {
    box-shadow: 0 12px 34px rgba(229, 31, 67, 0.46);
  }
}

.voice-note p {
  margin-bottom: 0;
}

.download-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.clear-recorded-audio {
  width: fit-content;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.file-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-remove {
  border: 0;
  border-radius: 999px;
  background: rgba(197, 49, 62, 0.1);
  color: #8f1f2b;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 8px;
}

.consent-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.consent-row label {
  font-weight: 600;
  line-height: 1.45;
}

.submit-button {
  width: fit-content;
}

.form-note {
  min-height: 24px;
  margin: -4px 0 0;
  color: var(--green-dark);
  font-weight: 800;
}

.guidance-panel {
  position: sticky;
  top: 92px;
  background: #fdfbf6;
}

.guidance-panel ul {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.emergency {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 28px;
  align-items: start;
}

.faq-section {
  background: #fdfbf6;
  box-shadow: 0 0 0 100vmax #fdfbf6;
  clip-path: inset(0 -100vmax);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.faq-grid article {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.faq-grid h3 {
  color: var(--green-dark);
}

.emergency-list {
  display: grid;
  gap: 18px;
}

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

.emergency-grid a {
  display: grid;
  gap: 10px;
  min-height: 124px;
  padding: 20px;
  text-decoration: none;
}

.emergency-grid span {
  color: var(--muted);
  font-weight: 800;
}

.emergency-grid strong {
  color: var(--red);
  font-size: 28px;
  line-height: 1.05;
}

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

.rescue-grid article {
  padding: 18px;
}

.rescue-grid h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.rescue-grid p {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 800;
}

.contact-section {
  padding-top: 0;
}

.contact-section > div {
  padding: clamp(22px, 4vw, 34px);
  background: #12336b;
  color: #fff;
}

.contact-section .eyebrow {
  color: #ffd35a;
}

.contact-section p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
}

.contact-section a {
  color: #ffd35a;
  font-weight: 900;
}

.site-footer {
  padding: 28px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 800;
}

.thanks-page {
  display: grid;
  min-height: calc(100svh - 68px);
  place-items: center;
  padding: 48px 16px;
}

.thanks-panel {
  width: min(760px, 100%);
  padding: clamp(26px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.thanks-panel img {
  display: block;
  width: 124px;
  height: 124px;
  margin-bottom: 22px;
  border-radius: 50%;
  object-fit: contain;
}

.thanks-panel h1 {
  font-size: clamp(34px, 5vw, 56px);
}

@media (min-width: 921px) {
  .hero-content {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
    text-align: left;
  }

  .hero h1 {
    max-width: 960px;
  }

  .hero-copy {
    max-width: 820px;
  }

  .hero-actions {
    max-width: 820px;
    justify-content: center;
  }

  .hero-logo {
    margin-left: min(325px, calc((100% - 170px) / 2));
    margin-right: 0;
  }
}

@media (min-width: 2000px) {
  .hero::after {
    background:
      linear-gradient(90deg, rgba(8, 37, 61, 0.86) 0%, rgba(8, 37, 61, 0.7) 46%, rgba(8, 37, 61, 0.38) 76%, rgba(8, 37, 61, 0.2) 100%),
      linear-gradient(0deg, rgba(8, 37, 61, 0.48), rgba(8, 37, 61, 0.1));
  }

  .hero h1 {
    font-size: clamp(82px, 4.2vw, 104px);
  }

  .hero-copy {
    font-size: 21px;
  }

  .hero .eyebrow {
    font-size: 14px;
  }
}

@media (max-width: 920px) {
  .intro,
  .section-head,
  .specialty-toolbar,
  .doctor-list-head,
  .consultation,
  .emergency {
    grid-template-columns: 1fr;
  }

  .doctor-count {
    justify-self: start;
  }

  .doctor-list-head .button {
    justify-self: start;
  }

  .steps,
  .specialty-grid,
  .case-topic-grid,
  .faq-grid,
  .emergency-grid,
  .rescue-grid {
    grid-template-columns: 1fr;
  }

  .doctor-carousel {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .carousel-button {
    width: 42px;
    height: 50px;
    font-size: 30px;
  }

  .doctor-card {
    flex-basis: min(330px, calc(100vw - 116px));
  }

  .guidance-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: auto;
    padding: 14px 16px;
  }

  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero {
    min-height: auto;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(8, 37, 61, 0.9) 0%, rgba(8, 37, 61, 0.76) 46%, rgba(8, 37, 61, 0.56) 100%);
  }

  .hero-content {
    width: min(100% - 32px, 780px);
    margin: 0 auto;
    padding: 40px 0 64px;
  }

  .hero-logo {
    width: 118px;
    height: 118px;
  }

  .hero-actions + .hero-logo {
    margin-left: auto;
    margin-right: auto;
  }

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

  .phone-row {
    grid-template-columns: 1fr;
  }

  .submit-button,
  .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand span:last-child {
    font-size: 14px;
  }

  nav {
    flex-wrap: wrap;
    font-size: 13px;
  }

  nav a {
    flex: 1 1 auto;
    min-width: max-content;
  }

  .site-header .instagram-link {
    flex: 0 0 38px;
    min-width: 38px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-logo {
    width: 96px;
    height: 96px;
  }

  .section {
    width: min(100% - 24px, 1120px);
    padding: 54px 0;
  }

  .form-panel,
  .guidance-panel {
    padding: 18px;
  }
}
