:root {
  --bgcolor: #F4F6F9; /*page background: ;*/
  --sectioncolor: #8abdf1; /*exam and test section*/
  --ecard1: #cce5fd; /**/
  --ecard2: #caf1da; /*used*/
  --ecard3: #d9d2f9; /**/
  --ecard4: #fedcc0; /**/
  --tcard: #f3f6fe; /**/
  --filter: #9663f4; /*filter*/
  --accent: #1a56a0; /*header*/
  --accent3: #1a56a099; /*nav, test arrow*/
  --accent2: #6e7f9e; /*Test Card YearFilter Border*/
  --white: #FFFFFF; /**/
}

body, html {
  margin: 0;
  background-color: var(--bgcolor);
}


nav {
  display: flex;
  border-bottom: solid 1px #00000050;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  height: 20px;
  padding: 2px 10px;
  background-color: var(--bgcolor);
  overflow: hidden;
}

#nav-exam-name, #nav-exam-year {
  width: 70px;
  color: var(--accent3);
  font-size: 12px;
  font-weight: 500;
  margin: 5px 15px 0px 0px;
  padding: 0 5px 0 5px;
}

#nav-exam-name span, #nav-exam-year span {
  position: relative;
  display: inline-block;
 }
 
/*
#nav-exam-name span::after, #nav-exam-year span::after{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 1px);
  border-bottom: 2px solid var(--accent);
  animation: popup 1s;
}
*/

@keyframes godown {
  0% {transform: translateY(0px);}
  100% {transform: translateY(15px);}
}

@keyframes comedown {
  0% {transform: translateY(-15px);}
  100% {transform: translateY(0px);}
}

.nav-exam {
  color: var(--accent);
}

#exam-section {
  background-image: linear-gradient(to bottom, var(--bgcolor), var(--sectioncolor));
  height: calc(22vh + 42px + 3.17em); /*recalculate height*/
  max-height: calc(292px + 3.17em);
  min-height: calc(192px + 3.17em);
  width: 100%;
  margin: 100px 0 0 0;
}

#exam-section h3 {
  display: block;
  color: #131f20;
  margin-left: 20px;
  position: relative;
  z-index: 0;
}

#exam-section h3::after {
  position: absolute;
  top: 0px;
  left: 0px;
  height: 100%;
  width: 8%;
  margin: 0 20px;
  content: "";
  z-index: 1;
}

#exam {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  height: calc(100% - 3.17em - 8px);
  width: 100%;
  overflow-x: scroll;
  position: relative;
}

.exam-card {
  /*background-color: var(--ecard2);*/
  color: #000000c1;
  border-radius: 8px;
  width: 28vw;
  max-width: 210px;
  min-width: 130px; /* recheck width */
  padding: 3px;
  margin: 10px 10px 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease-in;
  box-shadow: 1.2px 1.2px 4.5px #00000550;
}

 .exam-card:last-child {
   margin-right: 20px;
 }
 
.exam-card:hover {
  /*transform: scale(1.03);
  box-shadow: 3px 3px 0px;*/
  transform: scale(1);
}

.exam-card img {
  height: 75%;
  width: 100%;
  border: 1px solid #00000030;
  border-radius: 6.5px;
  object-fit: cover;
  object-position: 45% 50%;
  box-sizing: border-box;  /*do i need this ?*/
}

.exam-card h4 {
  font-size: 1em;
  font-weight: 700;
  margin: auto;
}

#exam-detail {
  height: calc(100% - 3.17em - 4px);
  width: 100%;
  position: relative;
  overflow: hidden;
}

#exam-detail img {
  height: calc(100% - 22px);
  width: calc(100% - 40px);
  border: 1px solid #00000030;
  border-radius: 8px;
  object-fit: cover;
  object-position: 45% 50%;
  margin: 10px 20px;
  box-shadow: 1.2px 1.2px 4.5px #00000550;
  animation: fadein 0.2s ease-out;
}

#exam-detail::after {
  position: absolute;
  top: 1px;
  left: 1px;
  height: calc(100% - 24px);
  width: calc(40% - 62px);
  margin: 10px 20px;
  border-radius: 8px;
  content: "";
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
  animation: glint 1s ease-in forwards;
}

@keyframes fadein {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* glint comes from very left rather than only on image */
@keyframes glint {
  from { transform: translateX(-100%) skewX(-20deg); }
  to   { transform: translateX(200%) skewX(-20deg); display: none;}
}

#test-section {
  background-image: linear-gradient(to bottom, var(--bgcolor) 0%, var(--sectioncolor) 200px);
  width: 100%;
  margin: 100px 0 0 0;
  padding: 10px;
}

#test-section h3 {
  display: block;
  color: #131f20;
  margin-left: 10px;
}

