/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,500;0,700;1,300&family=DM+Sans:wght@300&display=swap");

/* CSS Variables */
:root {
  --primary-color: #ff7c00;
  --secondary-color: #acc8d7;
  --secondary-color-dark: #85a5b6;
  --background-color: rgb(252, 243, 243);
  --accent-color: #8a1a40;
  --footer-links-color: #5d132c;
  --font-family-heading: "Work Sans", sans-serif;
  --font-family-body: "DM Sans", sans-serif;
  --text-color-dark: #36454f;
  --text-color-light: #ffffff;
}

/* Global Styles */
body {
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  background-color: var(--background-color);
  color: var(--text-color-dark);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}
.work-sans-italic-subheading {
  font-family: "Work Sans", sans-serif;
  font-style: italic;
  font-weight: 300;
}

.work-sans-normal {
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
}

section {
  scroll-margin-top: 60px; /* shows sections titles when an intermal link directs to it */
}

/* body {
  padding-top: 100px; /* equal to navbar height 
} */

a {
  text-decoration: none;
}

/* Buttons */
.btn-custom-filled {
  background-color: #ff7c00;
  color: white;

  padding: 10px 20px;
  border-radius: 5px;
  -webkit-transition: background-color 0.3s ease, color 0.3s ease;
  -o-transition: background-color 0.3s ease, color 0.3s ease;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-custom-filled:hover {
  background-color: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-custom-outline {
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-weight: bold;
}

.btn-custom-outline:hover {
  background-color: var(--accent-color);
  color: white;
}

/* Navbar */

#navbar {
  position: fixed; /* Make navbar fixed so that hero text is centered and does not slide down when opening the page*/
  top: 0;
  width: 100%;
  z-index: 10;
}

#navbar .logo {
  width: 100px;
}

#navbar,
.dropdown-menu {
  background-color: var(--secondary-color);
}

.btn-custom-outline i {
  color: var(--accent-color);
}

.btn-custom-outline:hover i {
  color: white;
}

/* Header */

#hero {
  position: relative;
  height: 100vh;
  width: 100%;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  overflow: hidden;
}

#hero-video {
  position: relative;
  height: 100vh;
  width: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: 32% 70%;
  object-position: 32% 70%;
  opacity: 0.9;
  z-index: -1;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

#hero .container {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  z-index: 1;
}

h1 {
  font-size: 2.1rem;
  text-shadow: 2px 2px 4px rgba(255, 124, 0, 0.8);
}

.lead {
  font-size: 1.5rem;
  text-shadow: 1px 1px 1px rgba(255, 124, 0, 0.8);

  font-style: italic;
}

.fade-slide-text {
  opacity: 0; /* start invisible */
  -webkit-transform: translateY(-100%);
  -ms-transform: translateY(-100%);
  transform: translateY(-100%); /* start off-screen to the top */
}
.fade-slide-text.animate {
  -webkit-animation: slideFadeIn 1.5s forwards;
  animation: slideFadeIn 1.5s forwards;
  -webkit-animation-delay: 2s;
  animation-delay: 2s; /* delay before animation starts */
}

@-webkit-keyframes slideFadeIn {
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes slideFadeIn {
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
/* Base state so buttons do not load first in final position, they are invisible until animate class is triggered*/
.btn-slide {
  opacity: 0;
  -webkit-transform: translateY(100%);
  -ms-transform: translateY(100%);
  transform: translateY(100%); /* off-screen at bottom */
}

/* Slide from bottom-left */
.btn-slide-left.animate {
  -webkit-animation: slideFromBottomLeft 1.5s ease-out forwards;
  animation: slideFromBottomLeft 1.5s ease-out forwards;
  -webkit-animation-delay: 3.5s;
  animation-delay: 3.5s;
}

@-webkit-keyframes slideFromBottomLeft {
  0% {
    opacity: 0;
    -webkit-transform: translate(-100%, 100%);
    transform: translate(-100%, 100%); /* bottom-left corner */
  }
  100% {
    opacity: 1;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0); /* final position */
  }
}

@keyframes slideFromBottomLeft {
  0% {
    opacity: 0;
    -webkit-transform: translate(-100%, 100%);
    transform: translate(-100%, 100%); /* bottom-left corner */
  }
  100% {
    opacity: 1;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0); /* final position */
  }
}
/* Slide from bottom-right */
.btn-slide-right.animate {
  -webkit-animation: slideFromBottomRight 1.5s ease-out forwards;
  animation: slideFromBottomRight 1.5s ease-out forwards;
  -webkit-animation-delay: 3.5s;
  animation-delay: 3.5s;
}

