@font-face {
  font-family: 'My Font';
  src: url('../lib/font/1FTV-HF-Gesco.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'My Font', serif;
}

body {
  background-color: #FFEFD6;
}

body::before {
  position: absolute;
  width: min(1400px, 90vw);
  transform: translateX(-50%);
}

.banner {
  width: 100%;
  height: 100vh;
  text-align: center;
  overflow: hidden;
  position: relative;

  /* Thêm các thuộc tính sau */
  background-image: url('../IMG/Bac/14.PNG');
  /* Đường dẫn đến hình nền */
  background-size: cover;
  /* Đảm bảo hình nền phủ toàn bộ mà không bị lặp */
  background-repeat: no-repeat;
  /* Không lặp lại hình nền */
  background-position: center;
  /* Căn giữa hình nền */
}

.banner .slider {
  position: absolute;
  width: 200px;
  height: 250px;
  top: 10%;
  left: calc(50% - 100px);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  animation: autoRun 20s linear infinite;
  z-index: 2;
}

@keyframes autoRun {
  from {
    transform: perspective(1000px) rotateX(-30deg) rotateY(0deg);
  }

  to {
    transform: perspective(1000px) rotateX(-30deg) rotateY(360deg);
  }
}

.banner .slider .item {
  position: absolute;
  inset: 0 0 0 0;
  transform:
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(400px);
}

.banner .slider .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.center-content {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

.center-content h1 {
  font-size: 8.5vw;
  color: #C70E1C;
  line-height: 1em;
  margin: 0;
}

/* P2 */
.bac-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: 2rem;
  /* khoảng cách giữa các card */
  margin-top: 2.5rem;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: 90%;
  /* chiều rộng chiếm 25% chiều rộng khung nhìn */
  height: 80%;
  /* chiều cao chiếm 75% chiều cao khung nhìn */
  border-radius: 50% / 40%;
  border: 0.4rem solid #0A4D3C;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

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

.button-container {
  margin-top: -5rem;
  display: flex;
  justify-content: center;
}

.next-button {
  padding: 17px 40px;
  border-radius: 50px;
  cursor: pointer;
  border: 0;
  background: #0A4D3C;
  color: #ffe9ab;
  font-weight: bold;
  box-shadow: rgb(0 0 0 / 5%) 0 0 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 1vw;
  transition: all 0.5s ease;
}

.next-button:hover {
  letter-spacing: 3px;
  background-color: #ffe9ab;
  color: #0A4D3C;
  box-shadow: #FCB92C 0 7px 29px 0;
}

.next-button:active {
  letter-spacing: 3px;
  background-color: #ffe9ab;
  color: #0A4D3C;
  box-shadow: #FCB92C 0 0 0 0;
  transform: translateY(10px);
  transition: 100ms;
}

/*.next-button {*/
/*  background-color: #c0392b;*/
/*  color: white;*/
/*  border: none;*/
/*  padding: 0.625rem 1.5625rem;*/
/*  font-size: 1rem;*/
/*  border-radius: 0.25rem;*/
/*  cursor: pointer;*/
/*  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;*/
/*}*/

/*.next-button:hover {*/
/*  background-color: #e74c3c;*/
/*  transform: translateY(-2px);*/
/*  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);*/
/*}*/

/*.next-button:active {*/
/*  transform: scale(0.98);*/
/*  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);*/
/*}*/

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.decor-img1 {
  margin-top: -15rem;
  /* đẩy xuống dưới */
  width: 15rem;
  /* thay vì 80px */
  height: auto;
  opacity: 0.8;

  transform: translateX(-10rem);
  /* dịch sang trái */
}

.decor-img2 {
  margin-top: -35rem;
  /* đẩy xuống dưới */
  width: 20rem;
  /* thay vì 80px */
  height: auto;
  opacity: 0.8;
  z-index: -1;
  transform: translateX(-10rem);
  /* dịch sang trái */
}

.decor-img3 {
  margin-top: -45rem;
  /* đẩy xuống dưới */
  width: 25rem;
  /* thay vì 80px */
  height: auto;
  opacity: 0.8;
  z-index: -1;
  transform: translateX(-8rem);
  /* dịch sang trái */
}

.decor-img4 {
  margin-top: 5rem;
  /* đẩy xuống dưới */
  width: 15rem;
  /* thay vì 80px */
  height: auto;
  opacity: 0.8;
  z-index: -1;
  transform: translateX(13rem);
  /* dịch sang trái */
}

/* P3 */
.background-section {
  margin-top: 2rem;
  position: relative;
  /*background-image: url('../IMG/Bac/10.PNG');*/
  /*background-size: cover;*/
  /*background-position: center;*/
  height: calc(100vh + 20vh);
  display: flex;
  flex-direction: column;
  /* Thêm dòng này */
  align-items: flex-end;
  /* Giữ các khối sát bên phải */
  justify-content: center;
  /* Căn giữa theo chiều dọc */
  padding: 20px;
}

.bac-img-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
}

.background-overlay1 {
  /* lớp phủ tối để dễ đọc chữ */
  padding: 0.2rem;
  color: #FCB92C;
  text-align: justify;
  width: 100%;
  border-radius: 1rem;
  font-size: 1.3rem;
  line-height: 1.6;
  font-weight: bold;
  margin-bottom: 1rem;
}

.background-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  /* lớp phủ tối để dễ đọc chữ */
  padding: 0.5rem;
  color: white;
  text-align: justify;
  width: 50%;
  border-radius: 1rem;
  font-size: 1.3rem;
  line-height: 1.6;
}