#year-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-top: 1px solid var(--accent2);
  border-bottom: 1px solid var(--accent2);
  padding: 4px 0;
}

#select-year {
  display: inline-flex;
  justify-self: flex-start;
  overflow-x: scroll;
  margin: 0 20px 0 10px;
  border-right: 1.5px solid black;
}

#select-year p {
  margin: 2px 20px;
  padding: 2px 5px;
  border: 1px solid #66e1b240;
  border-radius: 13px;
  background-color: #25b980;
  color: #ffffff;
}

#filter {
  display: inline-flex;
  justify-self: flex-end;
  border: 1px solid #9663f450;
  border-radius: 6px;
  margin: 0 10px;
  padding: 2px 5px;
  background-color: var(--filter);
  color: var(--white);
  align-items: center;
  justify-content: space-between;
}

#filter img {
  margin-left: 3px;
}

#filter-modal {
  display: flex;
  flex-direction: column;
  width: calc(100%-20px);
  height: auto;
  max-height: 0px;;
  background: var(--ecard2);
  margin: 0 10px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  transition: 0.4s ease;
  overflow: hidden;
  box-shadow: 1.2px 1.2px 4.5px #00000550;
}

#filter-type {
  display: inline-flex;
  overflow: scroll;
  align-items: self;
  border-bottom: 1px solid;
  padding: 2px 15px;
}

#filter-type > *{
  border-right: 1px solid red;
  width: calc(100%/6);
  text-align: center;
  padding: 3px 0;
  position: relative;
  z-index: 0;
}

#filter-type > *:last-child {
  border: none;
}

#filter-type > *::before {
  content: "";
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: linear-gradient(to right, var(--ecard2) 0%, var(--sectioncolor) 20%, var(--sectioncolor) 80%, var(--ecard2) 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s;
  
}
#filter-type > *.active::before {
  opacity: 1;
}

#filter-options {
  display: flex;
  overflow-x: scroll;
  width: 100%;
  scroll-snap-type: x mandatory;
}

#filter-options div {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  margin: 10px 0 15px;
  width: 100%;
  border-right: 1.5px solid;
  border-left: 1.5px solid;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#filter-options div > * {
  margin-bottom: 10px;
  border: 1px solid;
}







#test {
  display: grid;
  padding: 10px;
  max-height: 600px;
  overflow-y: scroll;
}

.test-card {
  display: grid;
  grid-template-rows: 1fr 4fr;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  width: 100%;
  height: 60px;
  margin: 10px 0;
  padding: 3px;
  background-color: var(--tcard);
  color: #000000d3;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
  box-shadow: 1.5px 1.5px 4.9px #00000550;
}

@keyframes slidedown {
  from {transform: translateY(-20px); opacity: 0;}
  to {transform: translateY(0px); opacity: 1;}
}

.test-card:hover {
  transform: scale(1.02);
  box-shadow: 3px 3px 0px;
}

.result-preview {
  grid-column: 1/3;
  grid-row: 1/1;
  justify-self: left;
  align-self: flex-start;
  margin: 0 0 0 20px;
  padding: 0;
  font-size: 20%;
  width: 200px;
}

.test-year {
  grid-column: 1/1;
  grid-row: 2/2;
}

.test-date {
  grid-column: 2/2;
  grid-row: 2/2;
}

.test-shift {
  grid-column: 3/3;
  grid-row: 2/2;
}

.test-year, .test-date, .test-shift {
  margin: 0;
  padding: 0;
  justify-self: center;
  align-self: center;
  font-size: 18px;
  font-weight: 600;
  color: #000000c1;
}
.test-card img{
  grid-column: 4/4;
  grid-row: 2/2;
  justify-self: right;
  align-self: flex-start;
  color: black;
  height: 100%;
  margin-right: 10px;
}

footer {
  width: 100%;
  font-size: 12px;
  padding: 5px;
  background: linear-gradient(160deg, var(--sectioncolor) 0%, var(--sectioncolor) 50%, var(--accent3) 80%, var(--sectioncolor) 100%);
  color: var(--accent3);
  margin-top: 100px;
}

footer p {
  margin: 0 0 5px 0;
  text-align: center;
}

.hide {
  display: none !important;
}

@keyframes rotatex-clock {
  0% {transform: rotateX(0deg);}
  100% {transform: rotateX(90deg);}
}
@keyframes rotatex-clock2 {
  0% {transform: rotateX(-90deg);}
  100% {transform: rotateX(0deg);}
}
@keyframes rotatex-anticlock {
  0% {transform: rotateX(0deg);}
  100% {transform: rotateX(-90deg);}
}
@keyframes rotatex-anticlock2 {
  0% {transform: rotateX(90deg);}
  100% {transform: rotateX(0deg);}
}