/* =============================================
   PESSOA.CSS — Entre Tempos · Desenhos de UMA pessoa
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&family=Bebas+Neue&family=Special+Elite&family=Dancing+Script:wght@400;600&family=IM+Fell+English:ital@0;1&display=swap');

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

body {
  background: #f2e8d5;
  font-family: 'Special Elite', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/aged-paper.webp');
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ── */
header {
  position: relative;
  z-index: 10;
  padding: 18px 30px;
  border-bottom: 2px solid #c4a96b;
}

header a {
  text-decoration: none;
  color: #3e4a59;
  font-weight: bold;
  font-family: 'Special Elite', serif;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.2s;
}

header a:hover {
  color: #c0392b;
}

/* ── CABEÇALHO DA PESSOA ── */
.pessoa-section {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 50px;
  max-width: 900px;
  margin: 40px auto 30px;
  padding: 0 40px;
}

.foto-pessoa {
  width: clamp(170px, 22vw, 240px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(4px 6px 14px rgba(0, 0, 0, 0.35)) sepia(15%);
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.foto-pessoa:hover {
  transform: rotate(0deg) scale(1.02);
}

.pessoa-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.pessoa-nome {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  color: #1a1a1a;
  letter-spacing: 4px;
  line-height: 1;
  border-left: 5px solid #c0392b;
  padding-left: 16px;
}

.pessoa-cargo {
  font-family: 'Special Elite', serif;
  font-size: 13px;
  color: #8c3b3b;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding-left: 21px;
  font-style: italic;
}

.pessoa-bio {
  font-family: 'IM Fell English', serif;
  font-size: clamp(14px, 1.5vw, 17px);
  color: #3e3228;
  line-height: 1.8;
  text-align: justify;
  margin-top: 4px;
  padding-left: 21px;
  max-width: 560px;
}

.contador-desenhos {
  font-family: 'Special Elite', serif;
  font-size: 12px;
  color: #7a6a50;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-left: 21px;
  margin-top: 4px;
}

/* ── DIVISOR ── */
.divisor {
  position: relative;
  z-index: 5;
  width: 80%;
  margin: 10px auto 60px;
  height: 2px;
  background: linear-gradient(to right, transparent, #c0392b, #c4a96b, #c0392b, transparent);
}

/* ══════════════════════════════════════════
   GALERIA DE DESENHOS — alternados, grandes
   ══════════════════════════════════════════ */

.galeria {
  position: relative;
  z-index: 5;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 120px;

  /* dois por linha, meio bagunçados */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 18px;
}

/* ── CARD DE DESENHO ── */
.card-desenho {
  position: relative;
  cursor: pointer;

  /* papel envelhecido */
  background-color: #ede4cc;
  background-image:
    url('https://www.transparenttextures.com/patterns/paper-fibers.webp'),
    url('https://www.transparenttextures.com/patterns/beige-paper.webp');

  padding: 18px 18px 14px;

  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.24),
    inset 0 0 50px rgba(120, 80, 10, 0.12);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* alternância vertical — itens pares sobem, ímpares descem */
.card-desenho:nth-child(odd) {
  margin-top: 0px;
  transform: rotate(-1.2deg);
}

.card-desenho:nth-child(even) {
  margin-top: 40px;
  transform: rotate(1.4deg);
}

.card-desenho:nth-child(3) {
  transform: rotate(-0.6deg);
}

.card-desenho:nth-child(4) {
  transform: rotate(2.0deg);
  margin-top: 50px;
}

.card-desenho:nth-child(5) {
  transform: rotate(-1.8deg);
  margin-top: -10px;
}

.card-desenho:nth-child(6) {
  transform: rotate(0.8deg);
  margin-top: 35px;
}

.card-desenho:hover {
  transform: rotate(0deg) scale(1.03) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
  z-index: 10;
}

/* ── IMAGEM DENTRO DO CARD ── */
.card-desenho .quadro {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #fff;
  border: 8px solid #fff;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-desenho .quadro img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-desenho:hover .quadro img {
  transform: scale(1.04);
}

/* Placeholder vazio */
.card-desenho .quadro.vazio {
  background: #e8dcc0;
  border-color: #c4a96b;
  border-style: dashed;
}

.card-desenho .quadro.vazio span {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 13px;
  color: #8c7c5e;
  text-align: center;
  padding: 0 12px;
}

/* ── LEGENDA ABAIXO DO QUADRO ── */
.card-desenho .card-titulo {
  font-family: 'Dancing Script', cursive;
  font-weight: 600;
  font-size: clamp(14px, 2vw, 18px);
  color: #1a0e04;
  margin-top: 10px;
  text-align: center;
}

.card-desenho .card-num {
  font-family: 'Caveat', cursive;
  font-size: 11px;
  color: #9a7c5a;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-top: 2px;
}

/* dobra de canto */
.card-desenho::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent #f2e8d5 transparent transparent;
}

/* ── RODAPÉ ── */
.rodape-desenhos {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 20px;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  color: #b0a090;
  letter-spacing: 2px;
  border-top: 1px solid #c4a96b;
}

.carimbo {
  display: inline-block;
  border: 3px solid #c0392b;
  color: #c0392b;
  padding: 4px 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  transform: rotate(-3deg);
  opacity: 0.6;
  margin-top: 10px;
}

/* ══════════════════════════════════════════
   LIGHTBOX — clicou no card, abre em tela cheia
   ══════════════════════════════════════════ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 7, 3, 0.88);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox.ativo {
  display: flex;
  animation: lbFadeIn 0.25s ease;
}

@keyframes lbFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
  animation: lbZoomIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lbZoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.lightbox-fechar {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-fechar:hover {
  opacity: 1;
}

.lightbox-legenda {
  margin-top: 12px;
  text-align: center;
  font-family: 'Dancing Script', cursive;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
}

/* ══════════════════════════════════════════
   BOTÃO DE CURTIDA — .btn-like
   ══════════════════════════════════════════ */

.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid #c4a96b;
  border-radius: 20px;
  padding: 3px 10px 3px 8px;
  cursor: pointer;
  font-family: 'Special Elite', serif;
  font-size: 13px;
  color: #7a6a50;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  margin-top: 6px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.btn-like:hover {
  color: #c0392b;
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.06);
}