@-webkit-keyframes slideFromBottomRight {
  0% {
    opacity: 0;
    -webkit-transform: translate(100%, 100%);
    transform: translate(100%, 100%); /* bottom-right corner */
  }
  100% {
    opacity: 1;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0); /* final position */
  }
}

@keyframes slideFromBottomRight {
  0% {
    opacity: 0;
    -webkit-transform: translate(100%, 100%);
    transform: translate(100%, 100%); /* bottom-right corner */
  }
  100% {
    opacity: 1;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0); /* final position */
  }
}

/* Main Content */

/*About us section*/

#about-us .col-md-4 {
  visibility: hidden;
}

#about-us span {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
}

#about-us span:nth-last-of-type(1) {
  color: var(--accent-color);
}

.body-text {
  font-size: 1rem;
  text-align: justify;
}

/* Carousel */

.carousel-inner {
  border-radius: 2%;
}

#about-us .overlay-carousel .carousel-caption {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
}

.image-wrapper {
  position: relative;
  width: 100%; /*So that carousel steps are positioned fixed to their corresponding image */
  height: 100%;
}

.carousel-steps {
  background: -webkit-gradient(
    linear,
    left top,
    right bottom,
    color-stop(20%, var(--primary-color)),
    color-stop(80%, var(--accent-color))
  );
  background: -o-linear-gradient(
    top left,
    var(--primary-color) 20%,
    var(--accent-color) 80%
  );
  background: linear-gradient(
    to bottom right,
    var(--primary-color) 20%,
    var(--accent-color) 80%
  );

  color: var(--text-color-light);
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  width: 60px;
  height: 60px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-weight: 900;
  font-size: 3rem;
  /* Positioning the number at the top  of the carousel */
  position: absolute;
  top: 10%;
  left: 10%;
}

/* Topics section */

#topics-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

#topics-wrapper img {
  width: 100%;

  overflow: hidden;
  -o-object-fit: cover;
  object-fit: cover;
}

.overlay-image-topics {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center; /* move h3 to center */
}

.topics-fade-animation {
  opacity: 0;
  -webkit-transform: scale(0.6);
  -ms-transform: scale(0.6);
  transform: scale(0.6);
  -webkit-transition: opacity 2s ease-out, -webkit-transform 2s ease-out;
  transition: opacity 2s ease-out, -webkit-transform 2s ease-out;
  -o-transition: opacity 2s ease-out, transform 2s ease-out;
  transition: opacity 2s ease-out, transform 2s ease-out;
  transition: opacity 2s ease-out, transform 2s ease-out,
    -webkit-transform 2s ease-out;
  /* opacity and transform will be triggered from below and put their value on this transition */
}

/* visible state is used for animations that activate when element becomes visible in the user viewport (in this case 20% of element must be visible) */
.topics-fade-animation.visible {
  opacity: 1;
  -webkit-transform: scale(1);
  -ms-transform: scale(1);
  transform: scale(1);
}

.overlay-image-topics a {
  position: absolute; /* moves h3 halway on y-axis */
  z-index: 3;
  top: 50%;
  text-align: center;
}

.overlay-image-topics::after {
  content: "";
  position: absolute;
  inset: 0;
  background: black;
  mix-blend-mode: multiply; /* darkening effect making the overlay more cinematic blend with the image */
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

/* hover state for topic image title once visible */
#topics .topics-fade-animation.visible h3 {
  color: var(--text-color-light);
  font-weight: 900;
  -webkit-transition: -webkit-transform 1s ease;
  transition: -webkit-transform 1s ease;
  -o-transition: transform 1s ease;
  transition: transform 1s ease;
  transition: transform 1s ease, -webkit-transform 1s ease;
}

#topics .topics-fade-animation.visible h3:hover {
  -webkit-transform: scale(1.05);
  -ms-transform: scale(1.05);
  transform: scale(1.05);
}

/* Footer */

footer {
  background-color: var(--secondary-color-dark);
  width: 100%;
}

footer .logo-container {
  position: relative;
  top: 0%;
  z-index: 1;
}

