/* Página dos professores. Menu, rodapé e botão de subir vêm de styles.css. */
.directory-hero { background: #ece7da; }
.directory-hero .section-inner { padding-block: clamp(36px, 6vw, 72px) clamp(28px, 4vw, 48px); text-align: center; }
.directory-hero h1 { max-width: 18ch; margin: 0 auto; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; }
.directory-lead { max-width: 52ch; margin: 16px auto 0; color: var(--muted); font-size: 1.1rem; }
.directory-filter { display: inline-grid; gap: 6px; margin-top: 24px; font-weight: 800; text-align: left; }
.directory-filter select { min-width: min(260px, 78vw); height: 48px; padding: 0 14px; border: 2px solid #cbd7d1; border-radius: 12px; background: #fff; color: #17332a; font: inherit; font-weight: 600; }
.directory-list .section-inner { padding-block: 32px 72px; text-align: center; }
#directory-status { margin: 0 0 8px; color: var(--muted); font-size: 1.1rem; }
#directory-status:empty { margin: 0; }
/* O atributo hidden vale mesmo nos botões com estilo próprio. */
.directory [hidden] { display: none; }
.teacher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 28px; padding: 0; list-style: none; text-align: center; }
.teacher-grid > li { margin: 0; }
.teacher-card { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 22px 16px 18px; border: 1px solid #d8dfd9; border-radius: 18px; background: #fff; color: #17332a; box-shadow: 0 8px 24px rgba(27, 68, 55, .07); overflow-wrap: anywhere; }
.teacher-card > * { max-width: 100%; margin: 0; }
.teacher-photo { width: 112px; height: 112px; flex: none; border-radius: 50%; object-fit: cover; }
.teacher-initials { display: grid; place-items: center; background: #1b4437; color: #fff; font-size: 2rem; font-weight: 800; }
.teacher-card h2 { font-size: 1.15rem; line-height: 1.25; letter-spacing: 0; }
.teacher-card .teacher-title { color: #6f5410; font-weight: 700; font-size: .95rem; }
.teacher-card .teacher-place { color: var(--muted); font-size: .88rem; }
.teacher-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; list-style: none; }
.teacher-tags li { margin: 0; padding: 3px 11px; border-radius: 99px; background: #e5eee9; font-size: .78rem; font-weight: 700; }
.teacher-card .teacher-bio { display: -webkit-box; overflow: hidden; color: #33473f; font-size: .92rem; line-height: 1.45; white-space: pre-line; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.teacher-card .teacher-bio.open { display: block; }
.teacher-more { border: 0; padding: 4px 6px; background: none; color: #1b4437; font: inherit; font-size: .86rem; font-weight: 800; text-decoration: underline; cursor: pointer; }
.teacher-card .teacher-line { align-self: stretch; font-size: .84rem; line-height: 1.4; text-align: left; }
.teacher-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-self: stretch; margin-top: auto; padding-top: 12px; border-top: 1px solid #e7e2d5; }
.teacher-links a { display: inline-block; padding: 7px 14px; border: 2px solid #1b4437; border-radius: 99px; color: #1b4437; font-size: .84rem; font-weight: 800; text-decoration: none; }
.teacher-links a:hover { background: #1b4437; color: #fff; }
.directory-notice { max-width: 760px; margin: 36px auto 0; padding: 14px 18px; border-left: 4px solid #9a7621; border-radius: 8px; background: #fff8e7; color: #4a3a0c; font-size: .92rem; text-align: left; }
.directory-notice p { margin: 4px 0; }
@media (max-width: 1100px) { .teacher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .teacher-grid { grid-template-columns: minmax(0, 1fr); } }
/* Com poucos professores, os cartões ficam no centro, e não encostados à esquerda. */
.teacher-grid:has(> li:only-child) { grid-template-columns: minmax(0, 340px); justify-content: center; }
@media (min-width: 561px) {
  .teacher-grid:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
}
@media (min-width: 861px) {
  .teacher-grid:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 290px)); justify-content: center; }
}
