/* basic styles for all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}


/* header styles */
header {
  height: 12em;
  background-image: url(../img/headBg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center 100%;
  box-shadow: inset 0 0 0 2000px rgba(16, 28, 83, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1em;
}
header img {
  position: absolute;
  height: 8em;
  top: 2em;
  left: 4em;
  transition: transform 0.3s ease, filter 0.3s ease;
}
header img:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}
.header {
  text-align: center;
  flex-grow: 1;
}
h1 {
  font-size: 2.5em;
  color: #fff;
  margin-bottom: 0.3em;
  font-size: 3.5em;
}
header p {
  color: gold;
  font-size: 1.5em;
}
nav {
  background-color: purple;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}
nav ul li {
  margin: 0 0.5em;
  transition: transform 0.3s ease;
}
nav ul li:hover {
  transform: scale(1.2);
}
nav ul li a {
  padding: 0 1em;
  color: #fff;
  text-decoration: none;
  font-size: 1.2em;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}
nav ul li a:hover {
  color: teal;
  background-color: gold;
}


/* main styles */
main {
  display: flex;
  justify-content: space-between;
  padding: 2em;
  background: url(../img/formBg.jpg) no-repeat center center fixed;
  background-size: cover;
}

.register, .students {
  width: 48%;
}


/* form styles */
.register {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 2em;
}
h2 {
  color: #fff;
  margin: 0.8em 0 0.5em 0;
}
form {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 2em;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  animation: fadeIn 1s ease-in-out;
}
form input,
button {
  padding: 0.5em;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1em;
  transition: background 0.3s ease, transform 0.3s ease;
}
form input::placeholder {
  color: #fff;
}
form input:hover,
button:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}
form input:focus,
button:focus {
  background: rgba(0, 0, 0, 0.4);
  outline: none;
  transform: scale(1.05);
  border: 2px solid gold;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* students page styles */
.students {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: url(img/studentsBg.jpg) no-repeat center center fixed;
  background-size: cover;
  padding-bottom: 2em;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-spacing: 0;
  border-collapse: separate;
  animation: fadeIn 1s ease-in-out;
}
th, td {
  padding: 0.5em 0.2em;
  text-align: left;
  color: #000; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
}
th {
  background: rgba(255, 255, 255, 0.4); 
  border-bottom: 2px solid rgba(255, 255, 255, 0.5); 
}
tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.2); 
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.3); 
}


/* footer */
footer {
  background-color: purple;
  color: #fff;
  padding: 10px 0;
  text-align: center;
  margin: 0;
  box-sizing: border-box;
}
footer ul {
  list-style-type: none;
  display: flex;
  justify-content: center;
  padding: 0;
}
footer ul li {
  margin: 0 10px;
}
footer ul li a img {
  width: 34px;
  height: 34px;
}
footer p {
  margin-top: 10px;
  font-size: 0.9rem;
}
footer ul li img {
    transition: transform 0.3s ease, color 0.3s ease;
}  
footer ul li img:hover {
  transform: scale(1.5) translateY(-0.5em);
}


/* Responsive styles */
/* For small laptops */
@media(max-width: 1050px) {
  main {
    flex-direction: column;
  }
  .students, .register {
    width: 100%;
    padding: 0 10%;
    justify-content: center;
  }
  table {
    width: auto;
  }
  header img {
    left: 2em;
  }
}

/* For tablets */
@media(max-width: 1024px) {
  header img {
    left: 0em;
  }
}

/* For tablets */
@media(max-width: 932px) {
  h1 {
    font-size: 3em;
  }
}

/* For tablets */
@media(max-width: 800px) {
  h1 {
    font-size: 5vw;
  }
  header p {
    font-size: 3vw;
  }
  table {
    height: auto;
    width: 100%;
    overflow-x: auto;
    min-width: 80%;
  }
}

/* For tablets */
@media(max-width: 650px) {
  header {
    height: 7em;
    background-position: center -85px;
  }
  header img {
    top: 2vw;
    left: 0;
    height: 15vw;
  }
}

/* For tablets */
@media(max-width: 480px) {
  nav ul li a {
    padding: 0;
    margin: 0 1vw;
  }
  header img {
    top: 1.5em;
  }
  .students, .register {
    padding: 0 0 1em 0;
  }
}