.PhoHN {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 100px;
  width: 100%;
  height: calc(100vh);
  box-sizing: border-box;
  margin-top: -150px;
}

.quote {
  flex: 1;
  color: #b60000;
  font-size: 2rem;
  line-height: 1.6;
}

.quote .line {
  width: 60px;
  height: 3px;
  background-color: #b60000;
  margin-bottom: 20px;
}

.highlight {
  font-weight: bold;
  color: #d60000;
}

.author {
  margin-top: 30px;
  font-size: 14px;
  color: #a14444;
}

.image-section {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pho {
  width: 600px;
  position: relative;
  top: 70px;
  left: 90px;
  z-index: 1;
  object-fit: contain;
  transition: all 0.5s ease-in-out;
}

.pho:hover {
  transform: scale(1.1) translateY(-10px) translate(-5%, -5%) rotate(-5deg);
}

.spoon-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 40%;
  left: 20%;
  transform: translate(-50%, -50%);
}

.spoon {
  position: absolute;
  width: 400px;
  transform-origin: center center;
  opacity: 0.9;
  top: 80%;
  left: -2%;

  transform: translateY(0) rotateY(0);
  transition: transform 0.5s ease-in-out;
}

.spoon:hover {
  transform: translate(0, -30%) rotate(40deg) translateX(-40px) scale(1.2);
}

