.services-page{
  display:grid;
  gap:48px;
  margin-block:40px 80px;
}

.services-intro{
  display:grid;
  gap:18px;
  max-width:780px;
}

.services-intro h1{
  margin:0;
  font-size:2.35rem;
  line-height:1.25;
}

.services-intro [data-services-field="lead"]{
  margin:0;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#1d4ed8;
}

#servicesPage:not(.is-editing) .services-intro.is-empty{
  display:none;
}

.services-intro [data-services-field="body_html"]{
  display:grid;
  gap:16px;
  line-height:1.65;
}

.services-intro [data-services-field="body_html"] > *{
  margin:0;
}

.services-intro [data-services-field="body_html"] h2,
.services-intro [data-services-field="body_html"] h3,
.services-intro [data-services-field="body_html"] h4{
  font-weight:700;
  letter-spacing:-0.01em;
}

.services-intro [data-services-field="body_html"] h2:not(:first-child),
.services-intro [data-services-field="body_html"] h3:not(:first-child),
.services-intro [data-services-field="body_html"] h4:not(:first-child){
  margin-top:8px;
}

.services-intro [data-services-field="body_html"] ol,
.services-intro [data-services-field="body_html"] ul{
  padding-left:1.3em;
}

.services-intro [data-services-field="body_html"] li{
  margin:0;
}

.services-intro [data-services-field] figure,
.services-intro [data-services-field] .rt-embed{
  margin:0;
}

.services-sections{
  display:grid;
  gap:28px;
}

.services-blocks{
  display:grid;
  gap:24px;
  width:100%;
  max-width:780px;
  margin:0 auto;
}

.services-block{
  padding:28px;
  border-radius:24px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(248,250,252,.96);
  box-shadow:0 12px 32px -28px rgba(15,23,42,.25);
  position:relative;
  transition:border .2s ease, box-shadow .2s ease;
}

html.theme-dark .services-block{
  background:rgba(15,23,42,.78);
  border-color:rgba(148,163,184,.25);
  box-shadow:0 12px 40px -32px rgba(15,23,42,.6);
}

.services-block__content{
  display:grid;
  gap:14px;
  line-height:1.6;
}

.services-block__content h3{
  margin:0;
  font-size:1.4rem;
  font-weight:700;
}

.services-block__content p,
.services-block__content ul,
.services-block__content ol{
  margin:0;
}

.services-block__content blockquote{
  margin:0;
  padding:0 0 0 1rem;
  border-left:3px solid rgba(59,130,246,.6);
  font-style:italic;
  color:#1f2937;
}

html.theme-dark .services-block__content blockquote{
  color:#e2e8f0;
  border-left-color:rgba(96,165,250,.75);
}

.services-block__content pre{
  margin:0;
  padding:12px 16px;
  border-radius:14px;
  background:rgba(15,23,42,.08);
  font-family:Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  overflow-x:auto;
}

html.theme-dark .services-block__content pre{
  background:rgba(15,23,42,.6);
  color:#e2e8f0;
}

.services-block__content code{
  font-family:Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.services-block__content figure{
  margin:0;
  display:grid;
  gap:8px;
}

.services-block__content figure img,
.services-block__content figure video{
  width:100%;
  height:auto;
  border-radius:16px;
}

.services-block__content figure figcaption{
  font-size:.85rem;
  color:#475569;
}

html.theme-dark .services-block__content figure figcaption{
  color:#cbd5f5;
}

.services-block__content .rt-embed{
  width:100%;
  position:relative;
  padding-top:56.25%;
  border-radius:16px;
  overflow:hidden;
  background:rgba(15,23,42,.08);
}

.services-block__content .rt-embed iframe,
.services-block__content .rt-embed video{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border:0;
}

.services-block__controls{
  position:absolute;
  top:12px;
  right:12px;
  display:none;
  gap:6px;
}

.services-block__controls button{
  border:none;
  background:rgba(15,23,42,.1);
  color:#0f172a;
  width:30px;
  height:30px;
  border-radius:10px;
  cursor:pointer;
  transition:background .2s ease;
}

.services-block__controls button:hover{
  background:rgba(59,130,246,.22);
}

html.theme-dark .services-block__controls button{
  background:rgba(148,163,184,.25);
  color:#e2e8f0;
}

html.theme-dark .services-block__controls button:hover{
  background:rgba(59,130,246,.35);
}

.services-footer-cta{
  display:flex;
  justify-content:center;
}

.services-footer-cta__btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 22px;
  border-radius:999px;
  border:1px solid rgba(29,78,216,.4);
  background:transparent;
  color:#1d4ed8;
  font-weight:600;
  text-decoration:none;
  transition:background .2s ease, color .2s ease;
}

.services-footer-cta__btn:hover{
  background:rgba(29,78,216,.08);
}

/* Inline editing UI */
#servicesInlineToolbar{
  position:fixed;
  left:16px;
  top:calc(var(--header-h, 72px) + 16px);
  z-index:2200;
  display:flex;
  flex-direction:column;
  gap:12px;
}

