@media screen and (min-width: 769px) and (max-width: 1023px) {
  body {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
  }

  .content {
  margin-top: 10px;
}

  .items-2 {
    /* Tablet cho rộng ra chút để thoáng */
    width: 90vw; 
    margin: 40px auto;
    
    /* KHÓA TỶ LỆ 3:1 (Ngang dài y hệt PC) */
    aspect-ratio: 3 / 1; 
    
    /* Reset chiều cao để aspect-ratio hoạt động */
    height: auto;
    min-height: 0;
  }

  .items-2 .bg-frame {
    /* Đảm bảo ảnh giãn full khung */
    width: 100%;
    height: 100%;
    object-fit: fill; 
  }

  .items-2 .content-text {
    /* Căn giữa */
    width: 85%;
    height: 80%;
    display: flex;
    justify-content: center;
    margin: auto auto;
  }

  .items-2 .content-text p{
    font-size: 14px;
    line-height: 1.4;
    font-family: "Montserrat", sans-serif;
  }





  .content-body,
  .khung-4,
  .khung-5,
  .khung-6,
  .khung-10,
  .khung-13 {
    width: 100%;
    margin: 80px 0;
  }

  .content-body .contentbody-items .contentbody-items-right h1 {
    padding-right: 50px;
  }

  .content img {
    width: 100%;
    height: auto;
  }

  .header {
    margin-top: 100px;
    flex-direction: column;
    text-align: center;
    margin-left: 0;
  }

  .header .header-items1 {
    font-size: 52px;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .header .header-items1 span {
    font-size: 55px;
  }

  .content .content-items .img-1 {
    width: 80%;
    height: auto;
    position: absolute;
    top: -30px;
    margin-top: -4%;
  }

  .content .content-items .img-2 {
    width: 80%;
    height: auto;
    position: absolute;
    top: 140px;
  }

  .contentbody-items {
    flex-direction: row;
    gap: 30px;
    margin-top: 40px;
    align-items: center;
  }

  .contentbody-items-right {
    width: 50%;
  }

  .contentbody-items-right h1,
  .contentbody-items-left h1 {
    font-size: 48px;
    margin-left: 0;
    text-align: center;
  }

  .contentbody-items-right p,
  .contentbody-items-left p {
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
    width: 100%;
  }

  .contentbody-items-left p {
    width: 70%;
  }

  .contentbody-items-left img,
  .contentbody-items-right img {
    width: 100%;
    border-radius: 10px;
  }

  .header-2 {
    width: 100%;
    padding-left: 0;
    justify-content: center;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .header-2 .header-items-1 {
    font-size: 90px;
    justify-content: center;
  }

  .header-2 .header-items-2 .top-text,
  .header-2 .header-items-2 .bot-text {
    font-size: 60px;
    text-align: center;
  }

  .title {
    font-size: 40px;
    width: 600px;
  }

  .content-container {
    width: 100%;
    margin-top: 60px;
  }

  .content-container .sub-content-container img {
    width: 400px;
  }

  .content-container .sub-content-container .img-back {
    position: absolute;
    right: -30px;
  }

  .content-container .sub-content-container .img-front {
    position: absolute;
    left: -30px;
  }

  .container .out {
    width: 80%;
    height: auto;
  }

  .container .in {
    width: 73%;
    height: auto;
  }

  .content-ctn {

  }

  .container .content-ctn h3 {
    font-size: 24px;
    width: 600px;
  }

  .container .content-ctn img {
    width: 200px;
    height: auto;
  }

  .container-1 .title-1,
  .container-1 .title-2 {
    font-size: 70px;
    padding-left: 0;
    text-align: center;
  }

  .khung-4 {
    width: 100%;
    height: 500px;
    margin-left: 0;
  }

  .khung-4 .items {
    width: 100%;
  }

  .khung-4 .items .img-1 {
    width: 40%;
    height: auto;
    left: 0;
    top: 50px;
  }

  .khung-4 .items .img-2 {
    width: 60%;
    height: auto;
    left: 50px;
    top: 100px;
  }

  .khung-4 .items .img-3 {
    width: 30%;
    height: auto;
    top: 160px;
    left: 350px;
  }

  .container-2 {
    top: 0;
    left: 0;
  }

  .container-2 .out {
    width: 45%;
    height: auto;
    top: -300px;
    right: 0;
  }

  .container-2 .in {
    width: 40%;
    height: auto;
    position: absolute;
    top: -285px;
    right: 20px;
  }

  .container-2 .content-ctn {
    top: -270px;
    right: -110px;
    gap: 20px;
  }

  .container-2 .content-ctn h3 {
    font-size: 16px;
    width: 300px;
  }
  .container-2 .content-ctn img {
    width: 100px;
    height: auto;
  }

  .khung-5 {
    width: 100%;
    height: 600px;
    padding: 40px;
  }

  .k5-container .items:nth-child(1) h2 {
    font-size: 40px;
    margin-top: -150px;
    margin-left: -140px;
    width: 100%;
  }

  .k5-container .items:nth-child(2) {
    left: 180px;
    top: 250px;
    width: 180px;
    height: auto;
  }

  .k5-container .items:nth-child(2) p {
    font-size: 13px;
    width: 100%;
  }

  .k5-container .items:nth-child(3) img {
    position: absolute;
    top: -100px;
    left: -550px;
    width: 100%;
    height: auto;
  }

  .k5-container .items:nth-child(4) img {
    position: absolute;
    top: -300px;
    width: 90%;
    height: auto;
    left: -570px;
  }

  .k5-container .items:nth-child(5) img {
    position: absolute;
    top: -640px;
    width: 200px;
    height: auto;
  }

  .khung-6 {
    position: relative;
    width: 100%;
  }

  .khung-6 .items {
  }

  .khung-6 .items:nth-child(1) {
    position: absolute;
    font-size: 72px;
    top: 400px;
  }
  .khung-6 .items:nth-child(2) img {
    position: absolute;
    width: 60%;
    top: 100px;
  }

  .khung-6 .items:nth-child(3),
  .khung-6 .items:nth-child(4) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
  }

  .khung-6 .items:nth-child(3) .up:nth-child(1) img {
    width: 120%;
    top: 150px;
    z-index: 1;
  }

  .khung-6 .items:nth-child(4) .up:nth-child(1) {
    top: 380px;
    z-index: 2;
    width: 250px;
    height: auto;
    margin: 0 auto;
  }

  .khung-7 {
    height: auto;
    margin-bottom: 100px;
  }

  .k7-title-section {
    width: 100%;
    margin-bottom: 100px;
  }

  .k7-title-section h2 {
    font-size: 48px;
    width: 100%;
    text-align: center;
  }

  .k7-title-section img {
    width: 180px;
    height: auto;
  }

  .k7-content-section {
    flex-direction: row;
    align-items: center;
  }

  .col-left,
  .col-right,
  .col-center {
    width: 100%;
    height: 600px;
    margin-bottom: 40px;
  }

  .col-center img {
    width: 100%;
  }

  .overlay-box {
    position: absolute;
    top: 450px;
    left: 450px;
    width: 250px;
    height: 250px;
    margin: 20px auto;
  }

  .overlay-box img {
    width: 100%;
    height: auto;
  }

  .frame-8-wrapper .frame-8-header .frame-8-sub-header .header,
  .frame-8-wrapper .frame-8-header .frame-8-sub-header .sub-header {
    font-size: 48px;
  }

  .frame-8-wrapper .frame-8-header .frame-8-sub-header .header {
    margin: 0;
  }

  .frame-8-wrapper .frame-8-header img {
    width: 70%;
  }

  .content-card {
    width: 80%;
  }

  .card-left {
    width: 100%;
    height: auto;
  }

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

  .card-right {
    width: 100%;
    padding: 0;
  }

  .card-right img {
    width: 100%;
    height: 100%;
  }

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

  .card-name {
    font-size: 40px;
  }

  .card-slogan {
    font-size: 32px;
  }

  .card-desc p {
    font-size: 18px;
  }

  .card-btn {
    margin: 20px auto 0 auto; 
    display: block;
    position: relative;
    z-index: 10; 
    text-decoration: none;
  }

  .card-right .card-btn img {
    width: 100px;       
    height: auto;      
    position: static;  
    object-fit: contain;
  }

  .frame-8-card-container .items {
    width: 90%;
  }

  .frame-8-card-container .items .left {
    position: absolute;
    left: 0;
  }

  .frame-8-card-container .items .right {
    position: absolute;
    left: 100%;
  }

  .frame-8-card-container .items .bg {
    width: 60%;
    height: auto;
    top: 0;
    left: 400px;
  }

  .khung-9 .khung9-items {
    width: 100%;
  }

  .khung-9 .khung9-items img {
    width: 250px;
    height: 320px;
  }

  .khung-9 .khung9-items .bg {
    width: 230px;
    height: 320px;
  }

  .khung-9 .khung9-items .bg .text {
    font-size: 13px;
  }


  .items-3 {
    width: 95%; /* Mở rộng khung ra chút cho thoáng */
    margin: 40px auto;
  }

  .items-3 .content-text-3 {
    /* Giảm padding so với PC để có nhiều đất cho chữ hơn */
    padding: 40px 60px; 
  }

  .items-3 h1 {
    font-size: 45px; /* Cỡ chữ tiêu đề vừa phải cho Tablet */
    margin-bottom: 15px;
  }

  .items-3 .content-text-3 p {
    font-size: 18px; /* Cỡ chữ nội dung dễ đọc */
    line-height: 1.5;
  }

  .khung-10 {
    margin: 0;
    margin-top: 150px;
    width: 100%;
    height: 600px;
    background-size: contain;
  }

  .khung-10 .items:first-child {
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
  }

  .text-kham-pha {
    font-size: 12px; 
    top: 72%; 
    left: 32%;
  }

  .khung-10 .items:first-child img {
    max-width: 70%;
    height: auto;
  }

  .khung-10 .items:first-child img:nth-child(3) {
    transform: translate(-50%, 15px);
  }

  .khung-10 .items:last-child {
    font-size: 60px;
    bottom: 140px;
  }

  .khung-11 {
    width: 100%;
  }

  .khung-11 .items {
    width: 50%;
  }

  .khung-11 .items .content p {
    font-size: 16px;
  }

  .khung-11 .items .sub-title img {
    width: 50px;
  }

  .khung-11 .items .title {
    padding-left: 40px;
  }

  .khung-11 .items .sub-title,
  .khung-11 .items .title {
    text-align: left;
    font-size: 48px;
  }

  .khung-11 .items .left {
    width: 100%;
  }

  .khung-12 .items .deco img {
    width: 120px;
    height: auto;
  }

  .khung-12 .items p {
    font-size: 24px;
  }

  .khung-12 .items .header .title,
  .khung-12 .items .header .sub-title {
    font-size: 64px;
  }

  .khung-13 {
    margin-top: 50px;
    height: auto;
    flex-direction: row;
    padding-bottom: 50px;
    background-size: cover;
  }

  .khung-13 .group-left {
    width: 90%;
    height: 300px;
    background-size: contain;
    margin-bottom: -20px;
  }

  .khung-13 .group-left .title {
    font-size: 60px;
    text-align: center;
  }

  .khung-13 .group-left .sub-title {
    font-size: 50px;
  }

  .khung-13 .group-right {
    width: 95%;
    height: auto;
    min-height: 600px;
    padding: 40px;
    background-size: 100% 100%;
  }

  .khung-13 .group-right .img {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
  }

  .group-right .img .items:first-child img {
    width: 100%;
    height: auto;
  }

  .group-right .img .items:nth-child(2) img {
    width: 100%;
  }

  .khung-13 .group-right .dec p {
    font-size: 14px;
    text-align: justify;
    line-height: 1.6;
    padding: 0 10px;
  }

  .khung-14 .content .title {
    margin: 10px;
  }

  .khung-14 .content img {
    width: 100%;
  }
  .khung-14 .content .sub-title,
  .khung-14 .content .title {
    font-size: 48px;
  }

  /* --- KHUNG 15 (Đô thị & Footer Area) --- */
  .khung-15 {
    flex-direction: row;
    align-items: center;
  }

  .khung-15 .left,
  .khung-15 .right {
    width: 80%;
    text-align: center;
  }

  .khung-15 .left p,
  .khung-15 .right p {
    font-size: 20px;
  }

  .khung-15 .center {
    width: 90%;
  }


  .popup-box {
    overflow: hidden;
    background: #fff;
    width: 95%; 
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: popupFade 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .popup-box::-webkit-scrollbar {
    display: none;
  }

  .close {
    position: sticky;
    top: 15px;
    left: 88%; 
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #db1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999; 
  }

  .popup-close {
    color: #fff;
    font-size: 20px;
  }

  #popup .popup-header {
    margin: 0;
    padding: 30px 20px 10px 20px; 
  }

  .popup-header .text {
    color: #424438;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 32px; 
    line-height: 1.1;
    text-align: center;
  }

  .popup-header .sub-text {
    margin-top: 5px;
    color: #a69d80;
    font-family: "Montserrat", sans-serif;
    font-style: italic;
    font-weight: 600;
    font-size: 20px; 
    text-align: center;
  }

  .popup-header .popup-para {
    margin-top: 20px;
    color: #424438;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 14px; 
    text-align: justify;
    line-height: 1.5;
  }

  .popup-header .img-bg {
    width: 100%;
    overflow: hidden;
    margin-top: 10px;
  }

  .popup-header .img-bg img {
    width: 100%;
    display: block;
  }

  #popup .popup-header-2 {
    display: flex;
    flex-direction: row; /* Quan trọng: Giữ ngang */
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    gap: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
  }

  #popup .popup-header-2 .left-text {
    width: 45%; /* Chia đôi không gian */
    font-size: 13px; /* Giảm font để vừa hàng ngang */
    line-height: 1.3;
    text-align: right; /* Căn phải để đối xứng */
  }

  #popup .popup-header-2 .straight-line {
    width: 2px;
    height: 40px; /* Thanh dọc nhỏ lại */
    background: #a69d80;
    margin: 0 5px;
    flex-shrink: 0;
  }

  #popup .popup-header-2 .right-text {
    width: 45%;
    font-size: 10px; /* Chữ nhỏ để vừa khung */
    text-align: left;
    line-height: 1.4;
  }

  /* 2. Phần Ảnh: GIỮ DÁNG NGANG (LANDSCAPE) */
  /* Thay vì fix cứng px, dùng aspect-ratio để giữ tỷ lệ chuẩn */
  #popup .content .img-container,
  #popup .last-content .img-container {
    width: 100%;
    height: auto; /* Để height tự tính theo tỷ lệ */
    aspect-ratio: 16/9; /* Tỷ lệ vàng hình chữ nhật ngang */
    background: #d9d9d9;
    border-radius: 10px;
    overflow: hidden;
  }

  /* Nếu trình duyệt cũ không hỗ trợ aspect-ratio, dùng fallback */
  @supports not (aspect-ratio: 16/9) {
    #popup .content .img-container,
    #popup .last-content .img-container {
      height: 200px; /* Fallback chiều cao cố định */
    }
  }

  #popup .content .img-container img,
  #popup .last-content .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Phủ kín khung */
    object-position: center;
    display: block;
  }

  /* Các phần còn lại giữ nguyên logic thu nhỏ */
  #popup .content {
    padding: 20px 15px 40px 15px;
    gap: 30px;
  }

  #popup .content .text {
    font-size: 16px;
    margin-bottom: 10px;
  }

  /* --- FOOTER NEW DESIGN --- */
  .footer-new-design {
    padding: 60px 20px;
  }

  .footer-content {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .ft-logo h1 {
    font-size: 28px;
  }

  .ft-contact h3,
  .ft-form h3 {
    font-size: 16px;
  }
  .ft-contact .phone {
    font-size: 16px;
  }

  .ft-contact p {
    font-size: 16px;
  }

  .ft-contact a {
    font-size: 20px !important; /* Giảm từ 25px xuống 20px */
    line-height: 1.3;
  }

  .ft-form .form-group {
    width: 100%;
    margin: 0 auto;
    flex-direction: row;
  }

  .ft-form .form-group input {
    width: 200px;
  }
  .ft-form .form-group button {
    width: 150px;
  }

  .ft-form input {
    height: 55px;
    font-size: 18px;
  }

  .ft-form button {
    width: 30%;
    height: 55px;
    font-size: 18px;
  }

  .ft-form .ptit {
    width: 10px;
    margin-top: 20px;
  }
}
