/* ============================================================
 * Public services directory (services.php).
 * Builds on the landing kit in home-landing.css: same blue, same
 * radius language, same Inter / Plus Jakarta Sans pairing.
 * Dark mode uses the site-wide html.sp-dark class.
 * ============================================================ */

.sv-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- hero ---------- */
.sv-hero {
  position: relative;
  overflow: hidden;
  margin: 26px 0 22px;
  padding: 34px 34px 30px;
  background: linear-gradient(135deg, #eaf4fd 0%, #f6fbff 60%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.sv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 70% at 88% 0%, rgba(43, 159, 227, .18), transparent 70%),
    radial-gradient(38% 60% at 4% 100%, rgba(28, 127, 192, .12), transparent 70%);
}

.sv-hero > * {
  position: relative;
}

.sv-hero h1 {
  font-size: clamp(25px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  margin: 6px 0 12px;
}

.sv-intro {
  color: var(--slate);
  font-size: 15.5px;
  max-width: 720px;
}

.sv-intro p {
  margin: 0;
}

.sv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.sv-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.sv-pill b {
  color: var(--blue-deep);
}

.sv-pill svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

/* ---------- toolbar ---------- */
.sv-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.sv-tools form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 260px;
}

.sv-field {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.sv-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--slate-light);
  pointer-events: none;
}

.sv-input,
.sv-select {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
}

.sv-input {
  padding-left: 40px;
}

.sv-input:focus,
.sv-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 159, 227, .16);
}

.sv-select {
  min-width: 190px;
  flex: 0 1 220px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b9fe3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
}

.sv-tools .lp-btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 14.5px;
}

/* The language switcher is a smaller, quieter control than the search fields. */
.sv-langform {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.sv-langform .sv-select {
  height: 38px;
  min-width: 0;
  flex: 0 0 auto;
  width: auto;
  padding: 0 32px 0 12px;
  font-size: 13.5px;
  background-color: #f4f9fe;
}

/* ---------- country shortcuts ---------- */
.sv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.sv-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--slate);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}

.sv-chip:hover {
  color: var(--blue-deep);
  border-color: var(--blue);
  background: #f2f9fe;
}

.sv-chip.is-on {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
}

.sv-count {
  font-size: 13.5px;
  color: var(--slate);
  margin: 22px 0 14px;
}

.sv-count b {
  color: var(--ink);
}

/* ---------- service cards ---------- */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
  padding-bottom: 52px;
}

.sv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.sv-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(43, 159, 227, .55);
}

.sv-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  background: #f2f7fc;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.sv-ico .app-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Letter tile for services with no logo. */
.sv-ico .app-ini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
}

.sv-card .tx {
  flex: 1;
  min-width: 0;
}

.sv-card .nm {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-card .pr {
  flex: 0 0 auto;
  padding: 5px 10px;
  background: #eaf5fd;
  border-radius: 8px;
  color: var(--blue-deep);
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}

.sv-card:hover .pr {
  background: var(--grad);
  color: #fff;
}

.sv-empty {
  text-align: center;
  color: var(--slate-light);
  padding: 54px 24px;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
}

@media (max-width: 700px) {
  .sv-hero {
    margin: 16px 0 18px;
    padding: 24px 20px 22px;
    border-radius: 16px;
  }

  .sv-tools {
    padding: 12px;
  }

  .sv-tools form {
    min-width: 0;
  }

  .sv-select {
    flex: 1 1 100%;
    min-width: 0;
  }

  .sv-tools .lp-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .sv-langform {
    margin-left: 0;
    width: 100%;
  }

  .sv-langform .sv-select {
    flex: 1 1 auto;
    width: 100%;
  }

  .sv-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
 * Dark mode
 * ============================================================ */
html.sp-dark .sv-hero {
  background: linear-gradient(135deg, #1c2635 0%, #181d28 60%, #161b24 100%);
  border-color: var(--line);
}

html.sp-dark .sv-pill {
  background: #222b3a;
  border-color: var(--line);
}

html.sp-dark .sv-input,
html.sp-dark .sv-select {
  background-color: #263140;
  color: var(--ink);
  border-color: var(--line);
}

html.sp-dark .sv-select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237cc6f2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

html.sp-dark .sv-chip:hover {
  background: #263140;
}

html.sp-dark .sv-ico {
  background: #263140;
  border-color: var(--line);
}

/* Monochrome brand marks are near-black, so they get a light plate. */
html.sp-dark .sv-ico .app-ico {
  background: #fff;
  padding: 1px;
  border-radius: 4px;
}

html.sp-dark .sv-card .pr {
  background: #22303e;
  color: #7cc6f2;
}
