/* =========================================================================
   Directory UI — duas propostas (A: Finder, B: Vitrine)
   Ativadas por ?dir=a / ?dir=b. Escopo: .dir-a / .dir-b (o layout atual fica intacto)
   ========================================================================= */

.dir-a, .dir-b {
  --d-bg: #f6f2ea;
  --d-surface: #fffdf9;
  --d-surface-2: #faf6ee;
  --d-ink: #17233a;
  --d-muted: #6b7789;
  --d-line: rgba(23, 35, 58, .10);
  --d-line-strong: rgba(23, 35, 58, .18);
  --d-accent: #0f6f63;
  --d-accent-soft: rgba(15, 111, 99, .10);
  --d-gold: #b08d57;
  --d-radius: 18px;
  --d-shadow: 0 14px 38px rgba(23, 35, 58, .07);
  font-family: Inter, Arial, sans-serif;
  color: var(--d-ink);
}

/* ------------------------------------------------------------------ cabeçalho compacto (comum) */
.dir-a .da, .dir-b .db { max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px; }

.da__head, .db__head { margin-bottom: 18px; }
.da__eyebrow, .db__eyebrow {
  margin: 0 0 8px; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--d-gold); font-weight: 700;
}
.da__title, .db__title {
  margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -.02em; line-height: 1.1;
}
.da__sub, .db__sub { margin: 8px 0 0; color: var(--d-muted); font-size: .98rem; max-width: 70ch; }
.da__count {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 6px 14px; border-radius: 999px; background: var(--d-accent-soft); color: var(--d-accent);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* ------------------------------------------------------------------ barra de busca + filtros (A) */
.da__bar {
  background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--d-radius);
  padding: 16px; box-shadow: var(--d-shadow); margin-bottom: 20px;
}
.da__search { display: flex; gap: 10px; align-items: center; }
.da__search-field {
  flex: 1; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--d-line-strong); border-radius: 999px; padding: 11px 18px; background: #fff;
}
.da__search-field svg { flex: 0 0 auto; opacity: .45; }
.da__search-field input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; background: transparent; color: var(--d-ink); }
.da__search-btn {
  border: 0; border-radius: 999px; background: var(--d-accent); color: #fff; font-weight: 700;
  padding: 13px 26px; cursor: pointer; font: inherit;
}
.da__search-btn:hover { background: #0c5b52; }
.da__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.da__chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--d-line-strong); background: var(--d-surface-2); color: var(--d-ink);
  font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.da__chip:hover { border-color: var(--d-line-strong); background: #fff; }
.da__chip.is-active { background: var(--d-ink); border-color: var(--d-ink); color: #f4f0e7; }
.da__chip small { opacity: .6; font-weight: 700; }
.da__chip--ghost { border-style: dashed; background: transparent; color: var(--d-accent); }

/* ------------------------------------------------------------------ grade densa de cartões (A) */
.da__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 16px;
}
.dc {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--d-radius);
  box-shadow: var(--d-shadow); transition: transform .16s ease, box-shadow .16s ease;
}
.dc:hover { transform: translateY(-3px); box-shadow: 0 22px 52px rgba(23, 35, 58, .12); }
.dc__top { display: flex; align-items: center; gap: 13px; }
.dc__avatar {
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--d-accent-soft); color: var(--d-accent);
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; font-weight: 700;
}
.dc__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc__name { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.32rem; font-weight: 600; line-height: 1.15; }
.dc__title { margin: 3px 0 0; color: var(--d-muted); font-size: .84rem; line-height: 1.4; }
.dc__rows { display: grid; gap: 5px; font-size: .87rem; color: var(--d-muted); }
.dc__rows span { display: flex; align-items: flex-start; gap: 7px; }
.dc__foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--d-line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.dc__chip {
  padding: 5px 11px; border-radius: 999px; background: var(--d-accent-soft); color: var(--d-accent);
  font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.dc__link { color: var(--d-ink); font-weight: 700; font-size: .84rem; text-decoration: none; white-space: nowrap; }
.dc__link:hover { color: var(--d-accent); }

.da__about, .db__note {
  margin-top: 26px; border: 1px solid var(--d-line); border-radius: var(--d-radius);
  background: var(--d-surface-2); padding: 16px 20px;
}
.da__about summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.da__about p, .db__note p { color: var(--d-muted); font-size: .88rem; line-height: 1.65; margin: 10px 0 0; }
.da__about a, .db__note a { color: var(--d-accent); font-weight: 600; }
.da__empty, .db__empty {
  padding: 26px; border: 1px dashed var(--d-line-strong); border-radius: var(--d-radius);
  color: var(--d-muted); text-align: center; background: var(--d-surface-2);
}

/* ------------------------------------------------------------------ B: vitrine (sidebar + grade) */
.db__layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 26px; align-items: start; }
.db__side { position: sticky; top: 18px; display: grid; gap: 14px; }
.db__search { display: grid; gap: 9px; }
.db__search input {
  width: 100%; padding: 12px 15px; border-radius: 12px; border: 1px solid var(--d-line-strong);
  font: inherit; font-size: .95rem; background: #fff; color: var(--d-ink);
}
.db__search button {
  border: 0; border-radius: 12px; background: var(--d-ink); color: #f4f0e7; font: inherit;
  font-weight: 700; padding: 12px 18px; cursor: pointer;
}
.db__search button:hover { background: #0e1a2b; }
.db__filters { display: grid; gap: 4px; }
.db__filter {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border-radius: 11px; color: var(--d-ink); text-decoration: none; font-size: .9rem;
  border: 1px solid transparent; cursor: pointer; background: transparent; font: inherit;
}
.db__filter:hover { background: var(--d-surface); border-color: var(--d-line); }
.db__filter.is-active { background: var(--d-ink); color: #f4f0e7; }
.db__filter small { opacity: .6; font-weight: 700; }
.db__note { margin-top: 0; }

.db__main { display: grid; gap: 18px; }
.db__featured {
  display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 22px; padding: 26px;
  background: linear-gradient(135deg, rgba(176, 141, 87, .12), transparent 60%), var(--d-surface);
  border: 1px solid var(--d-line); border-left: 5px solid var(--d-gold);
  border-radius: var(--d-radius); box-shadow: var(--d-shadow);
}
.db__featured-media {
  width: 172px; height: 172px; border-radius: 14px; overflow: hidden; background: var(--d-accent-soft);
  display: grid; place-items: center; color: var(--d-accent);
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 3.4rem; font-weight: 700;
}
.db__featured-media img { width: 100%; height: 100%; object-fit: cover; }
.db__badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: rgba(176, 141, 87, .16); color: #8a6a3a; font-size: .7rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px;
}
.db__featured-name {
  margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
}
.db__featured-title { margin: 6px 0 0; color: var(--d-muted); font-size: .95rem; }
.db__featured-bio { margin: 12px 0 0; color: #3c475b; font-size: .93rem; line-height: 1.7; }
.db__contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.db__contact a, .db__contact span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--d-surface-2); border: 1px solid var(--d-line); color: var(--d-ink);
  font-size: .8rem; text-decoration: none;
}
.db__contact a:hover { border-color: var(--d-line-strong); }
.db__featured-cta {
  display: inline-flex; margin-top: 16px; padding: 11px 22px; border-radius: 999px;
  background: var(--d-accent); color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none;
}
.db__featured-cta:hover { background: #0c5b52; }

.db__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.db__card {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
  background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--d-radius);
  box-shadow: var(--d-shadow); transition: transform .16s ease, border-color .16s ease;
  text-decoration: none; color: inherit;
}
.db__card:hover { transform: translateY(-2px); border-color: var(--d-line-strong); }
.db__card-avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--d-accent-soft); color: var(--d-accent);
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.25rem; font-weight: 700;
}
.db__card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.db__card-name { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.18rem; font-weight: 600; line-height: 1.2; }
.db__card-meta { margin: 4px 0 0; color: var(--d-muted); font-size: .84rem; line-height: 1.5; }
.db__card-cat { margin-top: 8px; display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--d-gold); }

