/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

html {
  overflow-x: visible !important;
}
body {
  overflow-x: clip !important;
  width: 100% !important;
}

/* ── Font size scale-down ────────────────────────────────────────────────── */
html {
  font-size: 14px; /* base: giảm từ 16px xuống 14px (~12.5%) */
}

/* Body & paragraph text */
body, p, span, small, a, li, label, input, button, select, textarea {
  font-size: 0.875rem;  /* ~12.25px */
}

/* Headings */
h1 { font-size: 1.8rem;  }   /* ~25px  */
h2 { font-size: 1.5rem;  }   /* ~21px  */
h3 { font-size: 1.3rem;  }   /* ~18px  */
h4 { font-size: 1.1rem;  }   /* ~15px  */
h5 { font-size: 1rem;    }   /* ~14px  */
h6 { font-size: 0.9rem;  }   /* ~12.5px */

/* Navigation */
header nav a, header nav li {
  font-size: 0.85rem;
}

/* Section tabs */
.section-tabs button {
  font-size: 0.95rem !important;
}

/* Intro / content blocks */
.intro p, .room-box p, .paragraph {
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Booking & summary */
.summary, .summary * {
  font-size: 0.85rem;
}

/* Footer */
footer, footer a, footer li, footer p {
  font-size: 0.8rem;
}

/* Badges / labels / small texts */
small {
  font-size: 0.75rem;
}

/* Custom styles to fix image cropping and title size */
#section3 h2 {
  font-size: 28px !important;
}

.loop-item img {
  object-fit: contain !important;
  background-color: transparent !important;
}

.room-carousel img {
  object-fit: contain !important;
  background-color: #eee !important;
}

/* Fix hero container positioning and z-index overlap issues */
.hero {
  position: relative !important;
}

@media (max-width: 991px) {
  .hero.home-search {
    z-index: 1 !important;
  }
}

/* ===== TÁCH BIỆT HEADER VÀ HERO / BANNERS TOÀN TRANG ===== */
header {
  background-color: #000000 !important;
  height: 95px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

header.reveal_header {
  height: 95px !important;
}

header.reveal_header .container-fluid,
header.reveal_header .container-fluid > .row {
  height: 100% !important;
  width: 100% !important;
  align-items: center !important;
}

/* Prevent mobile header list items wrapping and ensure vertical alignment */
header nav ul {
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

header nav ul li {
  display: flex !important;
  align-items: center !important;
  margin-left: clamp(8px, 2vw, 20px) !important;
}

.hamburger_2 {
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Hide off-screen mobile nav panel completely to prevent horizontal leakage */
.nav_panel {
  visibility: hidden !important;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.5s !important;
}

.nav_panel.show {
  visibility: visible !important;
}

main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hero, .hero_in {
  margin-top: 95px !important;
}

@media (max-width: 991px) {
  header, header.reveal_header {
    height: 70px !important;
  }

  .hero, .hero_in {
    margin-top: 70px !important;
  }

  /* Shrink header logo and heights to prevent horizontal overflow */
  header.reveal_header .logo_normal img,
  header.reveal_header .logo_sticky img {
    height: 50px !important;
    width: auto !important;
  }

  /* Compact spacing for buttons and selectors inside header */
  header nav ul li {
    margin-left: 8px !important;
  }

  header nav ul li a.btn_1 {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }

  .dropbtn-lang {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* ===== FIX TRUNCATED ROOM SPECS/FEATURES DETAILS ===== */
.room-meta {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px 10px !important;
  font-size: 13px !important;
  width: 100% !important;
  padding: 0 4px !important;
}

@media (max-width: 576px) {
  .room-meta {
    font-size: 11px !important;
    gap: 4px !important;
  }
  .room-meta span {
    gap: 3px !important;
  }
}

.room-meta span {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

/* ===== DYNAMIC VERTICAL STACKED GIAO DIỆN KHÁC (<=384px & >=769px) ===== */
@media (max-width: 384px), (min-width: 769px) {
  body .room-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Căn giữa nhãn và giá tiền */
  body .room-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 2px !important;
    gap: 2px !important;
  }

  body .room-price .from {
    font-size: 12px !important;
    color: #777 !important;
    margin: 0 !important;
    display: block !important;
    text-align: center !important;
  }

  body .room-price .price-line {
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    gap: 4px !important;
    width: 100% !important;
  }

  body .room-price strong {
    font-size: 19px !important;
    color: #ff6a00 !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  body .room-price .unit {
    font-size: 11px !important;
    color: #ff6a00 !important;
    white-space: nowrap !important;
  }

  /* Căn giữa nhãn phụ và nút bấm */
  body .room-action {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
    margin-top: 2px !important;
  }

  body .room-badge {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #ff3b3b !important;
    margin: 0 !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  body .room-bottom .room-btn,
  body .room-bottom .btn_1 {
    flex-shrink: 0 !important;
    padding: 6px 20px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    border-radius: 24px !important;
    display: inline-block !important;
    width: auto !important;
    text-align: center !important;
  }
}

/* Thiết lập Container Query cho thẻ card phòng */
.room-card {
  container-type: inline-size !important;
}

@container (max-width: 340px) {
  .room-meta {
    font-size: 11px !important;
    gap: 4px !important;
  }
  .room-meta span {
    gap: 2px !important;
  }
  .room-meta span img,
  .room-meta span div img {
    width: 15px !important;
    height: 15px !important;
  }
}

/* ===== OPTIMIZE ROOM CARD TITLE (DYNAMIC AUTO-FIT) ===== */
.room-card .room-title {
  text-align: center !important;
  font-size: clamp(16px, 7.5cqw, 24px) !important; /* Tự động fit cỡ chữ theo chiều ngang của card */
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important; /* Đảm bảo luôn nằm trên 1 dòng */
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* Cắt ngắn bằng dấu ... nếu tên quá dài vượt khung */
}