/* The public service catalog. Scoped to preserve the rest of the home page. */
.service-catalog-section {
  --catalog-accent: #e4002b;
  color: var(--foreground);
}

.service-catalog-section [hidden] { display: none !important; }

.service-catalog-section .catalog-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr);
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
}

.service-catalog-section .catalog-heading .section-title { max-width: 13ch; }
.service-catalog-section .catalog-heading .section-intro { margin: 0 0 3px; max-width: 38ch; }

.service-catalog-section .catalog-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 68px);
}

.service-catalog-section .catalog-search { width: min(100%, 420px); min-width: 0; }
.service-catalog-section .catalog-search label {
  display: block;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .035em;
}

.service-catalog-section .catalog-search-field { position: relative; }
.service-catalog-section .catalog-search-field svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  pointer-events: none;
}

.service-catalog-section #service-search {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 16px 12px 46px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  color: var(--foreground);
  background: var(--panel);
  font: inherit;
  font-size: 14px;
  appearance: none;
}

.service-catalog-section #service-search::placeholder { color: var(--placeholder); opacity: 1; }
.service-catalog-section .catalog-results { flex-shrink: 0; margin: 0 0 17px; color: var(--muted); font-size: 12px; }
.service-catalog-section .catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 36px; }
.service-catalog-section .catalog-filter {
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}

.service-catalog-section .catalog-filter[aria-pressed="true"] {
  border-color: var(--foreground);
  color: var(--background);
  background: var(--foreground);
}

.service-catalog-section .catalog-filter:not(:disabled):hover { border-color: var(--foreground); color: var(--foreground); }
.service-catalog-section .catalog-filter[aria-pressed="true"]:not(:disabled):hover { color: var(--background); }
.service-catalog-section .service-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.service-catalog-section .service-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 0 26px;
  border-top: 1px solid var(--rule);
}

