/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/
@import url("../flatsome/style.css");

/*************** ADD CUSTOM CSS HERE.   ***************/

/* Import Font Awesome để sử dụng các icon */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* CSS cho toàn bộ trang */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #fff;
}

/* CSS cho thanh header trên cùng */
.top-header {
    background-color: rgb(204, 69, 6);
    padding: 10px 0;
    font-size: 14px;
}

/* Container để căn giữa nội dung */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Thêm padding để nội dung không chạm sát lề màn hình */
}

/* CSS cho flexbox container */
.header-info {
    display: flex; /* Sử dụng Flexbox để căn chỉnh các mục */
    justify-content: space-between; /* Phân bố đều các mục */
    align-items: center; /* Căn chỉnh theo chiều dọc */
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
    gap: 15px; /* Khoảng cách giữa các mục */
}

/* CSS cho mỗi mục thông tin */
.info-item {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Ngăn không cho văn bản bị xuống dòng */
    font-weight: 700;
}

/* CSS cho các icon */
.info-item .fas {
    margin-right: 8px; /* Khoảng cách giữa icon và chữ */
    color: #f0f0f0; /* Màu icon hơi nhạt hơn chữ */
}

/* Tùy chỉnh riêng cho số điện thoại */
.phone {
    font-weight: bold;
}


/* Cấu hình cơ bản cho menu */
.main-nav {
    display: flex;
    justify-content: center; /* Căn giữa menu theo chiều ngang */
    font-family: Arial, sans-serif;
}

.nav-list {
    list-style: none; /* Bỏ dấu chấm mặc định của ul/li */
    padding: 0;
    margin: 0;
    display: flex; /* Sử dụng Flexbox để các mục nằm trên một hàng */
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 30px; /* Khoảng cách giữa các mục */
}

.nav-item {
    position: relative;
}

/* Định dạng cho các link trong menu */
.nav-link {
    display: flex; /* Sử dụng Flexbox để căn chỉnh icon và chữ */
    align-items: center;
    color: #444; /* Màu chữ mặc định */
    text-decoration: none; /* Bỏ gạch chân link */
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease; /* Hiệu ứng chuyển màu mượt mà */
}

/* Định dạng icon */
.nav-link .fas {
    margin-right: 8px; /* Khoảng cách giữa icon và chữ */
    font-size: 18px;
}

/* Hiệu ứng khi di chuột vào link */
.nav-link:hover {
    color: #1a6ab3; /* Màu xanh lam khi hover */
}

/* Định dạng cho dropdown menu (mục Nhà Cho Thuê) */
.has-dropdown .nav-link {
    /* Thêm một mũi tên nhỏ nếu cần, sử dụng pseudo-element */
}

.dropdown-menu {
    display: none; /* Ẩn menu con ban đầu */
    position: absolute;
    top: 100%; /* Đặt menu con ngay dưới menu cha */
    left: 0;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 180px;
}

/* Hiển thị dropdown menu khi di chuột vào mục cha */
.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* Thêm/chỉnh sửa CSS cho menu con */
.dropdown-menu {
    /* Các thuộc tính đã có */
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    list-style: none;
    padding: 10px 10px 0px 0px; /* Bỏ padding để viền bao quanh các mục con */
    margin: 0;
    margin-top: -5px;
    /* Cập nhật màu nền và viền */
    background-color: #f7f7f7; /* Màu nền trắng xám */
    border: 1px solid #dcdcdc; /* Viền mỏng màu xám nhạt */
    border-top: none; /* Bỏ viền trên để nối liền với menu cha */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 310px; /* Tăng chiều rộng tối thiểu để phù hợp với hình ảnh */
    white-space: nowrap; /* Giúp các mục không bị xuống dòng */
}

