*,
*:before,
*:after {
  box-sizing: border-box;
  font-family: 'PT Sans', sans-serif !important;
}

html {
  scroll-behavior: smooth;
}

html {
  display: block;
}

body {
  position: relative;
  margin: 0;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

header .buttons {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 9999999999999;
  background: white;
  margin-bottom: 0;
  box-shadow: 0px -20px 30px -26px rgba(0, 0, 0, 0.22);
}

header .logo-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  margin-right: 1.5rem;
}

header .logo-wrapper img {
  max-height: 80px;
  height: 80%;
}

header .logo-campagna-wrapper {
  width: 100%;
}

header .logo-campagna-wrapper img {
  width: 100%;
  object-fit: contain;
}



header .titles {
  display: flex;
  justify-content: end;
  width: 60%;
}

header .titles h1 {
  font-size: 1rem;
  line-height: 1rem;
}

header .logos {
  width: 40%;
}

header .logos,
header .titles {
  align-items: center;
}

header .logos {
  justify-content: space-between;
}

header .arrow {
  width: 25px;
  margin-right: .5rem;
}

header h1 {
  width: fit-content;
  font-size: 2rem;
  font-family: 'PT Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: end;
  display: inline-block;
}

header .secondary-button {
  display: none;
  align-items: center;
  justify-content: center;
  padding: .5rem 1.5rem;
  font-size: 1rem;
  line-height: normal;
  height: fit-content;
  margin-block: auto;
  text-decoration: none;
  font-weight: 600;
  transition: all .25s ease-out;
  background: #e4e4e4;
  color: black;
  max-width: 220px;
  height: 33px;
}

.secondary-button:hover {
  background: #808080;
  color: white;
}

#donate-button-container,
.secondary-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-block: auto;
  width: 100%;
}

#donate-button-container {
  margin-block: 1rem;
  padding-inline: 1rem;
}

#donate-button-container img.rounded-logo {
  width: 80px;
  height: 80px;
  position: absolute;
  left: 1rem;
  top: -25px;
}

#donate-button {
  display: flex;
  align-items: center;
  justify-content: center;
}

#donate-button img {
  width: 220px;
}

body {
  padding-bottom: 65px;
}

.d-none {
  display: none;
}

.d-block {
  display: block;
}

.polaroid-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-block: 3rem;
  transition: all .5s ease-out;
}

.polaroid-wrapper img.polaroid {
  position: relative;
  height: 350px;
  max-width: 100%;
  object-fit: cover;
  transition: all .25s ease-out;
  background: #f3f3f3;
  /* border: 1px solid #dedede; */
  position: relative;
  padding: 10px 10px;
  padding-bottom: 4rem;
  box-sizing: border-box;
  border-radius: 2px;
  z-index: 2;
  width: 100%;
  margin-bottom: 2rem;
  /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); */
}

/* .polaroid-wrapper .polaroid:hover {
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
} */

.ms-auto {
  margin-left: auto;
}

.current-donations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  background-image: url('img/mattoncino.png');
  background-repeat: repeat;
  background-position: top left;
  background-size: calc(100vw / 64);
  padding: 1rem;
}

