/* Fonte e fundo de nuvens com movimento lento */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: url('assets/clouds.png') repeat-x;
  background-size: cover;
  animation: moverNuvens 300s linear infinite;
  position: relative;
  overflow-x: hidden;
  color: #333;
}

@keyframes moverNuvens {
  0% { background-position-x: 0; }
  100% { background-position-x: 10000px; }
}

/* Container principal com fundo branco semitransparente */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* Cabeçalho com nova cor */
header {
  background: #002e7d; /* Azul mais forte, próximo do logo */
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

/* Logo no cabeçalho com efeito de sombra e leve brilho */
header img.logo-igreja {
  height: 60px;
  border-radius: 8px;
  box-shadow:
    0 0 8px rgba(0, 46, 125, 0.7),
    0 0 15px rgba(0, 46, 125, 0.5);
  transition: transform 0.3s ease;
}

/* Pequena animação de zoom no hover */
header img.logo-igreja:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 12px rgba(0, 46, 125, 0.9),
    0 0 20px rgba(0, 46, 125, 0.7);
}

/* Título do cabeçalho */
h1 {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* Vídeo da fase do dia - fundo e mensagem */
.video-background-container {
  position: relative;
  width: 100%;
  height: 40vh;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-background-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-mensagem {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  font-size: 1.5em;
  text-shadow: 0 0 10px black;
  user-select: none;
}

.overlay-mensagem h2 {
  font-size: 2em;
  margin: 0 0 10px 0;
}

.overlay-mensagem p {
  font-size: 1.2em;
  margin: 0;
}

.overlay-mensagem span {
  margin-top: 8px;
  font-size: 1em;
  opacity: 0.8;
}

/* Lista de álbuns */
.album-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

/* Itens do álbum com sombra e efeito hover */
.album-item {
  background: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 1 1 200px;
  text-align: center;
  color: #333;
}

.album-item:hover {
  background-color: #3498db;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Correção para pastas: ícone em cima, nome abaixo */
.pasta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  gap: 5px;
}

.pasta-icone {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.nome-pasta {
  text-align: center;
  font-weight: bold;
  word-break: break-word;
}

/* Miniaturas do modal */
#mediaMiniaturas {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 10px;
}

.media-thumb {
  width: 160px;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.media-thumb:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.media-thumb img,
.media-thumb video {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.media-thumb.ativo {
  outline: 3px solid #3498db;
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(52, 152, 219, 0.7);
}

/* Modal */
#albumModal {
  display: none;
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  flex-direction: column;
  padding: 20px;
}

#albumContent {
  background: white;
  border-radius: 10px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#mediaPrincipal {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

#mediaPrincipal img,
#mediaPrincipal video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

#albumDesc {
  padding: 10px 20px;
  font-size: 1em;
  color: #333;
  max-height: 100px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #ddd;
}

/* Botões de navegação */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.nav-button:hover {
  background: rgba(0,0,0,0.8);
}

#prevBtn { left: 10px; }
#nextBtn { right: 10px; }

/* Botão fechar vermelho moderno */
#closeBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff5e57;
  box-shadow: 0 4px 8px rgba(255, 94, 87, 0.5);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

#closeBtn:hover { background: #ff3b30; }

/* Responsividade */
@media(max-width:600px) {
  .album-item {
    flex: 1 1 100%;
    text-align: center;
  }
  .media-thumb { width: 100px; height: 70px; }

  .overlay-mensagem { font-size: 1em !important; padding: 10px !important; }
  .overlay-mensagem h2 { font-size: 1.2em !important; }
  .overlay-mensagem p { font-size: 0.9em !important; }
  .overlay-mensagem span { font-size: 0.8em !important; }
}

/* Miniaturas na página (quando abertas fora do modal) */
#miniaturasNaPagina {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  justify-content: center;
  z-index: 1000;
}

/* Botão fechar miniaturas na página */
.btn-fechar-miniaturas {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff5e57;
  border: none;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(255, 94, 87, 0.6);
  transition: background-color 0.3s ease;
  z-index: 1010;
}

.btn-fechar-miniaturas:hover { background: #ff3b30; }

/* Botões de ação no modal */
.botao-acao {
  display: inline-block;
  margin: 5px 15px;
  padding: 10px 20px;
  background: #3498db;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.botao-acao:hover { background-color: #2980b9; }

/* Rodapé elegante e moderno */
footer {
  background: #002e7d;
  color: #f0f0f0;
  text-align: center;
  padding: 18px 20px;
  font-size: 0.95em;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-top: 1px solid #004aad;
  box-shadow: 0 -2px 8px rgba(0, 46, 125, 0.3);
  user-select: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

footer a {
  color: #81a9ff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease;
}

footer a:hover {
  color: #c1d4ff;
  text-decoration: underline;
}

footer p {
  margin: 4px 0;
  line-height: 1.3em;
}

.botao-ao-vivo-topo {
  display: inline-block;
  background-color: #d62828;
  color: white;
  padding: 10px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

.botao-ao-vivo-topo:hover { background-color: #a61e1e; }
