/* ==========================================================================
   FOOTER OFICIAL CEAA (MODERNIZADO & ALTA FIDELIDADE)
   Cores e Estrutura Oficiais:
   - Fundo Superior Principal: Deep Midnight Blue (#030233)
   - Faixa de Destaque: Azul Oficial (#2581CC) com área social em Deep Slate (#2A2A47)
   - Barra de Copyright: Midnight Blue (#030233 / #0D0C3B)
   - Sem sombras (box-shadow: none !important)
   - Tipografia limpa sans-serif (Inter / Plus Jakarta Sans)
   ========================================================================== */

.app-site-footer {
  position: relative;
  width: 100%;
  background-color: #030233;
  color: #FFFFFF;
  box-shadow: none !important;
  border: none !important;
  overflow: hidden;
  box-sizing: border-box;
}

/* ==========================================================================
   BLOCO PRINCIPAL (MARCA, ONDE ESTAMOS & PARCEIROS)
   ========================================================================== */
.footer-primary-wrap {
  padding: 5rem 2rem 4.5rem;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4.5rem;
  align-items: flex-start;
}

/* Coluna Esquerda: Marca & Endereço */
.footer-left-col {
  display: flex;
  flex-direction: column;
}

.footer-brand-wrap {
  margin-bottom: 2.25rem;
}

.footer-logo-img {
  width: 165px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: none !important;
  box-shadow: none !important;
}

.footer-address-block {
  display: flex;
  flex-direction: column;
}

.footer-block-heading {
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.01em;
}

.footer-address-text {
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.65;
  color: #E2E8F0;
  margin-bottom: 2rem;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFFFFF;
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.footer-contact-link:hover {
  color: #60A5FA;
  gap: 0.75rem;
}

/* Coluna Direita: Parceiros e Financiamento */
.footer-right-col {
  display: flex;
  flex-direction: column;
}

.footer-partners-block {
  display: flex;
  flex-direction: column;
}

.footer-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.15rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

.footer-partner-card {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #FFFFFF !important;
  border-radius: 12px !important;
  height: 76px !important;
  padding: 0.75rem 1rem !important;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.footer-partner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22) !important;
}

.footer-partner-img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}

.footer-partner-card:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

.footer-partner-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: none !important;
  box-shadow: none !important;
}

.footer-faperj-notice {
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #CBD5E1;
  margin: 0;
  text-align: justify;
}

/* ==========================================================================
   FAIXA DE DESTAQUE: TÍTULO DO PROJETO & REDES SOCIAIS
   Dividida no estilo original: Azul (#2581CC) à esquerda, Navy (#2A2A47) à direita
   ========================================================================== */
.footer-highlight-bar {
  width: 100%;
  background-color: #2581CC;
  box-shadow: none !important;
  border: none !important;
}

.footer-highlight-container {
  max-width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.footer-highlight-left {
  flex: 1;
  padding: 1.35rem 3rem 1.35rem 4rem;
  display: flex;
  align-items: center;
}

.footer-project-title {
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.footer-highlight-right {
  background-color: #2A2A47;
  padding: 1.35rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.88;
}

.footer-social-link:hover {
  opacity: 1;
  transform: scale(1.12);
}

/* ==========================================================================
   BARRA DE COPYRIGHT INFERIOR
   ========================================================================== */
.footer-copyright-bar {
  background-color: #030233;
  padding: 1.25rem 2rem;
  text-align: center;
}

.footer-copyright-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-copyright-text {
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.8125rem;
  color: #94A3B8;
  margin: 0;
  letter-spacing: 0.02em;
}

.footer-author-link {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-author-link:hover {
  color: #60A5FA;
}

/* ==========================================================================
   RESPONSIVIDADE DO FOOTER
   ========================================================================== */
/* Tablet e 1024px: mantém 2 colunas no footer (marca/endereço à esquerda e parceiros à direita) */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-primary-wrap {
    padding: 4rem 2rem 3.5rem;
  }
  .footer-container {
    grid-template-columns: 320px 1fr !important;
    gap: 3rem !important;
    align-items: flex-start !important;
  }
  .footer-partners-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.85rem !important;
  }
  .footer-partner-card {
    height: 70px !important;
    padding: 0.65rem 0.85rem !important;
  }
  .footer-highlight-left {
    padding: 1.25rem 1.75rem;
  }
  .footer-highlight-right {
    padding: 1.25rem 1.75rem;
  }
}

@media (max-width: 768px) {
  .footer-primary-wrap {
    padding: 3rem 1.25rem 2.5rem;
  }
  .footer-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.75rem !important;
    width: 100% !important;
  }
  .footer-left-col {
    width: 100% !important;
  }
  .footer-right-col {
    width: 100% !important;
  }
  .footer-partners-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.85rem !important;
    width: 100% !important;
  }
  .footer-partner-card {
    height: 68px !important;
    padding: 0.6rem 0.75rem !important;
  }
  .footer-highlight-container {
    flex-direction: column;
  }
  .footer-highlight-left {
    padding: 1.25rem 1.5rem;
    text-align: center;
    justify-content: center;
  }
  .footer-project-title {
    font-size: 1rem;
  }
  .footer-highlight-right {
    padding: 1rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .footer-partners-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .footer-partner-card {
    height: 64px !important;
    padding: 0.5rem 0.65rem !important;
  }
  .footer-partners-grid .footer-partner-card:last-child {
    grid-column: span 2 !important;
    max-width: 60% !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
}


/* ==========================================================================
   PROJETO CEAA — BOTÃO BACK TO TOP GLOBAL
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #0F172A;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn.is-on-light {
  background: #7A1733 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #7A1733 !important;
  box-shadow: 0 4px 14px rgba(122, 23, 51, 0.3) !important;
}

.back-to-top-btn.is-on-light:hover {
  background: #551023 !important;
  border-color: #551023 !important;
  color: #FFFFFF !important;
  transform: translateY(-2px) scale(1.08);
}

.back-to-top-btn:hover {
  background: #7A1733;
  color: #FFFFFF;
  border-color: #7A1733;
  transform: translateY(-2px) scale(1.08);
}

.back-to-top-btn svg {
  display: block;
  stroke: currentColor;
}

/* ==========================================================================
   LINKS INSTITUCIONAIS LGPD: POLÍTICA DE PRIVACIDADE | TERMOS DE USO
   ========================================================================== */
.footer-legal-links-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  flex-wrap: wrap;
}