.current-donations .background {
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: 1px;
  box-shadow: 0px 7px 15px 0px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.current-donations h2 {
  margin: 0;
  color: #424242;
}

.current-donations .num {
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-red {
  color: #e7002a !important;
}

.text-body-flex {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.text-body-flex p {
  margin-bottom: 3rem;
}

.text-body-flex .gallery-link {
  display: flex;
  flex-direction: column;
  height: 300px;
  justify-content: space-between;
  text-decoration: none !important;
  padding-left: 2rem;
  padding-top: 5rem;
  padding-bottom: 3rem;
  padding-right: 4rem;
  background: #1cdeb370;
  position: relative;
}

.text-body-flex .gallery-link::after {
  content: "";
  position: absolute;
  top: 10px;
  left: -22px;
  z-index: 10;
  height: 60px;
  width: 60px;
  background: url(./img/arrow.svg);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.text-body-flex .gallery-link .title {
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 600;
  color: black;
}

.text-body-flex .gallery-link .link {
  text-decoration: underline !important;
}

@media screen and (min-width: 630px) {

  header .logos,
  header .titles {
    width: 50%;
  }

  header .logos .logo-campagna-wrapper {
    width: 220px;
  }

  header .titles {
    justify-content: flex-end;
  }

  header .titles h1 {
    font-size: 1.5rem;
    line-height: 1.5rem;
  }

  header .logos {
    justify-content: flex-start;
  }

  header .titles {
    display: flex !important;
  }

  header #donate-button-container {
    width: 50%;
  }

  header .secondary-button-wrapper {
    width: 50%;
  }

  header .secondary-button {
    margin: 0;
    font-size: 1.2rem;
    padding: .3rem 1rem;
  }

  header .arrow {
    margin-right: 1rem;
  }
}

@media screen and (min-width: 992px) {
	
  .text-body-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
  }

  .text-body-flex p {
    margin-bottom: unset;
    margin-right: 3rem;
  }

  body {
    padding-bottom: 0;
  }

  header .buttons {
    flex-direction: row;
    margin-bottom: 1rem;
    position: static;
    box-shadow: none;
  }

  .d-lg-block {
    display: block;
  }

  .d-lg-none {
    display: none;
  }

  header .logos,
  header .titles {
    width: 33%;
  }

  header .buttons {
    width: 100%;
  }

  header .buttons {
    justify-content: flex-end;
  }

  header #donate-button-container,
  header .secondary-button-wrapper {
    width: fit-content;
  }

  header #donate-button-container {
    width: fit-content;
    margin-right: 1rem;
  }

  #donate-button-container img.rounded-logo {
    display: none;
  }

  header .secondary-button {
    display: flex;
  }
}

@media screen and (min-width: 800px) {
  .polaroid-wrapper {
    flex-direction: row;
  }

  .polaroid-wrapper img.polaroid {
    max-width: 34%;
    width: auto;
    margin-bottom: 0;
    /* box-shadow: 0px 0px 1px 0 rgba(0, 0, 0, 0.2); */
  }

  header .logos {
    display: flex;
  }

  header .logo-wrapper {
    display: flex;
  }
}

@media screen and (min-width: 1200px) {

  header .logos {
    width: 33%;
  }

  header .titles {
    width: 30%;
    justify-content: center !important;
  }

  header .buttons {
    width: 36%;
    margin-bottom: 0;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 9999999999999999;
    background: white;
    box-shadow: 0px 18px 28px -30px rgba(0, 0, 0, 0.27);
  }
}

.lego-matrix {
  width: 100%;
  overflow: hidden;
  grid-template-columns: repeat(64, calc(100vw / 64));
  grid-template-rows: repeat(27, calc(100vw / 64));

  background-color: #808080;
  position: relative;
}

.lego-matrix .overlay {
  position: absolute;
  pointer-events: none;
  width: 100%;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 3;
  transition: background .5s ease-in-out;
}

.lego-matrix .overlay.active {
  background: #00000080;
}

#lego-matrix {
  display: grid;
}

.brick.light-grey {
  background-color: #e4e4e4;
  color: #e4e4e4;
}

.brick.dark-grey {
  background-color: #808080;
  color: #808080;
  transition: all .3s linear;
}

.brick.red {
  background-color: #ea1c30;
  color: #ea1c30;
  animation-duration: .5s;
  opacity: 0;
}

