:root {
  --color-primary: #A2D56F;
  --color-accent: #7BAE4C;
  --color-bg: #e9e9e9;
  --color-text: #2E2E2E;
  --color-subtext: #707070;

  --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 20px;

  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: #EEEEEE;
  line-height: 1.6;
  padding-top: 50px;
}
main {
  flex: 1;
}
section {
  margin-top: 40px;
}
/* Xóa margin-top cho section đầu tiên */
section:first-of-type {
  margin-top: 0;
}
main section:last-of-type {
  margin-bottom: 4rem;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}
img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}


button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-accent);
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}
button:hover {
  background-color: var(--color-primary);
}

input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.header-top {
  padding: 10px 10px;
  display: flex;
  justify-content:center;
  align-items: center;
}

.header-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */

.logo-image {
  max-width: 100%;
  height: 60px;
  object-fit: contain;
  display: block; /* Loại bỏ khoảng trắng dưới hình ảnh */
  margin: 0 auto; /* Căn giữa logo nếu cần */
}

/* Thêm một số hiệu ứng cho logo khi hover */
.logo-image:hover {
  opacity: 0.8; /* Giảm độ mờ khi di chuột qua logo */
  transform: scale(1.05); /* Phóng to logo một chút khi hover */
  transition: all 0.3s ease; /* Thêm hiệu ứng chuyển động mượt mà */
}
/* Main Nav */
.main-nav {
  position: relative;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.nav-item {
  position: relative;
}



/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 300px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  border-top-left-radius: 5px; 
  border-bottom-left-radius: 5px; 
  padding: 5px 0;
}

.nav-item:hover .dropdown-menu {
  display: block;
}

/* Cột danh mục chính */
.dropdown-column {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 550px;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE và Edge cũ */
}

.dropdown-column::-webkit-scrollbar {
  display: none;               /* Chrome, Safari */
}
.dropdown-column:hover {
  background-color: #f2f2f2;
}
/* Cột danh mục con */
.dropdown-item {
  background-color: #fff;
}
.dropdown-flex {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #ddd;
  width: 100%;
  padding: 10px;
}
.dropdown-flex:hover {
  background-color: #f2f2f2;
}
.submenu-container {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #fff;
  min-width: 200px;
  height: 560px;
  padding: 5px 0;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
  border-top-right-radius: 5px; 
  border-bottom-right-radius: 5px; 
}

.dropdown-item:hover .submenu-container {
  display: block;
}

.submenu li {
  list-style: none;
}

.submenu a {
  display: block;
  padding:10px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}

.submenu a:hover {
  background-color: #f2f2f2;
}


/* Hiển thị submenu khi hover */
.dropdown-item:hover .submenu-container {
  display: block;
}

.has-submenu {
  position: relative;
  display: flex;
}

.has-submenu .submenu-container {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 250px;  /* Điều chỉnh chiều rộng của submenu */
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.has-submenu:hover .submenu-container {
  display: block;
}
.parent-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}


/* Location & Search */
.search-location {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#selectedLocation {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.location-selector{
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  padding: 6px 10px;
  gap: 5px;
  border: 1px solid #ccc;

  /* Bo góc bên trái */
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);

  /* Không bo góc bên phải */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.search-form {
  position: relative;
  display: flex;
  align-items: stretch;
}
.search-form input {
  width: 250px;
  padding: var(--spacing-sm);
  border: none;
  background-color: white;
  border-radius: var(--radius-xs) 0 0 var(--radius-sm);
}
.search-form button {
  background-color:#e9e9e9;
  color: #7BAE4C ;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.search-form button:hover {
  background-color: #A2D56F;
  color: #fff;
  border-color: #8FC85C;
  border: 1px solid #fff;
}
/* Thanh gợi ý search */
.suggestions-box {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  width: 440px;
  height: 250px;
  background-color: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow-y: scroll; /* vẫn cuộn được */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE 10+ */
  z-index: 1000;
  font-size: 0.9rem;
}
.suggestions-box::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.suggestions-box::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}

