*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  outline: 0;
  outline-offset: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.container-lg {
  width: 100%;
}

.container-sm {
  max-width: 1100px;
  margin: 0 auto;
  margin-bottom: 70px;
}

/* Vertical sections (with title and paragraph/description) */
.container-sm.vertical .section-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.container-sm.vertical .section-title::after {
  content: "";
  width: 60px;
  background-color: var(--primary-color);
  height: 3px;

  position: absolute;
  top: 120%;
  left: 40%;
}

.container-sm.vertical .section-paragraph {
  text-align: center;
  font-weight: 500;
  width: 65%;
  margin-bottom: 50px;
}

/* Horizontal sections (with image, title and paragraph/description) */
.container-sm.horizontal .section-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  position: relative;
}

.container-sm.horizontal {
  display: flex;
  gap: 50px;
  align-items: center;
}

.container-sm.horizontal.left {
  flex-direction: row;
}
.container-sm.horizontal.right {
  flex-direction: row-reverse;
  justify-content: end;
}

.container-sm.horizontal .section-img {
  width: 7rem;
  flex: 1;
}

.container-sm.horizontal .section-content {
  flex: 1;
}

.container-sm.horizontal .section-title::after {
  content: "";
  width: 60px;
  background-color: var(--primary-color);
  height: 3px;

  position: absolute;
  top: 120%;
  left: 0%;
}

.container-sm.horizontal .section-paragraph {
  font-weight: 500;
  /* width: 65%; */
  margin-bottom: 50px;
}

.btn {
  transition: all 0.3s ease;
  color: #333;
  background-color: var(--secondary-color);
  padding: 20px 30px;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 500;
  &:hover {
    background-color: var(--primary-color);
    color: #fff;
  }
}
/* Utility Variables */
:root {
  --primary-color: rgb(240, 68, 76);
  --secondary-color: #ffc05a;

  --header-background-color: rgba(240, 68, 76, 0.8);
}

/* General Styling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* leaves 100px space from the top when scrolled into view */
  overflow-x: hidden;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  text-decoration: none;
  &:hover {
    color: var(--secondary-color);
  }
}

li {
  list-style: none;
}

/* Header Styling */
header.header {
  /* sticky makes the element inside the flow normally. But "fixed" takes it out of the flow. No need for
  the hustle we've used. */
  transition: background-color 0.4s ease;
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1.5rem;
  z-index: 1;
}

header.header.scroll {
  background-color: var(--header-background-color);
}

.logo {
  width: 5rem;
  height: 100%;
}

.main-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;

  a {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;

    &:hover {
      color: var(--secondary-color);
    }
  }
}

/* Main Section (Hero) Styling */
section.hero.container-lg {
  position: relative;
  background: url("../images/header-background.jpg") no-repeat center
    center/cover;
  height: 100vh;
}

section.hero {
  .container-sm {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    height: 100vh;
  }
}

.hero-text {
  flex: 1;
  color: white;
  padding: 0px 0px 50px 0px;
  h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 20px;
  }
  p {
    line-height: 2;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 40px;
  }
}

.hero-img {
  /* min-width: 0; */
  flex: 1;
}

/* Cloud-shaped white area */
.frame-decoration {
  width: 100%;
  height: 100px;
  position: absolute;
  /* Position it at the absolute bottom */
  bottom: 0;
}

/* What Will You Learn? Section Styling */
section#what-will-you-learn.container-lg {
  margin-bottom: 150px;
}

section#what-will-you-learn .container-sm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0px;
}

section#what-will-you-learn .learn-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 30px;
  row-gap: 40px;
}

.learn-card .card-img {
  transition: transform 0.3s ease;
  &:hover {
    transform: scale(1.1);
  }
}

.learn-card .card-heading {
  font-size: 1rem;
  margin-top: 5px;
}

/* Chapters Section */
section#chapters.container-lg {
  margin-bottom: 150px;
}
section#chapters .container-sm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* margin-top: 70px; */
  gap: 0px;
}

section#chapters .info-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4);
}

.info-card.vertical {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 30px;
}

.info-card .info-img {
  width: 7rem;
}

/* Summary Section Styling */
section#summary.container-lg {
  background-color: #f4f4f4;
  padding-top: 5px;
}

section#summary .container-sm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 70px;
  margin-bottom: 0;
  gap: 0px;
}

section#summary .summary-table {
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  padding: 30px;
  margin-bottom: 70px;
}

section#summary .table-content {
  display: flex;
  flex-direction: column;
}

