/* ==========================================================================
   Fotos — perfil estilo Instagram (prefixo .ft-)
   ========================================================================== */

.ft { max-width: 960px; margin: 0 auto; }

/* ---------- Perfil ---------- */
.ft-perfil {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 6vw, 72px);
  align-items: center; padding: 0 clamp(0px, 3vw, 32px) clamp(24px, 4vw, 40px);
}
.ft-avatar-anel {
  --ft-av: clamp(86px, 20vw, 160px);
  width: var(--ft-av); height: var(--ft-av); border-radius: 50%; padding: 4px;
  background: conic-gradient(from 210deg, var(--accent), var(--link), color-mix(in srgb, var(--accent) 55%, var(--accent-soft)), var(--accent));
}
.ft-avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg); background: var(--bg-alt);
}
.ft-avatar-inicial {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--link));
  color: var(--accent-text); font-family: var(--font-display); font-weight: 700;
  font-size: calc(var(--ft-av) * .45); line-height: 1;
}
.ft-perfil-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; }
.ft-nome { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0; }
.ft-botao-insta { padding: 8px 16px; font-size: .9rem; }
.ft-numeros { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; color: var(--muted); }
.ft-numeros strong { color: var(--text); font-weight: 700; }
.ft-bio p { margin: 0 0 .35em; max-width: 520px; }
.ft-cargo { font-weight: 600; }

@media (max-width: 600px) {
  .ft-perfil { grid-template-columns: auto 1fr; gap: 16px 20px; align-items: start; padding: 0 0 20px; }
  .ft-perfil-topo { margin-bottom: 10px; }
  .ft-numeros { gap: 4px 16px; font-size: .9rem; margin-bottom: 0; }
  .ft-bio { grid-column: 1 / -1; font-size: .95rem; }
  .ft-botao-insta span { display: none; }
  .ft-botao-insta { padding: 8px; width: 36px; height: 36px; }
}

/* ---------- Chips de hashtag ---------- */
.ft-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ft-chip {
  flex: none; text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); padding: 6px 14px; border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.ft-chip span { opacity: .6; font-size: .8em; margin-left: 2px; }
.ft-chip:hover { color: var(--text); border-color: var(--muted); }
.ft-chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Abas ---------- */
.ft-abas {
  display: flex; justify-content: center; gap: clamp(24px, 8vw, 64px);
  border-top: 1px solid var(--border); margin-bottom: 4px;
}
.ft-abas button {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: none; border: 0; border-top: 2px solid transparent; margin-top: -1px;
  padding: 14px 4px; color: var(--muted); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.ft-abas button:hover { color: var(--text); }
.ft-abas button[aria-selected="true"] { color: var(--text); border-top-color: var(--text); }

.ft-filtro-info { text-align: center; color: var(--muted); margin: 4px 0 14px; font-size: .95rem; }
.ft-painel[hidden] { display: none; }

/* ---------- Grade (sempre 3 colunas) ---------- */
.ft-grade {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(3px, .8vw, 6px);
}
.ft-celula {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  background: var(--bg-alt); border-radius: 3px;
}
.ft-celula img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease;
}
.ft-celula:hover img, .ft-celula:focus-visible img { transform: scale(1.04); }
.ft-celula:focus-visible { outline-offset: -3px; }
.ft-sobre {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: 12px; color: #fff; font-size: .85rem; line-height: 1.3;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, 0));
  opacity: 0; transition: opacity .2s;
}
.ft-sobre-local { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ft-sobre-local::before { content: "📍 "; }
.ft-sobre-data { opacity: .85; font-size: .8rem; }
.ft-celula:hover .ft-sobre, .ft-celula:focus-visible .ft-sobre { opacity: 1; }
@media (hover: none) { .ft-sobre { display: none; } }
.ft-icone-vertical {
  position: absolute; top: 8px; right: 8px; width: 14px; height: 18px;
  border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 4px rgba(0, 0, 0, .4); opacity: .9;
}
.ft-celula.ft-nova { animation: ft-surgir .45s ease both; }
@keyframes ft-surgir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ft-mais { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0 8px; }
.ft-mais[hidden] { display: none; }
.ft-carregando {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent);
  animation: ft-girar .8s linear infinite; display: none;
}
.ft-mais.carregando .ft-carregando { display: block; }
.ft-mais.carregando .botao { display: none; }
@keyframes ft-girar { to { transform: rotate(360deg); } }
.ft-fim { text-align: center; color: var(--muted); font-size: .9rem; padding: 28px 0 0; margin: 0; }
.ft-fim[hidden] { display: none; }
.ft-vazio svg { color: var(--accent); margin: 0 auto 8px; }
.ft-vazio h2 { color: var(--text); }

/* ---------- Mapa ---------- */
.ft-mapa { height: clamp(380px, 65vh, 620px); margin-top: 12px; }
.ft-mapa-nota { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 10px; }
.ft-marcador {
  width: 46px; height: 46px; border-radius: 10px; overflow: hidden;
  border: 3px solid var(--surface); box-shadow: var(--shadow-lg); background: var(--bg-alt);
}
.ft-marcador img { width: 100%; height: 100%; object-fit: cover; }
.ft-cluster {
  width: 54px; height: 54px; border-radius: 12px; position: relative;
  border: 3px solid var(--surface); box-shadow: var(--shadow-lg); background: var(--bg-alt) center / cover;
}
.ft-cluster span {
  position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-text);
  font: 700 .75rem/24px var(--font-body); text-align: center; box-shadow: var(--shadow);
}
.ft-popup { width: 180px; }
.ft-popup img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.ft-popup strong { display: block; line-height: 1.3; }
.ft-popup small { color: var(--muted); }
.ft-popup button {
  margin-top: 8px; width: 100%; padding: 6px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: .85rem;
}
.ft-popup .ft-popup-gmaps {
  display: block; margin-top: 6px; text-align: center; font-size: .8rem; font-weight: 600;
  color: var(--link); text-decoration: none;
}
.ft-popup .ft-popup-gmaps:hover { text-decoration: underline; }
.secao-fotos .leaflet-popup-content-wrapper, .secao-fotos .leaflet-popup-tip { background: var(--surface); color: var(--text); }

