/* Molde comum dos mapas interativos do Lírio Católico (Leaflet nativo) */

:root {
  --lc-tinta: #2b241c;
  --lc-tinta-suave: #6d6255;
  --lc-papel: #fbf7ef;
  --lc-papel-2: #f2eadb;
  --lc-borda: #e0d5c1;
  --lc-ouro: #e9a83a;
  --lc-ouro-escuro: #b3560f;
  --lc-serifa: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --lc-sans: "Open Sans", Roboto, system-ui, sans-serif;
}

.pagina-mapa main.lc {
  padding-top: 5.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  color: var(--lc-tinta);
  font-family: var(--lc-sans);
}

/* ---------- cabeçalho ---------- */
.lc-cabecalho { max-width: 860px; margin: 0 auto 1.5rem; text-align: center; }

.lc-sobretitulo {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lc-tinta-suave);
  margin-bottom: .4rem;
}

.lc-cabecalho h1 {
  font-family: var(--lc-serifa);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: .8rem;
}

.lc-lead { font-size: 1.05rem; line-height: 1.6; color: var(--lc-tinta-suave); }

.lc-totais {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.6rem;
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--lc-tinta-suave);
}

.lc-totais strong { font-family: var(--lc-serifa); font-size: 1.5rem; color: var(--lc-tinta); margin-right: .2em; }

/* ---------- aplicativo ---------- */
.lc-app {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: min(78vh, 820px);
  min-height: 520px;
  border: 1px solid var(--lc-borda);
  border-radius: 14px;
  overflow: hidden;
  background: var(--lc-papel);
  box-shadow: 0 10px 30px rgba(60, 40, 10, .08);
}

.lc-painel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--lc-borda);
  background: var(--lc-papel);
  min-height: 0;
  position: relative;
}

.lc-painel-alca { display: none; }

