@font-face {
    font-family: "IRANSansWeb";
        src: url(/static/webfonts/IRANSansWeb.woff2);

}

* {
    font-family: "IRANSansWeb";
    text-decoration: none;
}

:root {
    --blue:#009cff;
    --yellow:#f1c637;
    --green: #4caf50;
    --black: #262626;
}


body {
    background:linear-gradient(45deg, rgba(199, 59, 250, 0.799) 37%, rgba(36, 251, 255, 0.744) 66%) ,url(/static/images/quiz_background.jpg) fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    font-size: 1rem;
}

header {
    width: 95%;
    background: #fff;
    border-radius: 5rem;
    transition: .2s;
    margin-top: 1rem;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 0 .5rem;
    position: fixed;
    top: 0;
    z-index: 9999;
    height: 3rem;
}

header.scrolled {
    width: 100%;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: 0 .1rem .3rem rgba(0,0,0,.3);
}

header .logo {
    color: var(--yellow);
    text-decoration: none;
    transition: .2s;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

header .logo img {
    width: 5rem;
}

.logo.lscrolled {
    margin: 0 1rem 0 0;
}

header .title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.5rem;
}

header .navbar {
    margin-right: auto;
}

header .navbar ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    padding: 0;
    align-items: center;
    justify-content: space-between;
}

header .navbar ul.active {
    display: flex;
    width: 6.5rem;
    animation: menu .3s ease;
    border-radius: .5rem;
    left: 1%;
}

header .navbar ul li {
    margin: 0 1rem;
    text-align: center;
}

header .navbar ul li a {
    color: var(--blue);
    transition: .2s;
    text-decoration: none;
    display: block;
    padding: 1rem 0;
}

header .navbar ul li a:hover {
    color: var(--yellow);
}

header .menu-toggle {
    display: block;
    cursor: pointer;
}

.menu {
    transition: transform 0.3s ease;
    margin: .3rem 0 0 .5rem;
}

.menu-toggle i {
    font-size: 2rem;
    color: var(--blue);
}

.menu.clicked {
    transform: rotate(90deg);
}

.menu.clicked::before {
    font-family: 'Font Awesome 5 Free';
    content: "\f00d";
    font-weight: 900;
    font-size: 40px;
    color: var(--yellow);
}

.content {
    margin-top: 6rem;
    background-color: #fff;
    display: flex;
    align-items: center;
    width: 92%;
    border-radius: 1rem;
}

.content-img {
    width: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-img img {
    width: 30rem;
}

.content-text {
    width: 40%;
    margin-right: 2rem;
}

.content-text h1 {
    color: var(--blue);
}

.content-text p {
    color: #999;
    text-align: justify;
}

.exams-section {
    background: #f3f4f6;
    width: 92%;
    margin-top: 5rem;
    margin-bottom: 5rem;
    border-radius: 1rem;
}

.exams {
    padding: 0 1rem 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;;
}

.exams .box {
    width: 18rem;
    max-height: 23.5rem;
    padding: 1rem;
    margin: 6rem 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 1rem;
    transition: .3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.exams .box:hover {
    transform: scale(1.02);
}

.exams .box .exam-img img {
    width: 14.625rem;
    height: 9.375rem;
    margin-top: -5rem;
    border-radius: 1rem;
    object-fit: cover;
}

.exams .box a {
    width: 5rem;
    text-align: center;
    background: var(--blue);
    color: white;
    border-radius: 5rem;
    font-size: 1.3rem;
    transition: .3s;
}

.exams .box a:hover {
    transform: scale(1.05);
}

.exams .box span {
    color: #999;
    font-size: smaller;
}

.time-difficulty {
    display: flex;
    justify-content: space-around;
}

.exam-time, .exam-difficulty {
    margin: 0;
}

.box-information {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.exams .box .box-information .description {
    overflow: auto;
}

#load-more {
    text-align: center;
    margin: 1rem 0 .5rem 0;
    cursor: pointer;
    padding: 3px 10px;
    background-color: var(--yellow);
    color: #fff;
    font-size: 1.3rem;
    border-radius: 5rem;
    border: none;
}

.filter {
    display: flex;
    border-right: .1rem solid;
    border-left: .1rem solid;
}

.search-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -3rem;
}

.search {
    display: flex;
    align-items: center;
    border-right: .1rem solid;
    border-left: .1rem solid;
    height: 42.4px;
}

#search {
    background: white;
    border: none;
    border-radius: 5rem;
    padding: .5rem;
    width: 15rem;
}

.search-filter .search button {
    background: white;
    border: none;
    border-radius: 5rem;
    margin-right: .2rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-select-checkbox {
  position: relative;
  font-family: inherit;
}

.select-box {
  padding: 0.5rem 1rem;
  border-radius:5rem;
  cursor: pointer;
  background-color: white;
  user-select: none;
  transition: 0.3s;
  margin-left: .3rem;
}

.select-box:hover {
  background-color: #f5f5f5;
}

.checkbox-options {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10;
}

.checkbox-options label {
  display: block;
  margin: 0.3rem 0;
  cursor: pointer;
}

.custom-select-checkbox.open .checkbox-options {
  display: block;
  width: 76px;
}

.sort {
    background: white;
    display: flex;
    align-items: center;
    border-radius: 5rem;
    padding: 0.5rem 1rem;
}

.sort label {
    margin-left: 0.5rem;
}

.sort select {
    border: none;
}

#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
}

#backToTop.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#backToTop:hover {
  transform: scale(1.1);
}

@media (max-width: 470px) {

    .logo.lscrolled {
        margin: .3rem .5rem 0 0 !important;
    }

    header .logo img {
         width: 4rem;
    }

    #backToTop {
        bottom: 1rem !important;
        right: 1rem !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

}


@keyframes menu {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@media (max-width : 770px) {
    .content-img img {
        width: 20rem;
    }

    .content-text h1 {
        text-align: justify;
        font-size: 1.5rem;
    }
}

@media (max-width : 611px) {
    .content-text h1 {
        font-size: x-large;
    }

    #searchBtn {
        margin-left: .2rem;
    }

    #search {
        width: 76%;
    }

    .select-box {
        padding: 0.5rem .5rem;
        margin-left: .2rem;
    }

    .sort label {
        display: none;
    }

    .content-text {
        width: auto !important;
        margin: 0 2rem !important;
    }

    .content {
        flex-direction: column-reverse;
    }

    .content-text h1 {
        text-align: center;
    }
}