/* Sidebar mobile cải tiến */

#mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background-color: #2e3a59;
    color: white;
    z-index: 9999;
    padding: 20px 15px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: left 0.3s ease;
    overflow-y: auto;
    font-family: 'Arial', sans-serif;
    border-right: 1px solid #444;
}

#mobile-sidebar.active {
    left: 0;
}

#sidebar-overlay {
  background-color: transparent !important;
}
#sidebar-overlay.active {
    display: block;
}

#mobile-sidebar h3.menu-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
}

#mobile-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#mobile-sidebar ul li {
    margin: 12px 0;
}
#mobile-sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
}
#mobile-sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Thanh tìm kiếm trong sidebar */
#mobile-sidebar input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    margin: 15px 0;
    font-size: 15px;
}

/* Ngôn ngữ */
#mobile-sidebar .language-menu {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#mobile-sidebar .language-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
}
#mobile-sidebar .language-menu img {
    width: 18px;
    height: 12px;
}

/* Nút 3 gạch */
#hamburger-menu {
    position: fixed;
    top: 120px;
    left: 10px;
    font-size: 46px;
    color: white;
    z-index: 10000;
    background-color: transparent;
    border: none;
}
#mobile-sidebar {
  background-color: #2c3e50;
  padding: 15px;
  width: 260px;
  height: 100%;
  position: fixed;
  top: 0;
  left: -100%;
  z-index: 999;
  transition: 0.3s ease;
  overflow-y: auto;
  color: white;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.language-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}
.language-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    padding: 5px 0;
}
.language-menu img {
    width: 18px;
    height: 12px;
}

/* Ẩn phần header bên phải + tìm kiếm PC khi ở mobile */
@media screen and (max-width: 768px) {
  .header-content {
    display: none;
  }

  header {
    height: auto;
    padding: 10px;
  }

  .banner-container {
    margin-top: 0 !important;
    padding-top: 0;
    margin-bottom: 5px;
  }

  .banner {
    order: 1;
    width: 100%;
    margin-top: 10px !important;
    margin-bottom: 10px;
  }

.category-select-wrapper {
    margin-top: -10px !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

  #category-select {
    margin-top: 0 !important;
  }
}




@media (max-width: 768px) {
    .buttons .category-btn {
        display: none;
    }

    .category-select-wrapper {
        display: block;
        padding: 0;
        text-align: center;
    }

    #category-select {
        padding: 10px;
        width: 90%;
        font-size: 16px;
        border-radius: 8px;
    }
}

.sidebar-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.mobile-language-selector {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  margin-bottom: 10px;
}

.mobile-language-selector a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 13px;
}

.mobile-language-selector img {
  width: 18px;
  height: 12px;
  margin-right: 5px;
}



.banner-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.banner {
  margin-bottom: 0 !important;
}

section.buttons {
    margin: 0 !important;
    padding: 0 !important;
}

@media screen and (min-width: 769px) {
  .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }

  .buttons .category-btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 16px;
    background-color: transparent; /* hoặc bỏ hẳn nếu đã dùng background-image */
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .buttons .category-btn:hover {
    background-color: #2980b9;
  }

  .category-select-wrapper {
    display: none !important;
  }
  

.search-bar {
  display: flex;
  justify-content: center; /* căn giữa toàn bộ block */
  align-items: center;
  gap: 8px; /* khoảng cách giữa input và nút */
  margin: 0 auto;
  width: max-content; /* chỉ chiếm vừa đủ chiều rộng nội dung */
}

#search-input {
  width: 500px; /* bạn có thể điều chỉnh */
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px 0 0 6px; /* bo góc trái */
  border: 1px solid #ccc;
  outline: none;
}

.search-btn {
  padding: 8px 12px;
  font-size: 16px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 6px 6px 0; /* bo góc phải */
  cursor: pointer;
}
  
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between; /* giữ phần còn lại về bên phải nếu cần */
  padding-left: 0;
}

.logo {
  margin-left: 0;
  padding-left: 0;
}

.logo img {
  display: block;
  width: 100px;
  height: auto;
}
  
 .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: #2b2b2b;
}
  
  /* Logo TikTok */
.header-content strong {
  margin-right: 16px;
  display: flex;
  align-items: center;
}
  

/* Gom logo + diễn đàn thành 1 nhóm trái */
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Diễn đàn */
.header-right a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  margin-right: 20px;
  white-space: nowrap;
}  
  
  
  
  
  
  
}

  
  
  






/* Thiết lập riêng cho mobile */
@media screen and (max-width: 768px) {
  .header-content {
    display: none !important;
  }

  header {
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Đảm bảo không margin cho banner */
  .banner-container,
  .banner {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Nút select wrapper */
  .category-select-wrapper {
    display: block !important;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Nút select "Tất cả" */
  #category-select {
    display: inline-block;
    margin: 0 auto !important;
    padding: 10px 14px !important;
    font-size: 16px;
    border-radius: 8px;
  }

  /* Gộp luôn padding & margin vùng nút */
  section.buttons {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  
  .banner-container {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
}

.banner {
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  overflow: hidden;
  width: 100%;
}

  
section.buttons {
  margin: 0 !important;
  padding: 0 !important;
}

.category-select-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

#category-select {
  margin: 0 auto !important;
  display: block;
}

  
.tight-space {
  margin: 0;
  padding: 0;
}
  
  
  
}

@media (max-width: 768px) {
  .banner-container,
  .banner,
  .category-select-wrapper,
  section.buttons {
    margin: 0 !important;
    padding: 0 !important;
  }

  .banner-container {
    position: relative;
  }

  .banner {
    display: flex;
    overflow: hidden;
    width: 100%;
  }

  #category-select {
    display: block;
    margin: 0 auto !important;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  
  
 .banner-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.banner-slide {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
}

 section.buttons,
.category-select-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
  
  
.banner-container a.prev,
.banner-container a.next {
  position: absolute;
  top: 70%;
  transform: translateY(-50%);
  font-size: 28px;
  color: white;
   background: none !important; /* Bỏ nền đen */
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 10;
  cursor: pointer;
}

.banner-container a.prev {
  left: 10px;

}

.banner-container a.next {
  right: 10px;
}
  
.banner-container {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  height: auto;
} 
  
}
@media screen and (max-width: 768px) {
  #category-select {
    margin-top: 40px !important; /* 👉 Tạo khoảng cách phía trên */
  }
  
.search-bar, .sidebar-search-bar {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-top: 70px; /* 👈 Tăng giá trị này để đẩy xuống dưới */
}

.sidebar-search-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 10px 0;
}

.sidebar-search-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  margin-right: 8px; /* 👉 tạo khoảng cách giữa input và nút */
}

.sidebar-search-form .search-btn {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.search-btn {
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 16px;
}
  
}
@media screen and (min-width: 769px) {
  #hamburger-menu {
    display: none !important;
  }
}