/* ==========================================
 * PÁGINA PORTAL - TEMA VERDE
 * ========================================== */

.portal-page {
  min-height: 100vh;
  background-color: #f8f9fa;
}

/* Hero */
.hero-page {
background: radial-gradient(circle at top, #2D5016 0%, #4a7b2b 40%, #2D5016 100%);

  padding: 6rem 2rem 4rem;
  text-align: center;
  color: white;
  margin-bottom: 0;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  margin-top: 2rem;
  font-family: 'Montserrat', sans-serif;
}

.page-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0.75rem auto 0;
}

/* ==========================================
 * PROJETOS EM DESTAQUE
 * ========================================== */

.conteudo-section {
  padding: 3rem 1rem 4rem;
  background-color: #f8f9fa;
  background-image: url("../imagens/portal/programas/fundo-programas.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-header.center {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', sans-serif;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #5a6c7d;
}

/* Busca */

.busca-wrapper {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.busca-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.busca-input-group i {
  color: #7f8c8d;
  font-size: 0.95rem;
}

#busca-programas {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  background: transparent;
  color: #2c3e50;
}

#busca-programas::placeholder {
  color: #95a5a6;
}

.conteudo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

/* Cards */

.conteudo-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: auto;
}

.conteudo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.conteudo-imagem {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eef2f1;
  line-height: 0;
}

.conteudo-imagem picture {
  display: block;
  width: 100%;
}

.conteudo-imagem-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.conteudo-categoria {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.categoria-destaque {
  background: #ff5500;
  color: white;
}

.conteudo-data {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

.conteudo-corpo {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.conteudo-titulo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.3;
}

.conteudo-descricao {
  font-size: 0.95rem;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.conteudo-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #f8f9fa;
  flex-wrap: wrap;
}

.conteudo-autor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #7f8c8d;
}

.autor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff5500;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.conteudo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #ff5500;
  color: white;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.conteudo-btn:hover {
  background: #e24c00;
  transform: translateX(3px);
}

/* sem programas */

.sem-programas {
  max-width: 500px;
  margin: 2rem auto 0;
  text-align: center;
  color: #7f8c8d;
  padding: 2rem 1rem;
}

.sem-programas i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.sem-programas h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #2c3e50;
}

/* ==========================================
 * NEWSLETTER
 * ========================================== */

.newsletter-section {
  padding: 4rem 1rem;
  background: #f8f9fa;
}

.newsletter-card {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, #2D5016 0%, #4a7b2b 100%);
  padding: 3rem;
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.newsletter-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
}

.newsletter-content {
  color: white;
}

.newsletter-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
}

.newsletter-text {
  font-size: 1rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
}

.newsletter-input {
  padding: 1rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  min-width: 250px;
  backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #ff5500;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: #e24c00;
  transform: translateY(-2px);
}

/* ==========================================
 * CTA FINAL
 * ========================================== */

.cta-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 4rem 2rem;
  text-align: center;
  color: white;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.cta-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #ff5500;
  color: white;
}

.btn-primary:hover {
  background-color: #e24c00;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 85, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: #2c3e50;
  transform: translateY(-2px);
}

/* ==========================================
 * BOTÃO WHATSAPP FLUTUANTE
 * ========================================== */

.whatsapp-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 6px;
}

.whatsapp-floating-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25D366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.whatsapp-floating-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  background-color: #1ebe5b;
}

.whatsapp-floating-message {
  position: relative;
  max-width: 220px;
  background: linear-gradient(135deg, #f3e8ff 0%, #e0d4ff 100%);
  color: #1f2933;
  border-radius: 18px;
  padding: 8px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid rgba(0, 0, 0, 0.03);
  text-align: left;
  word-break: break-word;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.whatsapp-floating-message span {
  display: block;
}

.whatsapp-floating-message.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================
 * RESPONSIVE
 * ========================================== */

@media (max-width: 1024px) {
  .conteudo-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .newsletter-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem;
  }

  .newsletter-icon {
    margin: 0 auto;
  }

  .newsletter-form {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .portal-page {
    padding-top: 72px;
  }

  .page-title {
    font-size: 2rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .conteudo-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .conteudo-card {
    margin: 0 0.5rem;
  }

  .newsletter-card {
    padding: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-input {
    width: 100%;
    min-width: unset;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  .cta-text {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-cta {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-page {
    padding: 3.5rem 1rem 3rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .conteudo-titulo {
    font-size: 1.25rem;
  }

  .conteudo-descricao {
    font-size: 0.875rem;
  }

  .conteudo-corpo {
    padding: 1.25rem;
  }

  .conteudo-rodape {
    flex-direction: column;
    align-items: stretch;
  }

  .conteudo-btn {
    justify-content: center;
  }

  .whatsapp-floating-message {
    max-width: 190px;
    font-size: 12px;
  }
}