/* Common */

:root {
  --primary-color: #ffb900;
  --secondary-color: #171100;
  --text-color: #5f5b53;
  --white-color: #ffffff;
  --progess-fill: #4343f1;
  --progess-empty: #ccc;
  --font-heading: "Sen", sans-serif;
}

* {
  /* Chỉnh lại kích thước theo weith height hiện thị trong code bao gồm cả padding và border */
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-size: 1.6rem;
  font-family: "Poppins", sans-serif;
}

a {
  text-decoration: none;
}

button {
  display: inline-block;
  min-width: 11.8rem;
  color: aliceblue;
  background-color: black;
  line-height: 4.8rem;
  border-radius: 2.45rem;
  font-size: 2rem;
  cursor: pointer;
}

.heading-lv2 {
  color: #171100;
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.27;
  letter-spacing: -0.76px;
}

.heading-lv3 {
  font-size: 1.6rem;
  font-family: var(--font-heading);
  color: var(--text-color);
}

/* Phần header */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fffcf4;
  padding: 0.8rem 0;
}

.main-content {
  width: 117rem;
  max-width: calc(100% - 4.8rem);
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.header .body {
  display: flex;
  align-items: center;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
}

.nav a {
  color: black;
  font-family: "Poppins";
  font-size: 1.6rem;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  padding: 0.8rem 2.1rem;
  color: #5f5b53;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12rem;
  height: 4.8rem;
  position: relative;
}

.nav a:hover {
  color: black;
}

.nav a:hover::after {
  position: absolute;
  content: "";
  border-radius: 0.1rem;
  background-color: #171100;
  display: block;
  width: 4.4rem;
  height: 0.2rem;
  bottom: 1rem;
}

.header__signin-button {
  padding-left: 3rem;
}

.header__logo {
  width: 10rem;
}

/* Phần main hero */

.hero {
  background-color: #fffcf4;
  width: 100%;
  height: 140rem;
}

.hero__search {
  margin-top: 3rem;
  font-size: 2.5rem;
  position: relative;
}

.hero__search i {
  height: 4rem;
  width: 4rem;
  cursor: pointer;
  background-color: var(--white-color);
  position: absolute;
  left: 0;
  top: 0;
  border: 1px solid var(--secondary-color);
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__search input {
  width: 4rem;
  padding-left: 0rem;

  height: 4rem;
  font-size: 2rem;
  border: 1px solid var(--secondary-color);
  border-radius: 1rem;
  transition: 0.3s;
}

.hero__search.zoom input {
  padding-left: 5rem;
  width: 40rem;
}

.hero .main-media,
.hero .main-text {
  flex: 1;
  margin: 0;
}

.hero .main-content .main-content__first {
  display: flex;
  align-items: center;
}

.hero .main-media .body,
.hero .main-text .body {
  width: 100%;
  height: 68.5rem;
  z-index: 1;
  margin-top: 5rem;
  position: relative;
}

.main-media-img {
  width: 47rem;
  height: 68.5rem;
  border-radius: 2rem;
  object-fit: cover;
}

.hero__summary {
  position: absolute;
  z-index: 2;
  background-color: white;
  border-radius: 2rem;
  width: 27rem;
  left: 25rem;
  top: 30rem;
}

.hero__summary .item {
  display: flex;
  padding: 1rem;
}

.hero__summary .item .icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: #ece7e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__summary .item .icon img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0rem;
}

.hero__summary .item .info {
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
}

.hero__summary .label {
  font-size: 2rem;
  color: #5f5b53;
}

.hero__summary .title {
  padding-top: 1.5rem;
  font-size: 1.5rem;
  color: black;
  font-weight: bold;
}

.hero .main-text .body .line {
  margin-left: 10rem;
}

.hero .main-text .body .line1 {
  font-size: 5.8rem;
}

.hero .main-text .body .line2 {
  margin-top: 2.2rem;
  color: #5f5b53;
  font-size: 1.8rem;
}

.hero .main-text .body .line3 {
  display: flex;
  align-items: center;
  margin-top: 3.8rem;
}

.hero .main-text .body .line3 .button-watch-video {
  margin-left: 5rem;
  display: flex;
  justify-self: center;
  align-items: center;
}

.hero .main-text .body .line3 .button-see-courses button {
  min-width: 18rem;
  background-color: var(--primary-color);
  border: none;
}

.hero .main-text .body .line3 .button-watch-video .icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: whitesmoke;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hero .main-text .body .line3 .button-watch-video button {
  margin-left: 2rem;
  color: black;
  background-color: #fff;
  border: none;
}

.hero .main-text .body .line4 {
  margin-top: 4.8rem;
  font-size: 1.8rem;
  color: #5f5b53;
}

.hero .main-text .body .line5 {
  margin-top: 2rem;
  display: flex;
}

.hero .main-text .body .line5 .line5-1,
.hero .main-text .body .line5 .line5-3 {
  font-size: 4.4rem;
  margin-right: 1.5rem;
}

.hero .main-text .body .line5 .line5-2,
.hero .main-text .body .line5 .line5-4 {
  font-size: 1.8rem;
  margin-right: 1.5rem;
  display: flex;
  align-items: center;
}

/* thưc hiện setting cho box ảnh di chuyển */
.maincontent__box {
  display: flex;
  gap: 4rem;
  margin-top: 10rem;
}

.maincontent__box div {
  height: 50rem;
  width: 20rem;
  background-repeat: no-repeat;
  border-radius: 5rem;
  background-position: center;
  background-size: cover;
  color: #fff;
  flex: 1;
  cursor: pointer;
  position: relative;
  transition: flex 1s;
}

.panel h3 {
  font-size: 2.4rem;
  position: absolute;
  margin: 0;
  left: 2rem;
  bottom: 2rem;
  opacity: 0;
  transition: opacity 2s;
}

.panel.active {
  flex: 10;
}

.panel.active h3 {
  flex: 10;
  opacity: 1;
}

/* Bắt đầu popular */

.popular {
  background-color: #fff;
  width: 100%;
  margin-bottom: 13.5rem;
}

.popular .main-content {
  width: 117rem;
  max-width: calc(100% - 4.8rem);
  margin-left: auto;
  margin-right: auto;
}

.popular {
  margin-top: 10rem;
}

.popular .tren {
  display: flex;
}
.popular .tren .heading {
  max-width: 45.8rem;
}

.popular .tren .heading p {
  margin-top: 2rem;
  color: var(--text-color);
}

/* Hiệu ứng nút control */
.popular__control {
  margin-left: auto;
  display: flex;
  justify-items: flex-end;
  align-items: center;
}

.popular__control-button {
  width: 7rem;
  height: 7rem;
  padding: 1rem;
  cursor: pointer;
  font-size: 5rem;
  color: var(--primary-color);
  border: 0.1rem solid var(--primary-color);
  margin: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.popular__control-button:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.popular .duoi {
  display: flex;
  gap: 30px;
}

.popular .box1,
.popular .box2,
.popular .box3 {
  margin-top: 10rem;
  display: flex;
  border-radius: 1.5rem;
  gap: 3rem;
  border: 1px solid black;
  width: 40rem;
}

.popular .duoi .info img {
  width: 100%;
  border-radius: 1.5rem;
}

.popular__img {
  object-fit: cover;
  height: 27rem;
}

.popular .duoi .info .text {
  padding: 16px 22px 22px;
}

.popular .duoi .info .text .head {
  display: flex;
  margin: 2rem 0rem 0rem 0rem;
  justify-content: space-between;
}

.popular .duoi .info .text .head .rank {
  display: flex;
  justify-items: center;
  align-items: center;
}

.popular__desc {
  margin: 2rem 0rem;
  line-height: 3rem;
  width: 30rem;
  color: var(--text-color);
}

.popular__info-img {
  height: 30rem;
  object-fit: cover;
}

.popular .duoi .info .text .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popular .duoi .info .text .foot .price {
  font-weight: bold;
}

/* Hiệu ứng nút cho button popular */
.popular__foot-button {
  position: relative;
  overflow: hidden;
}

.popular__foot-button span {
  position: relative;
  z-index: 1;
}

.popular__foot-button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  background-color: var(--primary-color);
  transition: width 0.5s linear;
}

.popular__foot-button:hover::after {
  width: 100%;
  left: 0;
}

/* Feedback */

.feedback {
  min-height: 38rem;
  margin-top: 21rem;
  padding: 4rem 0;
  background-color: #2e2100;
  color: white;
}

.feedback .main-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: auto;
}

