/**
 * 🎓 GUIA DIDÁTICO SOCRÁTICO — ARQUITETURA CSS & DESIGN SYSTEM ACADÊMICO
 * ==========================================================================
 * 
 * PERGUNTA SOCRÁTICA PARA REFLEXÃO DO ALUNO DE ENGENHARIA / COMPUTAÇÃO:
 * "Como estruturar o CSS para suportar alteração de tema em tempo real (Dark/Light)
 *  sem duplicar código nem utilizar seletores rígidos pesados?"
 * 
 * RESPOSTA DIDÁTICA:
 * Utilizando "Design Tokens" via Variáveis CSS Nativas no pseudo-seletor :root.
 * O alternador altera apenas o atributo [data-theme="light"] no elemento <html>,
 * redefinindo dinamicamente as variáveis de cores (--bg-main, --accent, --text-main)
 * e atualizando automaticamente a interface inteira em 100% dos componentes.
 * ==========================================================================
 */

:root {
  --bg-main: #0b0f19;
  --bg-card: #151d2a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --border: #1e293b;
  --bg-controls: rgba(15, 23, 42, 0.6);
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #0284c7;
  --border: #cbd5e1;
  --bg-controls: #e2e8f0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* 🎓 ACESSIBILIDADE WCAG 2.1 AA — Anéis de Foco Destacados para Navegação por Teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn-link:focus-visible,
.academic-nav-link:focus-visible,
.nav-switch-btn:focus-visible,
.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
  -webkit-tap-highlight-color: transparent;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1080px;
  width: 100%;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
}

.top-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  width: 100%;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 1;
  min-width: 0;
}

.academic-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.academic-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.academic-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.academic-nav-link:hover {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.academic-nav-link.active-page-link {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  font-weight: 700;
}

.right-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.page-switch, .lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-controls);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.math-formula {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  margin: 0.6rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  color: var(--text-main);
}

/* 🎓 ADAPTABILIDADE DE FORMULAS KATEX & LIGHT MODE */
.math-formula,
.katex,
.katex-display,
.katex * {
  color: var(--text-main);
}

[data-theme="light"] .math-formula {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .phi-quote-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(241, 245, 249, 0.95) 100%);
  border-color: rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .phi-quote-card blockquote {
  color: #0f172a;
}

.theme-toggle-btn {
  background: var(--bg-controls);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.open-science-card {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.08);
}

.open-science-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.open-science-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.open-science-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.open-science-triad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.triad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.nav-switch-btn {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
}

.nav-switch-btn:hover, .nav-switch-btn.active {
  color: var(--accent);
}

.flag-icon {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-sep {
  color: var(--border);
}

.lang-btn:hover, .lang-btn.active {
  color: var(--accent);
}

.lang-sep {
  color: var(--border);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background-color: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.open-science-notice {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.open-science-notice svg {
  color: var(--accent);
  flex-shrink: 0;
}

.phi-quote-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 1.8rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.phi-quote-card blockquote {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  color: #f1f5f9;
  line-height: 1.7;
  text-align: center;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin: 0 auto 1.2rem;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.title-current {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.title-former {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.badge {
  display: inline-block;
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 1.1rem;
  border-radius: 30px;
  margin-bottom: 1.2rem;
}

.desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-controls);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-link:hover {
  background-color: var(--accent);
  color: #0b0f19;
  transform: translateY(-2px);
}

/* FLIP Fluid Simulator Card */
.simulator-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  text-align: center;
}

.sim-header {
  margin-bottom: 1.2rem;
}

.sim-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.sim-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 460px;
  margin: 0 auto 1.2rem;
  background: #000000;
  border-radius: 16px;
  border: 2px solid var(--border);
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
  cursor: grab;
}

.canvas-wrapper:active {
  cursor: grabbing;
}

#myCanvas {
  touch-action: none;
  width: 100%;
  height: 100%;
  display: block;
}

/* Control Panel */
.controls-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-controls);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-main);
}

.control-label-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
}

/* Section Styling */
.section-block {
  margin-top: 2rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 36px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* News List (Item 1 Diretrizes) */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.news-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}

.news-content {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Research & Software Grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.research-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.research-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.research-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.research-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tag-tech {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* Publications List */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.1rem 1.3rem;
  border-radius: 12px;
}

.pub-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pub-journal {
  font-size: 0.82rem;
  font-style: italic;
  color: #64748b;
  margin-bottom: 0.6rem;
}

.pub-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.action-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
}