/* P5 */
.background-container {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-image: url('../IMG/Bac/16.JPG');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.containerForm {
  display: flex;
  width: 65vw;
  height: 75vh;
  padding: 3rem;
  align-items: stretch;
  justify-content: center;
}

.overlay-box {
  background-color: rgba(0, 0, 0, 0.5);
  width: 35%;
  padding: 2rem;
  border-top-left-radius: 0.625rem;
  border-bottom-left-radius: 0.625rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 1rem rgba(255, 239, 214, 0.5);
}

.share-box {
  background-color: rgba(199, 14, 28, 0.75);
  width: 35%;
  padding: 2rem;
  border-top-right-radius: 0.625rem;
  border-bottom-right-radius: 0.625rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 1rem rgba(255, 239, 214, 0.6);
}

.title {
  font-size: 4rem;
  font-weight: bold;
  margin: 0;
  color: #FFEFD6;
}

.subtitle {
  margin-top: 0.6rem;
  font-size: 1.6rem;
  color: #FFEFD6;
}

.message {
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  color: #FFEFD6;
  text-align: justify;
}

.action-button {
  background-color: #FFEFD6;
  color: #0A4D3C;
  border: none;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1.25rem;
  border-radius: 0.375rem;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 0 0.5rem rgba(255, 239, 214, 0.9);
  transition: box-shadow 0.3s ease;
}

.action-button:hover {
  box-shadow: 0 0 0.9rem rgba(255, 239, 214, 1);
}

.auth-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.secondary-button {
  background-color: #FFEFD6;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.375rem;
  color: #0A4D3C;
  cursor: pointer;
  flex: 1;
  margin: 0 0.3rem;
  box-shadow: 0 0 0.5rem rgba(255, 239, 214, 0.8);
  transition: box-shadow 0.3s ease;
}

.secondary-button:hover {
  box-shadow: 0 0 0.9rem rgba(255, 239, 214, 1);
}

.or {
  color: #FFEFD6;
  margin: 0 0.3rem;
}

/*.animate-up {*/
/*  transform: translateY(0);*/
/*  transition: all 0.3s ease-in-out;*/
/*}*/

/*.animate-up:hover {*/
/*  transform: translateY(-30px);*/
/*}*/

@media screen and (max-width: 1020px) {
  .banner .slider {
    width: 160px;
    height: 200px;
    left: calc(50% - 80px);
  }

  .banner .slider .item {
    transform:
      rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(300px);
  }

  .PhoHN {
    padding: 5vw 8vw;
    height: 100vh;
    margin-top: -15vh;
  }

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

  .quote {
    font-size: 5vw;
  }

  .pho {
    width: 40vw;
    /* Dùng vw thay px */
    left: 10vw;
    top: 10vh;
  }

  .spoon-circle {
    width: 25vw;
    height: 25vw;
  }

  .spoon {
    width: 20vw;
    top: 80%;
  }

  .background-overlay1 {
    width: 80%;
  }
  .background-overlay {
    width: 80%;
  }
}

@media screen and (max-width: 767px) {
  .banner {
    margin-bottom: -30rem;
    background-size: contain;
    background-position: center 3rem;
  }

  .banner .slider {
    width: 100px;
    height: 150px;
    left: calc(50% - 50px);
  }

  .banner .slider .item {
    transform:
      rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(180px);
  }

  .center-content h1 {
    font-size: 14vw;
  }

  .center-content {
    top: 21%;
  }

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

  .card {
    width: 70vw;
    height: 45vh;
    margin: 0 auto 1.5rem;
  }

  .button-container {
    margin-top: 1rem;
  }

  .decor-img1 {
    display: none;
  }

  .decor-img2 {
    display: none;

  }

  .decor-img3 {
    margin-top: -10rem;
    /* đẩy xuống dưới */
    width: 10rem;
    /* thay vì 80px */
    transform: translateX(8rem);
    /* dịch sang trái */
  }

  .decor-img4 {
    margin-top: -11rem;
    /* đẩy xuống dưới */
    width: 10rem;
    /* thay vì 80px */
    margin-bottom: 1rem;
    transform: translateX(-10rem);
    /* dịch sang trái */
  }

  .background-section {
    margin-top: -14rem;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    /* Thêm dòng này */
    align-items: flex-end;
    /* Giữ các khối sát bên phải */
    justify-content: center;
    /* Căn giữa theo chiều dọc */
  }

  .background-overlay1 {
    padding: 0.1rem;
    border-radius: 0.25rem;
    font-size: 0.4rem;
    max-width: 35%;
    margin-bottom: 0.7em;
  }

  .background-overlay {
    border-radius: 0.25rem;
    max-width: 35%;
    font-size: 0.4rem;
    padding: 0.25rem;
  }

  .PhoHN {
    flex-direction: column;
    /* Đặt các phần tử theo chiều dọc */
    padding: 10vw 5vw;
    /* Thay đổi padding bằng vw */
    margin-top: -85vw;
  }

  .quote {
    font-size: 4.5vw;
    /* Dùng vw cho font-size */
    margin-right: 0;
    /* Loại bỏ margin */
    order: 2;
  }

  .pho {
    width: 80vw;
    /* Sử dụng vw cho chiều rộng */
    max-width: 90%;
    /* Chiều rộng tối đa là 90% */
    left: 10%;
    /* Đặt lại vị trí ảnh */
    top: -15vh;
    /* Điều chỉnh vị trí ảnh bằng vh */
  }

  .spoon-circle {
    width: 40vw;
    height: 40vw;
  }

  .spoon {
    width: 25vw;
    top: -7vh;
    left: -15%;
    transform: translate(-50%, -50%) rotate(-35deg);
    /* Xoay góc muỗng về bên trái */
  }

  .image-section {
    order: 1;
    top: 20vh;
  }

  .background-container {
    height: auto;
    padding: 2rem 1rem;
    flex-direction: column;
    background-position: top;
    margin-top: -10rem;
  }

  .containerForm {
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 1rem;
  }

  .overlay-box,
  .share-box {
    width: 100%;
    border-radius: 0.625rem;
    padding: 1.5rem;
  }

  .overlay-box {
    border-radius: 10px 10px 0 0; /* bo góc trên */
    margin-bottom: 0;
  }

  .share-box {
    border-radius: 0 0 10px 10px; /* bo góc dưới */
  }


  .title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .message {
    font-size: 0.9rem;
    text-align: center;
  }

  .action-button,
  .secondary-button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .auth-buttons {
    display: flex;
    flex-direction: row; /* chuyển từ column sang row */
    justify-content: center; /* căn giữa các nút nếu muốn */
    gap: 1rem; /* khoảng cách giữa 2 nút */
    flex-wrap: wrap; /* để tránh bị tràn khi màn nhỏ */
  }

  .secondary-button {
    margin: 0; /* bỏ margin dọc */
    width: auto; /* để vừa nội dung */
  }

  .or {
    margin: 0.5rem 0;
  }

  .background-overlay1 {
    width: 80%;
  }
  .background-overlay {
    width: 80%;
  }
}
