/* Global Styles */
body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  color: #fff;
  background-color: black;
  height: 100%;
  width: 100%;
  perspective: 800px;
}

/* Main Container */
#main {
  position: relative;
  background-color: rgba(0, 0, 0, 0.4);
}

#nav h1 {
  margin-top: 40px;
  font-size: 64px;
  font-weight: 700;
  text-align: center;
  color: #f0f0f0;
}

/* Page Sections */
#page1, #page2 {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  z-index: 10;
}

#cards1, #cards2, #cards3, #cards4 {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  position: relative;
  z-index: 10;
}

/* Card Styles */
.card {
  height: 80%;
  width: 24%;
  background-color: blue;
  border-radius: 20px;
  background-size: cover;
  overflow: hidden;
  background-position: center;
  transition: all ease 0.6s;
}

.card:hover .overlay {
  opacity: 1;
}

.card:hover {
  transform: rotate3d(1, 1, 0, 20deg);
}

/* Overlay Styles */
.overlay {
  height: 100%;
  width: 100%;
  background-color: #f7dcb9;
  padding: 30px;
  padding-top: 80px;
  opacity: 0;
  transition: all ease 0.6s;
}

.overlay h4 {
  color: black;
  font-size: 40px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 15px;
  font-weight: 800;
}

.overlay p {
  color: black;
  font-size: 18px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  #nav h1 {
    font-size: 48px;
  }

  .card {
    width: 30%;
  }
}

@media (max-width: 992px) {
  #nav h1 {
    font-size: 40px;
  }

  .card {
    width: 45%;
  }
}

@media (max-width: 768px) {
  #nav h1 {
    font-size: 32px;
  }

  .card {
    width: 100%;
  }

  #cards1, #cards2, #cards3, #cards4 {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  #nav h1 {
    font-size: 28px;
  }

  .overlay h4 {
    font-size: 32px;
  }

  .overlay p {
    font-size: 16px;
  }
}