.lc-painel-corpo {
  padding: .9rem 1rem;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

/* passos (anterior / reproduzir / próximo) */
.lc-passos {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 6px;
  align-items: center;
  background: var(--lc-papel-2);
  border-radius: 10px;
  padding: 6px;
  margin: .9rem 1rem 0;
}

.lc-passos button {
  border: 0;
  background: #fff;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: .95rem;
  color: var(--lc-tinta);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.lc-passos button:hover { background: var(--lc-ouro); color: #fff; }
.lc-passos button:disabled { opacity: .35; cursor: default; background: #fff; color: var(--lc-tinta); }
.lc-passos button.tocando { background: var(--lc-ouro-escuro); color: #fff; }

.lc-passos-rotulo {
  font-size: .8rem;
  line-height: 1.25;
  color: var(--lc-tinta-suave);
  padding: 0 .3rem;
  min-width: 0;
}

.lc-passos-rotulo b { display: block; color: var(--lc-tinta); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* fases (chips) */
.lc-fases { display: flex; flex-wrap: wrap; gap: 5px; }

.lc-fases button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--lc-borda);
  background: #fff;
  border-radius: 999px;
  padding: .25rem .6rem .25rem .35rem;
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  color: var(--lc-tinta);
  cursor: pointer;
  transition: opacity .15s;
}

.lc-fases button i.ponto { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1.5px solid rgba(0,0,0,.15); }
.lc-fases button.inativo { opacity: .4; text-decoration: line-through; }
.lc-fases .lc-fases-todas { font-weight: 400; color: var(--lc-tinta-suave); padding-left: .6rem; }

/* lista cronológica */
.lc-lista-titulo {
  font-family: var(--lc-serifa);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: .2rem 0 0;
}

.lc-lista-titulo i { font-size: .85rem; color: var(--lc-ouro); }

.lc-lista { list-style: none; display: grid; gap: 1px; }

.lc-lista .fase-h {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .6rem;
  padding: .2rem .3rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lc-tinta-suave);
  border-bottom: 1px solid var(--lc-borda);
}

.lc-lista .fase-h i.ponto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lc-lista .fase-h.inativo { opacity: .4; }

.lc-lista .evento {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: .5rem;
  align-items: start;
  padding: .35rem .4rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: .86rem;
}

.lc-lista .evento:hover { background: var(--lc-papel-2); }
.lc-lista .evento.atual { background: #fff; box-shadow: inset 0 0 0 1.5px var(--lc-ouro); }
.lc-lista .evento.inativo { display: none; }

.lc-lista .evento .num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

.lc-lista .evento .nome { font-weight: 600; line-height: 1.2; }
.lc-lista .evento .resumo { display: block; font-size: .76rem; color: var(--lc-tinta-suave); font-weight: 400; margin-top: .1rem; }

/* mapa */
.lc-mapa-wrap { position: relative; min-height: 0; }
#mapa { width: 100%; height: 100%; background: #dfe9ee; font-family: var(--lc-sans); }

.lc-carregando {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: rgba(251, 247, 239, .85);
  z-index: 500;
  color: var(--lc-tinta-suave);
  transition: opacity .3s;
}

.lc-carregando.oculto { opacity: 0; pointer-events: none; }

/* marcadores numerados */
.lc-marca { background: none; border: 0; }

.lc-marca .pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
  transition: transform .12s;
}

.lc-marca .pin span { transform: rotate(45deg); color: #fff; font-size: 11px; font-weight: 700; font-family: var(--lc-sans); text-shadow: 0 0 2px rgba(0,0,0,.4); }
.lc-marca:hover .pin { transform: rotate(-45deg) scale(1.15); }
.lc-marca.atual .pin { transform: rotate(-45deg) scale(1.35); box-shadow: 0 0 0 4px rgba(233,168,58,.55), 0 2px 6px rgba(0,0,0,.4); }
.lc-marca.martirio .pin { border-color: #ffd166; box-shadow: 0 0 0 2px #9b2c2c, 0 2px 5px rgba(0,0,0,.35); }
.lc-pop .fase.martirio { background: #9b2c2c; }
.lc-marca.fixo .pin { border-radius: 50%; transform: none; width: 18px; height: 18px; }
.lc-marca.fixo .pin span { transform: none; font-size: 9px; }

.lc-rotulo {
  background: none;
  border: 0;
  box-shadow: none;
  font-family: var(--lc-serifa);
  font-size: 13px;
  font-weight: 700;
  color: var(--lc-tinta);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff;
  white-space: nowrap;
  pointer-events: none;
}

.lc-rotulo::before { display: none; }

/* popup */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  background: var(--lc-papel);
  color: var(--lc-tinta);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.leaflet-popup-tip { background: var(--lc-papel); }
.leaflet-popup-content { margin: 14px 16px; font-family: var(--lc-sans); font-size: .88rem; line-height: 1.45; }

.lc-pop h3 {
  font-family: var(--lc-serifa);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .25rem;
}

.lc-pop .fase {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  padding: .12rem .5rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}

.lc-pop .periodo { font-size: .78rem; color: var(--lc-tinta-suave); font-style: italic; margin-bottom: .4rem; }
.lc-pop p { margin: 0 0 .5rem; }
.lc-pop ul { margin: 0 0 .5rem 1.1rem; padding: 0; }
.lc-pop li { margin-bottom: .2rem; }

.lc-pop .refs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: .5rem; }

.lc-pop .refs a, .lc-pop .refs span {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: var(--lc-papel-2);
  border: 1px solid var(--lc-borda);
  color: var(--lc-tinta);
  font-size: .75rem;
  text-decoration: none;
}

.lc-pop .refs a:hover { background: #f7e3b5; border-color: var(--lc-ouro); }

.lc-pop blockquote {
  margin: 0;
  padding: .2rem 0 .2rem .6rem;
  border-left: 3px solid var(--lc-ouro);
  font-family: var(--lc-serifa);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--lc-tinta-suave);
  max-height: 150px;
  overflow-y: auto;
}

.lc-pop .nav { display: flex; justify-content: space-between; margin-top: .6rem; gap: .5rem; }

.lc-pop .nav button {
  border: 1px solid var(--lc-borda);
  background: #fff;
  border-radius: 6px;
  padding: .3rem .6rem;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
  color: var(--lc-tinta);
}

.lc-pop .nav button:hover { background: var(--lc-ouro); color: #fff; border-color: var(--lc-ouro); }

.leaflet-bar a { color: var(--lc-tinta); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.75); }

/* ---------- texto e lista estática ---------- */
.lc-texto { max-width: 860px; margin: 2.5rem auto 3rem; line-height: 1.7; }
.lc-texto h2 { font-family: var(--lc-serifa); font-size: 1.9rem; font-weight: 600; margin: 2rem 0 .7rem; }
.lc-texto h3 { font-family: var(--lc-serifa); font-size: 1.35rem; font-weight: 600; margin: 1.4rem 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.lc-texto h3 i.ponto { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lc-texto p { margin-bottom: 1rem; }
.lc-texto a { color: var(--lc-ouro-escuro); }
.lc-texto ol.lc-eventos { margin: 0 0 1rem 1.4rem; }
.lc-texto ol.lc-eventos li { margin-bottom: .45rem; }
.lc-texto ol.lc-eventos li small { color: var(--lc-tinta-suave); }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .pagina-mapa main.lc { padding-left: 0; padding-right: 0; }
  .lc-cabecalho { padding: 0 1rem; }

  .lc-app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: calc(100vh - 5.5rem);
    min-height: 480px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .lc-mapa-wrap { grid-row: 1; }
  .lc-painel { grid-row: 2; border-right: 0; border-top: 1px solid var(--lc-borda); max-height: 62%; }

  .lc-painel-alca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    background: var(--lc-papel);
    font: inherit;
    font-weight: 700;
    font-size: .9rem;
    color: var(--lc-tinta);
    cursor: pointer;
  }

  .lc-painel-alca::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: var(--lc-borda);
  }

  .lc-painel-corpo { display: none; }
  .lc-painel.aberto .lc-painel-corpo { display: flex; }
  .lc-passos { margin: 0 .6rem .5rem; }
  .lc-texto { padding: 0 1rem; }
}