.suggestions-box::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Item gợi ý */
.suggestions-box div, .suggestions-box li {
  padding: var(--spacing-xs) var(--spacing-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.suggestions-box div:hover, .suggestions-box li:hover {
  background-color: #e9e9e9;
}

.suggestions-box .suggestion-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.suggestions-box .suggestion-item:last-child {
  border-bottom: none;
}

.suggestions-box .suggestion-item:hover,
.suggestions-box .suggestion-item.active {
  background-color: #f0f8ff; /* màu nền khi hover hoặc active */
}

.suggestions-box .suggestion-icon {
  margin-right: 8px;
  color: #7BAE4C; /* màu icon xanh lá như nút search */
  font-size: 1.2rem;
  flex-shrink: 0;
}

.suggestions-box .suggestion-item a {
  color: #333;
  text-decoration: none;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions-box .suggestion-item a:hover {
  text-decoration: underline;
}
.suggestion-status {
  padding: 10px 12px;
  color: #666;
  font-style: italic;
}

.suggestion-status.error {
  color: #d93025; /* đỏ báo lỗi */
}


/* Css phần thông báo */  
/* === Thông báo hiện đại & chuyên nghiệp === */

.notification-wrapper {
  position: relative;
  display: flex;
}

/* Biểu tượng chuông */
.notification {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

/* Số lượng thông báo */
.notification-count {
  position: absolute;
  top: -10px;
  right: -12px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  padding: 4px 6px;
  line-height: 1;
  display: none;
  z-index: 1;
  min-width: 18px;
  text-align: center;
}



/* Dropdown thông báo */
.notification-dropdown {
  position: absolute;
  top: 200%;
  left: -50px;
  width: 340px;
  height: 420px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
}

/* Tam giác nhọn chỉ lên chuông */
.notification-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 20px;
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
}

/* Header cố định khi cuộn */
.notification-dropdown .dropdown-header {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e2e2e2;
  padding: 10px 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.dropdown-header button {
  background: none;
  border: none;
  color: #007bff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.dropdown-header button:hover {
  text-decoration: underline;
}

/* Danh sách thông báo */
.notification-list {
  overflow-y: auto;
  flex: 1;
  max-height: 360px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE/Edge */
}

.notification-list::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Mỗi mục thông báo */
.notification-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.notification-item:hover {
  background: #f9f9f9;
}

.notification-item.unread {
  background-color: #eef6ff;
  font-weight: 600;
}


/* Nội dung thông báo */
.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.notification-time {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Trạng thái rỗng hoặc lỗi */
.suggestion-status {
  padding: 12px 15px;
  color: #888;
  font-style: italic;
  text-align: center;
}

.suggestion-status.error {
  color: #d93025;
}


.text-muted,
.text-danger {
  margin-left: 10px;
}
/* Text đánh dấu đã đọc toàn bộ (nếu dùng dưới cùng) - không cần nữa vì đã có header*/
/*
.mark-all-read-mobile {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  color: #007bff;
  cursor: pointer;
}
*/

/* Hiệu ứng pulse nhẹ cho badge */

.badge.notification-count.pulse {
  animation: pulse-animation 1.5s ease;
}

/* Panel chuyển động mượt */
#notification-dropdown,
#mobileNotificationPanel {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
  display: none;
  will-change: opacity, transform;
}
#notification-dropdown.active,
#mobileNotificationPanel.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* Avatar mobile */
.avatar-mobile {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0; 
  object-fit: cover;
  margin-right: 12px;
}

/* Container bên phải avatar */
.notification-clickable > div.ms-2 {
  overflow: hidden; /* Để text-truncate có hiệu quả */
}

/* Giới hạn chiều cao tên + nội dung để không quá dài, cắt bớt text */
.fw-semibold {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avatar desktop */
.avatar-desktop {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 12px;
}

/* Mobile notification message */
.notification-message {
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.notification-time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 3px;
}

/* Đảm bảo toàn bộ container hiển thị 1 dòng ngang */
.notification-clickable {
  width: 100%;
  display: flex;
  align-items: center;
}


/* Hiển thị số lượng tin nhắn */
.chat-link-wrapper {
  position: relative;
}

.chat-nav-link {
  position: relative;
  display: inline-block;
}

.message-badge {
  position: absolute;
  top: 5px;
  right: 0;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  padding: 4px 6px;
  line-height: 1;
  display: none; /* sẽ hiển thị qua JS khi cần */
  z-index: 1;
  min-width: 18px;
  text-align: center;
}


/* User Actions */
.user-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1rem;
}
.nav-link i{
  font-size: 1.5rem;
}

/* Avatar + Tên người dùng */
.user-avatar {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.user-avatar img,
.user-avatar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-right: -15px;
}

.user-avatar .avatar:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.user-avatar .fa-chevron-down {
  font-size: 12px;
  margin-left: 8px;
}

/* Tên người dùng */
.user-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #333;
}

.user-fullname {
  display: inline-block;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}


#userDropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  padding: 10px 0;
  width: 250px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 1000;
  border-end-end-radius: 5px;
  border-end-start-radius: 5px;
  display: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#userDropdown.show {
  opacity: 1;
  transform: translateY(0);
}

#userDropdown p {
  margin: 0;
  padding: 8px 16px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  color: #444;
}

#userDropdown a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

#userDropdown a:hover {
  background-color: #f5f5f5;
  color: #000;
}

