/* ==========================================================================
   MODALS — native <dialog> service deep-dives (same warm-neutral system)
   Keeps the landing uncluttered: full client content lives here, on demand.
   ========================================================================== */

.svc-dialog {
  width: min(760px, 92vw);
  max-width: none;
  max-height: 90vh;
  margin: auto;                 /* center */
  padding: 0;
  border: none;
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;             /* clip media corners */
  display: flex;
  flex-direction: column;
}
dialog.svc-dialog:not([open]) {
  display: none;
}
dialog.svc-dialog[open] {
  display: flex;
}
.svc-dialog::backdrop {
  background: rgba(16, 26, 24, .55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Header band — photo or signature gradient */
.dlg-media {
  position: relative;
  flex: none;
  height: clamp(120px, 20vw, 168px);
  overflow: hidden;
  background: var(--signature);
}
.dlg-media img { width: 100%; height: 100%; object-fit: cover; }
.dlg-media__logo { position: absolute; inset: 0; width: min(300px, 70%); height: auto !important; margin: auto; object-fit: contain !important; padding: 12px; background: var(--white); border-radius: 14px; }
.dlg-media--legal { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); height: clamp(104px, 15vw, 136px); padding: 14px clamp(22px, 3vw, 34px); background: var(--blue); }
.dlg-media--legal .dlg-media__logo { position: static; inset: auto; flex: 0 0 auto; width: clamp(108px, 23%, 156px); height: auto !important; margin: 0; padding: 8px; border-radius: 10px; }
.dlg-media__title { margin: 0; color: var(--white); font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -0.03em; }
.dlg-media--equipment { background: var(--white); }
.dlg-media--equipment img { object-fit: contain; padding: clamp(16px, 3vw, 32px); }
.dlg-media__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,35,52,.15), rgba(18,35,52,.5)); }
.dlg-media__icon { position: absolute; left: clamp(22px,3vw,34px); bottom: 16px; width: 52px; height: 52px; border-radius: 15px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); display: inline-flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg-media__icon svg { width: 26px; height: 26px; color: #fff; }

.dlg-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(16,26,24,.4); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.dlg-close:hover { background: rgba(16,26,24,.7); transform: rotate(90deg); }
.dlg-close svg { width: 20px; height: 20px; }

/* Scrollable body */
.dlg-body {
  overflow-y: auto;
  padding: clamp(24px, 3.2vw, 40px) clamp(22px, 3.2vw, 44px) clamp(24px, 3vw, 38px);
}
.dlg-body .eyebrow { margin-bottom: 12px; }
.dlg-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .5em; }
.dlg-body h3 { font-size: 1.02rem; letter-spacing: .01em; margin: 26px 0 12px; color: var(--ink); }
.dlg-body > p { color: var(--ink-soft); max-width: 62ch; }
.dlg-lead { font-size: 1.06rem; color: var(--ink-soft); }

/* Provider profiles are intentionally larger than service dialogs. The card
   hover remains the quick preview; this layout is reserved for click-through
   biographies that need room for the client's complete provider information. */
.provider-dialog {
  width: min(1080px, calc(100vw - 48px));
  max-height: min(88vh, 820px);
}


#dlg-quote {
	max-height: 96vh !important;
}

