@import url("https://fonts.googleapis.com/css2?family=Kalam:wght@400&display=swap");
:root {
  --adjust-size: 0px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  scroll-behavior: smooth;
}
body {
  position: relative;
  color: #222;
  font-family: "Kalam", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  /*background-image: url("https://images.unsplash.com/photo-1629968417841-d87296c4205b?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTMzMjQ1Nzh8&ixlib=rb-4.0.3&q=100&w=3000");
	*/
  background-size: cover;
}
main {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}
p {
  line-height: 1;
}

.btn-wrapper {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 160px;
  margin-bottom: 40px;
  z-index: 1;
}
.btnupload {
  align-items: center;
  text-decoration: none;
  color: #000000;
  background-color: #bafd02;
  padding: 15px;
  margin-bottom: 10px;
  width: 300px;
  height: 50px;
  align-items: auto;
  border-radius: 20px;
  text-transform: uppercase;
}

a {
  color: crimson;
  text-decoration: none;
}
.polaroid {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
  height: 200px;

}







.consentimento-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-top: 25px;
  padding: 16px;

  background: rgba(0,0,0,0.55);
  border-radius: 12px;

  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;

  position: relative;
  z-index: 10;
}

/* FORÇAR CHECKBOX NATIVA */
.consentimento-box input[type="checkbox"] {
  all: unset;                 /* 🔥 REMOVE TODO CSS HERDADO */
  appearance: checkbox;
  -webkit-appearance: checkbox;

  width: 18px;
  height: 18px;
  margin-top: 3px;

  cursor: pointer;
  accent-color: #bafd02;
}

/* Label clicável */
.consentimento-box label {
  cursor: pointer;
}

#gallery {
  margin-top: 250px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 👈 mais largas */
  gap: 36px;                     /* 👈 mais espaço entre polaroids */
  padding: 30px;
}

/*
#gallery {
  margin-top: 250px;
  position: relative;
  left: calc(-1 * var(--adjust-size));
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  max-width: 100vw;
  padding: 20px;
  -webkit-perspective: 0;
  perspective: 0;
}

*/

#gallery figure:nth-child(7n) {
  --duration: 1s;
  --pin-color: crimson;
}
#gallery figure:nth-child(7n + 1) {
  --duration: 1.8s;
  --pin-color: hotpink;
}
#gallery figure:nth-child(7n + 2) {
  --duration: 1.3s;
  --pin-color: magenta;
}
#gallery figure:nth-child(7n + 3) {
  --duration: 1.5s;
  --pin-color: orangered;
}
#gallery figure:nth-child(7n + 4) {
  --duration: 1.1s;
  --pin-color: darkorchid;
}
#gallery figure:nth-child(7n + 5) {
  --duration: 1.6s;
  --pin-color: deeppink;
}
#gallery figure:nth-child(7n + 6) {
  --duration: 1.2s;
  --pin-color: mediumvioletred;
}
#gallery figure:nth-child(3n) {
  --angle: 3deg;
}
#gallery figure:nth-child(3n + 1) {
  --angle: -3.3deg;
}
#gallery figure:nth-child(3n + 2) {
  --angle: 2.4deg;
}
#gallery figure:nth-child(odd) {
  --direction: alternate;
}
#gallery figure:nth-child(even) {
  --direction: alternate-reverse;
}
#gallery figure {
  --angle: 3deg;
  --count: 5;
  --duration: 1s;
  --delay: calc(-0.5 * var(--duration));
  --direction: alternate;
  --pin-color: red;

  position: relative;
  display: inline-block;
  margin: var(--adjust-size);
  padding: 0.5rem;
  border-radius: 5px;
  box-shadow: 0 7px 8px rgba(0, 0, 0, 0.4);
  width: 100%;
  height: auto;
  text-align: center;
  background-color: ghostwhite;
  background-image: url("https://images.unsplash.com/photo-1629968417850-3505f5180761?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTMzMjQ3ODJ8&ixlib=rb-4.0.3&q=80&w=500");
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;

  transform-origin: center 0.22rem;
  will-change: transform;
  break-inside: avoid;
  overflow: hidden;
  outline: 1px solid transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#gallery.active figure {
  animation-duration: var(--duration), 1.5s;
  animation-delay: var(--delay),
    calc(var(--delay) + var(--duration) * var(--count));
  animation-timing-function: ease-in-out;
  animation-iteration-count: var(--count), 1;
  animation-direction: var(--direction), normal;
  animation-fill-mode: both;
  animation-name: swing, swingEnd;
}

#gallery figure {
  position: relative;
  display: flex;
  flex-direction: column;

  padding: 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);

  transform-origin: center 0.22rem;
  break-inside: avoid;
}


.photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;      /* 👈 quadrado clássico de polaroid */
  background: #f3f3f3;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

/*
#gallery figure {
  position: relative;
  display: flex;
  flex-direction: column;

  width: 100%;
  padding: 14px 14px 10px;   👈 branco reduzido em baixo 

  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);

  transform-origin: center 0.22rem;
  break-inside: avoid;
  overflow: hidden;
}*/


/*
#gallery figure {
  --angle: 3deg;
  --count: 5;
  --duration: 1s;
  --delay: calc(-0.5 * var(--duration));
  --direction: alternate;
  --pin-color: red;

  position: relative;
  display: flex;
  flex-direction: column;

  width: 220px;          👈 largura fixa 
  height: 300px;          👈 altura fixa

  padding: 14px 14px 16px 14px;  👈 moldura branca (mais larga em baixo) 
  border-radius: 6px;

  background-color: #fff;
  box-shadow: 0 7px 8px rgba(0, 0, 0, 0.4);

  transform-origin: center 0.22rem;
  will-change: transform;
  break-inside: avoid;
  overflow: hidden;

  backface-visibility: hidden;
}
*/
#gallery figure:after {
  position: absolute;
  top: 0.22rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  content: "";
  background: var(--pin-color);
  border-radius: 50%;
  box-shadow: -0.1rem -0.1rem 0.3rem 0.02rem rgba(0, 0, 0, 0.5) inset;
  filter: drop-shadow(0.3rem 0.15rem 0.2rem rgba(0, 0, 0, 0.5));
  transform: translateZ(0);
  z-index: 2;
}

figure img.polaroid {
  aspect-ratio: 1 /1;
  
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 5px;
  margin-bottom: 10px;
  z-index: 1;
}



/*figure figcaption {
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 1;
}*/


figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
  color: #444;
  line-height: 1.2;
}




figure h2 {
  color: crimson;
  font-size: 22px;
}
figure p {
  font-size: 17px;
}
figure small {
  font-size: 12px;
}
figure > div {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
@keyframes swing {
  0% {
    transform: rotate3d(0, 0, 1, calc(-1 * var(--angle)));
  }
  100% {
    transform: rotate3d(0, 0, 1, var(--angle));
  }
}
@keyframes swingEnd {
  to {
    transform: rotate3d(0, 0, 1, 0deg);
  }
}
#info {
  position: relative;
  text-align: center;
  z-index: 1;
}
#info a {
  font-size: 1.1rem;
}

@media (min-width: 800px) {
  #gallery {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}


@media (max-width: 600px) {
  #gallery figure {
    width: 180px;
    height: 260px;
  }
}