.feedback .profile .main-picture {
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
}

.feedback .profile .name {
  margin-top: 1.3rem;
  font-size: 1.8rem;
  font-weight: bold;
}

.feedback .profile .course {
  margin-top: 0.4rem;
  font-size: 1.4rem;
}

.feedback .profile .dots {
  gap: 10px;
  display: flex;
  margin-top: 28px;
}

.feedback .main-content .content {
  font-size: 2.6rem;
  font-style: italic;
  line-height: 1.54;
  width: 80rem;
}

/* Code cho features */

.features > * {
  margin-top: 13.5rem;
}

.features {
  width: 117rem;
  max-width: calc(100% - 4.8rem);
  height: 64.5rem * 2;
  margin-left: auto;
  margin-right: auto;
}

.features .first,
.features .second {
  display: flex;
  gap: 10rem;
}

.features .first .images {
  display: flex;
  gap: 3rem;
}

.features .images img {
  max-width: 27rem;
  min-width: 27rem;
  border-radius: 4rem;
  object-fit: cover;
}

.features .first .images .img-left {
  margin-top: 5rem;
}

.features .first .images .img-right {
  margin-bottom: 5rem;
}

.features .content {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.features .content .head {
  margin-top: 10rem;
}

.features .content .foot {
  display: flex;
  justify-content: center;
}

.features .second .images img {
  max-width: 50rem;
  height: 60rem;
}

/* Hiệu ứng cho nút button trong feature */
.feature__foot-button {
  color: var(--white-color);
  background-color: var(--primary-color);
  transition: 0.3s linear;
}

.feature__foot-button:hover {
  color: var(--white-color);
  background-color: var(--text-color);
  transform: translate(0, -15px);
}

/* Blogs */

.blogs {
  background-color: #fffcf4;
}

.blogs .heading-lv2,
.blogs .heading-lv3 {
  margin-top: 5rem;
  text-align: center;
}

.blogs .list-box {
  background-color: var(--white-color);
  margin-top: 10rem;
  display: flex;
  gap: 5rem;
}

.blogs .list-box .box {
  border: 0.1rem solid black;
  border-radius: 3rem;
}

.blogs .list-box .images {
  width: 100%;
  height: 30rem;
  border-radius: 3rem 3rem 0rem 0rem;
  object-fit: cover;
}

.blogs .info {
  margin-top: 5rem;
}

.blogs .info > * {
  margin-top: 3rem;
}

.blogs h3 {
  font-weight: bold;
}

.blogs .info span {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.05);
}