.mobile-category-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 20%;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
  transition: bottom 0.3s ease-in-out;
  border-top: 2px solid #eee;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: flex;
  transform: translateY(100%);
}
.mobile-category-panel.active {
  transform: translateY(0%);
}
.category-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: #f8f8f8;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  z-index: 2;
}
.category-header button {
  color: #000;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.category-list {
  list-style: none;
  margin: 60px 0 0;
  padding: 0;
  width: 55%;
  border-right: 1px solid #eee;
}
.category-list li {
  position: relative;
  padding-left: 16px;
  cursor: pointer;
}

.category-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background-color: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 2px;
}

.category-list li:hover::before,
.category-list li.active::before {
  opacity: 1;
}

.parent-category-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.parent-category-item:hover {
  background: #f9f9f9;
}
.subcategory-list {
  list-style: none;
  padding: 12px 16px;
  margin: 60px 0 0;
  width: 55%;
}
.subcategory-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.subcategory-list li a {
  color: #333;
  font-size: 15px;
}
.subcategory-list li a:hover {
  color: var(--color-primary);
}


.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.category-list {
  list-style: none;
  padding: 12px 0 0;
  overflow-y: auto;
}

.category-list li {
  padding: 10px;
  border-bottom: 1px solid #f1f1f1;
}

.nav-link {
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 15px;
}
.nav-link:hover {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}
.nav-link i {
  margin-right: 6px;
}

.post-btn {
  background-color: white;
  color: var(--color-accent);
  font-weight: bold;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s;
}
.post-btn i {
  margin-right: 6px;
}
.post-btn:hover {
  background-color: var(--color-bg);
}

/* Bottom nav mobile */
.bottom-nav-mobile {
  display: none;
}


.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 8% auto;
  padding: 20px;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 0 10px #0003;
}

#locationList {
  max-height: 400px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
}

#locationList li {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}
#locationList li:hover {
  background-color: #f0f0f0;
}
#locationList > li {
  padding: 5px 10px;
  list-style-type: none;
  border-bottom: 1px solid #ddd;
}

#locationList ul li {
  list-style-type: circle;
  padding-left: 10px;
  margin-left: 5px;
}
.close {
  float: right;
  font-size: 20px;
  cursor: pointer;
}

/*--------- Tài khoản css mobile ----------*/
.bottom-nav-mobile .avatar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bottom-nav-mobile .bottom-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2px;
}
.bottom-username {
  display: block;             /* hoặc inline-block nếu cần */
  max-width: 60px;            /* tùy theo thiết kế, có thể điều chỉnh */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;            /* có thể thay đổi nếu cần */
  text-align: center;
}

.bottom-nav-mobile a {
  position: relative;
  color: #666;
  padding: 5px 0;
  text-align: center;
  flex: 1;
}

.bottom-nav-mobile a.active {
  color: #00cc66; /* Màu xanh khi active */
}

.bottom-nav-mobile a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 30%;
  width: 40%;
  height: 3px;
  background-color: #00cc66; /* màu vạch xanh */
  border-radius: 2px;
}
.dropdown-danhmuc-mobile {
  display: none !important;
}

/*----Footer--------*/

.site-footer {
  background-color: #f7f9f9; 
  color: #333;
  padding: 50px 20px 30px;
  border-top: 1px solid #e0e0e0;
  margin: 50px 0; 
}

.footer-column h4 {
  color: #111;
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
}

.footer-column h4::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: #A2D56F; /* điểm nhấn xanh */
  margin-top: 8px;
  border-radius: 2px;
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}

.footer-column {
  flex: 1 1 200px;
  min-width: 200px;
}



.footer-column p,
.footer-column li,
.footer-column a {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  text-decoration: none;
  color: #555;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #A2D56F;
}

.social-icons {
  margin-top: 10px;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
  color: #ccc;
  font-size: 18px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #A2D56F;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  font-size: 13px;
  color: #777;
  text-align: center;
  border-top: 1px solid #ddd;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #4CAF50; /* xanh tươi, giống màu điểm nhấn */
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  cursor: pointer;
}

.read-more:hover,
.read-more:focus {
  color: #388E3C; /* xanh đậm hơn khi hover */
  border-bottom-color: #388E3C;
  outline: none;
}