footer .logo-container img {
  width: 60%; /* img resizes with device width and height adjust to maintain aspect ratio */
  height: auto;
}

footer nav {
  position: sticky; /* footer nav section sticks to bottom until the end of the element*/
  background-color: var(--secondary-color-dark);

  bottom: 0;
  z-index: 10;
}

footer nav .social-links-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 4%;
}
footer hr {
  width: 60px;
  margin-left: auto;
  margin-right: auto;
  color: black;
}
.social-links-footer i {
  font-size: 1.2rem; /* font size for icon sizing */
}
.secondary-links a,
.tertiary-links a,
footer i {
  color: var(--footer-links-color);
  font-weight: bold; /* color contrast compliant in bold and no opacity at rest state to make it more accessible */
  -webkit-transition: -webkit-transform 0.25s ease;
  transition: -webkit-transform 0.25s ease;
  -o-transition: transform 0.25s ease;
  transition: transform 0.25s ease;
  transition: transform 0.25s ease, -webkit-transform 0.25s ease;
  /* initial transform is 0 When hovered the icon scales up with 1.15 
  EASE EFFECT:
- starts slow
- speeds up in the middle
- slows down again at the end
 */
}

.secondary-links a:hover,
.tertiary-links a:hover,
footer i:hover {
  -webkit-transform: scale(1.15);
  -ms-transform: scale(1.15);
  transform: scale(1.15);
}

.hr-separator {
  padding: 0 5px;
  width: 1px;
  height: 15px;
  color: black;
}

footer small a {
  color: black;
  font-size: 1rem;
}

/* Media Queries */

@media (prefers-reduced-motion: reduce) {
  #hero-video {
    -webkit-animation: none;
    animation: none;
    -webkit-transition: none;
    -o-transition: none;
    transition: none;
    display: none; /* Removes video for people who cannot tolerate moving backgrounds (vestibular issues) */
  }
}

@media screen and (max-width: 576px) {
  .carousel-steps {
    display: none;
  }
  /* On smaller screens shows steps in carousel caption*/
  #first-caption p::before {
    content: "1";
  }

  #second-caption p::before {
    content: "2";
  }

  #third-caption p::before {
    content: "3";
  }

  #fourth-caption p::before {
    content: "4";
  }

  .carousel-caption p::before {
    color: var(--primary-color);
    margin-right: 2px;
    font-weight: 900;
    font-size: 1.7rem;
    position: relative;
    right: 3px;
  }
}

@media screen and (max-width: 767px) {
  /* Footer */
  .hr-separator {
    display: none;
  }
  .tertiary-links a,
  .secondary-links a {
    display: block;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content; /* makes div as big as the anchor tag so you only interact with link when hovering over the content since anchor tag inside div makes the whole div clickable*/
    margin-left: auto;
    margin-right: auto;
  }
  .secondary-links a:not(:nth-last-of-type(1)),
  .tertiary-links a:not(:nth-last-of-type(1)) {
    padding-bottom: 5px;
  }
}

@media screen and (min-width: 768px) {
  /* Topics */
  #topics-wrapper {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 5%;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  .overlay-image-topics {
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    width: 40%;
  }

  /* Footer */
  .secondary-links a,
  .tertiary-links a {
    display: inline-block;
  }

  .hr-separator {
    visibility: hidden;
  }
}

@media screen and (min-width: 992px) {
  #about-us .col-md-4 {
    display: none;
  }

  #about-us .col-lg-6 {
    /* moves about us section in the middle of carousel height */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  #about-us .col-lg-6 #carousel-heading {
    display: none;
  }

  .carousel-steps {
    height: 75px;
    width: 75px;
    font-size: 3.5rem;
  }

  .overlay-image-topics {
    width: 28%;
  }
}

@media screen and (min-width: 1200px) {
  #about-us-paragraph {
    padding-right: 10px;
  }

  /*Footer*/
  footer .logo-container img {
    width: 50%;
  }

  .social-links-footer i {
    font-size: 1.6rem;
  }
}

@media screen and (min-width: 1400px) {
  #about-us-paragraph {
    padding-right: 24px;
  }

  /* Footer */

  footer .logo-container img {
    width: 40%;
  }

  .hr-separator {
    visibility: visible;
    padding: 0 12px;
  }
}
