@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,
html {
  width: 100%;
  height: 100%;
  background-color: #FFEFD6;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes imageAppear {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Initial hidden state for animations */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.image-appear {
  opacity: 0;
  transform: scale(0.8);
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transform: scale(1) !important;
}

/* Hover Effects */
.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.container-form .submit:hover {
  background-color: #FCB92Ccc;
  transform: scale(1.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.card-section .card-content:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
}

/* Original Styles with Animation Classes Added */
.container-form {
  width: 80%;
  max-width: 60rem;
  height: 80vh;
  display: flex;
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(10, 77, 60, 0.5);
  backdrop-filter: blur(0.3125rem);
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.7);
  z-index: 1;
  position: relative;
  margin: 0 auto;
}
.container-form .left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: all 0.8s ease;
  z-index: 2;
}

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

.container-form .forms {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

.container-form .form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 80%;
  padding: 1.25rem;
  border-radius: 1.25rem;
  position: relative;
  background-color: rgba(255, 239, 214, 0);
  color: #FFEFD6;
}

.container-form .title {
  font-size: 1.6rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  color: #C70E1C;
  text-shadow:
    0 0 0.1875rem #fff,
    0 0 0.3125rem #fff,
    0 0 0.4375rem #C70E1C,
    0 0 0.625rem #C70E1C;
  margin-bottom: 0.625rem;
}

.container-form .form label {
  position: relative;
}

.container-form .form label .input {
  background-color: rgba(51, 51, 51, 0.1);
  color: #FFEFD6;
  width: 100%;
  padding: 1.25rem 0.3125rem 0.3125rem 0.625rem;
  outline: 0;
  border: 0.0625rem solid rgba(105, 105, 105, 0.5);
  border-radius: 0.625rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.container-form .form label .input:hover {
  border-color: #FCB92C;
}

.container-form .form label .input + span {
  color: rgba(255, 239, 214, 0.5);
  position: absolute;
  left: 0.625rem;
  top: 0;
  font-size: 0.9em;
  cursor: text;
  transition: 0.3s ease;
}

.container-form .form label .input:placeholder-shown + span {
  top: 0.8rem;
  font-size: 0.9em;
}

.container-form .form label .input:focus + span,
.container-form .form label .input:valid + span {
  color: #FCB92C;
  top: 0;
  font-size: 0.7em;
  font-weight: 600;
}

.container-form .submit {
  border: none;
  outline: none;
  padding: 0.625rem;
  width: 60%;
  border-radius: 0.625rem;
  color: #fff;
  margin-left: 20%;
  font-size: 1rem;
  background-color: #C70E1C;
  cursor: pointer;
}

.container-form .form label select.input {
  background-color: rgba(51, 51, 51, 0.1);
  color: #FFEFD6;
  width: 100%;
  padding: 1.25rem 0.3125rem 0.3125rem 0.625rem;
  outline: 0;
  border: 0.0625rem solid rgba(105, 105, 105, 0.5);
  border-radius: 0.625rem;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.container-form .form label select.input:focus + span,
.container-form .form label select.input:valid + span {
  color: #FCB92C;
  top: 0;
  font-size: 0.7em;
  font-weight: 600;
}

.container-form .form label select.input:required:invalid + span {
  top: 0.8rem;
  font-size: 0.9em;
  color: rgba(255, 239, 214, 0.5);
}

.container-form select.input {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23FFEFD6' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1.125rem 1.125rem;
  padding-right: 2rem;
}

.container-form select.input option {
  background-color: #0A4D3C;
  color: #FFEFD6;
}

/* P2 */
.ember-wrapper {
  width: 90%;
  margin: auto;
  padding: 1.25rem;
  margin-top: 5rem;
}

.ember-wrapper h2 {
  color: #FCB92C;
  font-size: 1.5rem;
  text-align: center;
}

.ember-wrapper .ember {
  color: #C70E1C;
  font-weight: bold;
}

.ember-wrapper h3 {
  color: #FCB92C;
  font-weight: normal;
  text-align: center;
  margin-bottom: 2.5rem;
}

.ember-wrapper .steps-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.875rem;
  justify-content: space-between;
}

.ember-wrapper .steps {
  flex: 1;
  min-width: 18.75rem;
}

.ember-wrapper .step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.875rem;
  flex-direction: column;
}

.ember-wrapper .step-image {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: contain;
  margin-right: 0.9375rem;
}