.blogs .info .button {
  text-align: center;
  margin-bottom: 5rem;
}

.blogs .dots {
  margin-top: 5rem;
}

.blogs__progress-wrapper {
  display: flex;
  width: 600px;
  justify-content: space-between;
  max-width: 100%;
  position: relative;
  margin: 0 auto;
  z-index: 2;
}

.blogs__progress-wrapper::before {
  content: "";
  background-color: var(--progess-empty);
  height: 4px;
  width: 100%;
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
}

.blogs__progress {
  background-color: var(--progess-fill);
  height: 4px;
  width: 0%;
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  transition: width 1s;
}

.blogs__step {
  color: var(--progess-empty);
  background-color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid var(--progess-empty);
  z-index: 2;
}

.blogs__step.active {
  color: var(--progess-fill);
  background-color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid var(--progess-fill);
  transition: all 0s 1s;
}

.blogs__button-wrapper {
  padding-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blogs__button-wrapper button {
  background-color: var(--progess-fill);
  border: 0px;
  border-radius: 5rem;
  margin: 0rem 1rem 0 1rem;
}

.blogs__button-wrapper button:disabled {
  background-color: var(--progess-empty);
  cursor: not-allowed;
}

.blogs__button-next:active,
.blogs__button-prev:active {
  transform: scale(0.7);
}

/* Hiệu ứng cho nut button */
.blogs__button {
  position: relative;
  overflow: hidden;
}

.button__span {
  position: relative;
  z-index: 1;
}

.blogs__button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0;
  background-color: var(--primary-color);
  transition: width 0.5s linear;
}

.blogs__button:hover::after {
  width: 100%;
}

/* footer */

footer {
  background-color: #2e2100;
  margin-top: 13.5rem;
  color: var(--white-color);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

footer .tren {
  padding: 10rem 0rem 10rem 0rem;
  display: flex;
  gap: 3rem;
}

footer .tren > div {
  flex: 1;
}

.footer__circle {
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background-color: var(--text-color);
  position: absolute;
  top: 0px;
  left: 0px;
  transform: translate(-50%, -50%) scale(0);
  animation: scale 1s ease-out;
}

@keyframes scale {
  to {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}
/* ===== NAVBAR BASE ===== */
.header .body {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  font-size: 2.5rem;
  cursor: pointer;
}

/* Nav desktop */
.nav ul {
  display: flex;
  align-items: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  color: #5f5b53;
  position: relative;
  transition: 0.3s;
}

.nav a:hover {
  color: black;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0.5rem;
  width: 0;
  height: 2px;
  background-color: #171100;
  transition: width 0.3s;
}

.nav a:hover::after {
  width: 50%;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  body {
    font-size: 0rem;
  }

  .menu-toggle {
    display: block;
  }

  /* Ẩn nav mặc định */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fffcf4;

    /* Ẩn ban đầu */
    opacity: 0;
    transform: translateY(-2rem);
    pointer-events: none;

    transition: all 0.3s ease;
  }

  .nav.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav ul {
    flex-direction: column;
    width: 100%;
  }

  .nav a {
    width: 100%;
    padding: 1.5rem;
    justify-content: flex-start;
    border-bottom: 1px solid #ddd;
  }

  .main-media {
    width: 0%;
  }

  .main-media img {
    width: 0%;
  }

  .main-text body {
    display: flex;
  }

  .hero__summary {
    display: none;
  }

  .features img {
    display: none;
  }

  .popular {
    display: none;
  }

  .hero__search.zoom input {
    padding-left: 5rem;
    width: 30rem;
    font-size: small;
  }

  .main-content__first .body {
    margin-left: -10rem;
  }

  .line5 {
    display: flex;
    flex-direction: column;
  }

  footer .duoi,
  footer .company,
  footer .support,
  .group-17522 {
    display: none;
  }
}