@media (min-width: 600px) and (max-width: 1100px) {
  .header-top {
    padding: 10px 15px;
  }
  .logo-image {
    width: 100px; 
  }
  .header-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-left: 0;
  }

  /* Nhóm Logo + Location cùng 1 hàng */
  .logo-nav {
    justify-content: space-between;
    align-items: center;
  }

  .logo-text {
    font-size: 1.4rem;
    color: #fff;
    font-weight: bold;
  }

  .main-nav {
    display: none; /* Ẩn menu chính */
  }

  .notification-dropdown {
      top: 150%;
      left: -180px;
  }

  .location-selector {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
  }

  /* Tìm kiếm nằm dưới */
  .search-location {
    align-items: stretch;
    gap: 1rem;
  }

  .search-form {
    display: flex;
    width: 100%;
  }

  .search-form input {
    width: 250px;
    padding: 8px;
    font-size: 0.85rem;
  }
  .search-form button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Ẩn các hành động người dùng */
  .nav-link, .user-avatar {
    display: none;
  }
  .post-btn {
    margin-left: 20px;
    font-size: 0.85rem;
    font-weight: bold;
  }
/* --- Bottom nav mobile cố định dưới cùng màn hình --- */
.bottom-nav-mobile {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  background-color: #fff;
  border-top: 1px solid #ddd;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 6px 0;
  font-size: 0.75rem;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.bottom-nav-mobile a {
  flex: 1;
  text-align: center;
  color: #444;
  text-decoration: none;
}

.bottom-nav-mobile i {
  font-size: 1.5rem;
  margin-bottom: 6px;
}


.message-badge {
  position: absolute;
  top: 0;
  right: 40px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  padding: 4px 6px;
  line-height: 1;
  display: none;
  z-index: 1;
  min-width: 18px;
  text-align: center;
}


}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    padding: 10px 15px;
  }
  .logo-image {
    height: 40px;
  }

  .header-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  /* Nhóm Logo + Location cùng 1 hàng */
  .logo-nav {
    justify-content: space-between;
    align-items: center;
  }

  .logo-text {
    font-size: 1.4rem;
    color: #fff;
    font-weight: bold;
  }

  .main-nav {
    display: none; /* Ẩn menu chính */
  }

  .location-selector {
    width: 150px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
  }

  /* Tìm kiếm nằm dưới */
  .search-location {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--color-primary);
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  transition: transform 0.3s ease, opacity 0.3s ease;

  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* cho xuống dòng nếu thiếu chỗ */
}

/* Ẩn khi cần */
.search-location.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* 🔍 Form tìm kiếm chiếm phần lớn chiều ngang */
.search-form {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.search-form input {
  flex: 1;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-form button {
  display: none;
}

/* Gợi ý kết quả tìm kiếm */
.suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 🔔 Thông báo */
.notification-wrapper {
  list-style: none;
  position: relative;
}

.notification {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.notification-count {
  position: absolute;
  top: 0;
  right: -2px;
  background-color: red;
  color: white;
  font-size: 11px;
  border-radius: 50%;
  padding: 4px 6px;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: 120%;
  left: -300px;
  width: 340px;
  height: 420px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
}
.notification-item.unread {
  font-weight: 400;
}

/* Thông báo cho phần tin nhắn */
.message-badge {
  position: absolute;
  top: 0;
  right: 15px;
  background-color: red;
  color: white;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 12px;
  font-weight: bold;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}


  /* Ẩn các hành động người dùng */
  .user-actions {
    display: none;
  }

  /* --- Bottom nav mobile cố định dưới cùng màn hình --- */
  .bottom-nav-mobile {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    background-color: #fff;
    border-top: 1px solid #ddd;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 6px 0;
    font-size: 0.75rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .bottom-nav-mobile.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  .bottom-nav-mobile a {
    flex: 1;
    text-align: center;
    color: #444;
    text-decoration: none;
  }

  .bottom-nav-mobile i {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

 .modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 16px;
    max-width: 100%;
    border-radius: 6px;
  }

  #locationList {
    max-height: 300px;
    font-size: 15px;
  }

  #locationList li {
    padding: 12px 10px;
  }

  .close {
    font-size: 24px;
    float: none;
    display: block;
    text-align: right;
    margin-bottom: 10px;
  } 

  .footer-columns {
    flex-direction: column;
    gap: 20px;
  }

  .footer-column {
    flex: 1 1 100%;
  }

  .section-title h2 {
    font-size: 18px;
  }
}

