/*Authors:Erinn Mouton, Nathan Just*/
/*Date: 7 September 2024*/
/*Description: This page includes styles for the header, navigation menu, main content, criteria section, table, contact section, and footer*/

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  --first-color: hsl(224.4, 78.3%, 27.1%);
  --title-color: hsl(230, 75%, 15%);
  --text-color: hsl(230, 12%, 40%);
  --body-color: hsl(230, 100%, 98%);
  --container-color: hsl(230, 100%, 97%);
  --border-color: hsl(230, 25%, 80%);

  /*========== Font and typography ==========*/
  --body-font: "Syne", sans-serif;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
  --z-modal: 1000;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1023px) {
  :root {
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: "Poppins";
}

html {
  scroll-behavior: smooth;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: rgb(255, 253, 254);
  color: var(--text-color);
}

input,
button {
  border: none;
  outline: none;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin: 0 auto;
}

.main {
  position: relative;
}

.main_forms_bg {
  background-image: url("../img/bg_forms.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 70vh;
  position: relative;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  box-shadow: 0 2px 16px hsla(230, 75%, 32%, 0.15);
  z-index: var(--z-fixed);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color 0.4s;
}

.nav__logo img {
  max-width: 100%;
  height: 70px; /* Default height for the logo */
  width: auto;
  display: block;
}

:is(.nav__logo, .nav__search, .nav__login, .nav__toggle, .nav__link):hover {
  color: var(--first-color);
}

/* Hamburger menu styles */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

.nav__toggle-icon {
  width: 25px;
  height: 2px;
  background-color: var(--title-color);
  display: block;
  position: relative;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  width: 25px;
  height: 2px;
  background-color: var(--title-color);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

.nav__toggle-icon::before {
  top: -8px;
}

.nav__toggle-icon::after {
  top: 8px;
}

/* Responsive menu visibility */
.nav__menu {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.nav__menu.hidden {
  display: none;
}

.nav__menu.show {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  right: 0;
  background-color: var(--body-color);
  width: 100%;
  padding: 1rem;
  box-shadow: 0 4px 8px hsla(0, 0%, 0%, 0.1);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
    padding-right: 50px;
  }

  .nav__menu {
    display: none; /* Hidden by default */
  }

  .nav__menu.show {
    display: flex; /* Show when toggled */
  }
}

/* Adjust size for tablets */
@media (max-width: 768px) {
  .nav__logo img {
    height: 50px;
    padding-left: 50px;
  }
}

/* Adjust size for smaller devices like phones */
@media (max-width: 480px) {
  .nav__logo img {
    height: 45px;
  }
}

/* Navigation for mobile devices */
@media screen and (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    background-color: var(--body-color);
    box-shadow: 0 8px 16px hsla(230, 75%, 32%, 0.15);
    width: 100%;
    padding-block: 4.5rem 4rem;
    transition: top 0.4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
  text-align: center;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color 0.4s;
}

/*============= MAIN CONTENT ===========*/
.content {
  font-family: "Poppins", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content-centered {
  flex: 1;
  padding: 20px;
  margin: 1cm 0;
  padding-top: 2cm;
}

.content-centered h1 {
  font-size: 3rem;
  color: rgb(255, 255, 255);
  margin-top: 1.5cm;
  margin-bottom: 0.5cm;
  text-align: center;
}

.content-centered p {
  color: rgb(255, 255, 255);
  margin-bottom: 0.9cm;
  text-align: center;
}

/* Media query for smaller devices */
@media (max-width: 768px) {
  .content {
    flex-direction: column; /* Stack elements vertically */
    align-items: center; /* Center content */
    text-align: center; /* Center text */
  }

  .content-left-side {
    align-items: center;
  }

  .content-right-side {
    display: none; /* Hide image on smaller devices */
  }

  .content-left-side h1 {
    font-size: 2rem; /* Smaller font size for smaller screens */
  }

  .content-left-side p {
    font-size: 0.9rem; /* Adjust font size */
  }

  /* Adjust button container and button styles */
  .button-container {
    flex-direction: column; /* Stack buttons vertically on small screens */
    width: 100%; /* Full width on small screens */
    align-items: center;
  }

  .button {
    width: 100%; /* Full width buttons on small screens */
    max-width: 250px; /* Set max width for buttons */
    margin: 4px 0; /* Vertical margin only for spacing */
  }
}

/* Media query for even smaller devices */
@media (max-width: 480px) {
  .content-left-side h1 {
    font-size: 2rem; /* Smaller font size for even smaller screens */
    text-align: center;
  }

  .content-left-side p {
    font-size: 0.9rem; /* Adjust font size */
  }
}

/*============= MAIN CONTENT ===========*/
.main-content {
  padding: 30px;
  background-color: white;
}

.main-content h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: black;
  text-align: center;
}

.main-content p {
  font-size: 1rem;
  color: black;
  margin-bottom: 30px;
}

/*=============== Criteria ===============*/
.criteria h2 {
  font-size: 2em;
  margin-bottom: 2ch;
  margin-top: 2rem;
}

.criteria ul {
  list-style-type: disc;
  padding-left: 60px;
}

.criteria li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: black;
}

.criteria li strong {
  color: #000;
}

/*=============== Table ===============*/
.table h1 {
  text-align: center;
  margin-top: 50px;
  color: black;
}

.table table {
  margin: 50px auto;
  width: 70%;
  border-collapse: collapse;
}

.table td {
  padding: 15px;
  border: 1px solid #ddd;
  color: black;
}

.table th {
  padding: 15px;
  text-align: left;
  background-color: #d3dcf6;
  border: 1px solid #ddd;
  color: black;
}

/*=============== Forms ===============*/ 
.admission-forms-section {
  background-color: #d3dcf6;
  color: white;
  padding: 40px; /* Reduce padding */
  text-align: center; /* Center heading and content */
  display: flex;
  flex-direction: column; /* Stack content vertically */
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */
  max-width: 1200px; /* Optional: Limit the section width */
  margin: 0 auto; /* Center the section horizontally */
  border-radius: 10px; /* Optional: Add rounded corners for a cleaner look */
}


.admission-forms-section h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #000000; /* Black text color */
}

.form-cards {
  display: grid; /* Use grid for smarter layout */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
  gap: 20px; /* Add space between cards */
  width: 100%; /* Ensure grid takes full width */
  max-width: 1200px; /* Optional: Limit max width for better layout */
  margin: 0 auto; /* Center container */
}

.form-card {
  padding: 20px;
  border: 1px solid #ccc; /* Light border */
  border-radius: 8px;
  background-color: #fff; /* White background for the card */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center; /* Center content inside the card */
  display: flex;
  flex-direction: column; /* Ensure content stacks vertically */
  align-items: center; /* Center items */
}

.form-card .material-icons {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #000; /* Black icons */
}

.form-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #000; /* Black text color */
}