/* ---------- Modal de post ---------- */
.ft-modal {
  position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 4vw, 48px) clamp(56px, 7vw, 96px);
  background: rgba(8, 7, 5, .82);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.ft-modal.aberto { opacity: 1; visibility: visible; }
.ft-post {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 380px);
  width: min(1120px, 100%); height: min(88vh, 780px);
  background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-lg);
  transform: scale(.97); transition: transform .2s;
}
.ft-modal.aberto .ft-post { transform: none; }
.ft-post-midia {
  position: relative; background: #000; display: flex; align-items: center; justify-content: center;
  min-height: 0; user-select: none;
}
.ft-post-midia img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .2s; }
.ft-post-midia img.carregando { opacity: .35; }
.ft-coracao-grande {
  position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px;
  color: #fff; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .45)); opacity: 0; pointer-events: none;
}
.ft-coracao-grande.anima { animation: ft-coracao-pop .9s ease both; }
@keyframes ft-coracao-pop {
  0% { opacity: 0; transform: scale(.3); }
  15% { opacity: .95; transform: scale(1.15); }
  30% { transform: scale(.95); }
  45%, 70% { opacity: .95; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1) translateY(-20px); }
}
.ft-post-lado { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); }
.ft-post-topo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ft-mini-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover;
  display: grid; place-items: center; font: 700 1rem var(--font-display);
  background: linear-gradient(135deg, var(--accent), var(--link)); color: var(--accent-text);
}
.ft-post-topo div { min-width: 0; line-height: 1.3; }
.ft-post-topo strong { display: block; font-size: .95rem; }
.ft-post-topo small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-post-gmaps {
  display: inline-block; margin-top: 2px; font-size: .78rem; font-weight: 600;
  color: var(--link); text-decoration: none; white-space: nowrap;
}
.ft-post-gmaps:hover { text-decoration: underline; }
.ft-post-gmaps[hidden] { display: none; }
.ft-post-legenda { flex: 1; overflow-y: auto; padding: 16px; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.ft-post-legenda p { margin: 0; }
.ft-post-legenda .ft-autor { font-weight: 700; margin-right: 6px; }
.ft-hashtag { color: var(--link); text-decoration: none; font-weight: 500; }
.ft-hashtag:hover { text-decoration: underline; }
.ft-post-base { border-top: 1px solid var(--border); padding: 10px 16px 14px; }
.ft-acoes { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.ft-acao {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: none; border: 0; color: var(--text); cursor: pointer;
}
.ft-acao:hover { background: var(--bg-alt); }
.ft-acao svg { width: 26px; height: 26px; }
.ft-curtir .ft-cheio { display: none; }
.ft-curtir[aria-pressed="true"] { color: var(--accent); }
.ft-curtir[aria-pressed="true"] .ft-cheio { display: block; }
.ft-curtir[aria-pressed="true"] .ft-vazio-ic { display: none; }
.ft-curtir.pulsa svg { animation: ft-pulsa .45s ease; }
@keyframes ft-pulsa { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.ft-acoes .ft-contador { margin-left: auto; color: var(--muted); font-size: .82rem; }
.ft-post-data { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 0; }
.ft-curtiu-msg { font-size: .88rem; font-weight: 600; margin: 2px 0 0; min-height: 1.3em; }

.ft-modal-fechar, .ft-modal-nav {
  position: absolute; z-index: 2; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .14); display: grid; place-items: center; border-radius: 50%;
  width: 44px; height: 44px; transition: background .15s;
}
.ft-modal-fechar:hover, .ft-modal-nav:hover { background: rgba(255, 255, 255, .28); }
.ft-modal-fechar { top: 14px; right: 14px; }
.ft-modal-nav { top: 50%; transform: translateY(-50%); }
.ft-modal-ant { left: 12px; }
.ft-modal-prox { right: 12px; }
.ft-modal-nav[hidden] { display: none; }
.ft-modal svg { pointer-events: none; }

@media (max-width: 760px) {
  .ft-modal { padding: 0; align-items: stretch; }
  .ft-post {
    grid-template-columns: 1fr; height: 100%; max-height: none;
    width: 100%; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; transform: none;
  }
  .ft-post-lado { order: -1; display: contents; }
  .ft-post-topo { order: 0; padding: 12px 64px 12px 14px; }
  .ft-post-midia { order: 1; height: auto; max-height: 70vh; }
  .ft-post-midia img { max-height: 70vh; }
  .ft-post-base { order: 2; border-top: 0; padding-bottom: 4px; }
  .ft-post-legenda { order: 3; overflow: visible; padding-top: 4px; padding-bottom: 32px; }
  .ft-modal-fechar { top: 8px; right: 10px; color: var(--text); background: var(--bg-alt); width: 40px; height: 40px; }
  .ft-modal-nav { top: calc(62px + min(50vw, 35vh)); background: rgba(0, 0, 0, .45); width: 38px; height: 38px; }
  .ft-modal-ant { left: 10px; }
  .ft-modal-prox { right: 10px; }
}
.ft-acao[hidden], .ft-post-topo small[hidden] { display: none; }
