/* ==========================================================================
   Encontrar igreja — localizador (lista + mapa) e página de cada igreja
   ========================================================================== */

.ig-section { background: #f4f8ff; padding: 36px 0 96px; font-family: "Inter", sans-serif; color: #0b1a3d; }
.ig-wrap { width: min(1320px, 94%); margin: 0 auto; }

/* ── Cabeçalho ── */
.ig-hero .ig-search { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 34px 0 0; padding: 7px 7px 7px 22px; border-radius: 999px; background: #fff; box-shadow: 0 24px 60px rgba(2, 10, 40, .35); }
.ig-search > i { color: #0057e5; font-size: 16px; }
.ig-search input[type="search"] { flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; padding: 13px 4px !important; font: 400 16px "Inter", sans-serif !important; color: #0b1a3d; border-radius: 0 !important; }
.ig-search input::placeholder { color: #7a86a3; }
.ig-search button { flex: none; border: 0; padding: 13px 24px; border-radius: 999px; font: 600 14px "Inter", sans-serif; cursor: pointer; transition: background .3s, transform .3s; display: inline-flex; align-items: center; gap: 8px; }
.ig-search .ig-go { background: #0057e5; color: #fff; }
.ig-search .ig-go:hover { background: #0048c0; transform: translateY(-1px); }
.ig-search .ig-near { background: #e4eeff; color: #0057e5; }
.ig-search .ig-near:hover { background: #d3e3ff; }
.ig-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 28px 0 0; }
.ig-stats li { color: rgba(255, 255, 255, .72); font-size: 14px; font-weight: 300; }
.ig-stats strong { font: 500 22px "Manrope", sans-serif; color: #fff; margin-right: 6px; }
.ig-stats i { color: #8fb8ff; margin-right: 6px; }
.ig-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 18px; font-size: 13.5px; }
.ig-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.ig-crumbs a:hover { color: #fff; text-decoration: underline; }
.ig-crumbs i { font-size: 10px; opacity: .55; color: #fff; }
.ig-hero-art::before { background-image: var(--ig-img, none); background-size: cover; background-position: center; opacity: .2; }

/* ── Barra de filtros ── */
.ig-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ig-chips { flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.ig-chips::-webkit-scrollbar { display: none; }
.ig-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid #dfe8fa; color: #34456b; font: 500 14px "Inter", sans-serif; cursor: pointer; transition: all .3s; }
.ig-chip span { padding: 1px 8px; border-radius: 999px; background: #eef4ff; color: #0057e5; font-size: 12px; font-weight: 600; }
.ig-chip:hover { border-color: #0057e5; color: #0057e5; }
.ig-chip.is-on { background: #0057e5; border-color: #0057e5; color: #fff; }
.ig-chip.is-on span { background: rgba(255, 255, 255, .22); color: #fff; }
.ig-ordem { flex: none; display: flex; align-items: center; gap: 8px; color: #5b6b8a; font-size: 13px; }
.ig-ordem select { padding: 9px 14px !important; border-radius: 999px !important; border: 1px solid #dfe8fa !important; background: #fff !important; font: 500 14px "Inter", sans-serif !important; color: #0b1a3d; }
.ig-vista { display: none; }

/* ── Lista + mapa ── */
.ig-layout { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); gap: 22px; align-items: start; }
.ig-lista { display: grid; gap: 14px; max-height: 760px; overflow-y: auto; padding: 2px 8px 2px 2px; scrollbar-width: thin; scrollbar-color: #b8cdf3 transparent; }
.ig-resumo { margin: 0 0 4px; color: #4f5d7d; font-size: 14.5px; }
.ig-resumo strong { color: #0b1a3d; }
.ig-estado { margin: 0; padding: 10px 14px; border-radius: 14px; background: #e9f1ff; color: #0048c0; font-size: 13.5px; }
.ig-estado[hidden] { display: none; }

.ig-card { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 14px; border-radius: 24px; background: #fff; border: 1px solid #dfe8fa; transition: transform .4s var(--tx-ease, ease), border-color .3s, box-shadow .3s; cursor: pointer; }
.ig-card:hover, .ig-card.is-on { border-color: #0057e5; box-shadow: 0 18px 44px rgba(0, 87, 229, .13); }
.ig-card.is-on { background: #f6f9ff; }
.ig-card[hidden] { display: none; }
.ig-thumb { position: relative; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 18px; background: linear-gradient(135deg, #0a3fb8, #2f7bff); color: rgba(255, 255, 255, .45); font-size: 34px; overflow: hidden; }
.ig-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ig-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ig-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ig-tipo { font: 600 10.5px "Inter", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #0057e5; }
.ig-dist { display: none; padding: 3px 10px; border-radius: 999px; background: #0057e5; color: #fff; font: 600 12px "Inter", sans-serif; white-space: nowrap; }
.ig-dist.is-on { display: inline-block; }
.ig-card h3 { margin: 0; font: 600 17px/1.3 "Manrope", sans-serif; letter-spacing: -.015em; }
.ig-card h3 a { color: #0b1a3d; text-decoration: none; }
.ig-card h3 a:hover { color: #0057e5; }
.ig-linha { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #5b6b8a; font-size: 13.5px; line-height: 1.45; }
.ig-linha i { flex: none; width: 14px; margin-top: 3px; color: #0057e5; text-align: center; font-size: 12px; }
.ig-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ig-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; font: 500 13px "Inter", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .3s, background .3s, color .3s, border-color .3s, box-shadow .3s; }
.ig-btn:hover { transform: translateY(-1px); }
.ig-btn-p { background: #0057e5; color: #fff; }
.ig-btn-p:hover { background: #0048c0; color: #fff; box-shadow: 0 10px 22px rgba(0, 87, 229, .28); }
.ig-btn-o { background: #fff; border-color: #cfe0ff; color: #0057e5; }
.ig-btn-o:hover { background: #0057e5; border-color: #0057e5; color: #fff; }
.ig-btn-w { background: #fff; color: #0057e5; }
.ig-btn-w:hover { background: #e8f0ff; color: #0048c0; }
.ig-btn-wa { background: #e7f6ee; border-color: #bfe5cf; color: #0a6b3b; }
.ig-btn-wa:hover { background: #0a8a4a; border-color: #0a8a4a; color: #fff; }
.ig-btn-g { background: transparent; border-color: rgba(255, 255, 255, .4); color: #fff; }
.ig-btn-g:hover { background: #fff; color: #0057e5; }
.ig-btn-lg { padding: 13px 24px; font-size: 14.5px; }

.ig-vazio { padding: 48px 24px; text-align: center; border-radius: 24px; background: #fff; border: 1px solid #dfe8fa; }
.ig-vazio[hidden] { display: none; }
.ig-vazio > i { font-size: 34px; color: #b8cdf3; margin-bottom: 12px; }
.ig-vazio h3 { margin: 0 0 6px; font: 600 20px "Manrope", sans-serif; }
.ig-vazio p { margin: 0 0 18px; color: #5b6b8a; }

.ig-mapa-caixa { position: sticky; top: 92px; height: 760px; border-radius: 28px; overflow: hidden; background: #e4eeff; border: 1px solid #dfe8fa; box-shadow: 0 24px 60px rgba(0, 60, 170, .1); }
#ig-map { width: 100%; height: 100%; z-index: 0; }
.ig-mapa-aviso { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; padding: 30px; color: #5b6b8a; background: #eef4ff; }
.ig-mapa-aviso[hidden] { display: none; }
.ig-mapa-aviso i { display: block; font-size: 34px; color: #8fb8ff; margin-bottom: 10px; }
.ig-mapa-ctrl { position: absolute; z-index: 500; top: 14px; right: 14px; display: grid; gap: 8px; }
.ig-mapa-ctrl button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: #fff; color: #0057e5; font: 600 13px "Inter", sans-serif; box-shadow: 0 8px 24px rgba(2, 10, 40, .2); cursor: pointer; transition: background .3s, color .3s; }
.ig-mapa-ctrl button:hover { background: #0057e5; color: #fff; }

/* marcadores */
.ig-pin { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #0057e5; border: 3px solid #fff; box-shadow: 0 8px 20px rgba(0, 40, 140, .4); transition: transform .25s, background .25s; }
.ig-pin i { transform: rotate(45deg); color: #fff; font-size: 14px; }
.ig-pin.is-on { background: #061746; transform: rotate(-45deg) scale(1.2); }
.ig-eu { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .25); }
.leaflet-popup-content-wrapper { border-radius: 20px; padding: 0; overflow: hidden; box-shadow: 0 20px 50px rgba(2, 10, 40, .3); }
.leaflet-popup-content { margin: 0; width: 280px !important; font-family: "Inter", sans-serif; }
.ig-pop { padding: 18px 20px 16px; }
.ig-pop strong { display: block; margin-bottom: 4px; font: 600 16px/1.3 "Manrope", sans-serif; color: #0b1a3d; }
.ig-pop p { margin: 0 0 6px; color: #5b6b8a; font-size: 13px; line-height: 1.5; }
.ig-pop .ig-acoes { margin-top: 12px; }

/* ── Página de uma igreja ── */
.ig-acoes-hero { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ig-tag { display: inline-flex; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; font: 500 11px "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.ig-det { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.ig-det > main, .ig-det > aside { min-width: 0; }
.ig-bloco { margin-bottom: 26px; padding: 34px 38px; border-radius: 28px; background: #fff; border: 1px solid #dfe8fa; }
.ig-bloco h2 { margin: 0 0 18px; font: 600 22px "Manrope", sans-serif; letter-spacing: -.02em; }
.ig-bloco h2 i { color: #0057e5; margin-right: 10px; }
.ig-bloco p { margin: 0 0 1em; color: #34456b; line-height: 1.8; font-size: 16.5px; }
.ig-bloco p:last-child { margin-bottom: 0; }
.ig-horarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.ig-hor { display: grid; gap: 6px; padding: 20px 22px; border-radius: 22px; background: #f4f8ff; border: 1px solid #e3ecfb; }
.ig-hor > i { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 14px; background: linear-gradient(135deg, #0a3fb8, #2f7bff); color: #fff; font-size: 16px; }
.ig-hor span { font: 600 11px "Inter", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #5b6b8a; }
.ig-hor strong { font: 600 18px/1.3 "Manrope", sans-serif; color: #0b1a3d; }
.ig-mapa-det { height: 380px; border-radius: 22px; overflow: hidden; background: #e4eeff; margin-bottom: 18px; }
#ig-map-det { width: 100%; height: 100%; }
.ig-endereco { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; color: #34456b; line-height: 1.6; }
.ig-endereco > i { color: #0057e5; margin-top: 4px; }
.ig-contactos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ig-contactos a, .ig-contactos li > span { display: flex; align-items: center; gap: 14px; padding: 12px 10px; margin: 0 -10px; border-radius: 16px; color: #0b1a3d; text-decoration: none; font-size: 15px; transition: background .3s; }
.ig-contactos a:hover { background: #f1f6ff; }
.ig-contactos i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #e4eeff; color: #0057e5; font-size: 15px; }
.ig-contactos small { display: block; color: #7a86a3; font-size: 12px; }
.ig-side-cta { padding: 28px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #061746, #0057e5); margin-bottom: 20px; }
.ig-side-cta > i { font-size: 26px; color: #8fb8ff; margin-bottom: 12px; display: block; }
.ig-side-cta h3 { margin: 0 0 8px; font: 600 19px "Manrope", sans-serif; color: #fff; }
.ig-side-cta p { margin: 0 0 18px; color: rgba(255, 255, 255, .78); font-weight: 300; line-height: 1.65; font-size: 14.5px; }
.ig-side-card { padding: 26px; border-radius: 28px; background: #fff; border: 1px solid #dfe8fa; margin-bottom: 20px; }
.ig-side-card h3 { margin: 0 0 14px; font: 600 18px "Manrope", sans-serif; }
.ig-prox { display: grid; gap: 4px; }
.ig-prox a { display: grid; gap: 2px; padding: 10px 12px; margin: 0 -12px; border-radius: 14px; text-decoration: none; transition: background .3s; }
.ig-prox a:hover { background: #f1f6ff; }
.ig-prox strong { font: 600 15px/1.3 "Manrope", sans-serif; color: #0b1a3d; }
.ig-prox small { color: #7a86a3; font-size: 12.5px; }
.ig-side-sticky { position: sticky; top: 100px; }

/* ── Telemóvel e tablet ── */
@media (max-width: 1100px) {
  .ig-layout { grid-template-columns: minmax(0, 1fr); }
  .ig-vista { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid #dfe8fa; }
  .ig-vista button { border: 0; padding: 9px 18px; border-radius: 999px; background: transparent; color: #34456b; font: 500 14px "Inter", sans-serif; cursor: pointer; }
  .ig-vista button.is-on { background: #0057e5; color: #fff; }
  .ig-mapa-caixa { position: relative; top: 0; height: 68vh; min-height: 420px; display: none; }
  .ig-lista { max-height: none; overflow: visible; padding: 0; }
  body.ig-ver-mapa .ig-mapa-caixa { display: block; }
  body.ig-ver-mapa .ig-lista { display: none; }
  .ig-det { grid-template-columns: minmax(0, 1fr); }
  .ig-side-sticky { position: static; }
}
@media (max-width: 640px) {
  .ig-section { padding: 24px 0 72px; }
  .ig-hero .ig-search { flex-wrap: wrap; border-radius: 28px; padding: 12px; }
  .ig-search > i { display: none; }
  .ig-search input[type="search"] { flex-basis: 100%; padding-left: 10px !important; }
  .ig-search button { flex: 1; justify-content: center; }
  .ig-bar { flex-wrap: wrap; }
  .ig-ordem { width: 100%; justify-content: space-between; }
  .ig-card { grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; }
  .ig-thumb { width: 84px; height: 84px; font-size: 26px; }
  .ig-bloco { padding: 24px 20px; }
  .ig-mapa-det { height: 300px; }
}
