/* Directorio de servicios y vidriera de proveedores. Usa las variables de styles.css. */

.services-section {
  scroll-margin-top: 96px;
  margin-top: 2.5rem;
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.svc-muted { color: var(--muted); }
.svc-ok { color: #0f9c78; font-weight: 700; }
.svc-error { color: var(--danger); font-weight: 700; margin: 0; }
.svc-error:empty, .svc-ok:empty { display: none; }
.svc-note {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}
.svc-pre { white-space: pre-line; line-height: 1.55; }

.svc-stack { display: grid; gap: 0.85rem; }
.svc-stack label, .svc-two label { display: grid; gap: 0.35rem; font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.svc-stack input, .svc-stack select, .svc-stack textarea, .svc-search input, .svc-add input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.svc-stack input:focus-visible, .svc-stack select:focus-visible, .svc-stack textarea:focus-visible, .svc-search input:focus-visible, .svc-add input:focus-visible {
  outline: 3px solid rgba(107, 93, 245, 0.35);
  outline-offset: 1px;
}
.svc-stack small { font-weight: 400; }
.svc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.svc-row-end { display: flex; justify-content: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.svc-stack h4, .svc-detail h4 { margin: 0.4rem 0 0; color: var(--ink); font-size: 1.05rem; }

.svc-auth { max-width: 640px; margin: 0 auto; }

.svc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.svc-tabs { display: inline-flex; gap: 0.3rem; padding: 0.25rem; border-radius: 999px; background: var(--surface-soft); }
.svc-tab {
  border: 0;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.svc-tab.is-active { color: #fff; background: var(--purple); }

.svc-search { margin-bottom: 0.8rem; }
.svc-chips, .svc-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 1rem; }
.svc-chip {
  cursor: pointer;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
.svc-chip.is-active { background: var(--purple); border-color: var(--purple); color: #fff; }
.svc-tag {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.svc-add { display: flex; gap: 0.6rem; margin-top: 0.4rem; }

.svc-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.svc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  color: var(--text);
}
.svc-card:hover { transform: translateY(-2px); }
.svc-card:focus-visible { outline: 3px solid rgba(107, 93, 245, 0.45); outline-offset: 2px; }
.svc-card-body { display: grid; gap: 0.25rem; min-width: 0; }
.svc-card-body strong { color: var(--ink); font-size: 1.05rem; overflow-wrap: anywhere; }
.svc-card-body small { overflow-wrap: anywhere; }
.svc-badge {
  justify-self: start;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--purple-strong);
  font-size: 0.78rem;
  font-weight: 800;
}
.svc-empty { grid-column: 1 / -1; text-align: center; padding: 2rem 1rem; }

.svc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  background: var(--surface-soft);
}
.svc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.svc-avatar-md { width: 72px; height: 72px; border-radius: 18px; font-size: 1.9rem; }
.svc-avatar-lg { width: 104px; height: 104px; border-radius: 26px; font-size: 2.8rem; }

.svc-top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.svc-photo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.svc-switch { display: flex !important; grid-template-columns: none; align-items: center; gap: 0.6rem; }
.svc-switch input { width: 20px; min-height: 20px; accent-color: var(--teal); }

.svc-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}
.svc-dialog-small { width: min(420px, calc(100vw - 2rem)); padding: 1.4rem; }
.svc-dialog::backdrop { background: rgba(17, 19, 63, 0.5); }
.svc-detail { position: relative; padding: 1.6rem; display: grid; gap: 1rem; }
.svc-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.svc-hero { display: grid; justify-items: center; gap: 0.5rem; text-align: center; }
.svc-hero h3 { margin: 0.2rem 0 0; color: var(--ink); font-size: 1.5rem; overflow-wrap: anywhere; }
.svc-hero p { margin: 0; }
.svc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; }
.svc-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
a.svc-action:hover { background: var(--surface-soft); }
.svc-detail p { margin: 0; line-height: 1.5; }

@media (max-width: 720px) {
  .services-section { padding: 1rem; }
  .svc-two { grid-template-columns: 1fr; }
  .svc-results { grid-template-columns: 1fr; }
  .svc-bar { flex-direction: column; align-items: stretch; }
  .svc-tabs { justify-content: center; }
}
