/*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__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
}

/*=============== 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;
}

@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;
  }
}

/*============= 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-left-side {
  flex: 1;
  padding: 20px;
  margin: 1cm 0;
  padding-top: 2cm;
  text-align: left; /* Default alignment for larger screens */
}

.content-left-side h1 {
  font-size: 2.7rem;
  color: rgb(29, 28, 28);
  margin-bottom: 0.5cm;
}

.content-left-side p {
  color: rgb(29, 28, 28);
  margin-bottom: 0.9cm;
}

.content-right-side {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-top: 3cm;
  margin-bottom: 1cm;
}

.content-right-side img {
  height: 500px;
  width: 450px;
  border-radius: 6px;
  padding-top: 20px;
}

.button {
  background-color: #1a2d7a;
  border: none;
  border-radius: 7px;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin: 4px 9px; /* Horizontal spacing for larger screens */
  cursor: pointer;
  width: 250px; /* Fixed width for buttons */
}

/* Button container for better layout */
.button-container {
  display: flex;
  flex-direction: column; /* Default to horizontal for larger screens */
  justify-content: flex-start; /* Align buttons to the left */
  margin-top: 0.3cm;
}

/* 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 */
  }

  /* Styling for the content left side */
  .content-left-side {
    flex: 1;
    display: flex;
    justify-content: center; /* Centering content horizontally */
    align-items: flex-start;
    margin-top: 2cm;
    margin-bottom: 2.7cm;
    padding: 0 1rem; /* Add padding for better responsiveness */
  }

  .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 */
  }
}

/* Gallery layout */
figure img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1; /* Maintains square aspect ratio */
  object-fit: cover;
  transition: transform 1000ms;
}

ul.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(
    auto-fit,
    minmax(200px, 1fr)
  ); /* Responsive column sizing */
  max-width: 100%;
}

/* Adjust for larger screens */
@media (min-width: 768px) {
  /* You can adjust the breakpoint as needed */
  ul.gallery {
    grid-template-columns: repeat(3, 1fr); /* Three columns on larger screens */
  }
}

figure {
  margin: 0;
  position: relative;
  overflow: hidden;
}

figure::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: rgba(9, 0, 48, 0.5);
  transform-origin: center;
  opacity: 0;
  transform: scale(2);
  transition: opacity 300ms;
}

figcaption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center; /* Centering vertically */
  text-align: center;
  padding: 1rem;
  color: white;
  font-size: 1.2rem;
  z-index: 1;
  opacity: 0;
  transition: opacity 600ms, transform 600ms;
}

a:is(:hover, :focus) figure::after {
  opacity: 1;
}

a:is(:hover, :focus) figcaption {
  opacity: 1;
  transition: opacity 600ms;
}

@media (prefers-reduced-motion: no-preference) {
  figcaption {
    transform: translate3d(0, 2rem, 0);
  }

  figure::after {
    border-radius: 50%;
    opacity: 1;
    transform: scale(0);
    transition: transform 900ms;
  }

  a:is(:hover, :focus) figure::after {
    transform: scale(2.5);
  }

  a:is(:hover, :focus) figcaption {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 600ms 400ms, transform 600ms 400ms;
  }

  a:is(:hover, :focus) figure img {
    transform: scale(1.2);
  }
}

/*============= Facilities Images ===========*/
.facilities {
  background-color: #d3dcf6;
  text-align: center;
  padding: 20px;
  padding-bottom: 40px;
}

.facilities h1 {
  font-size: 2.5em;
  margin-bottom: 1cm;
  margin-top: 1cm;
  color: #000;
}

/* Flex container for facilities */
.facility-container {
  display: flex; /* Enable flexbox layout */
  justify-content: space-between; /* Space between cards */
  flex-wrap: wrap; /* Allow cards to wrap onto next line */
  margin-top: 20px; /* Space between title and facilities */
}

.facility {
  flex: 1; /* Allow cards to grow equally */
  margin: 10px; /* Margin for spacing */
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box; /* Include padding in width calculation */
  min-width: 250px; /* Minimum width for responsiveness */
}

.facility img {
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  max-height: 250px; /* Limit the height */
  object-fit: cover; /* Cover the area without distortion */
  border-radius: 8px;
}

.facility h2 {
  font-size: 1.2em;
  color: #000;
  margin-top: 10px;
}

.facility p {
  font-size: 0.9em;
  color: #555;
  margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .facility-container {
    flex-direction: column; /* Stack vertically on medium screens */
    align-items: center; /* Center cards */
  }

  .facility {
    width: calc(100% - 20px); /* Full width for each card */
    margin: 10px 0; /* Vertical spacing */
  }
}

@media (max-width: 480px) {
  .facility {
    width: calc(100% - 20px); /* Ensure full width on small screens */
  }
}

/*============= Event Gallery ===========*/
.events-section {
  padding: 20px;
  text-align: center;
  padding-bottom: 3cm;
}

.events-section h1 {
  font-size: 2.5em;
  margin-bottom: 1cm;
  margin-top: 1cm;
  color: #000;
}

/* Slideshow styles */
.slideshow-container {
  max-width: 100%; /* Full width */
  position: relative;
  margin: auto; /* Centering */
  display: none; /* Hide by default on larger screens */
}

.mySlides {
  display: none; /* Hide all slides by default */
}

.mySlides img {
  width: 100%; /* Full width for images */
  height: 300px; /* Set a fixed height for uniformity */
  object-fit: cover; /* Maintain aspect ratio while covering the area */
  border-radius: 5px; /* Optional rounded corners */
}

/* Styles for the grid layout on larger screens */
.events {
  display: flex; /* Flexbox layout for the grid */
  justify-content: center;
  gap: 20px;
  padding-bottom: 1cm;
  flex-wrap: wrap; /* Allow wrapping of images */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .slideshow-container {
    display: block; /* Show the slideshow on smaller screens */
  }
}

.events img {
  width: calc(33.333% - 20px); /* Adjust width for 3 images per row */
  height: auto; /* Maintain aspect ratio */
  object-fit: cover;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .events img {
    width: calc(50% - 10px); /* 2 images per row on smaller screens */
  }
}

@media (max-width: 480px) {
  .events img {
    width: calc(50% - 10px); /* Still 2 images per row on extra small screens */
  }
}

/*=============== 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;
}
