:root {
  --color-primary: #934e80;
  --color-primary-dark: #723b61;
  --color-primary-deep: #3f2438;
  --color-ink: #22242a;
  --color-muted: #626975;
  --color-line: #e8e9ef;
  --color-bg: #ffffff;
  --color-soft: #f6f7f9;
  --shadow: 0 14px 38px rgba(26, 31, 44, 0.13);
  --radius: 8px;
  --header-height: 82px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.65;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(63, 36, 56, 0.72);
  backdrop-filter: blur(7px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  width: 238px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav a,
.nav-dropdown > button {
  color: #fff;
  background: transparent;
  border: 0;
  padding: 24px 0;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.site-nav a:hover,
.nav-dropdown > button:hover {
  color: #f1d7ea;
}

.site-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 0;
}

.site-nav .nav-cta:hover {
  color: #fff;
  background: var(--color-primary-dark);
}

.imeb-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.imeb-brand img {
  width: 196px;
  max-width: 18vw;
  height: auto;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 10px);
  left: 0;
  width: 260px;
  padding: 10px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 180ms ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  color: #33343a;
  text-transform: none;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.hero {
  position: relative;
  height: clamp(430px, 56.25vw, 760px);
  background: var(--color-primary-deep);
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  overflow: hidden;
}

.hero-video iframe {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100vh;
  border: 0;
  transform: translate(-50%, -50%);
  background: var(--color-primary-deep);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(91, 58, 84, 0.34);
  pointer-events: none;
}

.section {
  padding: 72px 0;
}

.section:nth-of-type(even) {
  background: var(--color-soft);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
}

h2 {
  font-size: clamp(28px, 3vw, 36px);
}

h3 {
  font-size: 20px;
}

p {
  margin: 16px 0 0;
  color: var(--color-muted);
}

.two-column {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: 48px;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.section-heading.centered {
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.doctor-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.doctor-card:hover,
.doctor-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  outline: none;
}

.doctor-card img {
  width: 170px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.doctor-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--color-muted);
}

.doctor-more-link {
  display: block;
}

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

.treatment-card {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.treatment-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.treatment-card img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.treatment-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.treatment-card h3 {
  min-height: 50px;
  font-size: 18px;
  text-transform: uppercase;
}

.treatment-card p {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.more-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 48px;
  align-items: start;
}

.contact-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
}

.contact-list li + li {
  margin-top: 10px;
}

.contact-form {
  padding: 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 31, 44, 0.08);
}

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

label {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: #33343a;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d9dce4;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--color-ink);
  font: inherit;
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(147, 78, 128, 0.14);
}

textarea {
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form button,
.modal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 24px;
  color: #fff;
  background: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

.contact-form button:hover,
.modal-action:hover {
  color: #fff;
  background: var(--color-primary-dark);
}

.form-status {
  display: none;
  margin-bottom: 16px;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-error {
  color: #8b1d24;
  background: #fff0f1;
}

.form-status.is-success {
  color: #17653b;
  background: #eaf8f0;
}

.site-footer {
  background: #23262d;
  color: #fff;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.social-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.social-links a {
  color: rgba(255, 255, 255, 0.82);
}

.whatsapp-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 14px 30px rgba(45, 183, 66, 0.32);
}

.whatsapp-float svg {
  width: 38px;
  height: 38px;
  fill: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 22, 0.72);
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(84vh, 720px);
  overflow: auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.94);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modal-content {
  padding: 30px;
}

#modalText {
  white-space: pre-line;
}

.detail-modal-card {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.detail-modal-card > img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  aspect-ratio: auto;
  object-fit: cover;
}

.detail-modal-card .modal-content {
  align-self: center;
  padding: 34px 38px;
}

.detail-modal-card .modal-content h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.treatment-modal-card > img {
  object-position: center;
}

.doctor-modal-card ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.doctor-modal-card li + li {
  margin-top: 8px;
}

.modal-action {
  margin-top: 22px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 22px;
    background: rgba(63, 36, 56, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .nav-dropdown > button {
    width: 100%;
    padding: 12px 0;
    text-align: left;
  }

  .site-nav .nav-cta {
    width: max-content;
    min-height: 46px;
    padding: 0 18px;
  }

  .site-nav .imeb-brand {
    width: max-content;
    padding: 4px 0 0;
  }

  .imeb-brand img {
    width: 168px;
    max-width: 52vw;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  .nav-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .two-column,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 1140px);
  }

  .brand img {
    width: 176px;
  }

  .hero {
    height: clamp(380px, 100vw, 560px);
  }

  .section {
    padding: 54px 0;
  }

  .team-grid,
  .treatment-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .doctor-card {
    grid-template-columns: 1fr;
  }

  .doctor-card img {
    width: 100%;
    aspect-ratio: 1.25 / 1;
  }

  .detail-modal-card {
    display: block;
  }

  .detail-modal-card > img {
    height: auto;
    min-height: 0;
    aspect-ratio: 2 / 1;
  }

  .doctor-modal-card > img {
    aspect-ratio: 1 / 1;
  }

  .detail-modal-card .modal-content {
    padding: 26px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .whatsapp-float {
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
  }
}