.brick {
  width: calc(100vw / 64);
  height: calc(100vw / 64);
  background-color: #e4e4e4;
  color: #e4e4e4;
  box-shadow: inset 0 0 calc(calc(100vw / 64) * 5 / 30) rgba(0, 0, 0, 0.2);
  background-image: radial-gradient(currentColor calc(calc(100vw / 64) * 7.5 / 30), transparent calc(calc(100vw / 64) * 8.5 / 30)),
    radial-gradient(rgba(255, 255, 255, 0.6) calc(calc(100vw / 64) * 7.5 / 30), transparent calc(calc(100vw / 64) * 8.5 / 30)),
    radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 64) * 7.5 / 30), transparent calc(calc(100vw / 64) * 10.5 / 30)),
    radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 64) * 7.5 / 30), transparent calc(calc(100vw / 64) * 10.5 / 30));
  background-size: calc(100vw / 64) calc(100vw / 64);
  background-position: 0px 0px, calc(calc(100vw / 64) * calc(0 - 0.5) / 30) calc(calc(100vw / 64) * calc(0 - 0.5) / 30), 0px 0px, calc(calc(100vw / 64) * 3 / 30) calc(calc(100vw / 64) * 3 / 30);
  background-repeat: no-repeat;
  opacity: 0;
}

.text-body {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 2rem;
  padding-block: 3rem;
  text-align: start;
  font-weight: 400;
  font-size: 1.2rem;
}

@media screen and (max-width: 820px) {
  .brick {
    width: calc(100vw / 32);
    height: calc(100vw / 32);
    box-shadow: inset 0 0 calc(calc(100vw / 32) * 5 / 30) rgba(0, 0, 0, 0.2);
    background-image: radial-gradient(currentColor calc(calc(100vw / 32) * 7.5 / 30), transparent calc(calc(100vw / 32) * 8.5 / 30)),
      radial-gradient(rgba(255, 255, 255, 0.6) calc(calc(100vw / 32) * 7.5 / 30), transparent calc(calc(100vw / 32) * 8.5 / 30)),
      radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 32) * 7.5 / 30), transparent calc(calc(100vw / 32) * 10.5 / 30)),
      radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 32) * 7.5 / 30), transparent calc(calc(100vw / 32) * 10.5 / 30));
    background-size: calc(100vw / 32) calc(100vw / 32);
    background-position: 0px 0px, calc(calc(100vw / 32) * calc(0 - 0.5) / 30) calc(calc(100vw / 32) * calc(0 - 0.5) / 30), 0px 0px, calc(calc(100vw / 32) * 3 / 30) calc(calc(100vw / 32) * 3 / 30);
  }

  .lego-matrix {
    grid-template-columns: repeat(32, calc(100vw / 32));
    grid-template-rows: repeat(35, calc(100vw / 32));
  }

  .current-donations {
    background-size: calc(100vw / 32);
  }
}



@media screen and (max-width: 524px) {
  .brick {
    width: calc(100vw / 20);
    height: calc(100vw / 20);
    box-shadow: inset 0 0 calc(calc(100vw / 20) * 5 / 30) rgba(0, 0, 0, 0.2);
    background-image: radial-gradient(currentColor calc(calc(100vw / 20) * 7.5 / 30), transparent calc(calc(100vw / 20) * 8.5 / 30)),
      radial-gradient(rgba(255, 255, 255, 0.6) calc(calc(100vw / 20) * 7.5 / 30), transparent calc(calc(100vw / 20) * 8.5 / 30)),
      radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 20) * 7.5 / 30), transparent calc(calc(100vw / 20) * 10.5 / 30)),
      radial-gradient(rgba(0, 0, 0, 0.2) calc(calc(100vw / 20) * 7.5 / 30), transparent calc(calc(100vw / 20) * 10.5 / 30));
    background-size: calc(100vw / 20) calc(100vw / 20);
    background-position: 0px 0px, calc(calc(100vw / 20) * calc(0 - 0.5) / 30) calc(calc(100vw / 20) * calc(0 - 0.5) / 30), 0px 0px, calc(calc(100vw / 20) * 3 / 30) calc(calc(100vw / 32) * 3 / 30);
  }

  .lego-matrix {
    grid-template-columns: repeat(20, calc(100vw / 20));
    grid-template-rows: repeat(29, calc(100vw / 20));
  }

  #donate-button-container {
    justify-content: end;
  }

  .current-donations {
    background-size: calc(100vw / 20);
  }
}