@media(min-width:768px){
  #dlg-quote.provider-dialog{
    max-height: none;
  }
}
dialog.provider-dialog[open] {
  display: grid;
  grid-template-columns: minmax(280px, 35%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.provider-dialog .dlg-media {
  height: auto;
  min-height: 620px;
}
.provider-dialog .dlg-media img {
  object-position: center top;
}
.provider-dialog .dlg-media__scrim {
  background: linear-gradient(180deg, rgba(18,35,52,.04), rgba(18,35,52,.28));
}

@media(max-width:768px){
  .provider-dialog .dlg-media{
    display: none;
  }

  .dlg-body p, .dlg-body .dlg-note, .dlg-body h3{
    text-align: center;
  }

  .dlg-body .field p, .wpcf7-list-item, .resource-card__content h3, .resource-card__content p{
    text-align: start;
  }
}
.provider-dialog .dlg-body {
  padding: clamp(32px, 4vw, 54px);
  overscroll-behavior: contain;
}
.provider-dialog .dlg-body h2 {
  max-width: 18ch;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
}
.provider-dialog .dlg-lead {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--teal-deep);
  font-weight: 600;
}
.provider-dialog .dlg-body > p:not(.dlg-lead) {
  max-width: 72ch;
  line-height: 1.72;
}
.provider-dialog .dlg-actions {
  margin-top: 26px;
}

.dlg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; }
.dlg-cols .check-list li { margin-bottom: 9px; }
@media (max-width: 560px) { .dlg-cols { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
  .svc-dialog {
    width: min(94vw, 560px);
    max-height: calc(100dvh - 24px);
    border-radius: var(--radius-lg);
  }
  .dlg-media { height: 112px; display: none;}
  .dlg-body { padding: 22px 20px 24px; }
  .dlg-body h2{text-align: center;}
  .dlg-body .eyebrow{
    display: flex;
    justify-content: center;
    text-align: center;
  }
  .dlg-actions .btn { width: 100%; }

  .dlg-actions{
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .provider-dialog {
    width: min(94vw, 620px);
    max-height: calc(100dvh - 24px);
  }
  dialog.provider-dialog[open] {
    display: flex;
  }
  .provider-dialog .dlg-media {
    height: clamp(150px, 28vh, 220px);
    min-height: 0;
  }
  .provider-dialog .dlg-body {
    padding: 24px 22px 28px;
  }
  .provider-dialog .dlg-body h2 {
    max-width: 20ch;
    font-size: clamp(1.55rem, 7vw, 2rem);
    text-align: center;
  }

  .provider-dialog .dlg-body .eyebrow{
    text-align: center;
    display: flex;
    justify-content: center;
  }
}

.dlg-note { margin-top: 22px; padding: 16px 18px; border-radius: var(--radius-md); background: rgba(28,90,151,.07); border: 1px solid rgba(28,90,151,.18); font-size: .92rem; color: var(--ink-soft); }
.dlg-note b { color: var(--ink); }

/* IV menu inside a modal */
.dlg-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; margin-top: 4px; }
.dlg-menu .iv-item { display: flex; flex-direction: column; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dlg-menu .iv-item b { color: var(--ink); font-weight: 600; }
.dlg-menu .iv-item span { font-size: .85rem; color: var(--ink-mute); }
@media (max-width: 560px) { .dlg-menu { grid-template-columns: 1fr; } }

.dlg-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.dlg-actions .dlg-disc { font-size: .78rem; color: var(--ink-mute); margin: 0; flex: 1; min-width: 200px; }

/* Trigger button used across sections — outlined secondary action
   (was a bare "Learn more" text link; now reads as a bordered button). */
.more-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-content);
  color: var(--teal); background: transparent;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill);
  min-height: 52px;
  padding: 0 1.2em; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.more-btn svg { width: 15px; height: 15px; transition: transform .2s ease; }
.more-btn:hover, .more-btn:focus-visible { color: var(--teal-deep); border-color: var(--teal); background: rgba(28,90,151,.07); transform: translateY(-2px); }
.more-btn:hover svg { transform: translateX(4px); }
.more-btn.on-dark { color: #fff; background: rgba(18,35,52,.22); border-color: rgba(255,255,255,.42); }
.more-btn.on-dark:hover, .more-btn.on-dark:focus-visible { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.1); }

/* Open animation */
@media (prefers-reduced-motion: no-preference) {
  .svc-dialog[open] { animation: dlgIn .32s cubic-bezier(.22,1,.36,1); }
  .svc-dialog[open]::backdrop { animation: dlgFade .32s ease; }
}
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dlgFade { from { opacity: 0; } to { opacity: 1; } }

/* Lock background scroll when a modal is open (set on <html> by JS) */
html.modal-open, html.modal-open body { overflow: hidden; }