/* ===== VARIÁVEIS E RESET ===== */
:root {
  --azul-ufba: #003366;
  --azul-escuro: #002244;
  --azul-claro: #4d8ab1;
  --branco: #ffffff;
  --cinza-claro: #f8f9fa;
  --cinza-medio: #e9ecef;
  --cinza-escuro: #495057;
  --sombra: 0 2px 8px rgba(0,0,0,0.1);
  --borda: 1px solid #dee2e6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: var(--cinza-claro);
}

/* ===== ESTRUTURA BÁSICA ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
}

/* ===== ESTATÍSTICAS (mantido para páginas que usam) ===== */
.highlight-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.highlight-card {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  text-align: center;
  padding: 1rem;
  background: var(--cinza-medio);
  border-radius: 8px;
}
@media (max-width: 768px) {
  .highlight-card {
    flex: 0 0 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
  }
}
@media (max-width: 480px) {
  .highlight-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--azul-ufba), var(--azul-claro));
  color: var(--branco);
  padding: 1rem 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.header-container { display: flex; align-items: center; }
.logo { height: 70px; margin-right: 1.5rem; }
.header h1 { font-size: 1.8rem; font-weight: 500; }

/* ===== NAVEGAÇÃO ===== */
.navbar {
  background-color: var(--azul-escuro);
  position: sticky; top: 0; z-index: 100;
  padding: 0 1rem; display: flex; align-items: center; height: 55px;
}
.nav-list {
  display: flex; list-style: none; margin: 0; padding: 0;
  width: 100%; justify-content: center;
}
.nav-item { position: relative; }
.nav-link {
  color: var(--branco); text-decoration: none; padding: 1rem 1.2rem;
  display: block; transition: all 0.3s; white-space: nowrap; position: relative;
}
.nav-link:hover, .nav-link.active { background-color: rgba(255,255,255,0.15); }
/* underline animation preserved (width rule below) */
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Dropdown */
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background-color: var(--azul-claro);
  border-radius: 0 0 4px 4px; display: none; list-style: none;
  box-shadow: var(--sombra); padding: 0; margin: 0; z-index: 101;
  animation: dropdownFade 0.2s ease;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown.open .dropdown-menu { display: block !important; }

