:root {
  --main-color: #952ee2;
}
/* Global Styles */
body {
  background-color: #f8f9fa;
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html, body {
  font-family: 'Roboto', sans-serif;
}
.header-top { 
  background: var(--main-color); 
  color: #fff; 
  font-size: .9rem; 
  padding: 5px 0; 
  position: static;
}
.header-part { 
  background: #fff;
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  border-bottom: none !important; /* remove purple underline */
}
.fixed-header-wrapper {
  position: static;
  border-bottom: none !important; /* clear any inherited border */
}
.navbar-part { 
  background: #f8f9fa; /* match page background */
  position: static;
  border-bottom: none !important; /* ensure no underline */
}
.navbar-part .navbar-list { list-style: none; padding: 0; margin: 0; display: flex; }
.navbar-part .navbar-item { margin-right: 1rem; }
.navbar-part .navbar-link { 
  color: #000; /* menu text in black */
  text-decoration: none; 
  padding: .75rem 0; 
  display: block; 
}
.navbar-part .navbar-link:hover {
  color: var(--main-color);
}
.feature-area { 
  padding: 40px 0;
  padding-top: 98px; /* offset for fixed header height */
}
.card-custom { border-radius: .5rem; box-shadow: 0 0 .5rem rgba(0,0,0,.1); }
.btn-gradient-custom {
  background: linear-gradient(90deg, var(--main-color), #d02626);
  color: #fff !important;
  border: none;
  filter: none;
  transition: filter 0.2s;
}
.btn-gradient-custom:hover {
  filter: brightness(1.08);
  color: #fff !important;
}
.btn-gradient-custom * {
  color: #fff !important;
}
footer { background: transparent; color: #fff; padding: 0; }
footer a { color: #fff; text-decoration: none; }
.copy-btn { font-size: 14px; padding: 5px 10px; background-color: #cccccc; color: #000; border: none; border-radius: 4px; cursor: pointer; }
.copy-btn:hover { background-color: #bcbcbc; }
.line-count { font-size: 14px; font-weight: 500; background-color: #007bff; color: #fff; padding: 4px 8px; border-radius: 4px; }
textarea.form-control { background-color: #e9ecef; }
.result-area { margin-top: 20px; }
/* Màu biểu tượng chân trang */
.footer .footer-top i {
  color: var(--main-color);
}
/* Biểu tượng mạng xã hội ở cuối chân trang */
.social-icon {
  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  text-align: center;
  line-height: 50px;
  margin-left: 8px;
}
.social-icon.facebook { background-color: #1877F2; }
.social-icon.zalo     { background-color: #0068FF; }
.social-icon.telegram { background-color: #26A5E4; }
.social-icon i { color: #fff !important; }
/* Màu chữ ở đầu chân trang */
.footer .footer-top {
  color: #000;
}
.footer .footer-top a {
  color: #000;
}
.footer .footer-top .list-unstyled a:hover {
  text-decoration: underline;
}
/* Điều chỉnh kiểu chữ ở đầu chân trang */
.footer-top h5, .footer-top .fw-bold {
  color: #000000;
}
.footer-top p, .footer-top ul.list-unstyled li a {
  color: #333;
  line-height: 1.6;
}
.footer-top ul.list-unstyled li {
  margin-bottom: 0.5rem;
}
/* Tiêu đề chân trang có trọng lượng bình thường */
.footer-top h5 {
  font-weight: 400 !important;
}
/* Điều chỉnh kích thước và màu sắc của văn bản mô tả cột đầu tiên */
.footer-top .row .col-md-4:nth-child(1) p {
  font-size: 1.0rem;
  color: #464646;
}
/* Tăng kích thước icon FontAwesome trong footer contact */
.footer-top i.fa-envelope,
.footer-top i.fa-phone,
.footer-top i.fa-map-marker-alt {
  font-size: 1.8rem;
}
.sticky-wrapper {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
}
/* Search form and icons styling */
.search-form {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
}
.search-form .position-relative {
  flex: 1;
}
.search-input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: none;
  border-radius: 8px;
  background: #f2f2f2;
  font-size: 16px;
  color: #333;
  outline: none;
}
.search-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}
.header-icons .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f2f2f2;
  border-radius: 50%;
  color: #333;
  border: none;
  cursor: pointer;
}
.header-icons .icon-btn i {
  font-size: 18px;
}
.header-icons .icon-btn:hover {
  background: var(--main-color);
  color: #fff;
}
.header-icons .icon-btn:hover i {
  color: #fff;
}
.header-icons .icon-btn .badge {
  display: none;
}
/* Hover đổi màu kính lúp */
.search-btn:hover i {
  color: var(--main-color);
}
/* Responsive: mobile search and menu toggle */
@media (max-width: 991.98px) {
  /* Hide default search form and icons */
  .search-form { display: none !important; }
  .header-icons { display: none !important; }
  /* Show toggle buttons */
  #menuToggleBtn, #searchToggleBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f2f2f2;
    border-radius: 50%;
    color: #333;
    border: none;
    cursor: pointer;
  }
  /* Footer bottom navigation: hidden by default, shown when hamburger toggles */
  .mobile-bottom-nav {
    display: none;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 5px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1101;
  }
  .mobile-bottom-nav.show {
    display: flex;
  }
  .mobile-bottom-nav .navbar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #333;
    text-decoration: none;
  }
  .mobile-bottom-nav .navbar-link i {
    font-size: 20px;
    margin-bottom: 3px;
  }
  /* ensure content above footer nav */
  .feature-area, .result-area {
    padding-bottom: 60px;
  }
  /* Logo adjustments and toggles positioning */
  .logo-img { height: 40px; }
  .logo-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  #menuToggleBtn { position: absolute; top: 50%; left: 20px; transform: translateY(-50%); }
  #searchToggleBtn { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); }
}
@media (min-width: 992px) {
  /* Hide toggle buttons on desktop */
  #menuToggleBtn, #searchToggleBtn { display: none !important; }
  /* Ensure default display on desktop */
  .search-form, .header-icons { display: flex !important; position: static !important; }
  .mobile-bottom-nav { display: none !important; }
}
/* Ensure no underline on icon-btn */
.icon-btn {
  text-decoration: none;
}
/* Loại bỏ mọi đường viền hoặc bóng viền tím dưới header */
.header-part, .fixed-header-wrapper, .navbar-part {
  border-bottom: none !important;
  box-shadow: none !important;
}
/* Điều chỉnh kích thước và màu sắc của văn bản mô tả cột đầu tiên */
.footer-top .row .col-md-4:nth-child(1) p {
  font-size: 1.0rem;
  color: #464646;
}
/* Tăng kích thước icon FontAwesome trong footer contact */
.footer-top i.fa-envelope,
.footer-top i.fa-phone,
.footer-top i.fa-map-marker-alt {
  font-size: 1.8rem;
}
.header-icons .icon-btn + .icon-btn {
  margin-left: 12px;
}
/* Hover state for mobile footer navigation icons and labels */
.mobile-bottom-nav .navbar-link:hover,
.mobile-bottom-nav .navbar-link:hover i {
  color: var(--main-color);
}
.gtranslate_wrapper select {
    font-size: 0.90em;
    min-width: 165px;
    height: 22px;
}
.gtranslate_wrapper select option {
    color: #222 !important; /* Màu chữ trong dropdown */
    background: #fff !important;
}
.gtranslate_wrapper {
    vertical-align: middle;
}
.header-search .input-group {
    position: relative;
}
.header-search .search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
    pointer-events: none;
}
.header-search .form-control {
    padding-right: 40px;
}
.header-main.scrolled .header-search .search-icon {
    color: var(--main-color);
}
.header-main {
    position: relative;
    z-index: 100;
    transition: box-shadow 0.2s;
}
.header-main.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(149,46,226,0.08);
    animation: slideDown 0.2s;
}
.header-main.scrolled .header-search .input-group {
    border: 2px solid var(--main-color) !important;
    background: #fff;
}
@keyframes slideDown {
    from { transform: translateY(-100%);}
    to { transform: translateY(0);}
}
.searchbox-wrapper {
    position: relative;
    background: #f6f6f6 !important;
    border-radius: 8px;
    height: 50px;
    border: none !important;
    display: flex;
    align-items: center;
    width: 100%;
    transition: border 0.2s, background 0.2s;
    padding: 0;
}
.searchbox-input {
    width: 100%;
    height: 100%;
    padding-left: 18px;
    padding-right: 44px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    font-size: 1rem;
    color: #333;
}
.searchbox-input::placeholder {
    color: #888;
    opacity: 1;
    font-size: 0.86rem;
}
.searchbox-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #333;
    font-size: 1.1rem;
    pointer-events: auto;
    transition: color 0.2s ease;
    cursor: pointer;
    z-index: 10;
}
.searchbox-icon i {
    pointer-events: auto;
    cursor: pointer;
}
.searchbox-icon:hover {
    color: var(--main-color);
    cursor: pointer;
}
/* Remove all other color changes */
.searchbox-wrapper:hover .searchbox-icon,
.searchbox-wrapper:focus-within .searchbox-icon {
    color: #333;
}
/* Add border color change on scroll and focus */
.header-main.scrolled .searchbox-wrapper,
.searchbox-wrapper:focus-within {
    border: 2px solid var(--main-color) !important;
    background: #fff !important;
}
/* Add hover effect for the search icon */
.searchbox-icon i:hover {
    color: var(--main-color);
}
.header-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.86em;
}
.header-link:hover {
  color: #fff;
  text-decoration: none;
}
.header-top-bar {
  background: var(--main-color);
  color: #fff;
  padding: 8px 0;
}
.header-welcome {
  font-size: 0.86em;
}
/* === Mobile Header & Bottom Nav === */
@media (max-width: 767px) {
  /* MOBILE HEADER */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 9999;
  }
  .mobile-header .menu-btn,
  .mobile-header .search-btn {
    font-size: 24px;
    color: #333;
    text-decoration: none;
  }

  /* Đẩy nội dung trang xuống dưới header */
  body {
    padding-top: 48px;
  }

  /* MOBILE BOTTOM NAV */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    z-index: 9999;
  }
  .mobile-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    color: #333;
    text-decoration: none;
  }
  .mobile-nav .nav-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
  }
  .mobile-nav .nav-item.active,
  .mobile-nav .nav-item:hover {
    color: #e74c3c;
  }
}

/* Ẩn trên desktop/tablet */
@media (min-width: 768px) {
  .mobile-header,
  .mobile-nav {
    display: none !important;
  }
}
