/* ==========================================================================
   For clinics (index-v3 #dentists). Split: the mist text side with the
   WhatsApp button and hours; the navy visual side, cut by an ellipse, with
   the logo arcs and a phone whose chat plays once on entering view
   (js/chat.js). The layout and the bubble sides mirror in RTL. A navy-900
   Crescent Edge rises into the CTA.
   ========================================================================== */
.dentists { display: grid; overflow: hidden; background: var(--mist); }
.dentists__text { display: grid; align-content: center; padding: calc(clamp(4rem, 8vw, 6rem) + var(--edge)) var(--gutter) calc(clamp(4rem, 8vw, 6rem) + var(--edge) / 2); }
.dentists__text > div { max-inline-size: 600px; }
.dentists__text .lead { margin-block-start: 1.1rem; }
.dentists__action { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-block-start: 2.2rem; }
.dentists__action .btn svg { inline-size: 1.4em; block-size: 1.4em; }
.dentists__hours { font-size: .92rem; color: var(--muted); }
.dentists__hours strong { display: block; color: var(--fg); }

.dentists__visual {
  position: relative; isolation: isolate; display: grid; place-items: center;
  padding: 6rem var(--gutter) calc(clamp(4rem, 8vw, 6rem) + var(--edge));
  background: radial-gradient(60% 50% at 55% 45%, var(--navy-700), var(--navy-900) 70%);
  clip-path: ellipse(120% 100% at 50% 100%);
}
.dentists__arcs {
  position: absolute; z-index: -1; inset-block-start: 50%; inset-inline-start: 50%;
  inline-size: min(720px, 120%); transform: translate(-50%, -50%);
  color: var(--white); opacity: .35; pointer-events: none;
}
[dir="rtl"] .dentists__arcs { transform: translate(50%, -50%); }

@media (min-width: 1024px) {
  .dentists { grid-template-columns: 1fr 1fr; }
  .dentists__text { padding-inline: max(var(--gutter), (100vw - var(--container)) / 2) 3rem; }
  /* Starts at the top of the section, which sits under the curve above, so the
     dark shape meets the curve with no light band between them */
  .dentists__visual {
    padding-block: calc(clamp(4rem, 8vw, 6rem) + var(--edge)) calc(clamp(4rem, 8vw, 6rem) + var(--edge) / 2);
    clip-path: ellipse(100% 78% at 100% 50%);
  }
  [dir="rtl"] .dentists__visual { clip-path: ellipse(100% 78% at 0% 50%); }
}

/* --- Phone ----------------------------------------------------------------- */
/* The phone is a size container: everything inside is sized in em from its
   own width, so on a narrow screen the whole mockup scales down as one piece
   and the chat never crops. 16px at the full 300px width. */
