:root {
  --main-container-margin: 1rem;
  --grid-bg-color: rgb(20, 130, 255);
  --grid-col-color: rgb(0, 255, 157);
  --grid-col-margin: 2.5rem;
}

@keyframes animate-header {
  0% {
    transform: translateX(150%);
  }
  100% {
    transform: translateX(0);
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", "Arial", sans-serif;
  color: #fff;
  text-align: center;
}

body:has(#collapse:checked),
body:has(.open-modal-checkbox:checked) {
  overflow: hidden;
}

main {
  margin: 1rem;
  position: relative;
}

/* initial grid layout styles */
header,
section,
footer {
  /* height: 3rem; */
  margin: 1rem 0;
  /* background-color: var(--grid-bg-color); */
}

header {
  height: calc(100vh - 2 * var(--main-container-margin));
  background: linear-gradient(rgba(0, 76, 255, 0.547), rgba(0, 94, 255, 0.678)),
    url("../assets/images/Header.jpg") no-repeat;
  background-size: cover;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  color: white;
  position: relative;
  text-align: center;
}

header .container {
  width: 40rem;
  text-align: center;
  position: absolute;
  top: 7rem;
  left: calc(50% - 20rem);
  animation: animate-header 1s ease-out;
}

header .title {
  font-size: 4rem;
  letter-spacing: 1.4rem;
  line-height: 5rem;
}

header .description {
  letter-spacing: 0.6rem;
  line-height: 1.8rem;
  margin-bottom: 6rem;
}

header .button {
  background: white;
  border-radius: 2rem;
  font-size: 0.9rem;
  padding: 1.2rem;
  text-decoration: none;
  color: rgb(72, 72, 72);
  margin-top: 5rem !important;
  transition: all 300ms ease-out;
}

header .button:hover {
  background: #000000;
  color: rgb(0, 200, 255);
}

.col {
  float: left;
  margin: var(--grid-col-margin);
  text-align: center;
  /* background-color: var(--grid-col-color); */
}

#lectures .col {
  width: calc(100% / 4 - 2 * var(--grid-col-margin));
}

#lectures {
  height: 100vh;
  background-image: linear-gradient(
      90deg,
      rgba(106, 0, 255, 0.4) 0%,
      rgba(56, 147, 255, 0.4) 37%,
      rgba(0, 255, 136, 0.4) 100%
    ),
    url("../assets/images/Background.jpg");
  background-size: cover;
  color: rgb(86, 86, 86);
  text-align: center;
}
#lectures .col {
  margin-top: 10rem;
}
#lectures .card {
  background-color: rgba(255, 255, 255, 0.7);
  height: 21rem;
  padding: 1rem;
  border-radius: 5px;
  transition: transform 300ms ease-out;
}

#lectures .card:hover {
  transform: scale(1.1);
}

#lectures img {
  height: 5rem;
  filter: invert(3%) opacity(50%);
}

#books {
  height: 100vh;
  background-color: rgba(150, 150, 150, 0.178);
}
#books .col {
  width: calc(100% / 3 - 2 * var(--grid-col-margin));
  margin-top: 10rem;
}
/* The flip card container - set the width and height to whatever you want. We have added the border property to demonstrate that the flip itself goes out of the box on hover (remove perspective if you don't want the 3D effect */
.flip-card {
  background-color: transparent;
  width: 300px;
  height: 25rem;
  perspective: 1000px;
  position: relative;
  margin: auto;
}

.flip-card img {
  width: 100%;
}

/* This container is needed to position the front and back side */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

/* Do an horizontal flip when you move the mouse over the flip box container */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Position the front and back side */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
  border-radius: 5px;
}

/* Style the front side (fallback if image is missing) */
.flip-card-front {
  background-color: white;
  color: black;
}

.image-section {
  position: relative;
}

.flip-card .title1,
.flip-card .title2 {
  color: white;
  position: absolute;
  right: 0;
  text-align: right;
  padding: 0.5rem;
  background-color: rgb(255, 47, 172);
}

.flip-card .title1 {
  border-radius: 5px 0 0 5px;
  bottom: 2rem;
}
.flip-card .title2 {
  bottom: 0;
  border-radius: 0 0 0 5px;
}

.flip-card .description {
  line-height: 2.2rem;
  color: gray;
}

/* Style the back side */
.flip-card-back {
  background-color: white;
  color: black;
  transform: rotateY(180deg);
  padding: 2rem;
  box-sizing: border-box;
}