.action-badge.doi-link {
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border-color: var(--accent);
}

.action-badge.prestige-badge {
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  font-weight: 700;
}

[data-theme="light"] .action-badge.prestige-badge {
  background-color: rgba(16, 185, 129, 0.15);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.4);
}

.action-badge.data-link {
  background-color: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.4);
  font-weight: 600;
  text-decoration: none;
}

[data-theme="light"] .action-badge.data-link {
  background-color: rgba(147, 51, 234, 0.15);
  color: #7e22ce;
  border-color: rgba(126, 34, 206, 0.4);
}

/* Responsividade Tablet (< 900px) */
@media (max-width: 900px) {
  .top-nav-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  .nav-left-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  .academic-nav {
    justify-content: center;
    gap: 0.8rem;
  }
}

/* Responsividade Mobile (< 640px) */
@media (max-width: 640px) {
  body {
    padding: 1rem 0.5rem;
  }

  .card {
    padding: 3.5rem 1.2rem 1.8rem;
    border-radius: 16px;
  }

  .top-nav-controls {
    top: 0.8rem;
    left: 0.8rem;
    right: 0.8rem;
  }

  .page-switch, .lang-switch {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
  }

  .name {
    font-size: 1.5rem;
  }

  .title-current {
    font-size: 0.95rem;
  }

  .title-former {
    font-size: 0.8rem;
  }

  .desc {
    font-size: 0.88rem;
    text-align: left !important;
  }

  .btn-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .simulator-card {
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
  }

  .canvas-wrapper {
    height: 320px;
  }

  .controls-panel {
    padding: 0.8rem;
    gap: 0.6rem;
    font-size: 0.75rem;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .pub-item div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
  }
}

/* ==========================================================================
   🎓 STICKY NAVBAR & CONTROLES SUPERIORES (WCAG AA & GLASSMORPHISM)
   ========================================================================== */
.top-nav-controls {
  position: sticky;
  top: 0.8rem;
  z-index: 1000;
  background: rgba(21, 29, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

[data-theme="light"] .top-nav-controls {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   🏷️ RESEARCH FOCUS TAGS (PERFIL PRINCIPAL)
   ========================================================================== */
.research-focus-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.2rem 0 0.8rem;
}

.focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.focus-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   🎓 EDUCATION TIMELINE WIDGET (FORMAÇÃO ACADÊMICA)
   ========================================================================== */
.education-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
  text-align: left;
}

.edu-item {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: transform 0.2s ease;
}

.edu-item:hover {
  transform: translateY(-2px);
}

.edu-degree {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
}

.edu-field {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.1rem;
}

.edu-inst {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ==========================================================================
   🔍 FILTROS DINÂMICOS DE PUBLICAÇÕES & BIBTEX ACCORDION
   ========================================================================== */
.pub-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  justify-content: flex-start;
}

.pub-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
}

.bibtex-btn {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 0.4rem;
  transition: all 0.2s ease;
}

.bibtex-btn:hover {
  background: var(--accent);
  color: #0f172a;
}

.bibtex-box {
  display: none;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  margin-top: 0.6rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
}

.bibtex-box.open {
  display: block;
}

.copy-bib-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.copy-bib-btn:hover {
  color: var(--accent);
}

/* ==========================================================================
   🧑‍🔬 EQUIPE DE PESQUISA & VAGAS DE RECRUTAMENTO (PHI LAB)
   ========================================================================== */
.setup-notice-card {
  background: rgba(56, 189, 248, 0.05);
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.setup-notice-badge {
  background: var(--accent);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.vacancy-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.vacancy-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.vacancy-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.vacancy-level {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.vacancy-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ==========================================================================
   🖼️ GALERIA DE INFRAESTRUTURA & MÍDIA
   ========================================================================== */
.gallery-grid, .media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.gallery-card, .media-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.gallery-card:hover, .media-card:hover {
  border-color: var(--accent);
}

.gallery-placeholder-img {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 0.5rem;
}

.gallery-card-body, .media-card-body {
  padding: 1rem;
}

.gallery-card-title, .media-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.gallery-card-desc, .media-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   📍 CONTATO & LOCALIZAÇÃO INSTITUCIONAL
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-item svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.contact-item strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 0.1rem;
}


