/* CSS Document */

body {
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  overflow-x: hidden;
  max-width: 1200px;
  min-height: 100vh;
}

/* Define a media query for screens with a max-width of 480px */
@media screen and (max-width: 480px) {
  body {
    max-width: 480px;
  }
}

/* Create a pseudo-element for the full-height color */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #9d0000 50%, #090a0f 175%);
  z-index: -1; /* Place it behind the content */
}

.snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.7;
  pointer-events: none; /* Allow interaction with elements behind it */
}

/* Define a keyframes animation for the snowflakes */
@keyframes fall {
  0% {
    transform: translateY(-10px);
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Apply the animation to your snowflakes */
.snow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: fall linear infinite;
  animation-duration: 30s; /* Adjusted the duration for snowflakes */
  animation-delay: 0s; /* Adjust the delay as needed */
  opacity: 0.7;
}

.overlay {
  position: absolute;
  overflow: visible;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); /* Add a semi-transparent background color */
  z-index: 2; /* Place it above the snowflakes */
  justify-content: center;
}

/* Define a media query separately */
@media screen and (max-width: 480px) {
  .overlay {
    max-width: 480px; /* Apply styles specific to the overlay for smaller screens */
  }
}

/* Rest of your CSS... */

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

@font-face {
  font-family: 'Thirsty Soft W01 Medium';
  src: url('fonts/ThirstySoftW01Medium.woff2') format('woff2'),
       url('fonts/ThirstySoftW01Medium.woff') format('woff'),
       url('fonts/ThirstySoftW01Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

h1 {
  font-family: 'Thirsty Soft W01 Medium';
  font-size: 5.5rem;
  color: white;
  text-align: center;
  margin: 20px;
  padding-bottom: 25px;
  padding-top: 50px;
  text-shadow: 5px 5px 4px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 480px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 24px; /* Adjust the value as needed */
  font-family: 'Molde Light';
  font-weight: black;
  color: white;
  text-align: center;
  margin: 20px;
  padding-bottom: 20px; /* Adjust the value as needed */
  margin-left: 5vw; /* Adjust the value as needed */
  margin-right: 5vw; /* Adjust the value as needed */
  justify-content: center;
}

h3 {
  font-size: 2rem; /* Adjust the value as needed */
  font-family: 'Molde Black';
  font-weight: black;
  color: white;
  text-align: center;
  margin: 25px;/* Adjust the value as needed */
  padding-bottom: 30px; /* Adjust the value as needed */
  justify-content: center;
}

@font-face {
  font-family: 'Molde Light';
  src: url('fonts/MoldeLight.woff2') format('woff2'),
       url('fonts/MoldeLight.woff') format('woff'),
       url('fonts/MoldeLight.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Molde Black';
  src: url('fonts/MoldeBlack.woff2') format('woff2'),
       url('fonts/MoldeBlack.woff') format('woff'),
       url('fonts/MoldeBlack.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.wrapper {
  width: 100%;
  max-width: 100rem;
  justify-content: center;
  background-color: white;
}

.trees {
  max-width: 100%;
  height: auto;
  margin-bottom: -2.5rem; /* Remove the gap between trees and cols */
}

.cols {
  width: 100vw;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.col {
  margin: 2.5rem;
  cursor: pointer;
  justify-content: center;
}

.container {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  width: 500px;
  height: 500px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.back,
.front {
  background-size: cover;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  background-position: center;
  -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  -o-transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  text-align: center;
  min-height: 280px;
  height: auto;
  color: #fff;
  font-size: 22px;
  overflow: hidden;
  display: inline-block;
}

.front {
  background-size: cover;
}

.back:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  min-width: 500px;
  min-height: 500px;
  height: 100%;
  content: '';
  display: block;
  opacity: .6;
  background-color: #000;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  font-size: 22px;
}

.container:hover .front,
.container:hover .back {
  -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  -o-transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.front {
  position: absolute;
  width: 100%;
  height: auto;
}

.inner {
  -webkit-transform: translateY(-50%) translateZ(60px) scale(1);
  transform: translateY(-50%) translateZ(60px) scale(1);
  top: 55%;
  position: absolute;
  font-size: 22px;
  color: white;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  outline: 1px solid transparent;
  -webkit-perspective: inherit;
  perspective: inherit;
  z-index: 2;
  overflow: hidden; 
  /* Add this line to hide overflowing text */
}

@media screen and (max-width: 480px) {
  .inner {
    top: 50%;
    font-size: 18px; /* Adjust font size for mobile */
    padding: 20px; /* Adjust padding for mobile */
  }
}

@media screen and (max-width: 480px) {
  .container,
  .back,
  .front {
    width: 300px;
    height: 300px;
    overflow-x: hidden;
  }

  .front img,
  .back img {
    width: 100%;
    height: 100%;
  }

  /* Add 20px of padding to .inner on mobile */
  .front .inner,
  .back .inner {
    font-size: 16px;
    padding: 5px;
  }

  /* Update the font size of "span" and its margin on mobile */
  .back .inner span {
    font-size: 16px;
    margin: 10px;
    padding: 10px;
    display: inline-block;
  }

  /* Add 20px of padding to .inner on mobile */
  .inner {
    padding: 16px; /* Add this line to add 20px of padding to the sides on mobile */
  }
}

.container .back {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.container .front {
  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.container:hover .back {
  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.container:hover .front {
  -webkit-transform: rotateY(-180deg);
  transform: rotateY(-180deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.container:not(:hover) .back {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.container:not(:hover) .front {
  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.back .inner p {
  font-size: 24px;
  margin-bottom: 1rem; /* Smaller bottom margin on mobile */
  margin-top: 1.5rem; /* Smaller top margin on mobile */
  position: relative;
}

/* For mobile devices */
@media screen and (max-width: 480px) {
  .back .inner p {
    font-size: 19px;
    margin-top: 10px;
  }
}

.back .inner p:after {
  content: '';
  width: 10rem;
  height: 2px;
  position: absolute;
  background: #C6D4DF;
  display: block;
  left: 0;
  right: 0;
  margin: 5px auto;
  justify-content: center;
	color: white;
}

.back .inner span {
  color: white;
  font-family: 'Monserrat';
  font-weight: 500;
  font-size: 18px;
  text-shadow: 5px;

}

/* For mobile devices */
@media screen and (max-width: 480px) {
  .container,
  .back,
  .front {
    width: 350px; /* Set a fixed width */
    height: 350px; /* Set a fixed height */
    overflow-x: hidden;
  }

  .back img,
  .front img {
    width: 100%;
    height: 100%;
  }

  .back .inner,
  .front .inner {
    font-size: 16px; /* Adjust the value as needed for responsive font size */
    padding: 10px; /* Adjust padding as needed for spacing */
    display: inline-block;
  }

  /* Update the font size of "span" on mobile */
  .back .inner span {
    font-size: 16px;
  }
}
