/* css/partners-directory.css — Partners Directory layout, sidebar, accordion, drawer
   Prefix: .pd-  (partners-directory)
   Does NOT redefine .partner-card--large or any class in partners-page.css
   Requires: css/style.css (--blue, --gold, --off-white, --blue-mid custom properties) */

/* === Container principal === */
.pd-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* === Sidebar filtros (desktop) === */
.pd-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 20px 16px;
}

.pd-sidebar__group {
  margin-bottom: 20px;
}

.pd-sidebar__group:last-of-type {
  margin-bottom: 0;
}

.pd-sidebar__label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue, #0a3d6b);
  margin-bottom: 10px;
}

.pd-sidebar__filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.pd-sidebar__filter input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue, #0a3d6b);
  cursor: pointer;
  flex-shrink: 0;
}

.pd-sidebar__filter input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 2px;
  border-radius: 2px;
}

.pd-sidebar__count {
  margin-left: auto;
  font-size: 11px;
  color: #888;
}

.pd-sidebar__clear {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--blue, #0a3d6b);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.pd-sidebar__clear:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 3px;
  border-radius: 2px;
}

.pd-sidebar__clear:hover {
  color: var(--blue-mid, #1a5fa3);
}

/* === Mobile drawer === */
.pd-mobile-filters-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--blue, #0a3d6b);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
}

.pd-mobile-filters-btn:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 3px;
  border-radius: 8px;
}

.pd-mobile-filters-btn:hover {
  background: var(--blue-mid, #1a5fa3);
}

.pd-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  padding: 56px 20px 32px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.pd-drawer--open {
  transform: translateX(0);
}

.pd-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 899;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.pd-drawer__backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

.pd-drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.pd-drawer__close:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 2px;
  border-radius: 6px;
}

.pd-drawer__close:hover {
  color: var(--blue, #0a3d6b);
}

.pd-drawer__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue, #0a3d6b);
  margin-bottom: 20px;
}

/* Drawer reutiliza .pd-sidebar__group/.pd-sidebar__label/.pd-sidebar__filter dentro */

/* === Lista principal === */
.pd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 12px;
  flex-wrap: wrap;
}

.pd-result-count {
  font-size: 13px;
  color: #555;
}

.pd-sort {
  font-size: 12px;
  color: #555;
  background: none;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.pd-sort:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 2px;
  border-radius: 6px;
}

/* === Linha compacta === */
.pd-row {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.pd-row:hover {
  background: var(--off-white, #f6f4ef);
}

.pd-row:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 2px;
  border-radius: 12px;
}

.pd-row__logo {
  background: var(--blue, #0a3d6b);
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  width: 80px;
  height: 80px;
}

.pd-row__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pd-row__main {
  min-width: 0;
}

.pd-row__name {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue, #0a3d6b);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-row__meta {
  font-size: 12px;
  color: #666;
  margin: 0 0 6px;
}

.pd-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.pd-row__chip {
  font-size: 11px;
  background: rgba(10, 61, 107, 0.07);
  color: var(--blue, #0a3d6b);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.pd-row__chip--gold {
  background: rgba(201, 168, 76, 0.15);
  color: #6e4e00;
}

.pd-row__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.pd-row__badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--blue, #0a3d6b);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: normal;
  line-height: 1.3;
  max-width: 100%;
  word-wrap: break-word;
}

.pd-row__toggle {
  font-size: 11px;
  color: #185fa5;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pd-row__toggle:focus-visible {
  outline: 2px solid var(--gold, #c9a84c);
  outline-offset: 2px;
  border-radius: 4px;
}

.pd-row__toggle:hover {
  color: var(--blue, #0a3d6b);
}

.pd-row__toggle-icon {
  display: inline-block;
  transition: transform 0.25s ease;
}

.pd-row__toggle[aria-expanded="true"] .pd-row__toggle-icon {
  transform: rotate(180deg);
}

/* === Founder destacado === */
.pd-row--founder {
  border: 0.5px solid var(--gold, #c9a84c);
  border-left: 3px solid var(--gold, #c9a84c);
  margin-top: 8px;
}

.pd-row--founder::before {
  content: "FOUNDER PARTNER 2026";
  position: absolute;
  top: -8px;
  left: 16px;
  background: var(--gold, #c9a84c);
  color: var(--blue, #0a3d6b);
  padding: 2px 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.4;
}

/* === Accordion expand === */
.pd-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  grid-column: 1 / -1; /* span all columns inside .pd-row grid */
}

.pd-expand--open {
  max-height: 1200px;
  transition: max-height 0.5s ease-in;
}

.pd-expand__inner {
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
  padding-top: 16px;
  margin-top: 14px;
}

/* .pd-expand__inner hosts .partner-card--large content — do NOT redefine those classes here */

/* === Toolbar (mobile btn + count + active filters) === */
.pd-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pd-toolbar .pd-mobile-filters-btn {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.pd-toolbar .pd-result-count {
  flex: 1 1 auto;
  margin: 0;
}

.pd-toolbar .pd-active-filters {
  flex: 0 0 auto;
}

/* === Responsive === */
@media (max-width: 720px) {
  .pd-layout {
    grid-template-columns: 1fr;
    padding: 16px 12px;
  }

  .pd-sidebar {
    display: none;
  }

  .pd-mobile-filters-btn {
    display: flex;
  }

  .pd-row {
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }

  .pd-row__logo {
    width: 60px;
    height: 60px;
  }

  .pd-row__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .pd-row__name {
    font-size: 14px;
  }
}

@media (min-width: 721px) {
  .pd-mobile-filters-btn {
    display: none;
  }

  .pd-drawer {
    display: none;
  }
}

/* === Print === */
@media print {
  .pd-sidebar,
  .pd-mobile-filters-btn,
  .pd-row__aside {
    display: none;
  }

  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-row {
    grid-template-columns: 60px 1fr;
    break-inside: avoid;
  }

  .pd-expand {
    max-height: none;
    overflow: visible;
  }
}