/* Định dạng cho các link trong menu con */
.dropdown-menu a {
    display: block;
    padding: 5px 5px; /* Cập nhật padding để tăng khoảng trống */
    color: #444; /* Màu chữ mặc định */
    text-decoration: none;
    border-bottom: 1px solid #ffaa83; /* Viền ngăn cách giữa các mục */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ẩn viền cuối cùng của menu con */
.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* Định dạng cho mục menu con khi di chuột qua */
.dropdown-menu a:hover {
    background: #f77022; /* Màu cam đậm */
    color: #fff; /* Chữ trắng khi hover */
}

/* Định dạng cho mục có menu con (dấu mũi tên >) */
.has-dropdown > .nav-link::after {
    content: "\f107"; /* Mũi tên xuống */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 5px;
}

/* Hiển thị mũi tên > cho menu cấp 3 */
.dropdown-menu a:has(ul)::after {
    content: "\f105"; /* Mũi tên sang phải */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    float: right;
    color: #444;
}

/* Highlight menu cha khi menu con đang hiển thị */
.nav-item.has-dropdown:hover .nav-link {
    background-color: #e93c07;
    background-color: #e93c07;
    background-image: linear-gradient(to right, #ff8c43, #fcc17e);
    color: #fff;
}

/* Cấu hình chung cho toàn bộ phần */

.category-section {
    margin: 20px 0;
}

.category-heading {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

/* Container bao ngoài cùng, có thể dùng để ẩn/hiện */
.category-list-wrapper {
    position: relative;
    /* Dùng để ẩn menu ban đầu */
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

/* Container chứa tất cả các nút */
.category-list-container {
    padding: 15px;
    background-color: #fff9f0; /* Màu nền vàng nhạt */
}

/* Các hàng chứa nút */
.category-row {
    display: flex; /* Sử dụng Flexbox để các nút nằm ngang */
    flex-wrap: wrap; /* Cho phép các nút xuống dòng */
    justify-content: flex-start; /* Căn chỉnh nút về bên trái */
    gap: 12px; /* Khoảng cách giữa các nút */
    margin-bottom: 12px;
}
/* Loại bỏ margin-bottom cho hàng cuối cùng */
.category-row:last-child {
    margin-bottom: 0;
}

/* Tạo kiểu cho nút bấm */
.category-button {
    text-decoration: none;
    color: #1a6ab3; /* Màu chữ xanh da trời */
    background-color: #f7f3ed; /* Màu nền nút */
    border: 1px solid #1a6ab3; /* Viền 1px màu xanh da trời */
    padding: 10px 15px;
    border-radius: 5px; /* Bo góc nút */
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    white-space: nowrap; /* Ngăn nút xuống dòng */
}

/* Hiệu ứng khi di chuột vào nút */
.category-button:hover {
    background-color: #1a6ab3;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}



.main-menu {
  display: flex;
  flex-direction: column; /* đổi từ ngang sang dọc */
  gap: 20px; /* khoảng cách giữa 2 mục chính */
  font-family: Arial, sans-serif;
  position: relative;
  z-index: 1000;
}

.menu-item {
  position: relative;
}

.menu-title {
  color: #000;
  cursor: pointer;
  font-weight: bold;
  padding: 10px 15px;
  background: #f9f9f9;
  border-radius: 6px;
  transition: color 0.3s ease, background 0.3s ease;
  display: inline-block;
}

.menu-title:hover {
  color: #0073e6;
  background: #eef6ff;
}

/* Submenu full width */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 1335px;
  background: #fff;
  padding: 20px;
  flex-wrap: wrap;
  gap: 12px;

  opacity: 0;
  transition: all 0.3s ease;
}

.menu-item:hover .submenu {
  display: flex;
  opacity: 1;
}

/* Style button */
.submenu a {
  padding: 8px 14px;
  border: 1px solid #0073e6;
  border-radius: 4px;
  color: #0073e6;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.submenu a:hover {
  background: #0073e6;
  color: #fff;
}

/* THÔNG TIN BĐS */
.acf-bds-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.acf-bds-table td {
    padding: 12px 15px;
    border: 1px solid #09aed338;
    vertical-align: top;
    font-size: 16px;
    color: #555;
}

.acf-bds-table td:first-child {
    font-weight: bold;
    font-size: 16px;
    width: 30%;
    color: #333;
    white-space: nowrap;
}

.acf-bds-table i {
    margin-right: 8px;
    color: #0073aa;
}

.acf-bds-table tr:hover {
    background-color: #90d6f1;
}

/* Style cho nút Tìm kiếm */
form button.btn {
    display: block;              /* chiếm cả dòng để dễ căn giữa */
    margin: 20px auto;           /* căn giữa */
    padding: 10px 25px;          /* khoảng cách trong */
    font-size: 16px;             /* cỡ chữ vừa */
    font-weight: 600;            /* chữ đậm */
    color: #fff;                 /* chữ trắng */
    background: #0073e6;         /* xanh chủ đạo */
    border: none;                /* bỏ viền */
    border-radius: 8px;          /* bo tròn */
    cursor: pointer;             /* đổi con trỏ */
    transition: all 0.3s ease;   /* hiệu ứng hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Hover */
form button.btn:hover {
    background: #005bb5;         /* xanh đậm hơn */
    transform: translateY(-2px);
}

/* Khi nhấn */
form button.btn:active {
    background: #004080;
    transform: translateY(0);
}


/* ===== Khung tổng & reset danh sách ===== */
.searchandfilter{
  max-width: 1300px;      /* có thể chỉnh 1000–1280 tuỳ layout */
  margin: 0 auto;
  padding: 0 16px;
  font-family: inherit;
}
.searchandfilter ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto; /* 4 select + 1 cột nút */
  gap: 5px;
}
.searchandfilter li{ margin: 0; }
.searchandfilter label{ display: block; width: 100%; }

/* ===== Ô tìm kiếm dài (hàng trên) ===== */
.searchandfilter .sf-field-search{ grid-column: 1 / -1; } /* chiếm full chiều ngang */
.searchandfilter .sf-field-search .sf-input-text{
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.searchandfilter ::placeholder{ color:#9aa0a6; }

/* ===== 4 select hàng dưới ===== */
.searchandfilter .sf-input-select{
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 8px;
  padding: 0 44px 0 14px;             /* dư chỗ cho mũi tên */
  margin-top: -15px;
  font-size: 14px;
  color: #111;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* mũi tên dropdown */
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.searchandfilter .sf-input-select:focus{
  box-shadow: 0 0 0 3px rgba(227,27,35,.18), 0 6px 18px rgba(0,0,0,.12);
}

/* ===== Nút Tìm kiếm màu đỏ ===== */
.searchandfilter .sf-field-submit{
  display: flex; align-items: stretch; justify-content: flex-end;
}
.searchandfilter .sf-field-submit input[type="submit"]{
  height: 40px;
  padding: 0 22px;
  margin-top: -15px;
  border: 0;
  border-radius: 8px;
  background: #e31b23;                /* đỏ như hình 1 */
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(227,27,35,.35);
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease;
}
.searchandfilter .sf-field-submit input[type="submit"]:hover{ filter: brightness(1.06); }
.searchandfilter .sf-field-submit input[type="submit"]:active{ transform: translateY(1px); }

.nav-tabs+.tab-panels {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px 10px 10px 11px;
}

/* ===== Responsive ===== */
@media (max-width: 992px){
  .searchandfilter ul{
    grid-template-columns: repeat(3, minmax(0,1fr)) auto; /* 3 select + nút sang phải */
  }
}
@media (max-width: 680px){
  .searchandfilter ul{
    grid-template-columns: repeat(2, minmax(0,1fr)); /* xếp 2 cột */
  }
  .searchandfilter .sf-field-submit{
    grid-column: 1 / -1;
  }
  .searchandfilter .sf-field-submit input[type="submit"]{
    width: 100%;
  }
}
@media (max-width: 520px){
  .searchandfilter ul{
    grid-template-columns: 1fr; /* xếp dọc */
  }
}

/* Bảng thông tin nhà thuê */
.bds-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  box-shadow: 0 10px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  border-radius: 8px;
  table-layout: fixed; /* giúp set width từng cột */
}

/* Header */
.bds-table thead tr {
  background: linear-gradient(45deg, #016dd8, #4fbeff);
  color: #fff;
  text-align: left;
  font-weight: bold;
}

.bds-table th {
  padding: 12px 10px;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.bds-table th:last-child {
  border-right: none;
}

/* Body */
.bds-table td {
  padding: 12px 10px;
  border: 1px solid #fff5e8;
  background-color: #fff;
  transition: background-color 0.3s ease;
  word-wrap: break-word;
}

.bds-table tbody tr:hover {
  background-color: #f0f8ff;
}

/* --- TÙY CHỈNH RIÊNG TỪNG CỘT --- */

/* Cột Hình */
.bds-table th:nth-child(1),
.bds-table td:nth-child(1) {
  width: 150px;
  text-align: center;
}

.bds-table td:nth-child(1) img {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* Cột Ngày */
.bds-table th:nth-child(2) {
  width: 100px;
  text-align: center;
  color: #ffffff;
}
.bds-table td:nth-child(2) {
  width: 100px;
  text-align: center;
  color: #1a1a1a;
}

/* Cột Chuyên mục */
.bds-table th:nth-child(3),
.bds-table td:nth-child(3) {
  width: 120px;
  color: #ffffff;
}
.bds-table th:nth-child(3) {
  text-align: center;
}

/* Cột Tiêu đề */
.bds-table th:nth-child(4),
.bds-table td:nth-child(4) {
  width: 220px;
}

.bds-table th:nth-child(4) {
  text-align: center;
}

.bds-table td:nth-child(4) a {
  color: #0653e2;
  text-decoration: none;
  font-weight: 600;
}

.bds-table td:nth-child(4) a:hover {
  color: #000000;
}

/* Cột Diện tích */
.bds-table th:nth-child(5),
.bds-table td:nth-child(5) {
  width: 90px;
  text-align: center;
}

.bds-table th:nth-child(5) {
  color: #ffffff;
}

.bds-table td:nth-child(5) {
  color: #181818;
  font-size: 14px;
}

/* Cột Chiều dài */
.bds-table th:nth-child(6),
.bds-table td:nth-child(6) {
  width: 90px;
  text-align: center;
}

.bds-table td:nth-child(6) {
  color: #181818;
  font-size: 14px;
}

/* Cột Chiều ngang */
.bds-table th:nth-child(7),
.bds-table td:nth-child(7) {
  width: 90px;
  text-align: center;
}

.bds-table td:nth-child(7) {
  color: #181818;
  font-size: 14px;
}

/* Cột Kết cấu */
.bds-table th:nth-child(8),
.bds-table td:nth-child(8) {
  width: 120px;
}

.bds-table th:nth-child(8) {
  text-align: center;
}

.bds-table td:nth-child(8) {
  color: #181818;
  font-size: 14px;
}

/* Cột Giá thuê */
.bds-table th:nth-child(9),
.bds-table td:nth-child(9) {
  width: 120px;
  color: #ffffff;
  text-align: center;
}

/* Cột Hoa hồng */
.bds-table th:nth-child(10),
.bds-table td:nth-child(10) {
  width: 100px;
  text-align: center;
}

.bds-table td:nth-child(10) {
   font-size: 14px;
  color: #018032; /* xanh lá */
  font-weight: 700;
}

/* Cột SĐT Chủ nhà */
.bds-table th:nth-child(11),
.bds-table td:nth-child(11) {
  width: 140px;
  text-align: center;
}

.bds-table td:nth-child(11) a {
  color: #ff0000;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bds-table td:nth-child(11) a:hover {
  text-decoration: underline;
}

/* Quick View button trong cột Tiêu đề */
.bds-table .quick-view-btn {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #ff1212;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.bds-table .quick-view-btn a {
  color: #000000;
}

.bds-table .quick-view-btn:hover {
  background: linear-gradient(45deg, #68d4ff, #eeff00);
  color: #fff;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 20px 0;
}

.pagination a, .pagination span {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  background: #f0f8ff;
  color: #1e90ff;
  font-size: 13px;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: linear-gradient(45deg, #1e90ff, #00bfff);
  color: #fff;
}

.pagination .current {
  background: linear-gradient(45deg, #1e90ff, #00bfff);
  color: #fff;
  font-weight: bold;
}


/* =========================
   MOBILE 2-COLUMN (LABEL | VALUE)
   ========================= */
@media (max-width: 768px) {
  .bds-table thead { 
    position: absolute; 
    left: -9999px; 
    top: -9999px; 
  }

  .bds-table,
  .bds-table tbody,
  .bds-table tr { 
    display: block; 
    width: 100%;
  }

  .bds-table tbody tr {
    margin: 14px 0;
    background: #fff;
    border: 1px solid #e8f2ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 16px rgba(0,0,0,0.06);
  }

  .bds-table tbody tr {
        border: 1px solid #72afff;
        border-radius: 10px;
    }

  /* Cột Hình */
  .bds-table td:nth-child(1) {
    display: flex;
    width: auto;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: none;
  }
  .bds-table td:nth-child(1)::before { content: none !important; }
  .bds-table td:nth-child(1) img {
    max-width: 90%;
    height: auto;
    border-radius: 8px;
  }

  /* Cột Ngày */
  .bds-table td:nth-child(2) {
    text-align: left;
}

 /* Cột Chuyên Mục */
  .bds-table td:nth-child(3) a {
    color: #e26906;
}

 /* Cột Diện Tích */
  .bds-table td:nth-child(5) {
    text-align: left;
}

 /* Cột Chiều Dài */
  .bds-table td:nth-child(6) {
    text-align: left;
}

 /* Cột Chiều Ngang */
  .bds-table td:nth-child(7) {
    text-align: left;
}

 /* Cột Giá */
  .bds-table td:nth-child(9) {
    text-align: left;
}

 /* Cột Hoa Hồng */
  .bds-table td:nth-child(10) {
    text-align: left;
}

  /* Các ô khác: chia 2 cột (label | value) */
  .bds-table td {
    display: grid;
    grid-template-columns: 130px 220px; /* cột 1 cố định, cột 2 auto thật sự */
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    border-top: 1px solid #ffffff;
    background: #fff;
  }

  /* Label (cột 1) */
  .bds-table td::before {
    content: attr(data-label);
    color: #0a66cc;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    background-color: #def5ff;
    padding: 10px;
  }

  /* Label theo thứ tự cột */
  .bds-table td:nth-child(2)::before { content: "Ngày"; }
  .bds-table td:nth-child(3)::before { content: "Chuyên mục"; }
  .bds-table td:nth-child(4)::before { content: "Địa chỉ"; }
  .bds-table td:nth-child(5)::before { content: "Diện tích"; }
  .bds-table td:nth-child(6)::before { content: "Chiều dài"; }
  .bds-table td:nth-child(7)::before { content: "Chiều ngang"; }
  .bds-table td:nth-child(8)::before { content: "Kết cấu"; }
  .bds-table td:nth-child(9)::before { content: "Giá thuê"; }
  .bds-table td:nth-child(10)::before { content: "Hoa hồng"; }
  .bds-table td:nth-child(11)::before { content: "SĐT Chủ nhà"; }

  /* Giá trị (cột 2) */
  .bds-table td > * { 
    grid-column: 2 / 3;
    width: auto !important;      /* chỉ đúng nội dung */
    display: inline-block;
    justify-self: start;
    text-align: left;
    font-size: 14px; 
    color: #111;
  }

  .bds-table td a { color: #0653e2; text-decoration: none; }
  .bds-table td a:hover { text-decoration: underline; }

  
  .bds-table td:nth-child(9), 
  .bds-table td:nth-child(9) * {
    color: #d70000;
    font-weight: 800;
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .bds-table td { grid-template-columns: 110px 220px; padding: 10px 12px; }
  .bds-table td::before { font-size: 12px; }
  .bds-table td > * { font-size: 13px; }
}