.footer-legal-btn {
  background: transparent;
  border: none;
  padding: 0;
  color: #94A3B8;
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(148, 163, 184, 0.4);
  transition: all 0.2s ease;
}

.footer-legal-btn:hover {
  color: #FFFFFF;
  text-decoration-color: #FFFFFF;
}

.footer-legal-divider {
  color: #475569;
  font-size: 0.8125rem;
  user-select: none;
}

/* ==========================================================================
   MODAIS INSTITUCIONAIS: POLÍTICA DE PRIVACIDADE & TERMOS DE USO (LGPD)
   ========================================================================== */
.footer-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(11, 16, 33, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.footer-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.footer-modal-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 18px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(11, 16, 33, 0.05);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-modal-backdrop.is-open .footer-modal-card {
  transform: translateY(0) scale(1);
}

.footer-modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  position: relative;
}

.footer-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7A1733;
  background: rgba(122, 23, 51, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.footer-modal-title {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0B1021;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.footer-modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.footer-modal-close-btn:hover {
  background: #7A1733;
  color: #FFFFFF;
  border-color: #7A1733;
}

.footer-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #334155;
  -webkit-overflow-scrolling: touch;
}

.footer-modal-lead {
  font-size: 0.985rem;
  font-weight: 500;
  color: #0B1021;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #F1F5F9;
}

.footer-modal-section {
  margin-bottom: 1.35rem;
}

.footer-modal-section h4 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0B1021;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.footer-modal-section p {
  margin: 0 0 0.75rem;
}

.footer-modal-section ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.35rem;
}

.footer-modal-section li {
  margin-bottom: 0.4rem;
}

.footer-modal-link {
  color: #7A1733;
  font-weight: 600;
  text-decoration: underline;
}

.footer-modal-link:hover {
  color: #551023;
}

.footer-citation-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #7A1733;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1E293B;
  margin: 0.75rem 0;
}

.footer-modal-footer {
  padding: 1rem 1.75rem;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
}

.footer-modal-btn {
  background: #0B1021;
  color: #FFFFFF;
  border: 1px solid #0B1021;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-modal-btn:hover {
  background: #7A1733;
  border-color: #7A1733;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .footer-legal-links-wrap {
    justify-content: center;
    gap: 0.5rem;
  }

  .footer-modal-backdrop {
    padding: 0;
  }

  .footer-modal-card {
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .footer-modal-header {
    padding: 1.25rem 1.25rem 1rem;
  }

  .footer-modal-body {
    padding: 1.25rem;
  }

  .footer-modal-title {
    font-size: 1.2rem;
    padding-right: 2rem;
  }

  .footer-modal-footer {
    padding: 0.85rem 1.25rem;
  }

  .footer-modal-btn {
    width: 100%;
    padding: 0.8rem;
  }
}