.phone {
  position: relative; inline-size: min(300px, 80vw); aspect-ratio: 9 / 18.5;
  container-type: inline-size;
  padding: 11px; border-radius: var(--radius-device); background: var(--navy-900);
  box-shadow: 0 0 0 1.5px var(--line-dark), inset 0 0 0 2px var(--navy-700), var(--shadow-lg);
}
.phone__notch {
  position: absolute; z-index: 2; inset-block-start: 6.6cqi; inset-inline-start: 50%;
  inline-size: 30.6cqi; block-size: 8cqi; border-radius: 4.7cqi;
  background: var(--navy-900); transform: translateX(-50%);
}
[dir="rtl"] .phone__notch { transform: translateX(50%); }
.phone__screen {
  font-size: min(16px, 5.75cqi);
  display: flex; flex-direction: column; block-size: 100%; overflow: hidden;
  border-radius: calc(var(--radius-device) - 11px); background: var(--mist);
}
.chat__head { display: flex; align-items: center; gap: .65em; padding: 2.75em .875em .75em; background: var(--navy-700); color: var(--white); }
.chat__avatar { display: grid; place-items: center; flex: none; inline-size: 2.25em; block-size: 2.25em; overflow: hidden; border-radius: 50%; background: var(--navy-800); }
.chat__avatar img { inline-size: 2em; block-size: 2em; object-fit: contain; }
.chat__head b { display: block; font-family: var(--font-head); font-size: .88em; font-weight: 600; line-height: 1.2; }
.chat__head small { font-size: .7em; color: var(--cyan-soft); }
.chat__body { flex: 1; display: flex; flex-direction: column; gap: .5em; padding: .875em .75em; overflow: hidden; }
.chat__day { align-self: center; padding: .3em .9em; border-radius: .5em; background: var(--white); color: var(--navy-700); font-size: .66em; font-weight: 700; }
/* Bubbles copy WhatsApp's own shape: 12px with a 4px tail corner */
.msg {
  max-inline-size: 84%; padding: .625em .8em .45em;
  border-radius: .94em; border-start-start-radius: .31em;
  background: var(--white); color: var(--navy-800);
  font-size: .8em; line-height: 1.4; box-shadow: var(--shadow-sm);
}
.msg time { display: block; margin-block-start: .2em; text-align: end; font-size: .78em; color: var(--navy-700); opacity: .75; }
.msg--out { align-self: flex-end; background: var(--cyan-tint); border-start-start-radius: .94em; border-start-end-radius: .31em; }
.js .msg { opacity: 0; transform: translateY(8px) scale(.98); }
.msg.is-shown {
  opacity: 1; transform: none;
  transition: opacity var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out);
}
.typing { display: none; align-self: flex-start; gap: .25em; padding: .6em .7em; border-radius: .75em; border-start-start-radius: .25em; background: var(--white); }
.typing.is-on { display: inline-flex; }
.typing i { inline-size: .375em; block-size: .375em; border-radius: 50%; background: var(--navy-700); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: typing var(--dur-reveal) var(--ease-in-out) infinite; }
  .typing i:nth-child(2) { animation-delay: 150ms; }
  .typing i:nth-child(3) { animation-delay: 300ms; }
}
.motion-paused .typing i { animation: none; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
.chat__input { display: flex; align-items: center; gap: .5em; padding: .625em .75em 1em; }
.chat__input span { flex: 1; padding: .7em 1.15em; border-radius: var(--radius-pill); background: var(--white); color: var(--navy-700); font-size: .78em; opacity: .8; }
.chat__input i { display: grid; place-items: center; flex: none; inline-size: 2.125em; block-size: 2.125em; border-radius: 50%; background: var(--cyan); color: var(--navy-900); }
.chat__input i svg { inline-size: 1em; block-size: 1em; }
[dir="rtl"] .chat__input i svg { transform: scaleX(-1); }

/* Both ends are cut along the Crescent Edge curve. The top slides up under the
   curve of Manufacturers (whose navy shows above it), so the dark visual meets
   that rim directly; the bottom lets the CTA's own gradient (which slides up
   underneath) show below it. The cyan rims sit on the cuts. */
.dentists {
  position: relative; z-index: 1;
  margin-block-start: calc(-1 * var(--edge));
  --cut-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V63Q720-23 1440 63V100Z'/%3E%3C/svg%3E");
  --cut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V62Q720-38 0 62Z'/%3E%3C/svg%3E");
  -webkit-mask: var(--cut-top) top / 100% var(--edge) no-repeat, linear-gradient(black 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat, var(--cut) bottom / 100% var(--edge) no-repeat;
  mask: var(--cut-top) top / 100% var(--edge) no-repeat, linear-gradient(black 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat, var(--cut) bottom / 100% var(--edge) no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  .js .msg { opacity: 1; transform: none; }
  .msg.is-shown { transition: none; }
}
/* Inside the editor there is no curve above to slide under */
.alh-editor-block .dentists { margin-block-start: 0; -webkit-mask: none; mask: none; }
/* Beat the flow layout's margin reset (global styles print after block styles) */
.alh.dentists { margin-block-start: calc(-1 * var(--edge)); }
.alh-editor-block .alh.dentists { margin-block-start: 0; }