/* Menu Toggle */
.menu-toggle {
  display: none; background: transparent; color: var(--branco);
  border: none; font-size: 1.5rem; cursor: pointer; padding: 0.5rem 1rem;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content { padding: 2rem 0; }
.section {
  background-color: #fff;
  margin-bottom: 2rem; padding: 1rem; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.section-title {
  color: var(--azul-escuro); border-left: 3px solid var(--azul-claro); padding-left: 0.5rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px;
}
.section-title::before { content: none; }

.alert {
  background-color: #fff8e1; border-left: 5px solid #ffc107;
  padding: 1rem; margin: 1rem 0; border-radius: 6px; color: #856404; font-style: italic;
}

/* ===== CARDS ===== */
.card {
  background: var(--branco);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease-in-out;
  animation: fadeInUp 0.3s ease-in-out;
}
.gradiente-card {
  background: linear-gradient(135deg, #1d2671, #2a4d9e, #4a90e2);
  color: #fff !important; min-height: 200px; padding: 1.5rem; border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.card-title { color: var(--azul-escuro); margin-bottom: 1rem; }
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* ===== GRIDS ===== */
.grid { display: grid; gap: 1.5rem; }
.grid .card { margin-bottom: 1.5rem; padding: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }

/* ===== BOTÕES E BADGES ===== */
.btn {
  display: inline-block; padding: 0.5rem 1rem;
  background: var(--azul-claro); color: var(--branco);
  border-radius: 25px; font-weight: 600;
  text-decoration: none; text-align: center; border: none; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.3s ease-in-out;
}
.btn:hover { background: var(--azul-ufba); transform: scale(1.05); }
.abtn { text-decoration: none; background-color: transparent; text-align: center; color: var(--branco); }

.badge {
  display: inline-block; padding: 0.4em 1em;
  color: #fff; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem;
  clip-path: inset(0 round 999px); text-transform: uppercase; letter-spacing: 0.6px; user-select: none;
  border-radius: 20px; transition: all 0.2s ease;
}
.badge:hover { transform: scale(1.05); opacity: 0.95; cursor: default; }
.badge-primary  { background: var(--azul-claro); color: #fff; }
.badge-success  { background: #28a745; color: #fff; }
.badge-warning  { background: #ffc107; color: #212529; }
.badge-danger   { background: #dc3545; color: #fff; }
.badge-success2 { background: #1abc9c; }

/* ===== LISTAS ===== */
.list {
  list-style: none; padding-left: 1.2rem; margin-bottom: 1rem; color: #555;
  font-size: 1rem; line-height: 1.5; text-align: left;
}
.list-item { margin-bottom: 0.5rem; border-bottom: var(--borda); }
.list-item:before { content: "▹"; color: var(--azul-claro); margin-right: 0.5rem; }

.date-box {
  background-color: #eef6fb; padding: 0.75rem 1rem;
  border-left: 4px solid var(--azul-claro); border-radius: 6px; font-size: 1rem; margin-bottom: 1rem; color: #333;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--azul-escuro), var(--azul-ufba));
  color: var(--branco); padding: 2rem 0; margin-top: 3rem;
  text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.footer p { margin: 0.5rem 0; }

/* ===== FOOTER DETALHADO ===== */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-info {
  text-align: left;
}

.footer-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
}

.footer-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.footer-social {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
}

.footer-social i {
  color: var(--branco);
  font-size: 1.3rem;
}

.footer-extra {
  text-align: right;
}

.footer-separator {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-copy {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}


/* ===== PÁGINAS ESPECÍFICAS ===== */

/* Professores */
.professor-card {
  background: linear-gradient(180deg, #ffffff, #fafafa);
  border: 1px solid #e0e0e0;
  border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  transition: all 0.3s ease-in-out;
  display: flex; gap: 1rem; align-items: center;
}
.professor-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.professor-photo-container { width: 100%; display: flex; justify-content: center; margin-bottom: 1rem; }
.professor-photo {
  position: relative; width: 100%; max-width: 160px; aspect-ratio: 1/1; border-radius: 50%;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.12); margin: 0 auto; flex-shrink: 0;
}
.professor-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder { color: #666; font-size: 14px; text-align: center; }

.professor-info { width: 100%; }
.professor-info h3 {
  font-size: 1rem; font-weight: 600; color: var(--azul-ufba); margin-bottom: 0.6rem; text-align: left;
}
.professor-info .list { list-style: none; padding-left: 0; margin: 0; color: var(--cinza-escuro); font-size: 0.9rem; line-height: 1.5; text-align: left; }
.professor-info .list-item { margin-bottom: 0.5rem; border: none; }
.professor-info .list-item a { color: var(--azul-ufba); text-decoration: none; font-weight: 600; }
.professor-info .list-item a:hover { text-decoration: underline; }

/* Sobre (mantido para preservar aparência atual dessa página) */
.highlight-cards { display: flex; justify-content: center; gap: 1.5rem; margin: 1.5rem 0; }
.highlight-card { text-align: center; padding: 1rem; background: var(--cinza-medio); border-radius: 8px; }

/* Colegiado */
.member-card { display: flex; gap: 1rem; align-items: center; }
.member-photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Mídia responsiva */
img, iframe, video { max-width: 100%; height: auto; }



/* Texto */
.justified-text {
  text-align: justify; margin: 10px 1rem 20px 1rem; color: #444;
  font-size: 1rem; text-justify: inter-word; hyphens: auto; line-height: 1.6;
  word-spacing: 0.04em; letter-spacing: 0.02em;
}
.center-text { text-align: center; }

/* Links com seta */
.seta-link {
  font-weight: 600; font-size: 1.2em; color: #2980b9;
  text-decoration: none; margin-left: 4px; transition: margin-left 0.2s ease;
}
.seta-link:hover { margin-left: 8px; }

/* Caixa de calendário */
.calendar-iframe {
  align-items: center; width: 100%; height: 260px; border-radius: 8px;
  box-shadow: 0 0 8px rgb(0 51 102 / 0.2); border: none;
}

/* Caixa de informação */
.info-box {
  background-color: #f9f9f9; padding: 1.25rem 1.5rem; margin-top: 2rem;
  border-left: 5px solid #3498db; border-radius: 6px; color: #333; font-size: 1rem; line-height: 1.5;
}

/* Grid duas colunas custom */
.duas { display: grid; grid-template-columns: 2fr 1.3fr; gap: 2rem; }

/* Número de fase */
.phase-number {
  background: var(--azul-ufba); color: #fff; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 1rem;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 992px) {
  .nav-list { justify-content: flex-start; flex-wrap: wrap; }
  .nav-link { padding: 0.8rem 1rem; }
  .duas { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar { flex-direction: column; height: auto; padding: 0; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 1rem; background-color: var(--azul-escuro);
  }
  .nav-list { flex-direction: column; display: none; width: 100%; }
  .nav-list.show { display: flex; }
  .nav-item { width: 100%; }
  .nav-link { padding: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
  .dropdown-menu { position: static; display: none; width: 100%; box-shadow: none; border-radius: 0; background-color: rgba(0,0,0,0.1); }
  .dropdown.open .dropdown-menu { display: block !important; }
  .dropdown:hover .dropdown-menu { display: none; }

  .professor-card { flex-direction: column; text-align: center; padding: 1.5rem; }
  .professor-photo { width: 120px; height: 120px; margin-bottom: 1rem; }
  .professor-info, .professor-info h3, .professor-info .list { text-align: center; }

  .professor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 480px) {
  .nav-link { padding: 0.8rem; font-size: 0.9rem; }
  body { font-size: 0.9rem; }
  .section-title { font-size: 1.2rem; }
  .card-title { font-size: 1rem; }
  .professor-photo { width: 100px; height: 100px; }
  .header-container { flex-direction: column; text-align: center; }
  .logo { margin: 0 0 1rem 0; }
}

/* ===== MELHORIAS VISUAIS (EXTRAS) ===== */

/* Foco acessível */
a:focus-visible, .btn:focus-visible, .nav-link:focus-visible {
  outline: 3px solid var(--azul-claro);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respeitar usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Seções extras */
.section-bg {
  background-color: var(--cinza-medio); padding: 2rem; margin-top: 2rem; border-radius: 8px;
}
.icon-grid { display: flex; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; }
.icon-box {
  flex: 1; min-width: 220px; background: var(--branco); padding: 1.5rem; border-radius: 8px; text-align: center;
  box-shadow: var(--sombra); transition: transform 0.2s ease;
}
.icon-box:hover { transform: translateY(-4px); }
.icon-box i { color: var(--azul-escuro); margin-bottom: .5rem; }
.icon-box h4 { color: var(--azul-escuro); margin-bottom: 0.5rem; }

p { margin-bottom: 0.8rem; }

/* Animações */
@keyframes dropdownFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* ===== Colegiado: utilitários visuais ===== */
.icon-ufba { color: var(--azul-ufba); margin-right: 0.5rem; }

.section-title--sm { font-size: 1.25rem; }
.with-mt { margin-top: 40px; }

/* grid dos membros com mesmo espaçamento que o inline antigo */
.members-grid { gap: 0.75rem; }

/* card/linha do membro (equivalente ao inline: font-size .85; flex; align-center) */
.member-card--sm {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

/* foto 70x70 usada só aqui, sem afetar outras páginas que usam 120x120 */
.member-photo--sm {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
}

/* padding da info (equivalente ao inline antigo) */
.colegiado-info { padding-left: 0.6rem; }
.with-mt-sm { margin-top: 30px; }

/* ===== Utilities (não mudam o layout existente, só removem inline) ===== */
.p-2xl { padding: 2rem !important; }

.mb-3xl { margin-bottom: 3rem !important; }
.mt-2xl { margin-top: 2rem !important; }
.mt-3xl { margin-top: 3rem !important; }
.mt-md  { margin-top: 1rem !important; }
.mt-sm  { margin-top: 0.5rem !important; }

.gap-md  { gap: 1rem !important; }
.gap-2xl { gap: 2rem !important; }
.gap-15  { gap: 15px !important; } /* se quiser usar em outros lugares */

.rounded-md { border-radius: 8px !important; }

/* opcional: estilinho simples para itens da galeria (figures) */
.gallery-item { overflow: hidden; border-radius: 8px; }
.gallery-item img { display: block; width: 100%; height: auto; }

.member-name{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis; /* fallback se nem a abreviação couber */
}

