/* ============================================================
ACERVO IFA — ESTILO BARROCO FINAL (v3)
Fundo: #1A110B | Destaques/Títulos: #D4AF37 | Texto: #EAE3D2
Fontes: Playfair Display (títulos) + Cormorant Garamond (texto)
- Fundo de página INTEIRA rolando junto com o conteúdo
- Santo Agostinho: halo dourado + sombra animada + cabeça visível
- Fontes maiores (texto base 1.25rem)
- Contraste reforçado sobre imagens de fundo
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&family=Cormorant+Garamond:wght@400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cormorant Garamond', serif;
  background: #1A110B;
  color: #F3ECDD;
  line-height: 1.75;
  overflow-x: hidden;
  font-size: 1.25rem; /* antes 1.1rem — letras maiores */
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

h1, h2, h3, h4, .nav-logo, .hero-title, .pagina-titulo, .section-title {
  font-family: 'Playfair Display', serif;
}

/* ===== FUNDO DE PÁGINA INTEIRA (imagem barroca, rola junto) ===== */
body.fundo-acervo { background-image: url('img/fundo-acervo.jpg'); }
body.fundo-professores { background-image: url('img/fundo-professores.jpg'); }
body.fundo-dedicatorias { background-image: url('img/fundo-dedicacao.jpg'); }
body.fundo-cadastro { background-image: url('img/fundo-cadastro.jpg'); }
body.fundo-sobre { background-image: url('img/fundo-sobre.jpg'); }

