/* Zsazsa's 25 Anos — cores do logo: dourado, azul, vermelho, preto */
@import url('https://fonts.googleapis.com/css2?family=Titan+One&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --fonte-display: 'Titan One', 'Arial Black', sans-serif;
  --fonte-texto: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --dourado: #d99a1b;
  --dourado-claro: #f2c14e;
  --azul: #24418f;
  --azul-escuro: #16295e;
  --vermelho: #b01c24;
  --tinta: #221a10;
  --fundo: #faf6ee;
  --branco: #fff;
  --cinza: #6e6759;
  --raio: 12px;
  --sombra: 0 2px 10px rgba(34, 26, 16, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fonte-texto);
  font-weight: 600;
  background: var(--fundo);
  color: var(--tinta);
  line-height: 1.6;
}
h1, h2, h3, .marca, .btn {
  font-family: var(--fonte-display);
  font-weight: 400;
  letter-spacing: .02em;
}
img { max-width: 100%; }
a { color: var(--azul); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* ---- Topo ---- */
.topo {
  background: #0d1836;
  border-bottom: 3px solid var(--dourado);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.topo-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; flex-wrap: wrap; }
.marca {
  display: flex; align-items: center; text-decoration: none; color: var(--branco);
  font-size: 1.45rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .45); white-space: nowrap;
}
.marca em { color: var(--dourado-claro); font-style: normal; }
.nav { display: flex; gap: .2rem; align-items: center; flex-wrap: wrap; }
.nav a {
  position: relative; color: rgba(255, 255, 255, .85); text-decoration: none;
  padding: .55rem .85rem; font-weight: 800; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .07em; border-radius: 8px;
}
.nav a:hover { color: #fff; }
.nav a.ativa { color: #fff; }
.nav a.ativa:not(.btn-partilhar)::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem;
  height: 3px; background: var(--dourado); border-radius: 2px;
}
.badge-pendentes {
  display: inline-block; min-width: 1.5em; text-align: center; margin-left: .35em;
  background: var(--vermelho); color: #fff; border-radius: 999px;
  font-size: .78rem; font-weight: 800; padding: .1em .45em; vertical-align: middle;
}
.nav .btn-partilhar {
  background: var(--vermelho); color: #fff; margin-left: .5rem;
  border-radius: 999px; padding: .55rem 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.nav .btn-partilhar:hover { background: #cf2530; }
.nav .btn-partilhar.ativa { outline: 2px solid var(--dourado-claro); outline-offset: 2px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--branco); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .6rem; }
  .nav.aberta { display: flex; }
}

/* ---- Hero ---- */
.hero {
  background: radial-gradient(circle at 50% 20%, var(--azul), var(--azul-escuro));
  color: var(--branco);
  text-align: center;
  padding: 3rem 1rem 3.5rem;
}
.hero img.hero-logo { height: 260px; width: auto; margin-bottom: 1.2rem; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); margin-bottom: .7rem; text-shadow: 0 4px 0 rgba(0,0,0,.25); line-height: 1.15; }
.hero h1 span { color: var(--dourado-claro); }
.hero p { max-width: 640px; margin: 0 auto 1.4rem; color: #dfe6f7; }
.hero p strong { color: var(--dourado-claro); }
.hero .hero-nota { margin-top: 1rem; font-size: .9rem; color: #b9c4e4; }

/* Slide de mensagens no hero */
.hero-slides { display: grid; max-width: 760px; margin: 0 auto; }
.hero-slide {
  grid-area: 1 / 1; opacity: 0; transition: opacity .9s ease; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-slide.ativo { opacity: 1; pointer-events: auto; }
.hero-pontos { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.4rem; }
.hero-pontos button {
  width: 11px; height: 11px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .35); padding: 0; transition: background .3s, transform .3s;
}
.hero-pontos button.ativo { background: var(--dourado-claro); transform: scale(1.25); }
.btn {
  display: inline-block; background: var(--vermelho); color: var(--branco);
  padding: .85rem 1.8rem; border-radius: 999px; text-decoration: none;
  border: 0; cursor: pointer; font-size: 1.05rem; box-shadow: var(--sombra);
}
.btn:hover { background: #cf2530; }
.btn-secundario { background: var(--dourado); color: var(--tinta); }
.btn-secundario:hover { background: var(--dourado-claro); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Grelha de anos ---- */
.seccao { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.seccao h2 { font-size: 2.1rem; margin-bottom: 1.4rem; color: var(--azul-escuro); }
.grelha-anos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) {
  .grelha-anos { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
}
@media (max-width: 520px) {
  .grelha-anos { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
}
.cartao-ano {
  background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra);
  text-decoration: none; color: var(--tinta); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease;
  border-top: 4px solid var(--dourado);
}
.cartao-ano:hover { transform: translateY(-3px); }
.cartao-ano .capa {
  aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 35%, var(--azul), var(--azul-escuro));
  display: flex; align-items: center; justify-content: center; color: var(--dourado-claro);
  font-family: var(--fonte-display); font-size: 3.8rem; position: relative; overflow: hidden;
  text-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.cartao-ano .capa .capa-tema { font-size: 5rem; opacity: .9; }
.cartao-ano .capa img { width: 100%; height: 100%; object-fit: cover; }
.cartao-ano .info { padding: .8rem 1rem 1.1rem; }
.cartao-ano .info h3 { font-size: 1.1rem; line-height: 1.35; font-family: var(--fonte-texto); font-weight: 800; }
.cartao-ano .info .meta { font-size: .82rem; color: var(--cinza); margin-top: .3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.selo {
  display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px;
  background: #eee; color: var(--cinza);
}
.selo.ouro { background: var(--dourado-claro); color: #5b430a; }
.selo.vermelho { background: #f7d7d9; color: var(--vermelho); }

/* ---- Galeria ---- */
.galeria-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
@media (max-width: 520px) {
  .galeria-grelha { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}
.item-media {
  position: relative; border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra);
  background: #000; aspect-ratio: 4 / 3; display: block;
}
.item-media img, .item-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-media .icone-video {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.9); text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none;
}
.item-bloqueado { cursor: default; }
.item-bloqueado::after {
  content: "🔒"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.nota-mais {
  margin-top: 1.2rem; background: var(--branco); border-left: 5px solid var(--dourado);
  padding: 1rem 1.2rem; border-radius: 8px; box-shadow: var(--sombra);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 8, 4, .93); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.aberto { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox .fechar {
  position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer;
}
.lightbox .nav-lb {
  position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #fff;
  background: rgba(255,255,255,.08); border: 0; cursor: pointer; padding: .4rem .8rem; border-radius: 8px;
}
.lightbox .anterior { left: .8rem; }
.lightbox .seguinte { right: .8rem; }

/* ---- Timeline ---- */
.timeline { position: relative; margin: 1rem 0 2rem; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 3px; background: var(--dourado); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 1.4rem 1.2rem; }
.tl-item::before {
  content: ""; position: absolute; left: -1.6rem; top: .35rem; width: 13px; height: 13px; border-radius: 50%;
  background: var(--azul); border: 3px solid var(--dourado-claro);
}
.tl-item h3 { font-size: 1.4rem; }
.tl-fotos { display: flex; gap: .55rem; margin-top: .7rem; flex-wrap: wrap; }
.tl-fotos a { position: relative; display: block; line-height: 0; }
.tl-fotos img {
  width: 116px; height: 116px; object-fit: cover; border-radius: 10px;
  box-shadow: var(--sombra); transition: transform .15s ease;
}
.tl-fotos a:hover img { transform: scale(1.06); }
.tl-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.tl-fotos .tl-mais {
  width: 116px; height: 116px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  background: var(--azul-escuro); color: var(--dourado-claro); text-decoration: none;
  font-family: var(--fonte-display); font-size: 1.5rem; box-shadow: var(--sombra);
}
.tl-fotos .tl-mais:hover { background: var(--azul); }
@media (max-width: 520px) {
  .tl-fotos img, .tl-fotos .tl-mais { width: 88px; height: 88px; }
}
.tl-item h3 a { color: var(--azul-escuro); text-decoration: none; }
.tl-item h3 a:hover { text-decoration: underline; }
.tl-item .meta { font-size: .85rem; color: var(--cinza); }

/* ---- Formulários / upload ---- */
.cartao {
  background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 1.6rem; max-width: 680px; margin: 0 auto;
}
.cartao h2 { color: var(--azul-escuro); margin-bottom: .8rem; }
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .3rem; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: .65rem .8rem; border: 1.5px solid #d8d2c4; border-radius: 8px;
  font: inherit; background: #fffdf8;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--dourado); border-color: var(--dourado); }
.ajuda { font-size: .85rem; color: var(--cinza); margin-top: .25rem; }
.erro { background: #fbe3e5; color: var(--vermelho); padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.sucesso { background: #e2f3e4; color: #1e6b2d; padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.passos { display: flex; gap: .5rem; margin-bottom: 1.4rem; font-size: .85rem; flex-wrap: wrap; }
.passos span { padding: .3rem .8rem; border-radius: 999px; background: #eee7d8; color: var(--cinza); font-weight: 600; }
.passos span.atual { background: var(--azul); color: #fff; }
.passos span.feito { background: var(--dourado-claro); color: #5b430a; }

.codigo-input { letter-spacing: .6em; text-align: center; font-size: 1.6rem; font-weight: 700; }

/* Lista de ficheiros no upload */
.lista-ficheiros { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.ficheiro-linha {
  display: flex; align-items: center; gap: .8rem; background: #fffdf8; border: 1px solid #eee3cd;
  padding: .5rem .8rem; border-radius: 8px; font-size: .9rem;
}
.ficheiro-linha .nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra { flex: 0 0 130px; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.barra > div { height: 100%; width: 0; background: var(--dourado); transition: width .2s; }
.barra.ok > div { background: #3d9950; }
.barra.falha > div { background: var(--vermelho); }

/* ---- História ---- */
.stats-grelha {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin: 1.4rem 0 1.8rem;
}
@media (max-width: 640px) { .stats-grelha { grid-template-columns: repeat(2, 1fr); } }
.stat-cartao {
  background: linear-gradient(160deg, var(--azul), var(--azul-escuro));
  color: #dfe6f7; border-radius: var(--raio); padding: 1.1rem .8rem;
  text-align: center; font-size: .85rem; font-weight: 700;
  border-bottom: 4px solid var(--dourado); box-shadow: var(--sombra);
}
.stat-cartao .numero {
  display: block; font-family: var(--fonte-display); font-size: 2.1rem;
  color: var(--dourado-claro); line-height: 1.2; margin-bottom: .15rem;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .3);
}
.prosa p { margin-bottom: 1rem; }
.prosa .grito {
  font-family: var(--fonte-display); font-size: 2.2rem; text-align: center;
  color: var(--vermelho); text-shadow: 2px 2px 0 var(--dourado-claro); margin: 1.4rem 0;
}

/* ---- Contactos ---- */
.contactos-grelha { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 760px) { .contactos-grelha { grid-template-columns: 1fr; } }
.contactos-grelha .cartao { max-width: none; }
.mapa-moldura {
  border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra);
  border: 4px solid var(--branco); aspect-ratio: 4 / 3; background: #dfe6f7;
}
.mapa-moldura iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Gala (reservas) ---- */
.gala-banner {
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center;
  background: linear-gradient(135deg, var(--azul), var(--azul-escuro));
  color: #fff; border-radius: var(--raio); border-bottom: 4px solid var(--dourado);
  padding: 1rem 1.3rem; margin-bottom: 1.2rem; font-size: 1.1rem;
  box-shadow: var(--sombra);
}
.gala-banner strong { color: var(--dourado-claro); }
.gala-banner a { color: var(--dourado-claro); }
.gala-menu h3 { color: var(--azul-escuro); margin-bottom: .9rem; }
.gala-menu dl { display: grid; gap: .75rem; }
.gala-menu dt { font-weight: 800; color: var(--azul-escuro); margin-bottom: .1rem; }
.gala-menu dd { margin: 0; color: #4c4638; }
.gala-menu > dl > div { border-left: 4px solid var(--dourado); padding-left: .8rem; }
.gala-steppers { display: grid; gap: .7rem; margin-bottom: 1rem; }
.stepper {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: #fffdf8; border: 1.5px solid #eee3cd; border-radius: 12px; padding: .8rem 1rem;
}
.stepper .controlo { display: flex; align-items: center; gap: .8rem; }
.stepper .controlo button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--azul); color: #fff; font-size: 1.5rem; line-height: 1;
  font-weight: 800;
}
.stepper .controlo button:active { transform: scale(.94); }
.stepper .n { font-family: var(--fonte-display); font-size: 1.5rem; min-width: 1.6rem; text-align: center; color: var(--azul-escuro); }
.pessoa-linha {
  background: #fffdf8; border: 1.5px solid #eee3cd; border-radius: 12px;
  padding: .8rem 1rem; margin-bottom: .6rem;
}
.pessoa-cab .rotulo { font-weight: 800; color: var(--azul-escuro); font-size: .9rem; }
.pessoa-campos { display: flex; gap: .6rem; margin-top: .45rem; flex-wrap: wrap; }
.pessoa-campos .p-nome { flex: 2; min-width: 200px; }
.pessoa-campos .p-parentesco { flex: 1; min-width: 120px; }
.pessoa-campos input, .pessoa-campos select, .p-restricao {
  padding: .55rem .7rem; border: 1.5px solid #d8d2c4; border-radius: 8px; font: inherit; background: #fff;
}
.p-restr-toggle { display: inline-flex; gap: .4rem; align-items: center; margin-top: .5rem; font-size: .88rem; color: var(--cinza); cursor: pointer; }
.p-restricao { width: 100%; margin-top: .45rem; }
.gala-total {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--azul-escuro); color: #fff; border-radius: 12px; padding: .9rem 1.2rem; margin-top: 1.2rem;
}
.gala-total strong { font-family: var(--fonte-display); font-size: 1.7rem; color: var(--dourado-claro); }

/* ---- Rodapé ---- */
.rodape {
  margin-top: 3rem; background: var(--azul-escuro); color: #cdd6ee;
  padding: 1.6rem 0; border-top: 4px solid var(--dourado); text-align: center; font-size: .9rem;
}
.rodape a { color: var(--dourado-claro); }
.rodape-nota { opacity: .8; }

/* ---- Backoffice ---- */
.admin-barra { background: var(--tinta); color: #fff; padding: .6rem 0; }
.admin-barra .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.admin-barra a { color: var(--dourado-claro); text-decoration: none; margin-left: 1rem; }
.tabela { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); }
.tabela th, .tabela td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid #eee3cd; vertical-align: middle; }
.tabela th { background: var(--azul-escuro); color: #fff; font-size: .85rem; }
.mod-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-top: .8rem; }
.mod-item { background: #fff; border-radius: 10px; box-shadow: var(--sombra); overflow: hidden; }
.mod-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.mod-item .acoes { display: flex; gap: .3rem; padding: .5rem; flex-wrap: wrap; }
.mod-item .acoes button, .mod-item .acoes a {
  flex: 1; font-size: .78rem; padding: .35rem .4rem; border-radius: 6px; border: 0; cursor: pointer; text-align: center; text-decoration: none;
}
.b-aprovar { background: #d9efdc; color: #1e6b2d; }
.b-destacar { background: var(--dourado-claro); color: #5b430a; }
.b-apagar { background: #f7d7d9; color: var(--vermelho); }
.b-neutro { background: #eee; color: #444; }
.estado-tag { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.estado-pendente { background: #fdeeca; color: #8a6207; }
.estado-aprovado { background: #d9efdc; color: #1e6b2d; }
.estado-destaque { background: var(--dourado-claro); color: #5b430a; }