/* ------------------------------------------------------------------ switcher + responsivo */
.dir-switcher {
  position: fixed; left: 16px; bottom: 78px; z-index: 9999; display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 999px; background: rgba(12, 22, 38, .92);
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  font: 600 12px/1 Inter, Arial, sans-serif; color: #f2ece0;
}
.dir-switcher a { padding: 7px 12px; border-radius: 999px; color: #f2ece0; text-decoration: none; opacity: .75; }
.dir-switcher a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.dir-switcher a.is-active { background: #c9a227; color: #17233a; opacity: 1; }
.dir-switcher span { opacity: .6; padding: 0 4px; }

@media (max-width: 980px) {
  .db__layout { grid-template-columns: 1fr; }
  .db__side { position: static; }
  .db__featured { grid-template-columns: 1fr; }
  .db__featured-media { width: 100%; height: 160px; }
}
@media (max-width: 620px) {
  .da__search { flex-direction: column; align-items: stretch; }
  .da__search-btn { width: 100%; }
  .da__grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ trilho (carrossel) do design A */
.da__railwrap { position: relative; }
.da__railwrap::before,
.da__railwrap::after {
  content: \x27\x27; position: absolute; top: 0; bottom: 18px; width: 64px; pointer-events: none;
  opacity: 0; transition: opacity .2s ease; z-index: 2;
}
.da__railwrap::before { left: -2px; background: linear-gradient(270deg, rgba(245,241,232,0), #f5f1e8 82%); }
.da__railwrap::after { right: -2px; background: linear-gradient(90deg, rgba(245,241,232,0), #f5f1e8 82%); }
.da__railwrap.has-prev::before { opacity: 1; }
.da__railwrap.has-more::after { opacity: 1; }

.da__grid.da__rail {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 4px 2px 16px; scrollbar-width: none; -ms-overflow-style: none;
}
.da__grid.da__rail::-webkit-scrollbar { display: none; }
.da__grid.da__rail .dc { flex: 0 0 300px; scroll-snap-align: start; }

.da__controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.da__arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--d-line-strong);
  background: #fff; color: var(--d-ink); font-size: 1.25rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.da__arrow:hover:not([disabled]) { background: var(--d-ink); border-color: var(--d-ink); color: #f4f0e7; }
.da__arrow[disabled] { opacity: .35; cursor: default; }

@media (max-width: 620px) {
  .da__grid.da__rail .dc { flex: 0 0 84%; }
  .da__controls { margin-left: 0; }
}

/* ------------------------------------------------------------------ setas sobre as laterais dos cards */
.da__railwrap > .da__arrow--side {
  position: absolute; top: 40%; z-index: 3;
  width: 56px; height: 56px; font-size: 1.95rem; font-weight: 700;
  background: var(--d-accent); border: 1px solid var(--d-accent); color: #fff;
  box-shadow: 0 16px 34px rgba(15, 111, 99, .38);
  transition: opacity .18s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.da__railwrap > .da__arrow--side[data-da-prev] { left: 10px; }
.da__railwrap > .da__arrow--side[data-da-next] { right: 10px; }
.da__railwrap > .da__arrow--side[disabled] { opacity: 0; pointer-events: none; }
.da__railwrap > .da__arrow--side:hover:not([disabled]) { background: #0c5b52; border-color: #0c5b52; color: #fff; transform: scale(1.07); }

@media (max-width: 620px) {
  .da__railwrap > .da__arrow--side { display: none; }
}