#servicesInlineToolbar .services-inline-toolbar__content{
  display:none;
}

#servicesInlineToolbar.is-expanded{
  left:50%;
  transform:translateX(-50%);
  flex-direction:row;
  align-items:center;
}

#servicesInlineToolbar.is-expanded .services-inline-toolbar__content{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(15,23,42,.85);
  color:#fff;
  box-shadow:0 12px 30px rgba(15,23,42,.3);
  border:1px solid rgba(148,163,184,.35);
  backdrop-filter:blur(10px);
}

html.theme-light #servicesInlineToolbar.is-expanded .services-inline-toolbar__content{
  background:rgba(248,250,252,.92);
  color:#0f172a;
  border-color:rgba(148,163,184,.4);
}

.services-inline-toolbar__launcher{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:50%;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(15,23,42,.85);
  color:#fff;
  cursor:pointer;
}

html.theme-light .services-inline-toolbar__launcher{
  background:rgba(248,250,252,.92);
  color:#0f172a;
  border-color:rgba(148,163,184,.4);
}

.services-inline-toolbar__toggle,
.services-inline-toolbar__add{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:none;
  background:transparent;
  color:inherit;
  font-weight:600;
  cursor:pointer;
  padding:6px 14px;
  border-radius:999px;
}

.services-inline-toolbar__save{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:none;
  background:#22c55e;
  color:#022c22;
  font-weight:700;
  cursor:pointer;
  padding:6px 16px;
  border-radius:999px;
  box-shadow:0 10px 24px -8px rgba(34,197,94,.55);
}

.services-inline-toolbar__save:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
}

.services-inline-toolbar__status{
  min-width:90px;
  font-size:.85rem;
  font-weight:600;
}

.services-inline-toolbar__status.is-error{
  color:#ef4444;
}

.services-inline-toolbar__status.is-ok{
  color:#22c55e;
}

.services-inline-toolbar__collapse{
  border:none;
  background:transparent;
  color:inherit;
  font-size:1.35rem;
  line-height:1;
  padding:6px;
  cursor:pointer;
}

.services-inline-toolbar__icon{
  width:20px;
  height:20px;
}

.services-editable{
  outline:2px dashed transparent;
  transition:outline-color .2s ease, background .2s ease;
}

#servicesPage.is-editing .services-editable{
  outline-color:rgba(59,130,246,.6);
  background:rgba(148,163,184,.12);
}

#servicesPage.is-editing .services-block{
  cursor:text;
}

#servicesPage.is-editing .services-block__controls{
  display:flex;
}

#servicesPage:not(.is-editing) .services-block__controls{
  display:none !important;
}

#servicesPage:not(.is-editing) .services-intro [data-services-field]:empty{
  display:none;
}

#servicesPage:not(.is-editing) .services-field-removed{
  display:none !important;
}

#servicesPage.is-editing .services-field-removed{
  border:1px dashed rgba(249,115,22,.9);
  background:rgba(251,191,36,.1);
  color:#ea580c;
  padding:12px;
  min-height:40px;
}

#servicesPage.is-editing .services-field-removed::before{
  content:attr(data-placeholder);
  display:block;
  font-size:.85rem;
  font-weight:600;
  margin-bottom:4px;
}

.services-rt-toolbar{
  position:fixed;
  z-index:2400;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  column-gap:6px;
  row-gap:6px;
  padding:10px 16px;
  border-radius:18px;
  background:rgba(15,23,42,.92);
  color:#f8fafc;
  box-shadow:0 12px 32px rgba(15,23,42,.35);
  border:1px solid rgba(148,163,184,.35);
  backdrop-filter:blur(10px);
  pointer-events:auto;
  width:min(1000px, 96vw);
  max-height:calc(34px * 2 + 18px);
}

.services-rt-toolbar[hidden]{
  display:none !important;
}

.services-rt-toolbar button{
  border:none;
  background:transparent;
  color:inherit;
  font-size:.9rem;
  font-weight:600;
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  transition:background .2s ease, color .2s ease;
  white-space:nowrap;
}

.services-rt-toolbar button:hover{
  background:rgba(248,250,252,.15);
}

.services-rt-toolbar .is-danger{
  color:#fca5a5;
}

.services-rt-toolbar button.is-danger:hover{
  background:rgba(248,113,113,.2);
  color:#fee2e2;
}

.services-rt-toolbar .rt-sep{
  width:1px;
  height:26px;
  background:rgba(148,163,184,.45);
  align-self:center;
}

html.theme-light .services-rt-toolbar{
  background:rgba(248,250,252,.95);
  color:#0f172a;
  border-color:rgba(148,163,184,.4);
  box-shadow:0 12px 28px rgba(148,163,184,.25);
}

html.theme-light .services-rt-toolbar button:hover{
  background:rgba(226,232,240,.65);
}

@media (max-width:720px){
  .services-rt-toolbar{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding:8px 12px;
    border-radius:14px;
    width:94vw;
  }
  .services-rt-toolbar button{
    font-size:.85rem;
    padding:4px 8px;
  }
  .services-block{
    padding:22px;
  }
}