section#summary .content-heading {
  background-color: var(--primary-color);
  color: #fff;
  padding: 10px;
  margin-bottom: 20px;
}

section#summary ol {
  counter-reset: item; /* reset counter at top-level */
  list-style: none; /* remove default bullets/numbers */
  li {
    counter-increment: item; /* increment counter for each <li> */
    margin: 0.3em 0;
  }
  /* Here I have to do this so that I don't add it to the headings as well */
  li ol li::before {
    content: counters(item, ".") ".";
  }

  li ol li {
    position: relative;
    margin-bottom: 30px;
    padding-right: 50px;
  }

  li ol li::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.2);
    top: 150%;
    left: 0%;
  }
  li ol li:last-child::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: transparent;
    top: 150%;
    left: 0%;
  }
}

/* Who Is This Course For? Styling */
section#who-is-this-course-for.container-lg {
  display: flex;
  justify-content: end;
  align-content: center;
  /* height: 20vh; */
  min-height: 65vh;
  background: url("../images/audience.jpg") no-repeat top center/cover;
}

section#who-is-this-course-for .section-content {
  background-color: var(--primary-color);
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;

  .section-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 85%;
    color: #fff;

    h2 {
      font-size: 2rem;
    }
    p {
      font-weight: 500;
    }

    li i {
      color: var(--secondary-color);
    }
  }
}

/* Takeaways Section */
section#takeaways.container-lg {
  margin-bottom: 150px;
}
section#takeaways .container-sm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 70px;
  gap: 0px;
}

section#takeaways .info-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 30px;
}

.info-card.horizontal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 25px;
}

.info-card.horizontal .info-img {
  color: var(--primary-color);
}

/* Author Section Styling */
section#author ul {
  margin-bottom: 70px;
  position: relative;
}

section#author li {
  margin-bottom: 5px;

  i {
    font-size: 0.8rem;
    text-align: center;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 200%;
    padding: 2px 2px;
    /* margin: 10px auto; */
  }
}

/* Stats Banner Section Styling */
section#stats-banner.container-lg {
  background: url("../images/stats-background.jpg") center/cover no-repeat;
}

section#stats-banner .container-sm {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
}

section#stats-banner .stats-img {
  flex: 1;
  /* Allow shrinking, this line is important because an image doesn't allow shrinking below its intrinsic width. This overrides it. */
  min-width: 0;
  /* background-color: #333; */
}

section#stats-banner .stats-content {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  gap: 30px;

  /* background-color: #ccc; */
}

section#stats-banner .stats-numbers-flex {
  display: flex;
  gap: 20px;
}

section#stats-banner .stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* flex: 1; */
}

section#stats-banner .stat .value {
  font-size: 3rem;
}

section#stats-banner .btn {
  text-align: center;
  width: 200px;
}

/* Newsletter Section Styling */
section#newsletter .container-sm {
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 50px;
}

section#newsletter .section-title::after {
  display: none;
}

section#newsletter .newsletter-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: inherit;
  gap: 20px;
  input[name="email"] {
    padding: 15px;
    border-radius: 20px;
    border: 1px solid #ccc;
    width: 350px;
  }

  .btn {
    border: none;
    width: 170px;
    text-align: center;
  }
}

/* Contact Section Styling */
section#contact .contact-header.container-lg {
  background-color: var(--primary-color);
}
section#contact h1 {
  padding: 9rem 0rem 2rem;
  color: #fff;
  font-size: 3rem;
}

section#contact .container-sm {
  padding: 1rem;
}

section#contact p {
  margin: 2rem 0 2rem;
}

section#contact .contact-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 30px;

  input,
  textarea {
    width: 100%;
    padding: 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.3);
  }

  textarea {
    height: 200px;
  }

  .btn {
    border: none;
    width: 100%;
  }
}

/* Location Section Styling */
section#location .container-sm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

section#location h2 {
  font-size: 2rem;
}

section#location iframe {
  width: 100%;
}

/* Disable Mobile For Desktop */
.mobile-menu,
.mobile-canvas,
.mobile-menu-list {
  display: none;
}

/* Footer Styling */
footer.container-lg {
  color: #fff;
  background-color: #2b2b31;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* align-items: center; */
  height: 400px;
}

footer .social {
  flex: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

footer h4 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 20px;
}

footer .social-flex-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

footer a {
  color: #fff;
}

footer a i {
  font-size: 2rem;
}

footer .navigation-copyright {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-around;
  margin: 0;
  border-top: 1px solid rgba(204, 204, 204, 0.3);
  padding: 10px 0;
}

footer .footer-menu {
  display: flex;
  gap: 20px;
}

@media (max-width: 1100px) {
  .container-sm {
    margin: 60px;
    margin-bottom: 70px;
  }

  section#what-will-you-learn .container-sm {
    margin-top: 0;
  }
  section.hero {
    .container-sm {
      margin: 0px 60px;
    }
  }

  section#contact .container-sm {
    margin: 0px 20px;
  }

  section#contact p {
    padding: 20px 0;
  }
}

@media (max-width: 992px) and (min-width: 768px) {
  header.header {
    flex-direction: column;
  }
  section#takeaways .info-card-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  section#contact h1,
  section#contact p,
  section#location h2,
  section#location p {
    text-align: center;
  }
}

/* Mobile Version (Responsive) */
@media (max-width: 768px) {
  /* Don't show Desktop's main menu */
  .main-menu {
    display: none;
  }

  /* Show the hamburg menu icon and style it */
  .mobile-menu {
    display: block;
    i {
      color: #fff;
      &:hover {
        color: var(--secondary-color);
      }
    }
  }

  /* The canvas that opens when you click the hamburg icon */
  .mobile-canvas {
    transform: translateX(100%);
    transition: transform 0.7s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 50px;
    position: absolute;
    top: 100%;
    left: 0;
    height: 100vh;
    width: 100vw;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    a {
      color: #fff;
      &:hover {
        color: var(--secondary-color);
      }
    }
    .mobile-menu-list {
      li > a,
      li > a > i {
        color: #fff;
        &:hover {
          color: var(--secondary-color);
        }
      }
    }
  }

  .mobile-canvas.active {
    transform: translateX(0%);
  }

  .mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    font-size: 1.2rem;
  }

  /* Main Section (Hero) Styling */
  section.hero {
    .container-sm {
      text-align: center;
      padding-top: 6rem;
      height: 100vh;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 15px;
    }
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 0;
    h1 {
      font-size: 1.7rem;
    }
    p {
      font-size: 1rem;
    }
  }

  .hero-img {
    flex: 1;
    width: 300px;
  }

  section.hero a {
    padding: 20px;
    font-size: 1.1rem;
  }

  /* Cloud-shaped White area */
  .frame-decoration {
    height: 50px;
  }

  /* What Will You Learn? Section Styling */
  section#what-will-you-learn .learn-card-grid {
    padding: 15px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    column-gap: 15px;
    row-gap: 20px;
  }

  .learn-card .card-heading {
    font-size: 0.8rem;
  }

  /* Chapters Section */
  /* section#chapters.container-lg {
    margin-bottom: 150px;
  } */

  /* section#chapters .container-sm {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0px;
  } */

  section#chapters .info-card-grid {
    padding: 20px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 40px;
  }

  /* Summary Section Styling */
  section#summary ol {
    li ol li {
      position: relative;
      padding-right: 0px;
    }

    li ol li::after {
      content: "";
      top: 115%;
      left: 0%;
    }
  }
  section#summary .summary-table {
    margin: 15px;
  }

  /* Takeaways Section Styling */
  section#takeaways .info-card-grid {
    padding: 20px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
  }

  section#takeaways .info-card.horizontal {
    justify-content: start;
  }

  /* Details & Author Styling */
  .container-sm.horizontal.right,
  .container-sm.horizontal.left {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .container-sm.horizontal .section-img {
    width: 100%;
  }
  .container-sm.horizontal {
    padding: 20px;
  }

  /* Stats Banner Section Styling */
  section#stats-banner .container-sm {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  /* Footer Styling */
  footer h4 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 20px;
  }

  footer a i {
    font-size: 2rem;
  }

  footer .navigation-copyright {
    flex-direction: column;
  }
}

@media (max-width: 725px) {
  section#who-is-this-course-for .section-content {
    width: 100%;
  }
}

@media (max-width: 640px) {
  section#stats-banner .stats-numbers-flex {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .container-sm {
    margin: 0;
  }
  .container-sm.horizontal .section-title {
    font-size: 1.4rem;
  }
  .container-sm.horizontal .section-paragraph {
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px;
  }

  section#contact h1 {
    font-size: 2rem;
  }
  section#contact p {
    font-size: 0.9rem;
  }

  section#location .container-sm {
    padding: 20px;
  }
}

@media (max-width: 360px) {
  section#newsletter .newsletter-form {
    input[name="email"] {
      width: 300px;
    }
  }
  footer a i {
    font-size: 1.5rem;
  }
}
