/* Directorio app — mobile-first, embebible (sin chrome del portal) */
:root {
  --ms-navy: #002856;
  --ms-blue: #0033a1;
  --ms-ink: #1d1e1c;
  --ms-muted: #5a6570;
  --ms-surface: #f3f6fb;
  --ms-surface-2: #e8eef8;
  --ms-white: #ffffff;
  --ms-urgent: #c8102e;
  --ms-radius: 12px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ms-ink);
  background: var(--ms-white);
  line-height: 1.45;
}

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

/* Hero (captura) */
.da-hero {
  background: linear-gradient(165deg, #0a4a8a 0%, var(--ms-navy) 55%, #001a38 100%);
  color: #fff;
  padding: calc(1.75rem + var(--safe-top)) calc(1.15rem + var(--safe-right)) 1.85rem
    calc(1.15rem + var(--safe-left));
}

.da-hero__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.da-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 6.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.da-hero p {
  margin: 0.65rem 0 0;
  font-size: clamp(0.92rem, 3.6vw, 1.05rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
}

.da-main {
  padding: 1.25rem calc(1.15rem + var(--safe-right)) calc(1.5rem + var(--safe-bottom))
    calc(1.15rem + var(--safe-left));
  max-width: 40rem;
  margin: 0 auto;
}

.da-search {
  display: grid;
  gap: 0.85rem;
}

.da-search__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  min-height: 3rem;
  border: 1px solid rgba(0, 40, 86, 0.16);
  border-radius: 14px;
  background: var(--ms-white);
}

.da-search__icon {
  display: flex;
  color: #8a96a5;
  flex-shrink: 0;
}

.da-search__bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ms-ink);
  background: transparent;
}

.da-search__bar input::placeholder {
  color: #9aa5b4;
}

.da-search__filter select {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 2.25rem 0.7rem 0.95rem;
  border: 1px solid rgba(0, 40, 86, 0.16);
  border-radius: 12px;
  background: var(--ms-white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6570' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.9rem center;
  appearance: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ms-ink);
}

.da-search__filter select:focus,
.da-search__bar:focus-within {
  outline: 2px solid rgba(0, 51, 161, 0.35);
  outline-offset: 1px;
}

.da-hint {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ms-muted);
}

.da-hint--error {
  color: var(--ms-urgent);
}

.da-results {
  margin-top: 0.35rem;
}

.da-count {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ms-muted);
}

.da-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.da-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(0, 40, 86, 0.12);
  border-radius: 14px;
  background: var(--ms-white);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.da-card:active {
  background: var(--ms-surface);
}

.da-card__photo,
.da-card__sil {
  width: 52px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  background: var(--ms-surface-2);
  flex-shrink: 0;
  border: 1px solid rgba(0, 40, 86, 0.08);
}

.da-card__body {
  flex: 1;
  min-width: 0;
}

.da-card__name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ms-navy);
  line-height: 1.25;
}

.da-card__esp {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ms-blue);
  line-height: 1.3;
}

.da-card__cta {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ms-blue);
  white-space: nowrap;
}

/* Ficha — espejo móvil de .dir-ficha (portal) */
.da-back {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.35rem 0;
  margin: 0 0 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ms-blue);
  cursor: pointer;
  min-height: 2.5rem;
}

.da-ficha__hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.da-ficha__photo {
  display: block;
  width: 120px;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  object-position: center top;
  background: var(--ms-surface-2);
  flex-shrink: 0;
  border: 1px solid rgba(0, 40, 86, 0.1);
  box-shadow: 0 8px 24px rgba(0, 40, 86, 0.08);
}

.da-ficha__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ms-blue);
}

.da-ficha__name {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  font-weight: 700;
  color: var(--ms-navy);
  line-height: 1.2;
}

.da-ficha__esp {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ms-muted);
  line-height: 1.35;
}

.da-ficha__grid {
  display: grid;
  gap: 1.35rem;
}

.da-ficha__section {
  margin-bottom: 1.35rem;
}

.da-ficha__section h2 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  color: var(--ms-navy);
}

.da-ficha__section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.da-ficha__section li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--ms-ink);
  font-size: 0.92rem;
  line-height: 1.4;
}

.da-check {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--ms-blue);
}

.da-ficha__para {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  color: var(--ms-ink);
  line-height: 1.45;
}

.da-ficha__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.da-ficha__tags span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--ms-surface-2);
  color: var(--ms-navy);
  font-size: 0.85rem;
  font-weight: 600;
}

.da-ficha__video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.da-ficha__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.da-ficha__side {
  padding: 1.15rem;
  border-radius: 16px;
  background: var(--ms-surface);
  border: 1px solid rgba(0, 40, 86, 0.08);
}

.da-ficha__side h3 {
  margin: 0 0 0.4rem;
  color: var(--ms-navy);
  font-size: 1.05rem;
}

.da-ficha__side > p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ms-muted);
}

.da-ficha__phone {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ms-blue);
  text-decoration: none;
  min-height: 2.5rem;
  line-height: 2.5rem;
}

.da-ficha__direct {
  color: var(--ms-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.da-ficha__ext,
.da-ficha__meta {
  margin: 0.5rem 0 0;
  color: var(--ms-muted);
  font-size: 0.9rem;
}

.da-ficha__meta a {
  color: var(--ms-blue);
  text-decoration: none;
  word-break: break-word;
}

@media (min-width: 480px) {
  .da-card__cta {
    display: inline;
  }
}

@media (max-width: 359px) {
  .da-search__bar input {
    font-size: 0.92rem;
  }
  .da-card__cta {
    display: none;
  }
}
