/*
Theme Name: Ressurgência
Theme URI: https://www.ressurgencia.org/
Author: Ressurgência
Description: Tema custom com identidade visual “Ressurgência” (header/footer fixos, overlay, animações, scrollbar personalizada).
Version: 1.0.0
Text Domain: ressurgencia
*/

/* Helper: compensa barra de admin do WordPress (quando logado) */
body.admin-bar{ --wp-adminbar-h: 32px; }
@media (max-width: 782px){ body.admin-bar{ --wp-adminbar-h: 46px; } }

:root {
  --gold: #d4af37;
  --light-gold: rgba(255, 215, 0, 0.5);
  --velvet-text: #f0eada;
  --subtitle-text: #e6e1c7;
  --header-h: 64px; /* altura do header em desktop */
  --footer-h: 84px; /* altura do footer fixa para layout sem scroll */
}

@media (max-width: 768px) {
  :root { --header-h: 56px; } /* altura do header em mobile */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: 'Playfair Display', serif;
  background: url('assets/images/fundo.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--velvet-text);
  overflow: hidden; /* sem scroll */
}

/* ===== Header fixo ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.25));
  border-bottom: 1px solid rgba(212,175,55,0.35);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.site-header__inner {
  width: 100%;
  height: 100%;
  padding: 0 8px; /* cola o conteúdo nas extremidades com leve respiro */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}
.brand-circle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--light-gold));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,1,1); border: 0;
}

/* Botão hambúrguer (aparece no mobile) */
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.5);
  border-radius: 8px;
  cursor: pointer;
}
.menu-bar {
  display: block;
  width: 24px; height: 2px;
  margin: 5px auto;
  background: var(--velvet-text);
}

/* Nav no canto superior direito */
.nav-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-left: auto; /* empurra para a direita */
  align-items: center;
}
.nav-buttons a {
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--velvet-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.nav-buttons a:hover { background-color: var(--gold); color: #0b3d2e; }

/* garante extremos da tela no header */
.site-header { padding-left: 0; padding-right: 0; }
.site-header__inner { padding-left: 8px; padding-right: 8px; }
.brand { margin-left: 0; }
.nav-buttons { margin-right: 0; }

/* Comportamento responsivo do menu */
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-buttons {
    position: absolute;
    top: var(--header-h);
    right: 0;
    display: none; /* fechado por padrão */
    flex-direction: column;
    align-items: stretch;
    background: rgba(0,0,0,0.9);
    border-left: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    padding: 0.75rem;
    gap: 0.5rem;
    z-index: 1001;
  }
  .nav-buttons.open { display: flex; }
  .nav-buttons a { text-align: center; }
}

/* ===== Overlay / hero ===== */
.overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0,0,0,0.2));
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centra verticalmente */
  padding: 4vh 5vw; /* respiro interno */
  animation: fadeGradient 1.2s ease-in-out forwards;
  opacity: 0;
}

/* Título e subtítulo */
h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: #f5f0dd;
  text-align: center;
  margin-bottom: 1rem;
}
.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--subtitle-text);
  max-width: 900px;
  margin-bottom: 2rem;
  line-height: 1.6;
  text-align: center;
}

/* Container central */
.container {
  max-width: 90vw;
  padding: 3vh 2vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1.4s ease-in-out;
}

/* ===== Conteúdo genérico existente ===== */
.content {
  max-width: 900px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--gold);
  text-align: justify;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--subtitle-text);
}