/* Blocos semi-transparentes (mais escuros p/ texto destacar do fundo) */
.section, .cadastro-wrap, .form-box, .admin-bloco,
.card-trabalho, .card-dedicatoria, .card-palavra {
  background: rgba(20, 13, 8, 0.88) !important;
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  text-align: center;
  border: 1px solid transparent;
}
.btn-solid { background: #D4AF37; color: #1A110B; border-color: #D4AF37; box-shadow: 0 2px 0 #8a6d1f; }
.btn-solid:hover { background: #C5A059; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #D4AF37; border: 1px solid #D4AF37; }
.btn-ghost:hover { background: rgba(212, 175, 55, 0.12); }
.btn-admin {
  background: transparent; color: #D4AF37; border: 1px solid #D4AF37;
  font-size: 0.85rem; padding: 0.5rem 1rem; border-radius: 2px;
  font-family: 'Playfair Display', serif;
}
.btn-link { background: transparent; border: none; color: #D4AF37; font-size: 0.9rem; text-decoration: underline; }

/* ===== NAVEGAÇÃO ===== */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 2rem; background: #241812; position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid #D4AF37;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { font-size: 1.5rem; font-weight: 700; color: #D4AF37; white-space: nowrap; }
.nav-logo span { color: #EAE3D2; }
.btn-voltar {
  background: transparent; border: 1px solid #D4AF37; color: #D4AF37;
  font-family: 'Playfair Display', serif; font-size: 0.85rem; padding: 6px 14px;
  border-radius: 2px; cursor: pointer; text-decoration: none; line-height: 1.2;
  white-space: nowrap; transition: all 0.3s ease;
}
.btn-voltar:hover { background: #D4AF37; color: #1A110B; }
.nav-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav-links a { color: #EAE3D2; font-size: 1rem; transition: color 0.3s ease; }
.nav-links a:hover { color: #D4AF37; }
.auth-area { display: flex; align-items: center; gap: 0.8rem; }
.user-chip { display: flex; align-items: center; gap: 0.6rem; }
.user-foto { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid #D4AF37; }

/* ===== HERO (PÁGINA INICIAL) ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; flex-direction: row;
  align-items: center; justify-content: space-between; gap: 2rem;
  padding: 4rem 6vw; overflow: hidden;
  background: linear-gradient(135deg, #241812 0%, #1A110B 100%);
}
.hero-fundo {
  position: absolute; inset: 0;
  background-image: url('img/biblioteca.jpg');
  background-size: cover; background-position: center; z-index: 0; opacity: 0.22;
}
.hero > *:not(.hero-fundo) { position: relative; z-index: 1; }
.hero-texto { flex: 1; max-width: 55%; text-align: left; z-index: 3; position: relative; }
.hero-eyebrow {
  color: #D4AF37; letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.85rem;
  font-family: 'Playfair Display', serif; margin-bottom: 1rem;
  border-left: 3px solid #D4AF37; padding-left: 12px;
}
.hero-title { font-size: clamp(3rem, 8vw, 5.2rem); color: #D4AF37; line-height: 1.1; margin-bottom: 1.2rem; }
.hero-title em { color: #C5A059; font-style: italic; }
.hero-sub { max-width: 58%; color: #F3ECDD; font-size: 1.25rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== SANTO AGOSTINHO (cabeça SEMPRE visível) ===== */
.santo-wrap {
  position: relative;
  width: min(300px, 30vw);
  order: 2;
  z-index: 2;
  flex: 0 0 auto;
  margin-right: 18%;
  padding-top: 2.5rem;        /* espaço no topo para a cabeça */
  display: flex;
  align-items: flex-start;    /* alinha pelo topo, não corta a cabeça */
  justify-content: center;
}
.halo {
  position: absolute;
  top: 12%; left: 50%;
  width: 130%; height: 70%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.55) 0%, rgba(212, 175, 55, 0.18) 45%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
  animation: haloPulso 3.5s ease-in-out infinite;
}
@keyframes haloPulso {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}
.santo {
  position: relative;
  width: 100%;
  max-height: 74vh;           /* nunca passa da altura da tela */
  object-fit: contain;        /* mantém proporção sem cortar */
  z-index: 2;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
  animation: santoSobeDesce 3.5s ease-in-out infinite;
}
@keyframes santoSobeDesce {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-18px) rotate(1.5deg); }
}
.santo-sombra {
  position: absolute;
  bottom: 4%; left: 50%;
  width: 70%; height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);
  filter: blur(4px);
  border-radius: 50%;
  z-index: 1;
  animation: sombraMove 3.5s ease-in-out infinite;
}
@keyframes sombraMove {
  0%, 100% { transform: translateX(-50%) scaleX(1);   opacity: 0.6; }
  50%      { transform: translateX(-50%) scaleX(0.8); opacity: 0.4; }
}

/* ===== SEÇÕES ===== */
.section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem); color: #D4AF37; margin-bottom: 0.5rem;
  position: relative; display: inline-block;
}
.section-title::after {
  content: ""; display: block; width: 70px; height: 3px; background: #D4AF37; margin: 10px auto 0;
}
.section-title em { color: #C5A059; font-style: italic; }
.section-sub { color: #F3ECDD; max-width: 640px; margin: 0 auto; }

/* ===== HERO DAS PÁGINAS INTERNAS ===== */
.pagina-hero {
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent !important;
  border-bottom: 2px solid #D4AF37;
}
.pagina-hero > * { position: relative; z-index: 1; }
.pagina-titulo {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: #EAD289;              /* dourado mais claro, destaca do fundo */
  margin-top: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}
.pagina-hero .section-sub {
  color: #FFFFFF;
  font-size: 1.25rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.pagina-hero .hero-eyebrow {
  color: #D4AF37;
  border-left-color: #D4AF37;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* ===== CATEGORIAS (PÁGINA INICIAL) ===== */
.categorias { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.categoria-card {
  position: relative; border-radius: 4px; overflow: hidden; min-height: 320px; display: block;
  border: 1px solid #D4AF37; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.categoria-card:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.categoria-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.categoria-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; background: linear-gradient(180deg, transparent 30%, rgba(26, 17, 11, 0.92));
}
.categoria-num { color: #D4AF37; font-size: 0.85rem; letter-spacing: 0.15em; font-family: 'Playfair Display', serif; }
.categoria-overlay h3 { color: #fff; font-size: 1.4rem; margin: 0.3rem 0; }
.categoria-acesso { color: #D4AF37; font-size: 0.9rem; }
.seta { display: inline-block; transition: transform 0.3s ease; }
.categoria-card:hover .seta { transform: translateX(5px); }

/* ===== CADASTRO ===== */
.section-cadastro { max-width: 900px; }
.cadastro-wrap {
  position: relative; overflow: hidden; border-radius: 4px; border: 1px solid #D4AF37;
  background: rgba(20, 13, 8, 0.9); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.convite { text-align: center; padding: 2rem; }
.convite-img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 4px; margin-bottom: 1.5rem; }
.convite-texto strong { color: #EAD289; font-size: 1.3rem; font-family: 'Playfair Display', serif; }
.convite-texto p { color: #F3ECDD; margin-top: 0.5rem; }
.convite-acao { margin-top: 1rem; }
.box-cadastro { padding: 2rem; border-top: 1px solid #3a2a1c; }
.box-login { text-align: center; padding: 2rem; }
.box-login p { color: #F3ECDD; margin-bottom: 1rem; }
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; color: #D4AF37; font-size: 1rem; margin-bottom: 0.4rem; font-family: 'Playfair Display', serif; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: 2px; border: 1px solid #4a3626;
  background: #1A110B; color: #F3ECDD; font-family: inherit; font-size: 1rem;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: #D4AF37; box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}
.campo textarea { min-height: 110px; resize: vertical; }
.prof-checks { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.prof-checks .empty { color: #F3ECDD; font-size: 0.9rem; }
.form-note { color: #EAD289; font-size: 0.95rem; margin: 1rem 0; }
.form-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== BIOGRAFIA / TEXTO DA PÁGINA SOBRE ===== */
.bio-texto { text-align: left; padding: 1.5rem 0; }
.bio-texto p { color: #F3ECDD; font-size: 1.2rem; line-height: 1.85; margin-bottom: 1rem; }

/* ===== FORM BOX (professores / dedicatórias) ===== */
.form-box {
  background: rgba(20, 13, 8, 0.9);
  border: 1px solid #D4AF37;
  border-radius: 4px;
  padding: 24px;
  margin: 0 auto 28px;
  max-width: 720px;
}
.form-box h3 { color: #D4AF37; margin: 0 0 16px; font-family: 'Playfair Display', serif; }
.prof-lista { display: flex; flex-direction: column; gap: 10px; }

/* ===== GRID (TRABALHOS / DEDICATÓRIAS / PALAVRAS) ===== */
.grid, #grid, .grid-dedicatoria, .grid-palavras {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
}
.card-trabalho, .card-dedicatoria, .card-palavra {
  background: rgba(20, 13, 8, 0.92); border: 1px solid #D4AF37; border-radius: 4px; padding: 20px;
  height: 100%; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-trabalho:hover, .card-dedicatoria:hover, .card-palavra:hover {
  transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.card-trabalho.destaque { border-color: #D4AF37; box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3); }
.card-trabalho h3, .card-dedicatoria h3, .card-palavra h3 { color: #EAD289; font-size: 1.2rem; margin: 0; }
.card-trabalho .autor, .card-dedicatoria .autor { color: #C5A059; font-size: 0.95rem; margin: 0; font-family: 'Playfair Display', serif; }
.card-trabalho p, .card-dedicatoria p, .card-palavra p { color: #F3ECDD; margin: 0; line-height: 1.6; }
.card-trabalho a { color: #D4AF37; font-weight: 600; }
.badge-destaque {
  display: inline-block; background: #D4AF37; color: #1A110B; font-size: 0.75rem;
  padding: 3px 10px; border-radius: 2px; font-family: 'Playfair Display', serif; align-self: flex-start;
}
.empty { color: #F3ECDD; text-align: center; padding: 2rem; }

/* ===== FILTROS ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 2rem; }
.filtro-btn {
  background: transparent; border: 1px solid #D4AF37; color: #D4AF37; padding: 8px 16px;
  border-radius: 2px; font-family: 'Playfair Display', serif; cursor: pointer; transition: all 0.25s;
}
.filtro-btn:hover { background: rgba(212, 175, 55, 0.12); }
.filtro-btn.ativo { background: #D4AF37; color: #1A110B; }

/* ===== ACESSIBILIDADE ===== */
.acessibilidade {
  position: fixed; right: 12px; top: 15%; z-index: 99999; display: flex; flex-direction: column;
  gap: 8px; background: rgba(36, 24, 18, 0.95); padding: 8px; border-radius: 4px; border: 1px solid #D4AF37;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.acess-btn {
  background: transparent; border: 1px solid #D4AF37; color: #D4AF37;
  font-family: 'Playfair Display', serif; font-size: 0.75rem; padding: 8px 10px;
  border-radius: 2px; cursor: pointer; transition: all 0.3s ease;
}
.acess-btn:hover { background: #D4AF37; color: #1A110B; }
html.fonte-maior { font-size: 115%; }
html.fonte-muito-maior { font-size: 130%; }
html.alto-contraste { filter: contrast(1.35) saturate(1.1); }

/* ===== PAINEL DO ADMINISTRADOR ===== */
.section-admin { max-width: 960px; margin: 0 auto; padding: 40px 20px; margin-top: 40px; }
.admin-cabecalho { text-align: center; margin-bottom: 28px; }
.admin-abas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.aba-btn {
  background: transparent; border: 1px solid #D4AF37; color: #D4AF37; padding: 10px 18px;
  border-radius: 2px; cursor: pointer; font-family: 'Playfair Display', serif;
  font-size: 0.95rem; transition: all 0.25s;
}
.aba-btn:hover { background: rgba(212, 175, 55, 0.12); }
.aba-btn.ativa { background: #D4AF37; color: #1A110B; border-color: #D4AF37; font-weight: 600; }
.aba-conteudo { display: none; }
.aba-conteudo.ativa { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.admin-bloco {
  background: rgba(20, 13, 8, 0.92); border: 1px solid #D4AF37; border-radius: 4px; padding: 22px;
  margin-bottom: 20px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}
.admin-bloco h4 { margin: 0 0 16px; color: #D4AF37; font-size: 1.1rem; }
.admin-linha { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-linha input { flex: 1; min-width: 200px; }
.admin-campo { margin-bottom: 14px; }
.admin-campo label { display: block; margin-bottom: 6px; color: #D4AF37; font-size: 1rem; font-family: 'Playfair Display', serif; }
.admin-campo input, .admin-campo textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: 2px; border: 1px solid #4a3626;
  background: #1A110B; color: #F3ECDD; font-family: inherit; font-size: 1rem;
}
.admin-lista { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.admin-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #1A110B; border: 1px solid #3a2a1c; border-radius: 4px; padding: 12px 16px; flex-wrap: wrap;
}
.admin-item-coluna { flex-direction: column; align-items: stretch; }
.admin-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-item-info strong { color: #D4AF37; }
.admin-item-info small { color: #F3ECDD; }
.admin-item-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-pequeno { padding: 6px 12px; font-size: 0.8rem; border-radius: 2px; }

/* ===== RODAPÉ ===== */
.footer { text-align: center; padding: 2.5rem 2rem; border-top: 2px solid #D4AF37; background: #120c07; }
.footer-marca { color: #D4AF37; font-weight: 600; font-family: 'Playfair Display', serif; }
.footer-escola { color: #F3ECDD; font-size: 0.95rem; margin-top: 0.3rem; }
.footer-extra { color: #b8a98a; font-size: 0.9rem; margin-top: 0.3rem; }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .nav-links { gap: 0.8rem; }
  .hero { padding: 3rem 1.5rem; align-items: center; text-align: center; flex-direction: column; }
  .hero-texto { max-width: 100%; text-align: center; }
  .hero-sub { max-width: 100%; }
  .santo-wrap { display: none; }
  .acessibilidade { top: auto; bottom: 12px; flex-direction: row; }
  body { font-size: 1.15rem; }
}