.ember-wrapper .step-content h4 {
  margin: 0;
  font-size: 1.125rem;
  color: #0A4D3C;
}

.ember-wrapper .step-content p {
  margin-top: 0.3125rem;
  font-size: 0.9375rem;
  color: #696969;
}

.ember-wrapper .red {
  color: #C70E1C;
  font-weight: bold;
}

.ember-wrapper .main-image {
  flex: 1;
  min-width: 18.75rem;
  text-align: center;
  align-self: flex-start;
}

.ember-wrapper .main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.625rem;
}

/* P3 */
.ember-container {
  font-family: sans-serif;
  background-color: #fff8f1;
  padding: 2rem;
  max-width: 90vw;
  margin: auto;
  color: #2e2e2e;
  border-radius: 10px;
}

.ember-container h2 {
  text-align: center;
  color: #C70E1C;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.ember-container h2 span {
  color: #0A4D3C;
}

.ember-container .documents {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.ember-container .documents .square {
  width: 10rem;
  aspect-ratio: 1 / 1;
  background-color: #fff;
  border: 0.1rem solid #ffa07a;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ember-container .documents .square img {
  width: 3rem;
  height: auto;
  margin-bottom: 1rem;
}

.ember-container .documents .square p {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
}

.ember-container h3 {
  color: #FCB92C;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.ember-container .note {
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #555;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.ember-container .note .spec {
  color: #C70E1C;
}

.ember-container .benefits {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.ember-container .benefits .rectangle {
  flex: 1 1 calc(20% - 1rem);
  min-width: 10rem;
  background-color: #fff;
  border: 0.1rem solid #ffa07a;
  border-radius: 0.5rem;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.rectangle img {
  width: 3rem;
  height: auto;
  margin-bottom: 1rem;
}

.rectangle p {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

/* P4 */
.card-section {
  background-color: #C70E1C;
  text-align: center;
  width: 100%;
  margin: 5vh auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.card-section h1 {
  text-align: center;
  color: #FCB92C;
  font-size: 2rem;
  margin-bottom: 6vh;
}

.card-section .ember {
  color: #0A4D3C;
  font-weight: bold;
}

.card-section .card-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 6rem;
  margin-bottom: 5vh;
  flex-wrap: wrap;
}

.card-section .card-image {
  flex: 0 0 25%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-section .card-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.15);
  display: block;
}

.card-section .card-content {
  width: 30rem;
  max-width: 100%;
  height: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.card-section .card-content ul {
  text-align: left;
  width: 100%;
  padding-left: 1.25rem;
}

.card-section .card-content ul li {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.card-section .card-content h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #0A4D3C;
}

.card-section .card-content p {
  margin: 0.5rem 0;
  color: #C70E1C;
}

.card-section .card-content .price {
  font-size: 0.95rem;
}

.card-section .card-gold,
.card-section .card-silver,
.card-section .card-bronze {
  background: #FFEFD6;
  padding: 1rem;
  border-radius: 0.75rem;
  height: auto;
  box-sizing: border-box;
}

/* Media Query cho Mobile (dưới 768px) */
@media only screen and (max-width: 767px) {
  .container-form {
    width: 90%;
    height: auto;
    flex-direction: column;
    margin: 1rem auto;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .container-form .left {
    display: none;
  }

  .container-form .forms {
    width: 100%;
    background: url("../IMG/muasam/nen_form.png") no-repeat center center;
    background-size: cover;
    background-color: rgba(10, 77, 60, 0.5);
    backdrop-filter: blur(0.3125rem);
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .container-form .form {
    width: 90%;
    padding: 1rem;
    gap: 0.5rem;
  }

  .container-form .title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  .container-form .form label .input {
    padding: 1rem 0.25rem 0.25rem 0.5rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
  }

  .container-form .form label .input + span {
    font-size: 0.8em;
  }

  .container-form .form label .input:placeholder-shown + span {
    top: 0.7rem;
    font-size: 0.8em;
  }

  .container-form .form label .input:focus + span,
  .container-form .form label .input:valid + span {
    font-size: 0.6em;
  }

  .container-form .submit {
    width: 70%;
    margin-left: 15%;
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .container-form select.input {
    padding-right: 1.5rem;
    background-size: 1rem 1rem;
  }

  .ember-container h2 {
    font-size: 1.4rem;
    margin-bottom: 2rem;
  }

  .card-section {
    padding: 1rem;
    margin: 2vh auto;
  }

  .card-section h1 {
    font-size: 1.5rem;
    margin-bottom: 3vh;
  }

  .card-section .card-row {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3vh;
  }

  .card-section .card-image {
    flex: 0 0 100%;
    max-width: 80%;
    margin: 0 auto;
  }

  .card-section .card-image img {
    max-width: 100%;
  }
}

/* Media Query cho Tablet (từ 768px đến 1023px) */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .container-form {
    width: 85%;
    height: 70vh;
    margin: 1.5rem auto;
  }

  .container-form .left {
    flex: 1;
  }

  .container-form .forms {
    flex: 1;
  }

  .container-form .form {
    width: 85%;
    padding: 1rem;
    gap: 0.5rem;
  }

  .container-form .title {
    font-size: 1.5rem;
  }

  .container-form .form label .input {
    padding: 1rem 0.25rem 0.25rem 0.5rem;
    font-size: 0.95rem;
  }

  .container-form .form label .input + span {
    font-size: 0.85em;
  }

  .container-form .form label .input:placeholder-shown + span {
    top: 0.75rem;
    font-size: 0.85em;
  }

  .container-form .form label .input:focus + span,
  .container-form .form label .input:valid + span {
    font-size: 0.65em;
  }

  .container-form .submit {
    width: 65%;
    margin-left: 17.5%;
    font-size: 0.95rem;
  }

  .container-form select.input {
    padding-right: 1.75rem;
    background-size: 1rem 1rem;
  }

  .card-section {
    padding: 1.5rem;
    margin: 3vh auto;
  }

  .card-section h1 {
    font-size: 1.8rem;
    margin-bottom: 4vh;
  }

  .card-section .card-row {
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 4vh;
  }

  .card-section .card-image {
    flex: 0 0 50%;
    max-width: 60%;
    margin: 0 auto;
  }

  .card-section .card-image img {
    max-width: 100%;
  }

  .card-section .card-content {
    width: 80%;
    font-size: 0.88rem;
    padding: 0.9rem;
  }

  .card-section .card-content h2 {
    font-size: 1.05rem;
  }

  .card-section .card-content ul li {
    font-size: 0.82rem;
  }

  .card-section .card-content .price {
    font-size: 0.92rem;
  }
}

/* Media Query cho Desktop (từ 1024px trở lên) */
@media only screen and (min-width: 1024px) {
  .container-form {
    width: 80%;
    max-width: 60rem;
    height: 80vh;
  }

  .container-form .left {
    flex: 1;
  }

  .container-form .forms {
    flex: 1;
  }

  .container-form .form {
    width: 80%;
    padding: 1.25rem;
  }

  .container-form .title {
    font-size: 1.6rem;
  }

  .container-form .form label .input {
    padding: 1.25rem 0.3125rem 0.3125rem 0.625rem;
    font-size: 1rem;
  }

  .container-form .form label .input + span {
    font-size: 0.9em;
  }

  .container-form .form label .input:placeholder-shown + span {
    top: 0.8rem;
    font-size: 0.9em;
  }

  .container-form .form label .input:focus + span,
  .container-form .form label .input:valid + span {
    font-size: 0.7em;
  }

  .container-form .submit {
    width: 60%;
    margin-left: 20%;
    font-size: 1rem;
  }

  .container-form select.input {
    padding-right: 2rem;
    background-size: 1.125rem 1.125rem;
  }

  .card-section {
    padding: 2rem 1rem;
    margin: 5vh auto;
  }

  .card-section h1 {
    font-size: 2rem;
    margin-bottom: 6vh;
  }

  .card-section .card-row {
    flex-direction: row;
    gap: 6rem;
    margin-bottom: 5vh;
  }

  .card-section .card-image {
    flex: 0 0 25%;
  }

  .card-section .card-content {
    width: 30rem;
    font-size: 0.9rem;
  }

  .card-section .card-content h2 {
    font-size: 1.1rem;
  }

  .card-section .card-content ul li {
    font-size: 0.85rem;
  }

  .card-section .card-content .price {
    font-size: 0.95rem;
  }
}

/* Hiệu ứng Hover */
.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.container-form .submit:hover {
  background-color: #FCB92Ccc;
  transform: scale(1.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Giữ hiệu ứng hover chỉ cho documents .square và benefits .rectangle */
.ember-container .square:hover,
.ember-container .rectangle:hover {
  transform: scale(1.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-section .card-content:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
}
