/* css/mestres.css - Estilo da Galeria Etérica */

body {
    background: #0a0a15 url('../assets/fundo_estrelado.jpg') fixed center/cover; /* Fallback se tiver img de fundo */
    /* Se não tiver imagem de fundo, o gradiente do portal.css segura a onda */
}

.templo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    min-height: 100vh;
}

/* Cabeçalho com Chama Trina */
.cabecalho-templo { margin-bottom: 60px; animation: descerSuave 1s ease-out; }
.simbolo-sagrado { 
    width: 80px; height: auto; margin-bottom: 20px; 
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    animation: pulsoChama 3s infinite alternate;
}
.titulo-templo { font-family: 'Cinzel', serif; font-size: 3rem; color: var(--ouro-solar); text-shadow: 0 0 15px rgba(0,0,0,0.8); margin: 0; }
.subtitulo-templo { color: #aaa; font-size: 1.2rem; margin-top: 10px; }

@keyframes pulsoChama { 0% { transform: scale(1); filter: drop-shadow(0 0 10px white); } 100% { transform: scale(1.1); filter: drop-shadow(0 0 25px #ffaa00); } }

/* GRID DE CARDS */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

/* O Card do Mestre */
.card-mestre {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid #444;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.card-mestre:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--ouro-solar);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.img-container {
    width: 100%; height: 250px;
    overflow: hidden;
    border-bottom: 1px solid #333;
}

.img-container img {
    width: 100%; height: 100%;
    object-fit: cover; /* Garante que a foto preencha sem distorcer */
    transition: 0.5s;
}

.card-mestre:hover .img-container img { transform: scale(1.1); filter: brightness(1.2); }

.info-card { padding: 15px; }
.nome-mestre-card { 
    font-family: 'Cinzel'; color: #fff; font-size: 1.1rem; margin: 0; 
    letter-spacing: 1px;
}
.cargo-mestre { font-size: 0.8rem; color: #888; margin-top: 5px; }

/* MODAL (O ALTAR) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.ativo { opacity: 1; pointer-events: all; }

.modal-conteudo {
    background: #111;
    width: 90%; max-width: 900px;
    border: 1px solid var(--ouro-solar);
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
    position: relative;
    animation: abrirModal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-coluna-img {
    flex: 1;
    min-height: 400px;
    position: relative;
}
.modal-coluna-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.modal-coluna-texto {
    flex: 1.5;
    padding: 40px;
    display: flex; flex-direction: column; justify-content: center;
    text-align: left;
}

.btn-fechar {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; z-index: 10;
}
.btn-fechar:hover { color: var(--chama-viva); }

#modal-nome { font-family: 'Cinzel'; font-size: 2.5rem; color: var(--ouro-solar); margin: 0; }
.linha-divisoria { width: 50px; height: 3px; background: var(--chama-viva); margin: 20px 0; }
.texto-canalizado { font-size: 1.1rem; line-height: 1.6; color: #ddd; font-style: italic; }

.btn-sintonizar {
    margin-top: 30px; padding: 12px 25px;
    background: transparent; border: 1px solid var(--ouro-solar); color: var(--ouro-solar);
    font-family: 'Cinzel'; cursor: pointer; transition: 0.3s;
    align-self: flex-start;
}
.btn-sintonizar:hover { background: var(--ouro-solar); color: #000; }

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-conteudo { flex-direction: column; height: 90vh; overflow-y: auto; }
    .modal-coluna-img { min-height: 250px; flex: none; }
    .modal-coluna-texto { padding: 20px; }
    .titulo-templo { font-size: 2rem; }
}

@keyframes abrirModal { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes descerSuave { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }