/* Main Stylesheet */





/* CSS Variables */

:root {

  /* Colors */

  --selective-yellow: hsl(42, 100%, 56%);
  --roman-silver: hsl(240, 6%, 51%);
  --roman-silver_10: hsla(240, 6%, 51%, 0.1);
  --light-coral: hsl(357, 100%, 75%);
  --oxford-blue: hsl(224, 53%, 10%);
  --light-gray: hsl(0, 0%, 80%);
  --keppei: hsl(173, 60%, 47%);
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);
  --black_10: hsla(0, 0%, 0%, 0.1);

  /* Typography */

  --ff-gilroy: "Gilroy", sans-serif;

  --headline-lg: 4.8rem;
  --headline-md: 3rem;
  --headline-sm: 2.4rem;
  --title-lg: 2.2rem;
  --title-md: 2rem;
  --title-sm: 1.8rem;
  
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;

  /* Spacing */

  --section-padding: 56px;

  /* Shadows */

  --shadow-1: 0px 35px 65px -10px hsla(0, 0%, 0%, 0.05);
  --shadow-2: 0 10px 40px hsla(0, 0%, 0%, 0.06);

  /* Border Radius */

  --radius-4: 4px;
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-circle: 50%;

  /* Transitions */

  --transition: 0.25s ease;
  --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
  --cubic-out: cubic-bezier(0.05, 0.83, 0.52, 0.97);

}





/* Reset Styles */

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

li { list-style: none; }

a,
img,
span,
button,
ion-icon { display: block; }

a {
  text-decoration: none;
  color: inherit;
}

img { height: auto; }

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

html {
  font-family: var(--ff-gilroy);
  font-size: 10px;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background-color: var(--white);
  color: var(--roman-silver);
  font-size: 1.6rem;
  line-height: 1.5;
  overflow: hidden;
}

body.loaded { overflow: visible; }

body.nav-active { overflow: hidden; }





/* Reusable Classes */

.container { padding-inline: 16px; }

.headline-lg,
.headline-md,
.headline-sm,
.title-lg {
  color: var(--oxford-blue);
  font-weight: var(--fw-700);
}

.headline-lg {
  font-size: var(--headline-lg);
  line-height: 1.3;
}

.headline-md {
  font-size: var(--headline-md);
  line-height: 1.2;
}

.headline-sm { font-size: var(--headline-sm); }

.title-lg {
  font-size: var(--title-lg);
  line-height: 1.4;
}

.title-md { font-size: var(--title-md); }

.title-sm {
  font-size: var(--title-sm);
  font-weight: var(--fw-500);
}

.section { padding-block: var(--section-padding); }

.has-bg-image {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.has-before,
.has-after {
  position: relative;
  z-index: 1;
}

.has-before::before,
.has-after::after {
  content: "";
  position: absolute;
}

.btn {
  --bg: var(--light-coral);
  max-width: max-content;
  background-color: var(--bg);
  color: var(--white);
  font-weight: var(--fw-500);
  padding: 12px 24px;
  border-radius: var(--radius-6);
  transition: var(--transition);
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn ion-icon {
  font-size: 20px;
  transition: var(--transition);
}

.btn:hover ion-icon {
  transform: translateX(4px);
}

.btn-secondary { --bg: var(--oxford-blue); }

:is(.btn-primary, .btn-secondary):is(:hover, :focus-visible) {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 5px var(--bg);
}

.btn-tertiary {
  --bg: var(--white);
  color: var(--oxford-blue);
  font-weight: var(--fw-600);
}

:is(.headline-lg, .headline-md) .span {
  color: var(--light-coral);
  display: inline;
}

.section-subtitle {
  font-weight: var(--fw-600);
  color: var(--keppei);
  margin-block-end: 4px;
}

.text-center { text-align: center; }

.section-title { margin-block-end: 24px; }

.headline-md .has-after { padding-block-end: 8px; }

.headline-md .has-after::after {
  background-image: url("../images/line-shape.svg");
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  z-index: -1;
}

.grid-list {
  display: grid;
  gap: 28px;
}

.card {
  position: relative;
  background-color: var(--white);
  padding: 24px;
  border-radius: var(--radius-8);
  transition: var(--transition);
}

.card:is(:hover, :focus-within) { box-shadow: var(--shadow-1); }

.layer-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.w-100 { width: 100%; }

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}





/*-----------------------------------*\
  #PRELOADER
\*-----------------------------------*/

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--light-coral);
  display: grid;
  place-items: center;
  z-index: 6;
  transition: var(--transition);
}

.preloader.loaded {
  visibility: hidden;
  opacity: 0;
}

.preloader .circle {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-circle);
  border: 4px solid var(--white);
  border-block-start-color: transparent;
  animation: rotate360 1s ease infinite;
}

@keyframes rotate360 {
  0% { transform: rotate(0); }
  100% { transform: rotate(1turn); }
}





/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header .btn { display: none; }

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding-block: 32px;
  z-index: 4;
}

.header.active {
  background-color: var(--white);
  position: fixed;
  box-shadow: var(--shadow-2);
  animation: headerActive 0.5s ease forwards;
}

@keyframes headerActive {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(0); }
}

.header .container,
.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-open-btn,
.nav-close-btn { font-size: 32px; }

.navbar {
  position: fixed;
  top: 0;
  left: -320px;
  max-width: 320px;
  width: 100%;
  background-color: var(--white);
  height: 100vh;
  padding: 40px 16px;
  z-index: 2;
  transition: 0.25s var(--cubic-in);
  visibility: hidden;
}

.navbar.active {
  transition: 0.5s var(--cubic-out);
  visibility: visible;
  transform: translateX(320px);
}

.navbar-top { margin-block-end: 34px; }

.nav-close-btn ion-icon { --ionicon-stroke-width: 35px; }

.navbar-item:not(:last-child) { border-block-end: 1px solid var(--black_10); }

.navbar-link {
  padding-block: 8px;
  transition: var(--transition);
}

.navbar-link:is(:hover, :focus-visible) { color: var(--oxford-blue); }

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--black);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 0.6;
  visibility: visible;
}





/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero-banner { display: none; }

.hero { padding-block-start: calc(var(--pt, 96px) + var(--section-padding)); }

.hero .title-md {
  font-weight: var(--fw-500);
  padding-inline-start: 16px;
  margin-block: 24px 44px;
}

.hero .title-md::before {
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background-color: var(--light-coral);
}

.hero .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}





/*-----------------------------------*\
  #CATEGORY
\*-----------------------------------*/

.category .grid-list { padding-block: 40px 52px; }

.category-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border-inline-start: 4px solid transparent;
}

.category-card:is(:hover, :focus-within) { border-color: var(--light-coral); }

.category-card .title-sm { margin-block-start: 4px; }

.category .btn { margin-inline: auto; }





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about .container {
  display: grid;
  gap: 30px;
}

.about .section-text,
.progress-list li:not(:last-child) { margin-block-end: 32px; }

.progress-label-wrapper {
  display: flex;
  justify-content: space-between;
  margin-block-end: 8px;
}

.progress-label-wrapper .title-sm {
  color: var(--oxford-blue);
  font-weight: var(-fw-600);
}

.progress {
  background-color: var(--roman-silver_10);
  height: 6px;
  border-radius: var(--radius-6);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
}

.progress-fill.red {
  background-color: var(--light-coral);
  width: 86%;
}

.progress-fill.green {
  background-color: var(--keppei);
  width: 67%;
}

.progress-fill.yellow {
  background-color: var(--selective-yellow);
  width: 95%;
}





/*-----------------------------------*\
  #COURSE
\*-----------------------------------*/

.course .grid-list { padding-block: 20px 44px; }

.course-card {
  border-block-end: 4px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.course-card:is(:hover, :focus-within) { border-color: var(--light-coral); }

.course-card .card-banner {
  height: 160px;
  background-color: var(--light-gray);
  overflow: hidden;
  border-radius: var(--radius-4);
}

.course-card :is(.wrapper, .rating-wrapper) {
  display: flex;
  align-items: center;
}

.course-card .wrapper {
  justify-content: space-between;
  gap: 16px;
}

.course-card .card-price { color: var(--light-coral); }

.course-card .rating-wrapper { gap: 4px; }

.course-card .card-title { margin-block: 8px 16px; }

.course-card .card-meta { justify-content: flex-start; }

.course-card .card-meta .title-sm {
  display: flex;
  gap: 8px;
}

.course .btn { margin-inline: auto; }





/*-----------------------------------*\
  #STATISTICS
\*-----------------------------------*/

.stats { 
  background-color: var(--keppei);
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: var(--selective-yellow);
  opacity: 0.08;
  border-radius: var(--radius-circle);
}

.stats-list {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-8);
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stats-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.stats-card[data-color="red"]:hover {
  border-color: var(--light-coral);
}

.stats-card[data-color="green"]:hover {
  border-color: var(--keppei);
}

.stats-card[data-color="yellow"]:hover {
  border-color: var(--selective-yellow);
}

.stats-icon-wrapper {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: var(--light-coral);
  border-radius: var(--radius-circle);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(255, 126, 132, 0.3);
  transition: var(--transition);
}

.stats-card[data-color="red"] .stats-icon-wrapper {
  background: var(--light-coral);
  box-shadow: 0 8px 24px rgba(255, 126, 132, 0.3);
}

.stats-card[data-color="green"] .stats-icon-wrapper {
  background: var(--keppei);
  box-shadow: 0 8px 24px rgba(59, 178, 184, 0.3);
}

.stats-card[data-color="yellow"] .stats-icon-wrapper {
  background: var(--selective-yellow);
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3);
}

.stats-card:hover .stats-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.stats-icon {
  font-size: 40px;
  color: var(--white);
}

.stats-content {
  flex: 1;
}

.stats-number {
  color: var(--oxford-blue);
  margin-block-end: 4px;
  font-weight: var(--fw-700);
}

.stats-card[data-color="red"] .stats-number {
  color: var(--light-coral);
}

.stats-card[data-color="green"] .stats-number {
  color: var(--keppei);
}

.stats-card[data-color="yellow"] .stats-number {
  color: var(--selective-yellow);
}

.stats-text { 
  color: var(--roman-silver);
  font-weight: var(--fw-500);
}





/*-----------------------------------*\
  #TESTIMONIALS
\*-----------------------------------*/

.testimonials .grid-list { padding-block: 40px 52px; }

.testimonial-card { padding: 32px 24px; }

.testimonial-card .rating-wrapper {
  display: flex;
  gap: 4px;
  margin-block-end: 20px;
}

.testimonial-text {
  font-style: italic;
  line-height: 1.8;
  margin-block-end: 24px;
  color: var(--roman-silver);
}

.testimonial-author {
  padding-block-start: 24px;
  border-block-start: 1px solid var(--black_10);
}

.testimonial-author .title-lg {
  margin-block-end: 4px;
  color: var(--oxford-blue);
}

.testimonial-author .title-sm { color: var(--roman-silver); }





/*-----------------------------------*\
  #FAQ
\*-----------------------------------*/

.faq .section-title { margin-block-end: 40px; }

.faq-list { 
  margin-block-start: 40px;
  max-width: 900px;
  margin-inline: auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-8);
  margin-block-end: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.faq-item.active {
  box-shadow: 0 4px 20px rgba(255, 126, 132, 0.15);
  border: 2px solid var(--light-coral);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: left;
  padding: 24px 28px;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
}

.faq-question:hover { 
  background: rgba(255, 126, 132, 0.05);
}

.faq-question .title-lg { 
  transition: var(--transition);
  font-size: 2rem;
  color: var(--oxford-blue);
}

.faq-item.active .faq-question .title-lg {
  color: var(--light-coral);
}

.faq-question ion-icon {
  flex-shrink: 0;
  font-size: 28px;
  color: var(--light-coral);
  transition: transform 0.4s ease;
  background: rgba(255, 126, 132, 0.1);
  border-radius: var(--radius-circle);
  padding: 8px;
}

.faq-item.active .faq-question ion-icon { 
  transform: rotate(180deg);
  background: var(--light-coral);
  color: var(--white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 600px;
  padding: 0 28px 24px 28px;
  opacity: 1;
}

.faq-answer .title-sm {
  line-height: 1.8;
  color: var(--roman-silver);
  padding-block-start: 8px;
  border-block-start: 1px solid rgba(0, 0, 0, 0.08);
}





/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/

.contact .section-title { margin-block-end: 48px; }

.contact-wrapper {
  display: grid;
  gap: 40px;
  margin-block-start: 40px;
}

.contact-info {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius-8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-info-title {
  color: var(--oxford-blue);
  margin-block-end: 16px;
}

.contact-text {
  color: var(--roman-silver);
  line-height: 1.8;
  margin-block-end: 32px;
}

.contact-list {
  display: grid;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--light-coral);
  border-radius: var(--radius-circle);
  flex-shrink: 0;
  color: var(--white);
  font-size: 28px;
}

.contact-label {
  color: var(--roman-silver);
  margin-block-end: 4px;
}

.contact-link {
  color: var(--oxford-blue);
  transition: var(--transition);
  word-break: break-word;
}

.contact-link:hover { color: var(--light-coral); }

.contact-address {
  color: var(--oxford-blue);
  word-break: break-word;
}

.contact-form {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius-8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.input-wrapper { margin-block-end: 20px; }

.input-field {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--black_10);
  border-radius: var(--radius-6);
  font-size: 1.6rem;
  font-family: var(--ff-gilroy);
  color: var(--oxford-blue);
  transition: var(--transition);
  outline: none;
}

.input-field::placeholder {
  color: var(--roman-silver);
  opacity: 0.7;
}

.input-field:focus {
  border-color: var(--light-coral);
  box-shadow: 0 0 0 4px rgba(255, 126, 132, 0.1);
}

.textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
}

.contact-btn ion-icon {
  font-size: 20px;
  transition: var(--transition);
}

.contact-btn:hover ion-icon {
  transform: translateX(4px);
}





/*-----------------------------------*\
  #CTA
\*-----------------------------------*/

.cta {
  background-color: var(--keppei);
  padding: 48px 24px;
  text-align: center;
}

.cta .headline-md { color: var(--white); }

.cta .btn { margin-inline: auto; }





/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer-top .container {
  display: grid;
  gap: 24px;
}

.footer-text { margin-block: 40px 32px; }

.social-list {
  display: flex;
  gap: 16px;
}

.footer-list-title { margin-block-end: 32px; }

.footer-link { margin-block-start: 16px; }

.footer-top .grid-list {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.footer-top .grid-list .img-cover { border-radius: var(--radius-6); }

.footer-bottom {
  padding-block: 32px;
  text-align: center;
  border-block-start: 1px solid var(--black_10);
}

.copyright { font-weight: var(--fw-500); }





/*-----------------------------------*\
  #CONTAINER QUERIES
\*-----------------------------------*/

/**
 * container query for card
 */

.card-container { container-type: inline-size; }

@container (min-width: 500px) {

  .course-card { flex-direction: row; }

  .course-card .card-banner {
    width: 160px;
    flex-shrink: 0;
  }

}





/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for large than 575px screen
 */

@media (min-width: 575px) {

  /**
   * REUSED STYLE
   */

  .container {
    max-width: 640px;
    width: 100%;
    margin-inline: auto;
  }

  .card { padding: 32px; }



  /**
   * FOOTER
   */

  .footer-top .container { grid-template-columns: 1fr 1fr; }

}





/**
 * responsive for large than 768px screen
 */

@media (min-width: 768px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {
    
    /**
     * typography
     */

    --headline-lg: 6rem;
    --headline-md: 3.8rem;

    /**
     * spacing
     */

    --section-padding: 80px;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 768px; }

  .grid-list { grid-template-columns: 1fr 1fr; }



  /**
   * STATISTICS
   */

  .stats-list { grid-template-columns: 1fr 1fr; }



  /**
   * CONTACT
   */

  .contact-wrapper { grid-template-columns: 1fr 1fr; }



  /**
   * CTA
   */

  .cta { padding-block: 78px; }

}





/**
 * responsive for large than 992px screen
 */

@media (min-width: 992px) {

  :root {

    /**
     * typography
     */

    --headline-lg: 7.7rem;
    --headline-md: 4.4rem;

    /**
     * spacing
     */

    --section-padding: 120px;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 1024px; }

  .btn {
    padding: 16px 32px;
    font-size: 1.8rem;
  }



  /**
   * HEADER
   */

  .nav-open-btn,
  .overlay,
  .navbar-top { display: none; }

  .navbar,
  .navbar.active {
    all: unset;
    display: block;
  }

  .navbar-list {
    display: flex;
    gap: 8px;
  }

  .navbar-item:not(:last-child) { border-block-end: none; }

  .navbar-link { padding: 8px 16px; }

  .header .btn {
    display: inline-flex;
    box-shadow: none;
    min-width: max-content;
  }

  .header .btn ion-icon {
    flex-shrink: 0;
  }



  /**
   * CATEGORY
   */

  .grid-list { grid-template-columns: repeat(3, 1fr); }



  /**
   * STATISTICS
   */

  .stats-list { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 32px;
  }



  /**
   * ABOUT
   */

  .about .container { grid-template-columns: 1fr 1fr; }



  /**
   * COURSE
   */

  .course .grid-list {
    grid-template-columns: 1fr 1fr;
    margin-block: 40px 48px;
  }



  /**
   * FOOTER
   */

  .footer-top .container { grid-template-columns: 1fr 0.5fr 0.5fr 0.8fr; }

  .footer-brand { padding-inline-end: 24px; }

}





/**
 * responsive for large than 1200px screen
 */

@media (min-width: 1200px) {

  /**
   * REUSED STYE
   */

  .container { max-width: 1170px; }



  /**
   * HERO
   */

  .hero-banner {
    display: block;
    max-width: max-content;
    margin-inline-end: -14%;
  }

  .hero .container {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 48px;
  }

  .hero .title-md { margin-block: 40px 60px; }



  /**
   * ABOUT
   */

  .about .container { grid-template-columns: 1fr 0.7fr; }



  /**
   * CTA
   */

  .cta { text-align: left; }

  .cta .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cta .headline-md { max-width: 22ch; }

  .cta .btn { margin-inline: 0; }



  /**
   * FOOTER
   */

  .footer .container { gap: 48px; }

}