﻿/* PAGINA DE VAGAS - ASSOCIACAO SANTA CECILIA */

/* Tipografia padronizada */
.vagas-page h1,
.vagas-page h2,
.vagas-page h3,
.vagas-page h4,
.vagas-page h5,
.vagas-page h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.vagas-page p,
.vagas-page label,
.vagas-page input,
.vagas-page select,
.vagas-page textarea,
.vagas-page button {
  font-family: 'Outfit', sans-serif;
}

/* Layout principal */
.vagas-page {
  padding-top: 80px;
  min-height: 100vh;
}

/* Hero */
.hero-vagas {
  background: var(--branco);
  padding: 30px 0 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  animation: scrollFloat 0.8s ease forwards;
}

.hero-vagas h1 {
  color: var(--azul-principal);
  font-size: 48px;
  font-weight: 700;
  margin: 0;
}

@keyframes scrollFloat {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Container principal */
#vagasContainer {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 20px;
}

/* Estados de carregamento */
#loadingState {
  text-align: center;
  padding: 40px 20px;
}

#loadingState img,
#semVagasMessage img {
  width: 200px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

#loadingState p,
#semVagasMessage p {
  font-size: 16px;
  color: var(--texto);
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Mensagem Sem Vagas */
#semVagasMessage {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
}

#semVagasMessage img {
  width: 190px;
  height: 190px;
  margin-bottom: 20px;
}

#semVagasMessage p {
  margin-bottom: 0;
}

/* Cards informativos - sempre visiveis - 3 colunas */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colunas iguais */
  gap: 25px;
  margin-top: 50px;
  max-width: 1200px; /* Aumentado para comportar 3 */
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.info-card {
  background: var(--azul-principal);
  border-radius: 14px;
  padding: 35px 25px;
  color: var(--branco);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  min-height: 280px; /* Manter altura uniforme */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hover scale apenas aqui */
.info-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(17, 171, 224, 0.3);
}

.info-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: bold;
}

.info-card p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.95;
  flex-grow: 1; /* Empurra botão para baixo */
}

.info-card button {
  background: var(--amarelo-destaque);
  color: var(--texto);
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
}

.info-card button:hover {
  background: #e0b329;
  transform: translateY(-2px);
}

/* Container de vagas - Grid 2 colunas com centralização automática */
#comVagasState {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* Adaptativo e centralizado */
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  justify-items: center; /* Centraliza cards quando há apenas 1 */
}

/* Cards de Vagas - Ajustado para grid */
.vaga-card {
  background: var(--amarelo-destaque);
  border-radius: 20px;
  padding: 35px 25px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 450px; /* Altura mínima para uniformidade */
  width: 100%; /* Ocupa toda a largura do grid cell */
  max-width: 600px; /* Limita largura máxima para não ficar muito largo quando centralizado */
}

/* Título - cor --texto (azul escuro) */
.vaga-card h3 {
  color: var(--texto);
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: bold;
  border-bottom: 2px solid rgba(27, 42, 65, 0.2);
  padding-bottom: 15px;
}

/* Subtítulos - cor --texto */
.vaga-descricao-titulo,
.vaga-local-titulo {
  color: var(--texto);
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  margin-top: 15px;
}

.vaga-local-titulo {
  border-top: 2px solid rgba(27, 42, 65, 0.2);
  padding-top: 15px;
}

/* Descrições - cor --branco */
.vaga-card p {
  color: var(--branco);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 15px;
  text-align: center;
  flex-grow: 1; /* Empurra botões para baixo */
}

.vaga-local-endereco {
  color: var(--branco);
  font-size: 15px;
  margin-bottom: 20px;
}

/* Container de botões */
.vaga-acoes {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: auto; /* Sempre no final do card */
  flex-wrap: wrap;
}

.btn-candidatar,
.btn-saiba-mais {
  background: var(--azul-principal);
  color: var(--branco);
  border: none;
  padding: 11px 25px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-candidatar:hover,
.btn-saiba-mais:hover {
  background: #0e96c4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 171, 224, 0.3);
}
/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--branco);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 780px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #E53935;
  color: var(--branco);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: #c62828;
}

.modal-content h2 {
  color: var(--azul-principal);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.modal-intro {
  background: var(--branco);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.modal-intro p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--texto);
  margin-bottom: 12px;
}

.modal-intro p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

/* Formulario */
#formCandidatura {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#areaInteresseWrapper {
  display: block;
}

/* Grid de 2 colunas para campos do formulário */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

#formCandidatura label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  color: var(--texto);
  gap: 8px;
}

#formCandidatura input,
#formCandidatura select,
#formCandidatura textarea {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--branco);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#formCandidatura input:focus,
#formCandidatura select:focus,
#formCandidatura textarea:focus {
  border-color: var(--azul-principal);
  box-shadow: 0 0 0 3px rgba(17, 171, 224, 0.2);
  outline: none;
}