.btn-like.liked {
  color: #c0392b;
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
}

.like-icon {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.btn-like.liked .like-icon {
  color: #c0392b;
}

.like-count {
  font-size: 12px;
  min-width: 12px;
  text-align: center;
}

/* Animação de bounce ao curtir */
@keyframes likeBump {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.35);
  }

  60% {
    transform: scale(0.9);
  }

  80% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.btn-like.like-bump .like-icon {
  animation: likeBump 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .pessoa-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    text-align: center;
  }

  .foto-pessoa {
    width: clamp(150px, 52vw, 200px);
  }

  .pessoa-nome {
    border-left: none;
    padding-left: 0;
  }

  .pessoa-cargo,
  .pessoa-bio,
  .contador-desenhos {
    padding-left: 0;
  }

  .pessoa-bio {
    text-align: left;
    max-width: 100%;
  }

  .galeria {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
    padding: 0 10px 80px;
  }

  /* no mobile mantém alternância mas mais sutil */
  .card-desenho:nth-child(odd) {
    margin-top: 0;
    transform: rotate(-1deg);
  }

  .card-desenho:nth-child(even) {
    margin-top: 28px;
    transform: rotate(1.2deg);
  }

  .card-desenho:nth-child(3) {
    transform: rotate(-0.5deg);
    margin-top: 0;
  }

  .card-desenho:nth-child(4) {
    transform: rotate(1.5deg);
    margin-top: 32px;
  }

  .card-desenho:nth-child(5) {
    transform: rotate(-1.2deg);
    margin-top: 0;
  }

  .card-desenho:nth-child(6) {
    transform: rotate(0.6deg);
    margin-top: 24px;
  }

  .card-desenho .card-titulo {
    font-size: 13px;
  }
}