.service-catalog-section .service-card-meta { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; line-height: 1.5; letter-spacing: .035em; }
.service-catalog-section .service-card-media { flex: 0 0 auto; width: 88px; height: 88px; aspect-ratio: 1; margin-bottom: 22px; padding: 4px; overflow: hidden; border: 1px solid var(--rule); border-radius: 50%; background: var(--panel); }
.service-catalog-section .service-card-media img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: saturate(.6); opacity: .9; }
.service-catalog-section .service-card-meta span:last-child { font-variant-numeric: tabular-nums; }
.service-catalog-section .service-card-title {
  margin: 27px 0 13px;
  color: var(--foreground);
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.service-catalog-section .service-card-description { flex-grow: 1; margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.service-catalog-section .service-card-detail { display: flex; flex: 1; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.service-catalog-section .service-card-detail:hover .service-card-title { text-decoration: underline; text-decoration-color: var(--catalog-accent); text-underline-offset: 5px; }
.service-catalog-section .service-card-detail:focus-visible { outline: 2px solid var(--foreground); outline-offset: 6px; }
.service-catalog-section .service-card-explore { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 44px; margin-bottom: 14px; color: var(--foreground); font-size: 12px; line-height: 1.5; }
.service-catalog-section .service-card-explore > [aria-hidden="true"] { color: var(--catalog-accent); font-size: 20px; }
.service-catalog-section .service-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid #c9002f;
  border-radius: 0;
  color: #fff;
  background: #c9002f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.service-catalog-section .service-add-symbol { display: none; }
.service-catalog-section .service-add::after { content: "+"; flex: 0 0 20px; font-size: 25px; font-weight: 400; line-height: 1; text-align: center; }
.service-catalog-section .service-add:not(:disabled):hover { border-color: #b00029; color: #fff; background: #b00029; }
.service-catalog-section .service-add[aria-pressed="true"] { border-color: #950024; color: #fff; background: #950024; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 55%); }
.service-catalog-section .service-add[aria-pressed="true"]::after { content: "\2713"; font-size: 21px; }
.service-catalog-section .service-add[aria-pressed="true"]:not(:disabled):hover { border-color: #7d001e; color: #fff; background: #7d001e; }
.service-catalog-section button:disabled { cursor: default; }
.service-catalog-section .service-add:disabled { border-color: var(--rule); color: var(--muted); background: var(--toggle-hover); box-shadow: none; cursor: not-allowed; }
.service-catalog-section button:focus-visible,
.service-catalog-section input:focus-visible,
.service-catalog-section a:focus-visible { outline: 2px solid var(--foreground); outline-offset: 4px; }
.service-catalog-section .catalog-empty { margin: 0; padding: 56px 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 16px; line-height: 1.7; }
.service-catalog-section .catalog-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.service-catalog-section .catalog-review p { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.025em; }
.service-catalog-section .catalog-review p span { display: block; max-width: 49ch; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.7; letter-spacing: 0; }
.service-catalog-section .catalog-review-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  padding: 13px 20px;
  border: 1px solid var(--foreground);
  border-radius: 0;
  color: var(--background);
  background: var(--foreground);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.service-catalog-section .catalog-review-button:not(:disabled):hover { color: var(--foreground); background: transparent; }
.service-catalog-section .catalog-bundle-count { min-width: 1.6em; padding-left: 12px; border-left: 1px solid currentColor; font-variant-numeric: tabular-nums; }
.service-catalog-section .catalog-no-script { margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.service-catalog-section .catalog-no-script a { color: var(--foreground); text-underline-offset: 4px; overflow-wrap: anywhere; }

/* One decorative edge burst; the label and existing plus/check stay untouched. */
button[data-service-add] { position: relative; }
button[data-service-add]::before {
  content: "";
  position: absolute;
  inset: -14px 0;
  pointer-events: none;
  opacity: 0;
  transform: scale(.68);
  background:
    url("/brand/magic-button-sparkle.svg") 1% 34% / 16px 16px no-repeat,
    url("/brand/magic-button-sparkle.svg") 17% 2% / 11px 11px no-repeat,
    url("/brand/magic-button-sparkle.svg") 55% 0 / 14px 14px no-repeat,
    url("/brand/magic-button-sparkle.svg") 82% 10% / 9px 9px no-repeat,
    url("/brand/magic-button-sparkle.svg") 100% 50% / 17px 17px no-repeat,
    url("/brand/magic-button-sparkle.svg") 76% 100% / 13px 13px no-repeat,
    url("/brand/magic-button-sparkle.svg") 26% 94% / 10px 10px no-repeat,
    radial-gradient(circle, #fff1bf 50%, transparent 70%) 7% 76% / 3px 3px no-repeat,
    radial-gradient(circle, #e4b55b 50%, transparent 70%) 35% 4% / 3px 3px no-repeat,
    radial-gradient(circle, #fff1bf 50%, transparent 70%) 65% 88% / 3px 3px no-repeat,
    radial-gradient(circle, #e4b55b 50%, transparent 70%) 94% 16% / 4px 4px no-repeat;
}

@keyframes service-button-sparkles {
  0% { opacity: 0; transform: scale(.68); }
  18% { opacity: 1; }
  42% { opacity: .95; }
  100% { opacity: 0; transform: scale(1); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  button[data-service-add]:not(:disabled):hover::before { animation: service-button-sparkles 1s ease-out both; }
}
@media (prefers-reduced-motion: no-preference) {
  button[data-service-add]:not(:disabled):focus-visible::before { animation: service-button-sparkles 1s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  button[data-service-add]::before { display: none; animation: none; }
}

/* The dedicated catalog sits below the shared, absolutely positioned masthead. */
.services-page main { padding-top: clamp(112px, 10vw, 156px); }
.services-page .service-catalog-section { padding-top: clamp(32px, 4vw, 64px); }
.services-page .services-breadcrumb { display: flex; align-items: center; gap: 12px; margin: 0 auto 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.services-page .services-breadcrumb a,
.services-page a.services-breadcrumb { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.services-page .services-breadcrumb a:hover,
.services-page a.services-breadcrumb:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 5px; }
.services-page .services-breadcrumb a:focus-visible,
.services-page a.services-breadcrumb:focus-visible { outline: 2px solid var(--foreground); outline-offset: 4px; }

.services-preview .service-card-grid { margin-top: clamp(32px, 4vw, 52px); }
.services-preview .catalog-preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 52px;
  margin-top: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--foreground);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
}
.services-preview .catalog-preview-link > [aria-hidden="true"] { font-size: 21px; font-weight: 400; line-height: 1; }
.services-preview .catalog-preview-link:hover { border-color: var(--catalog-accent); }
.services-preview .catalog-preview-link:focus-visible { outline: 2px solid var(--foreground); outline-offset: 5px; }

@media (max-width: 1100px) {
  .service-catalog-section .service-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
  .service-catalog-section .catalog-heading { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 32px; }
}

@media (max-width: 700px) {
  .service-catalog-section .catalog-heading { grid-template-columns: 1fr; gap: 25px; }
  .service-catalog-section .catalog-heading .section-intro { max-width: 44ch; }
  .service-catalog-section .catalog-tools { align-items: start; flex-direction: column; gap: 14px; }
  .service-catalog-section .catalog-search { width: 100%; }
  .service-catalog-section #service-search { font-size: 16px; }
  .service-catalog-section .catalog-results { margin: 0; }
  .service-catalog-section .catalog-filters { margin-top: 20px; margin-bottom: 30px; gap: 6px; }
  .service-catalog-section .catalog-filter { padding-inline: 12px; font-size: 11px; }
  .service-catalog-section .catalog-review { align-items: start; flex-direction: column; gap: 22px; }
}

@media (max-width: 560px) {
  .service-catalog-section .service-card-media { width: 76px; height: 76px; margin-bottom: 18px; }
  .service-catalog-section .service-card-grid { grid-template-columns: 1fr; }
  .service-catalog-section .service-card { padding-block: 22px; }
  .service-catalog-section .service-card-title { margin-top: 22px; font-size: 27px; }
  .service-catalog-section .service-card-description { margin-bottom: 13px; }
  .service-catalog-section .catalog-review-button { width: 100%; padding-inline: 14px; gap: 12px; }
  .services-page main { padding-top: 112px; }
  .services-page .service-catalog-section { padding-top: 28px; }
  .services-preview .catalog-preview-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .service-catalog-section .service-add { transition: none; }
}