.flip-card .price {
  font-size: 2rem;
  font-weight: bold;
  margin-top: 1rem;
}

.open-modal-checkbox {
  display: none;
}

.flip-card #btn {
  background: #0003ff;
  padding: 1rem 3.5rem;
  color: #fff;
  position: absolute;
  left: 50%;
  bottom: 1rem;
  border-radius: 9px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.modal {
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(101, 101, 101, 0.5);
  backdrop-filter: blur(5px);
  top: 0;
  left: 0;
  right: 0;
  display: block;
  align-items: center;
  justify-content: center;
  display: none;
}

.modal .container {
  position: relative;
  width: 85%;
  height: 80%;
  margin-top: 5% !important;
  background: white;
  margin: auto;
  color: rgb(95, 95, 95);
}

.modal .context {
  padding: 2rem;
  text-align: left;
}

.modal img {
  height: 100%;
  float: left;
  margin-right: 2rem;
}

.modal .title {
  color: blue;
  font-size: 2rem;
}

.modal .description {
  width: 100%;
  margin-bottom: 2rem;
}

.modal .description p {
  width: 30%;
  float: left;
  padding: 0 2%;
  box-sizing: border-box;
  line-height: 1.5rem;
}

.modal .description .desc1 {
  border-right: 1px solid gray;
  padding-left: 0;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: none;
  cursor: pointer;
  color: black;
}

#book1:has(input:checked) + #modal1 {
  display: block;
}

#book2:has(input:checked) + #modal2 {
  display: block;
}

#book3:has(input:checked) + #modal3 {
  display: block;
}

.flip-card:has(input:checked) + .modal .close {
  display: block;
}

.button-container {
  position: absolute;
  bottom: 3rem;
  left: 38%;
}

.buy-btn {
  text-decoration: none;
  text-align: center;
  background: blue;
  color: white;
  padding: 1.5rem 2.5rem;
  border-radius: 2rem;
  transition: all 300ms ease-out;
}

.buy-btn:hover {
  background: rgb(255, 41, 209);
  /* color: black; */
}

footer {
  height: 10rem;
  background-color: rgb(43, 42, 42);
  color: rgb(202, 202, 202);
  text-align: center;
  padding-top: 6rem;
}

footer .col {
  width: calc(100% / 2 - 2 * var(--grid-col-margin));
  margin-top: 0;
}

footer a {
  cursor: pointer;
  margin: 0 1rem;
  font-size: 0.9rem;
  transition: color 300ms ease-out;
}

footer a:hover {
  color: rgb(0, 238, 255);
}

footer p {
  margin: 0;
  text-align: left;
}

footer hr {
  margin-bottom: 1rem;
  border: 1px solid rgba(56, 56, 56, 0.462);
}

.menu {
  display: none;
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  right: 0;
  left: 0;
  background: linear-gradient(
    90deg,
    rgb(115, 0, 255) 0%,
    rgb(0, 128, 255) 100%
  );
  transition: all 400ms ease-in;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 200%;
}

.menu ul {
  margin-top: 10rem;
  font-size: 60%;
  padding-top: 30px;
  list-style-type: none;
}
.menu li {
  margin-top: 3rem;
}
.menu li a {
  font-size: 1.8rem;
  text-decoration: none;
  color: white;
  transition: all 300ms ease-out;
}

.menu li a:hover {
  font-size: 2rem;
  color: rgb(0, 0, 0);
}

.collapse-label {
  position: fixed;
  z-index: 999;
  top: 1.6rem;
  right: 5.2rem;
}
#collapse {
  display: none;
}
.hamburger {
  position: absolute;
  width: 2rem;
  height: 2rem;
  z-index: 99;
  cursor: pointer;
  padding: 0.8rem;
  background-color: white;
  border-radius: 50%;
}
.lines {
  background-color: #000;
  width: 100%;
  height: 5px;
  margin: 5px 0;
  transition: all 450ms ease-in;
}
#collapse:checked + label .menu {
  display: block;
}
#collapse:checked ~ .collapse-label .hamburger .lines {
  cursor: pointer;
}
#collapse:checked ~ .collapse-label .hamburger .line-top {
  transform: translateY(200%) rotate(45deg);
}
#collapse:checked ~ .collapse-label .hamburger .line-mid {
  opacity: 0;
}
#collapse:checked ~ .collapse-label .hamburger .line-bottom {
  transform: translateY(-200%) rotate(135deg);
}