#formCandidatura textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  align-self: flex-end;
  font-size: 12px;
  color: rgba(27, 42, 65, 0.6);
}

.btn-enviar {
  background: var(--amarelo-destaque);
  color: var(--texto);
  border: none;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
  position: relative;
}

.btn-enviar:hover:not(:disabled) {
  background: #e0b329;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(252, 198, 45, 0.4);
}

.btn-enviar:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-block;
  font-size: 14px;
}

.form-message {
  margin-top: 10px;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.form-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Esconder elementos quando em loading/sucesso */
.modal-content.sending .modal-intro,
.modal-content.sending #formCandidatura,
.modal-content.sending h2 {
  display: none !important;
}

/* Mostrar apenas loading ou sucesso */
.modal-content.sending #modalLoading,
.modal-content.success #modalSucesso {
  display: block !important;
}

.modal-content.success .modal-intro,
.modal-content.success #formCandidatura,
.modal-content.success h2,
.modal-content.success #modalLoading {
  display: none !important;
}

/* Mensagem de erro centralizada */
.modal-mensagem-centralizada {
  text-align: center;
  padding: 60px 30px;
  display: none;
}

.modal-mensagem-centralizada.active {
  display: block;
}

.modal-mensagem-centralizada .icone-erro {
  width: 80px;
  height: 80px;
  background: #E53935;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin: 0 auto 25px;
  animation: scaleIn 0.5s ease;
}

.modal-mensagem-centralizada p {
  font-size: 16px;
  color: var(--texto);
  font-weight: 600;
  line-height: 1.6;
}

/* Esconder conteúdo quando mensagem centralizada ativa */
.modal-content.has-centered-message .modal-intro,
.modal-content.has-centered-message #formCandidatura,
.modal-content.has-centered-message h2 {
  display: none !important;
}

/* Asterisco vermelho obrigatório */
.obrigatorio {
  color: #E53935;
  font-weight: bold;
  margin-left: 2px;
}

/* Info do campo de arquivo */
.campo-info {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}

/* Input de arquivo */
input[type="file"] {
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: var(--azul-principal);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
  font-weight: 600;
}

input[type="file"]::file-selector-button:hover {
  background: #0e96c4;
}

/* Estados: Loading */
.modal-loading {
  text-align: center;
  padding: 60px 20px;
}

.modal-loading img {
  width: 180px;
  height: 180px;
  margin-bottom: 20px;
}

.modal-loading p {
  font-size: 16px;
  color: var(--texto);
  font-weight: 500;
}

/* Estados: Sucesso */
.modal-sucesso {
  text-align: center;
  padding: 60px 20px;
  animation: slideUp 0.5s ease;
}

.sucesso-icon {
  width: 80px;
  height: 80px;
  background: #4CAF50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin: 0 auto 25px;
  animation: scaleIn 0.5s ease;
}

.modal-sucesso p {
  font-size: 18px;
  color: var(--texto);
  font-weight: bold;
  line-height: 1.6;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Responsividade - Tablets */
@media (max-width: 992px) {
  .hero-vagas h1 {
    font-size: 40px;
  }

  /* Cards informativos - 2 colunas em tablets */
  .info-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Vagas - Reduz minmax para tablets */
  #comVagasState {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
  }

  .vaga-card {
    padding: 30px 20px;
    min-height: 400px;
  }

  .vaga-card h3 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .hero-vagas {
    padding: 25px 0 15px;
  }

  .hero-vagas h1 {
    font-size: 34px;
  }

  .modal-content {
    width: 95%;
    padding: 25px 20px;
  }

  /* Grid em 1 coluna no mobile */
  .modal-grid {
    grid-template-columns: 1fr;
  }

  #loadingState img,
  #semVagasMessage img {
    width: 190px;
    height: 190px;
  }
}

/* Responsividade - Mobile */
@media (max-width: 600px) {
  /* Cards informativos - 1 coluna em mobile */
  .info-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .info-card {
    min-height: auto;
  }

  /* Vagas - 1 coluna em mobile (lista) */
  #comVagasState {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vaga-card {
    min-height: auto;
    padding: 25px 20px;
    max-width: 100%; /* Remove limite de largura no mobile */
  }

  .vaga-card h3 {
    font-size: 22px;
  }

  .vaga-acoes {
    flex-direction: column;
    gap: 10px;
  }

  .btn-saiba-mais,
  .btn-candidatar {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .vagas-page {
    padding-top: 70px;
  }

  .hero-vagas h1 {
    font-size: 28px;
  }

  .info-card {
    padding: 28px 22px;
  }

  .vaga-descricao-titulo,
  .vaga-local-titulo {
    font-size: 18px;
  }

  .modal-close {
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}