/* Center the calendar and add background color */

@import url("https://fonts.googleapis.com/css2?family=Meow+Script&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500&display=swap");

ul {
  cursor: default;
}

li {
  cursor: default;
}

.tp-banner ul > li {
  cursor: default;
}

.tp-revslider-slidesli {
  overflow: auto !important;
  overflow-x: hidden !important;
}

body {
  background-image: url(bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.banner {
  z-index: 15;
  position: absolute;
  width: 100%;
  top: 5%;
}

.banner-image {
  width: 100%;
  display: block;
}

.logo-banner {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 40px; /* Adjust the left padding as needed */
  display: flex;
  align-items: center;
}

.logo-b {
  max-width: 130px;
  margin-top: 5%;
  height: auto;
  margin-right: 10px;
}

.text-banner {
  font-family: Arial, sans-serif;
  margin: 0;
  color: white;
  padding: 0;
  white-space: nowrap;
  text-transform: uppercase;
  text-align: left;
  font-weight: 500;
  font-size: 90%;
  max-width: calc(100% - 140px); /* Adjust the maximum width as needed */
}

.body-calendar {
  display: flex;
  align-items: center;

  flex-direction: column;
  height: 100vh;

  margin-left: auto;
  margin-right: auto;
  font-family: "Meow Script", cursive;
  overflow: hidden;
}

.border {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1; /* Ensure they are above the content */
  width: 0px;
}

.left-border {
  left: -5%;
}

.right-border {
  right: 10%;
}

.left-img,
.right-img {
  height: 100vh;
  display: block;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 4 columns for a 4x6 grid */
  gap: 15px; /* Adjust the gap between squares */
  max-width: 75%; /* Adjust the maximum width as needed */
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.logo-container {
  display: flex;
  justify-content: center; /* Center horizontally */
  margin-left: auto;
  margin-right: auto;
  margin-top: 12vh;
  margin-bottom: 3vh;
}

/* Push the logo to the top */
.logo {
  width: 40vh; /* Adjust the maximum width of the logo as needed */
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
  z-index: 1000;
  text-align: center;
  font-family: "Meow Script", cursive;
}

.lightbox .lightbox-content {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 20% 60%;
  gap: 20px 20px;
  grid-auto-flow: row;
  grid-template-areas:
    "logo-light logo-light"
    "im-light txt-light";
  align-items: center;
  justify-items: center;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.logo-light {
  grid-area: logo-light;
}

.im-light {
  grid-area: im-light;
}

.txt-light {
  grid-area: txt-light;
}

.lightbox .lightbox-content .im-light img {
  width: 60%;
  height: 60%;
  margin-left: 40%;
}

.logo-light .logo-lightbox {
  width: 30%;
}

.lightbox .lightbox-content .txt-light .content {
  /*margin-right: 50%;*/
  padding-right: 25%;
  text-align: left;
  color: rgb(0, 0, 0);
  font-family: "Quicksand", sans-serif;
}

.lightbox .lightbox-content .content h2 {
  margin: 0;
  font-size: 2.5em;
  margin-bottom: 2%;
  font-family: "Meow Script", cursive;
}

.lightbox .lightbox-content .content div {
  margin-bottom: 3%;
  font-size: 1.5em;
  margin: 0;
  white-space: normal; /* Allow text to wrap onto multiple lines */
}

.lightbox .lightbox-content .content button.red-button {
  margin-top: 4%;
  background-color: red;
  color: white;
  border: none;
  font-size: 2.5em;
  padding: 2% 3%;
  font-family: "Meow Script", cursive;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  transition: background-color 0.3s, box-shadow 0.3s;
  margin-left: 30%;
  margin-right: 30%;
}

.lightbox .lightbox-content .content button.red-button:hover {
  background-color: rgb(129, 10, 10);
}

.lightbox .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: red;
  font-family: "Quicksand", sans-serif;
  background-color: transparent;
  font-weight: 900;
  font-size: xxx-large;
  border: 0;
  font-weight: 300;
  transform: scaleX(1.4);
}

.lightbox .close-button:before {
  content: "Fermer";
  font-family: "Meow Script", cursive;
  font-weight: bold;
  font-size: 70%;
  position: absolute;
  right: 80%;
  top: 50%;
  transform: translateY(-50%) scaleX(0.67);
}

.lightbox-content {
  display: none;
}

.square {
  width: 150px;
  height: 150px;
  padding: 0;
  background-color: rgb(
    255,
    255,
    255
  ); /* Change this color to your preference */
  text-align: center;
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.5s, opacity 0.1s, scale 0.3s;
  position: relative;
  opacity: 1;
  transform: translateY(0deg);
  transform-style: preserve-3d;
  perspective: 1000px;
}

/*transition: transform 0.5s; /* Add a transition for transform property */

/* Style for the date on the front of the square */
.square .front {
  z-index: 1;
  display: flex;
  cursor: default;
  font-size: 18px;
  font-weight: bold;
}

/* Style for the back of the square */
.square .back {
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d; /* Enable 3D transformations */
  transform: rotateY(180deg); /* Adjust this value to match the front */
}

.square:hover .back {
  display: block;
}

.square.flipped {
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  opacity: 1;
}

.square.flipped .back {
  backface-visibility: visible;
  transform: rotateY(180deg);
  display: contents;
  z-index: 10;
}

.square.flipped .back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.square.flipped .front {
  position: absolute;
  transform: rotateY(-180deg);
  backface-visibility: hidden;
}

.square.flipped .front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
}

.square.flipped .flipper {
  transform: rotateY(180deg);
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.square.flipped:hover {
  transition: scale 0.3s;
  scale: 1.1; /* Add the scale effect on hover for flipped squares */
}

.square.current .front {
  cursor: pointer !important;
}

.front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.square.current {
  opacity: 1;
  perspective: 1000px;
  transition: transform 1s, opacity 0.2s;
  transform-style: preserve-3d;
  background-color: rgba(255, 255, 255, 0);
  animation: 1s ease 0s infinite alternate none running glow;
}

.square.current:hover {
  transform: rotateY(180deg) scale(1.1);
}

.square.current .flipper {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.square.current:hover .flipper {
  transform: rotateY(180deg);
}

.square.current .front,
.square.current .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.square.current .back {
  transform: rotateY(180deg);
}

.square.current .back img,
.square.current .front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes glow {
  0% {
    transform: scale(1);
    filter: drop-shadow(2px 4px 6px red);
  }
  100% {
    transform: scale(1.1);
    filter: drop-shadow(2px 4px 6px red);
  }
}

/* Add media queries for responsiveness */
@media screen and (max-width: 768px) {
  .banner-image {
    display: none;
  }

  .text-banner {
    display: none;
  }

  .body-calendar {
    margin-left: 10vw;
    margin-right: 10vw;
    margin-top: 5vh;
    margin-bottom: 5vh;
    height: auto;
    overflow: scroll;
  }

  .calendar {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for smaller screens */
  }

  .square {
    width: 100%;
    max-width: 300px; /* Adjust the maximum width as needed */
    height: auto;
  }

  .logo-container img {
    width: 50vw;
  }

  .lightbox .lightbox-content .content button.red-button {
    margin: 2% auto; /* Center the button */
  }

  .lightbox .lightbox-content .content h2 {
    margin: 0;
    font-size: 3em;
    margin-bottom: 2%;
    font-family: "Meow Script", cursive;
  }

  .logo-banner {
    position: revert-layer;
    top: 20%;
    transform: translateY(-80%);
    left: 40px;
    display: flex;
    align-items: center;
  }

  .logo-b {
    max-width: 82px;
    margin-top: 0;
    height: auto;
    margin-right: 10px;
  }

  .lightbox .lightbox-content {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 20% 50% 20%;
    gap: 0px 0px;
    grid-auto-flow: row;
    grid-template-areas:
      "logo-light"
      "im-light"
      "txt-light";
    align-items: center;
    justify-items: center;
    height: 100%;
    padding: 20px;
    box-sizing: content-box;
    position: relative;
    overflow-y: scroll;
  }

  .logo-light {
    grid-area: logo-light;
  }

  .im-light {
    grid-area: im-light;
  }

  .txt-light {
    grid-area: txt-light;
  }

  .lightbox .lightbox-content .im-light img {
    width: 50vw;
    height: auto;
    margin-left: 0%;
  }

  .logo-light .logo-lightbox {
    width: 40%;
  }

  .lightbox .lightbox-content .content {
    text-align: center; /* Center text for smaller screens */
    margin: 0;
    padding-right: 0;
    font-size: 12px;
  }

  .lightbox .lightbox-content .txt-light .content {
    /*margin-right: 50%;*/
    padding-right: 0%;
    text-align: center;
    color: rgb(0, 0, 0);
    /*font-family: 'Meow Script', cursive;*/
    padding: 0%;
  }

  .logo-container {
    margin-top: 0%;
  }

  .left-border,
  .right-border {
    display: none;
  }

  .tp-banner-container {
    width: 100%;
    position: absolute;
    padding: 0;
  }

  .lightbox .close-button:before {
    display: none;
  }
}

@media screen and (min-width: 768px) and (max-width: 1200px) {
  .left-border,
  .right-border {
    display: none;
  }

  .tp-banner-container {
    width: 100%;
    position: absolute;
    padding: 0;
  }

  .banner {
    position: absolute;
    width: 150%;
  }

  .calendar {
    grid-template-columns: repeat(4, 1fr); /* 3 columns for tablets */
  }

  .body-calendar {
    display: flex;
    align-items: center;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    font-family: "Meow Script", cursive;
    margin-top: 10%;
    margin-bottom: 15%;
  }

  .lightbox .lightbox-content {
    grid-template-columns: 50% 50%; /* Single column for smaller screens */
  }

  .lightbox .lightbox-content img {
    max-width: 100%;
    height: auto;
    margin: 0 auto; /* Center the image horizontally */
  }

  .lightbox .lightbox-content .content {
    text-align: center; /* Center text for smaller screens */
    margin: 0;
    padding-right: 0;
    font-size: 12px;
  }

  .lightbox .lightbox-content .content button.red-button {
    margin: 2% auto; /* Center the button */
  }

  .logo-container {
    margin-top: 0%;
  }

  .lightbox .close-button:before {
    right: 20%;
  }
}