.form-card p {
  font-size: 0.875rem;
  margin-bottom: 20px;
  color: #000; /* Black text color */
}

.form-card .button-container {
  display: flex;
  justify-content: center; /* Center buttons horizontally */
  gap: 20px; /* Add spacing between buttons */
}

.form-card button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  background-color: var(--first-color); /* Black background for buttons */
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-card button:hover {
  background-color: white;
  color: var(--first-color);
  border: 1px solid var(--first-color);
}

.form-card button.outline {
  background-color: transparent;
  color: var(--first-color);
  border: 1px solid var(--first-color);
}

.form-card button.outline:hover {
  background-color: var(--first-color); /* Black background for outline buttons on hover */
  color: white;
}

/*=============== Contact Us ===============*/
.contact-section {
  background-color: #1a2d7a; /* Dark blue background */
  color: white;
  padding: 80px;
  max-width: 100%;
  box-sizing: border-box;
}

.contact-section h1 {
  margin: 0;
  font-size: 2.7rem;
}

.contact-section p {
  margin: 15px 0;
  font-size: 1rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

/* Contact info layout for larger screens */
@media (min-width: 768px) {
  .contact-info {
    flex-direction: row;
    justify-content: space-around;
  }

  .contact-info p {
    width: auto;
    flex: 1;
    text-align: left;
  }
}

/* Icons for contact info */
.contact-info p::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  vertical-align: middle;
}

.contact-info p:first-child::before {
  background-image: url("../img/tel_img.png");
}

.contact-info p:nth-child(2)::before {
  background-image: url("../img/email_img.png");
}

.contact-info p:last-child::before {
  background-image: url("../img/location_img.png");
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-section h1 {
    font-size: 2rem;
  }

  .contact-info p {
    font-size: 1rem;
    text-align: center;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 40px;
  }

  .contact-section h1 {
    font-size: 1.8rem;
  }

  .contact-section p {
    font-size: 0.9rem;
  }

  .contact-info p {
    font-size: 0.8rem;
  }
}

/*================Footer====================*/

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 20px;
  font-family: "Poppins", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  font-size: 0.8rem;
}

/*=============== DIFFERENT DEVICES ===============*/
/* For large devices */
@media screen and (min-width: 1023px) {
  .nav {
    height: calc(var(--header-height) + 2rem);
    column-gap: 3rem;
  }
  .nav__menu {
    margin-left: auto;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }
}

@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }
}
