/* ===========================================================================
   The Specialties directory.

   Loads landing.css for its tokens, .container and .hero__orb, the same
   established reason the catalogue pages already load it (see
   docs/modules/public-site-shell.md). Self-contained otherwise: everything
   below reads a token with a literal fallback.

   Rebuilt 2026-11-21 from the axis-composition editorial layout
   (catalog.css, still used by /sports, untouched) into compact, full-width
   rows — no sidebar panel, no card-per-service wall of text, one row per
   specialty regardless of how many services sit under it.
   =========================================================================== */

body.catalog-page {
  background: #fff;
  color: var(--ink, #172725);
  font-family: Tajawal, Arial, sans-serif;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Compact hero ----------------------------------------------------------- */

.spec-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 44px;
  text-align: center;
  background: linear-gradient(135deg, #f8fbfa 0%, #fff 60%);
}

.spec-hero .container {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.spec-hero h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--dark, #132c27);
}

.spec-hero p {
  margin: 0;
  color: var(--muted, #687875);
  font-size: 15px;
  line-height: 1.85;
}

/* --- List section ------------------------------------------------------------ */

.spec-list {
  padding: 8px 0 72px;
}

.spec-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.spec-search {
  position: relative;
  width: min(420px, 100%);
}

.spec-search svg {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9aa9a6;
  pointer-events: none;
}

.spec-search input {
  width: 100%;
  height: 46px;
  padding-inline-start: 46px;
  padding-inline-end: 16px;
  border: 1px solid var(--line, #dfe9e5);
  border-radius: 10px;
  background: #fff;
  color: var(--ink, #172725);
  font-family: inherit;
  font-size: 14px;
}

.spec-search input:focus-visible {
  outline: 3px solid rgba(0, 132, 90, 0.14);
  border-color: var(--green, #00845a);
}

.spec-count {
  margin: 0;
  color: var(--muted, #687875);
  font-size: 13px;
}

#specList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--line, #dfe9e5);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease;
}

.spec-row:hover {
  border-color: #bcd9cf;
}

.spec-row[hidden] {
  display: none;
}

.spec-row__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft, #f4f8f6);
  color: var(--green, #00845a);
  font-size: 22px;
}

.spec-row__body {
  min-width: 0;
}

.spec-row__name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--dark, #132c27);
}

.spec-row__summary {
  margin: 0 0 8px;
  color: var(--muted, #687875);
  font-size: 13px;
  line-height: 1.7;
}

.spec-row__meta {
  margin: 0 0 10px;
  color: var(--green, #00845a);
  font-size: 12px;
  font-weight: 700;
}

.spec-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-row__tags li {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--soft, #f4f8f6);
  color: #3d5a53;
  font-size: 11.5px;
  font-weight: 600;
}

.spec-row__tags-more {
  background: transparent !important;
  color: var(--green, #00845a) !important;
}

.spec-row__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--green, #00845a);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.spec-row__cta svg {
  width: 15px;
  height: 15px;
}

html[dir="rtl"] .spec-row__cta svg {
  transform: scaleX(-1);
}

.spec-row__cta:hover,
.spec-row__cta:focus-visible {
  background: #006f4c;
}

.spec-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--muted, #687875);
  font-size: 14px;
}

.spec-empty:not([hidden]) {
  display: block;
}

/* --- Small screens ------------------------------------------------------------ */

@media (max-width: 700px) {
  .spec-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon body"
      "cta cta";
    row-gap: 14px;
  }

  .spec-row__icon {
    grid-area: icon;
  }

  .spec-row__body {
    grid-area: body;
  }

  .spec-row__cta {
    grid-area: cta;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .spec-hero {
    padding: 44px 0 36px;
  }

  .spec-row {
    padding: 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spec-row,
  .spec-row__cta {
    transition: none;
  }
}
