@import url("./common.css");
@import url("./navbar.css");
@import url("./scroll-up.css");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --primary-color: #f5df4e;
  --secondary-color: #dfe6e9;
  --black-color: #000;
  --white-color: #fff;
  --font-roboto: "Roboto", sans-serif;
}

body {
  background-color: rgba(223, 230, 233, 0.5);
}

.all-courses-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 10%;
}

.card {
  background-color: var(--white-color);
  border-radius: 15px;
}

.card:hover {
  box-shadow: 0 0 10px var(--white-color);
}

.card-image {
  width: 100%;
  /* height: 180px; */
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.card h1 {
  font-family: var(--font-roboto);
  font-weight: 700;
  font-size: 1.6vw;
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
}

.card a {
  text-decoration: none;
  color: #000;
  background-color: var(--primary-color);
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 0.8rem 2rem;
  border-radius: 1.875rem;
  font-family: var(--font-roboto);
  font-weight: 700;
  cursor: pointer;
}

.exam-rule {
  text-align: start;
}

.exam-rule h3 {
  font-family: var(--font-roboto);
  font-weight: 700;
  font-size: 1.5vw;
  margin-bottom: 0.3rem;
  text-align: center;
}
.exam-rule hr {
  width: 8vw;
  border: 0;
  outline: 0;
  height: 0.5vh;
  background-color: var(--primary-color);
  margin: 0 auto 1rem;
}

.exam-rule p {
  font-family: var(--font-roboto);
  font-weight: 400;
  font-size: 1.3vw;
  margin-bottom: 0.5rem;
}

.swal2-confirm {
  color: #000 !important;
}

.swal2-title {
  font-family: var(--font-roboto);
}
/* media query */

/* 900-1200px */
@media screen and (max-width: 1200px) {
  .card h1 {
    font-size: 2.5vw;
  }
  .exam-rule h3 {
    font-size: 2.2vw;
  }

  .exam-rule p {
    font-size: 1.6vw;
  }
}

/* 600-900px  */

@media screen and (max-width: 900px) {
  .card h1 {
    font-size: 3.5vw;
  }
}

/* 600px */
@media screen and (max-width: 600px) {
  .card h1 {
    font-size: 5vw;
  }

  .exam-rule h3 {
    font-size: 3.2vw;
  }

  .exam-rule p {
    font-size: 2.6vw;
  }
}

/* 400px */
@media screen and (max-width: 400px) {
  .card h1 {
    font-size: 6vw;
  }

  .exam-rule h3 {
    font-size: 4.2vw;
  }

  .exam-rule p {
    font-size: 3.6vw;
  }
}

/* 300px */
@media screen and (max-width: 300px) {
  .all-courses-section {
    grid-template-columns: repeat(1, 1fr);
    padding: 5rem 0;
  }

  .card h1 {
    font-size: 8vw;
  }

  .exam-rule h3 {
    font-size: 7.5vw;
  }

  .exam-rule p {
    font-size: 5.6vw;
  }

  .card a {
    font-size: 5.5vw;
  }
}
