/*
Theme Name: Baothoitiet
Description: Website dự báo thời tiết Thái Lan online
Author: Baothoitiet.org
Version: 1.0
*/

/* Import font Be Vietnam Pro */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@100;400;700&display=swap');

span#ui-id-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hiển thị viền cho bảng */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    text-align: left;
}

/* Tô nền nhẹ cho tiêu đề bảng */
table th {
    background: #f5f5f5;
    font-weight: 600;
}


.hero-padding-lg {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}
.expert-box {
    background: #f8faff;
    border-left: 4px solid #0061ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
	margin-top: 1.5rem;
}

.expert-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e9ecef;
    object-fit: cover;
}
/* Bọc menu */
.menu-item {
    position: relative;
}
/* Hiện dropdown khi hover */
.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Giữ menu đúng vị trí */
.nav-item.dropdown {
    position: relative;
}

/* Ẩn dropdown mặc định */
.dropdown-menu {
    display: none;
    margin-top: 0;
}


/* Nút bấm */
.menu-link {
    display: block;
    padding: .5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

/* Dropdown menu chính */
.region-dropdown {
    display: none;
    position: absolute;
    top: 100%;        /* ngay bên dưới nút */
    right: 0;         /* căn lề phải trùng với nút */
    transform: translateX(0);  /* không đẩy qua phải */
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9999;
    border-radius: 12px;

    display: none;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 20px;
    min-width: 700px;
    text-align: center;
}

/* Hover để mở menu */
.menu-item:hover .region-dropdown {
    display: grid;
}

/* Nhóm khu vực */
.region-group {
    list-style: none;
}

/* Tiêu đề khu vực */
.region-title {
    display: block;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
    font-size: 15px;
}

.province-link {
    display: block;
    color: #333;
    padding: 7px 0;
    text-decoration: none;
    font-size: 14px;
    background-color: #f9f1e685;
    border-radius: 12px;
}

.province-link:hover {
    color: #007bff;
}

/* CSS cho màn hình điện thoại */
@media (max-width: 768px) {
  .region-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    width: 90vw;
    grid-template-columns: repeat(3, minmax(50px, 1fr));
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    transform: translate(-12%);
    min-width: 0;
    top: 45px !important;
  }

  .region-content {
    max-height: 100%;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .menu-item.active .region-dropdown {
    display: block;
  }
  
.weather-item {
    flex: 0 0 135px !important;
    background:  #ffffffbf!important;
    text-align: center;
    color: #000000;
    border-right: 1px solid #228caf;
    padding: 10px 5px;
    border-radius: 20px;
}

  .custom-weather:nth-child(n+4) {
    display: none;
  }

  .col-xl-3.col-md-3.mb-2.card-post {
    width: 100% !important;
}


}

section.news-popular {
    margin-left: .75rem;
    margin-right: .75rem;
}

.child-page-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.child-page-menu li a {
    padding: 6px 12px;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}
.child-page-menu li a.active {
    background-color: #007bff;
    color: white;
}
.ui-autocomplete {
   z-index: 9999 !important;
}


.rank-math-breadcrumb p {
    margin-bottom: 0 !important;
}

h1.card-title.bold {
    font-size: 20px;
    font-weight: bold;
}



@media (min-width: 576px) {
    .justify-content-sm-between {
        justify-content: space-between !important;
        align-items: center;
    }
}
html {
    margin-top: 0;
}


    .live-container {
      display: inline-flex;
      align-items: center;
      background-color: #d0e8ff;
      padding: 6px 12px;
      border-radius: 20px;
      max-height: max-content;
      gap: 5px;
      margin-right: 10px;
      color: #007bff;
      margin-bottom: 15px;
    }

    .live-dot {
      position: relative;
      width: 12px;
      height: 12px;
      background-color: #4CAF50;
      border-radius: 50%;
      margin-right: 8px;
    }

    .live-dot::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background-color: rgb(35 177 41);
      transform: translate(-50%, -50%) scale(1);
      animation: pulse 1.5s ease-out infinite;
    }

    @keyframes pulse {
      0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
      }
      100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
      }
    }
    .search-results {
    max-height: 300px;      /* chiều cao tối đa */
    overflow-y: auto;       /* bật cuộn dọc */
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}
.search-results::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}
.ui-autocomplete {
    max-height: 300px;      /* chiều cao tối đa */
    overflow-y: auto;       /* cho phép cuộn dọc */
    overflow-x: hidden;     /* ẩn cuộn ngang */
    z-index: 9999 !important;
}
.ui-autocomplete {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ui-autocomplete {
    max-height: 40vh;
}
/* ===== HEADER ===== */


/* SEARCH */
.search-container {
    flex: 1;
    max-width: 520px;
}

.search-container form {
    display: flex;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #d1d5db;
}

.search-container input {
    border: none !important;
    outline: none !important;
    padding: 12px 18px;
    width: 100%;
    font-size: 14px;
    background: transparent;
}

.search-container button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0 22px;
    border-radius: 0 999px 999px 0;
    font-weight: 500;
    white-space: nowrap;
}

/* MENU PHẢI */
.nav-pills {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ededed;
    font-size: 14px;
    color: black;
    justify-content: center;
}

.nav-pills .nav-link svg {
    width: 16px;
    height: 16px;
    fill: #2563eb;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}


/* DÙNG CHUNG CHO H3 + H4 */
.item-link h3,
.item-link h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.item-link h3 a,
.item-link h4 a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    text-decoration: none;
}

.item-link h3 a:hover,
.item-link h4 a:hover {
    color: #2563eb;
}

/* ICON ĐỊA ĐIỂM */
.item-link h3 a::before,
.item-link h4 a::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%232563eb' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.3 7 13 7 13s7-7.7 7-13c0-3.9-3.1-7-7-7zm0 9.5c-1.4 0-2.5-1.1-2.5-2.5S10.6 6.5 12 6.5s2.5 1.1 2.5 2.5S13.4 11.5 12 11.5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block;
}

.ui-autocomplete::-webkit-scrollbar {
    width: 4px;
}

.ui-autocomplete::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.25);
    border-radius: 20px;
}
.ui-autocomplete {
    max-height: 240px;
    overflow-y: auto;
}