/* -------------------------- Animations -------------------------- */
@keyframes pulse {
  0% {
    background-color: #3f3f3f;
    color: #3f3f3f;
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.1);
  }

  50% {
    background-color: #e64a5a;
    color: #e64a5a;
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.9);
  }

  100% {
    background-color: #3f3f3f;
    color: #3f3f3f;
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.1);
  }
}

@keyframes cta {
  0% {
    background-color: #ea1c30;
    color: #ea1c30;
  }

  50% {
    background-color: #65000a;
    color: #65000a;
  }

  100% {
    background-color: #ea1c30;
    color: #ea1c30;
  }
}

/* @keyframes pulseShadow {
  0% {
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.1);
  }

  50% {
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.9);
  }

  100% {
    box-shadow: 0px 0px 28px 1px rgba(255, 255, 255, 0.1);
  }
} */

.brick.pulse {
  z-index: 10;
  animation: pulse 1.5s infinite ease-in-out;
  position: relative;
  transition: unset;
}

.brick.pulse::before {
  /* top: 0;
  left: 0;
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 9;
  background: transparent;
  animation: pulseShadow 1.5s infinite ease-in-out; */
  content: "";
  width: 20px;
  height: 20px;
  background: #fff;
  position: absolute;
  z-index: 998;
}

.brick.pulse::after {
  position: absolute;
  content: "A Roma ci sarà presto un posto dove ognuno potrà sentirsi un po’ a casa. Grazie per il tuo sostegno.";
  text-align: center;
  color: black;
  background: white;
  padding: 1rem;
  font-weight: 600;
  border-radius: 2px;
  width: 270px;
  right: 50%;
  box-shadow: 0px 0px 20px -4px #FFFFFF;
  z-index: 15;
}

.brick.pulse.bottom::after {
  bottom: -105px;
  top: auto;
}

.brick.pulse.bottom::before {
  transform: rotate(45deg) translateX(2px);
  bottom: -30px;
}

.brick.pulse.top::after {
  top: -105px;
  bottom: auto;
}

.brick.pulse.top::before {
  transform: rotate(45deg) translateX(2px);
  top: -30px;
}

.brick.pulse.left::after {
  transform: translateX(95%);
}

.brick.pulse.right::after {
  transform: translateX(5%);
}

.brick.pulse.center::after {
  transform: translateX(50%);
}


/* CTA Animation ---------------------------------------*/

.brick.cta {
  position: relative;
  animation: cta 1.5s infinite ease-in-out;
  cursor: pointer;
}

.brick.cta::before {
  content: "";
  width: 20px;
  height: 20px;
  background: #fff;
  position: absolute;
  z-index: 998;
}

.brick.cta::after {
  position: absolute;
  content: "Aggiungi il tuo mattone, costruisci un futuro migliore per i pazienti ematologici.";
  text-align: center;
  color: black;
  background: white;
  padding: 1rem;
  font-weight: 600;
  border-radius: 2px;
  width: 270px;
  right: 50%;
  box-shadow: 0px 0px 20px -4px #FFFFFF;
  z-index: 20;
  transition: all .5s ease-out;
}

.brick.cta.bottom::after {
  bottom: -105px;
  top: auto;
}

.brick.cta.bottom::before {
  transform: rotate(45deg) translateX(4px);
  bottom: -25px;
}

.brick.cta.top::after {
  top: -105px;
  bottom: auto;
}

.brick.cta.top::before {
  transform: rotate(45deg) translateX(2px);
  top: -30px;
}

.brick.cta.left::after {
  transform: translateX(95%);
}

.brick.cta.right::after {
  transform: translateX(5%);
}

.brick.cta.center::after {
  transform: translateX(50%);
}

/* -------------------------- Animations End -------------------------- */

@media screen and (max-width: 1000px) {
  #CybotCookiebotDialog {
    padding-bottom: 50px !important;
  }

  #CookiebotWidget {
    bottom: 75px !important;
    right: 10px !important;
    left: unset !important;
  }
}

.primary-button {
  background: transparent;
  border: none !important;
}