.back-button { margin-top: 40px; }
.back-button a {
  padding: 10px 24px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: var(--velvet-text);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.back-button a:hover { background-color: var(--gold); color: #0b3d2e; }

/* ===== Animações ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeGradient { from { opacity: 0; transform: scale(1.01);} to { opacity: 1; transform: scale(1);} }

/* ===== Formulários ===== */
form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
input, textarea {
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gold);
  color: var(--velvet-text);
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  border-radius: 5px;
  resize: vertical;
}
input::placeholder, textarea::placeholder { color: #c6b993; }
button {
  padding: 0.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: var(--velvet-text);
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}
button:hover { background-color: var(--gold); color: #0b3d2e; }

/* ===== Redes sociais (footer e geral) ===== */
.social-links { display: flex; gap: 1.2rem; justify-content: center; margin-top: 0.75rem; font-size: 1.4rem; }
.social-links a { color: var(--velvet-text); transition: color 0.3s ease, filter 0.3s ease; }
.social-links a:hover { color: var(--gold); filter: drop-shadow(0 0 3px var(--gold)); }

/* ===== Footer ===== */
.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
  border-top: 1px solid rgba(212,175,55,0.35);
  background: rgba(0,0,0,0.35); /* era 0.55 */
  backdrop-filter: blur(3px);
  z-index: 900;
}
.footer-inner {
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.footer-col h4 { font-size: 1rem; margin-bottom: 0.25rem; color: #f5f0dd; }
.footer-col a { color: var(--velvet-text); text-decoration: none; }
.footer-col a:hover { color: var(--gold); text-decoration: underline; }
.footer-col:nth-child(1) { justify-self: start; }
.footer-col:nth-child(2) { justify-self: center; }
.footer-col:nth-child(3) { justify-self: end; }
.copyright { text-align: right; font-size: 0.95rem; color: var(--subtitle-text); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-col:nth-child(1), .footer-col:nth-child(3) { justify-self: center; }
  .copyright { text-align: center; }
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: center;
}
.footer-col h4 { font-size: 1rem; margin-bottom: 0.5rem; color: #f5f0dd; }
.footer-col a { color: var(--velvet-text); text-decoration: none; }
.footer-col a:hover { color: var(--gold); text-decoration: underline; }
.copyright { text-align: right; font-size: 0.95rem; color: var(--subtitle-text); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .copyright { text-align: center; }
}

/* ===== Publicações / componentes existentes ===== */
.publicacao { padding: 2rem 0; margin-bottom: 3rem; }
.publicacao + .publicacao { border-top: 1px solid var(--gold); padding-top: 2rem; }
.publicacao header h2 { font-size: 1.8rem; color: #f5f0dd; }
.meta { font-size: 0.95rem; color: #c6b993; margin-bottom: 1rem; }
.midia img, .midia video { width: 100%; border: 1px solid var(--gold); border-radius: 5px; margin: 1rem 0; }
.resumo { font-size: 1.05rem; line-height: 1.6; color: var(--subtitle-text); margin-top: 1rem; margin-bottom: 1.5rem; }
.tags span { background-color: rgba(255, 255, 255, 0.08); border: 1px solid var(--gold); padding: 0.3rem 0.6rem; margin-right: 0.5rem; font-size: 0.85rem; border-radius: 3px; }
.acoes { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; flex-wrap: wrap; gap: 1rem; }
.leia-mais { color: var(--gold); text-decoration: underline; }
.acoes { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.hashtag-btn { background-color: rgba(255, 255, 255, 0.08); border: 1px solid var(--gold); border-radius: 5px; color: var(--velvet-text); font-family: 'Playfair Display', serif; padding: 0.5rem 1.2rem; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; }
.hashtag-btn:hover { color: var(--gold); border-color: var(--gold); filter: drop-shadow(0 0 3px var(--gold)); }
.compartilhar { display: flex; align-items: center; gap: 1.2rem; }
.compartilhar button { all: unset; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--velvet-text); cursor: pointer; transition: color 0.3s ease, filter 0.3s ease; }
.compartilhar button:hover { color: var(--gold); filter: drop-shadow(0 0 3px var(--gold)); }

/* Modal */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); }
.modal-content { background-color: #0b3d2e; margin: 10% auto; padding: 2rem; border: 1px solid var(--gold); width: 90%; max-width: 500px; border-radius: 8px; color: var(--subtitle-text); }
.modal-content h3 { margin-bottom: 1rem; }
.modal .close { float: right; font-size: 1.5rem; cursor: pointer; color: var(--gold); }
.autor-box { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.autor-foto { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.autor-info { font-size: 0.95rem; color: var(--subtitle-text); line-height: 1.4; }
.espaco-assinatura { margin-top: 3rem; }
#copyTagsBtn { margin-top: 1rem; background-color: rgba(255, 255, 255, 0.08); border: 1px solid var(--gold); border-radius: 5px; color: var(--velvet-text); font-family: 'Playfair Display', serif; padding: 0.5rem 1rem; font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease; }
#copyTagsBtn:hover { background-color: var(--gold); color: #0b3d2e; }
.copy-msg { display: none; color: var(--gold); font-size: 0.9rem; margin-top: 0.75rem; text-align: center; opacity: 0; transition: opacity 0.3s ease-in-out; }
.copy-msg.active { display: block; opacity: 1; }
.copy-link { background: none; border: none; color: var(--velvet-text); font-size: 1.2rem; cursor: pointer; margin-left: 0.5rem; transition: color 0.3s ease; }
.copy-link:hover { color: var(--gold); }
.leia-mais-wrapper { width: 100%; display: flex; justify-content: flex-end; margin-top: -0.5rem; margin-bottom: 1rem; }
.leia-mais { color: var(--gold); text-decoration: underline; font-size: 0.95rem; }
.copy-container { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.copy-feedback { position: absolute; top: -2.4rem; left: 50%; transform: translateX(-50%); background-color: #0b3d2e; border: 1px solid var(--gold); color: var(--gold); padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.8rem; white-space: nowrap; opacity: 0; pointer-events: none; z-index: 999; transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; }
.copy-feedback::after { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #0b3d2e transparent transparent transparent; }
.copy-feedback.active { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* Responsividade extra */
@media (max-width: 600px) {
  .content { padding: 1.5rem; font-size: 1rem; }
  .nav-buttons a { font-size: 0.95rem; padding: 0.6rem 1.2rem; }
}

/* Logo central acima do título */
.hero-mark {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;   /* + */
  align-items: center;      /* + */
  justify-content: center;
  gap: 0.5rem;              /* + */
}
.hero-logo {
  width: 192px;
  height: 192px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--light-gold));
}
/* nova: legenda dourada pequena abaixo do logo */
.hero-legend {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

.nav-buttons a { font-size: 0.95rem; padding: 0.6rem 1.2rem; }


/* 1) Manifesto ocupa o espaço entre header e footer, em fluxo normal */
.overlay.manifesto {
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: 0;
  right: 0;
  overflow: auto;
  padding: 3vh 5vw;   /* sem padding-bottom especial aqui */
  height: auto;
  z-index: 800;
  display: block;     /* <-- override do flex da .overlay base */
}


/* 2) Container sem height forçada; centraliza apenas na largura */
.manifesto .container {
  max-width: 100%;
  margin: 0 auto;
  height: auto;       /* garante que não “coma” o espaço final */
  min-height: 0;      /* evita esticar até o limite do viewport */
}

/* 3) Texto com largura confortável + ESPAÇADOR GARANTIDO no final */
.manifesto-content {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}
.manifesto-content::after {
  content: "";
  display: block;
  height: calc(var(--footer-h) + 4vh); /* espaço antes do footer */
}

/* Centraliza o “cartão” de contato e define largura confortável */
.contact-content {
  max-width: 720px;
  margin: 0 auto;     /* centraliza horizontalmente */
  text-align: left;
}

/* Grid do formulário */
.contact-form {
  display: grid;
  gap: 1rem;
}

/* Nome e E-mail na mesma linha (responsivo) */
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr; /* duas colunas iguais */
  gap: 1rem;
}

/* Inputs ocupam 100% da célula do grid */
.contact-form input,
.contact-form textarea {
  width: 100%;
}

/* Empilha em telas pequenas */
@media (max-width: 600px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar minimalista amarelo — Chrome/Edge/Safari */
.overlay.manifesto::-webkit-scrollbar { width: 8px; }
.overlay.manifesto::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); }
.overlay.manifesto::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 8px;
}
.overlay.manifesto::-webkit-scrollbar-thumb:hover { filter: brightness(1.1); }

/* Firefox */
.overlay.manifesto {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(255,255,255,0.08);
  -webkit-overflow-scrolling: touch; /* iOS mais suave */
}

/* centraliza o cartão de publicações */
.posts-content{
  width: min(900px, 100%);   /* tira o 100% “fixo” herdado */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.publicacao .midia img,
.publicacao .midia video{
  display: block;
  margin: 1rem auto;
}

.publicacao .tags,
.publicacao .acoes{
  justify-content: center;
  text-align: center;
}




/* Ajustes WP */
.admin-bar .site-header{ top: var(--wp-adminbar-h); }
.admin-bar .overlay.manifesto{ top: calc(var(--header-h) + var(--wp-adminbar-h)); }

/* ===== WordPress ajustes ===== */
body.admin-bar { --wp-adminbar-h: 32px; }
@media (max-width: 782px) { body.admin-bar { --wp-adminbar-h: 46px; } }

body.admin-bar .site-header { top: var(--wp-adminbar-h); }
body.admin-bar .overlay { padding-top: calc(var(--header-h) + var(--wp-adminbar-h)); }
body.admin-bar .overlay.manifesto {
  top: calc(var(--header-h) + var(--wp-adminbar-h));
  height: calc(100vh - var(--header-h) - var(--footer-h) - var(--wp-adminbar-h));
}

/* Conteúdo do editor (blocos) */
.manifesto-content h2, .posts-content h2 { margin-top: 0.4rem; }
.manifesto-content img, .posts-content img { height: auto; }
.manifesto-content a, .posts-content a { text-decoration: none; }

/* Contact Form 7: mantém o visual */
.wpcf7 form { margin-top: 1.25rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--velvet-text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
}
.wpcf7 input[type="submit"] {
  background: linear-gradient(180deg, rgba(212,175,55,0.95), rgba(164,125,20,0.95));
  border: 0;
  color: #0b3d2e;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
}
