/* ==========================================================================
   THOITIETHCM — SHELL (header / footer / ambient background)
   Prefix class: hcm-  (thong nhat voi he component hcm-* cua trang chu,
   xem assets/thoitiet-modern.css phan "NEW HOMEPAGE REDESIGN" cho token mau)
   ========================================================================== */

/* ==========================================================================
   NEN AM TROI + LA CO CHU DONG
   ========================================================================== */

.hcm-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #F0F7FF 0%, #E6F3FF 340px, #F0F7FF 100%);
}

.hcm-ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.hcm-ambient__glow--sun {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -100px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.35), transparent 70%);
}

.hcm-ambient__glow--leaf {
  width: 380px;
  height: 380px;
  top: 220px;
  left: -160px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
}

.hcm-ambient__glow--sky {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: 10%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.20), transparent 70%);
}

.hcm-ambient__leaf {
  position: absolute;
  opacity: 0.16;
  color: var(--hcm-cyan, #06b6d4);
  animation: hcm-leaf-sway 7s ease-in-out infinite;
}

@keyframes hcm-leaf-sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-10px); }
}

/* ==========================================================================
   HEADER — OCEANIC BLUE MODERN GLASS
   ========================================================================== */

.hcm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.14);
  box-shadow: 0 4px 20px -4px rgba(2, 132, 199, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hcm-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* --- Brand Logo --- */
.hcm-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none !important;
  color: inherit !important;
  flex: 0 0 auto;
  user-select: none;
}

.hcm-logo__brand-image {
  display: block;
  width: 270px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.25s ease;
}

.hcm-logo:hover .hcm-logo__brand-image {
  transform: translateY(-1px) scale(1.02);
}

.hcm-logo__mark {
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hcm-logo:hover .hcm-logo__mark {
  transform: translateY(-1px) scale(1.05);
}

.hcm-logo__img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: none;
  display: block;
}

.hcm-header .hcm-logo__img {
  width: 56px;
  height: 56px;
}

.hcm-logo__text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

/* --- Search Wrap & Form --- */
.hcm-search-wrap {
  flex: 0 1 380px;
  max-width: 400px;
  position: relative;
}

/* Strict Flatsome Overrides for Search Form */
#wrapper .hcm-header form.hcm-search-form,
.hcm-header form.hcm-search-form,
.hcm-search-form {
  display: flex !important;
  align-items: center !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(2, 132, 199, 0.28) !important;
  border-radius: 9999px !important;
  padding: 3px 4px 3px 12px !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  box-sizing: border-box !important;
  position: relative !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#wrapper .hcm-header form.hcm-search-form:hover,
.hcm-search-form:hover {
  border-color: rgba(2, 132, 199, 0.55) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12) !important;
}

#wrapper .hcm-header form.hcm-search-form:focus-within,
.hcm-search-form:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.18), 0 4px 16px rgba(2, 132, 199, 0.12) !important;
  background: #ffffff !important;
}

.hcm-search-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  flex: 0 0 auto;
  line-height: 1;
}

.hcm-search-icon {
  width: 17px;
  height: 17px;
  display: block;
  stroke: #0284c7;
}

/* Strict Flatsome Overrides for Search Input */
#wrapper .hcm-header input[type='search'].hcm-search-input,
.hcm-header input[type='search'].hcm-search-input,
input[type='search'].hcm-search-input,
.hcm-search-input {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  line-height: 36px !important;
  padding: 0 8px !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.hcm-search-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

/* Strict Flatsome Overrides for Search Submit Button */
#wrapper .hcm-header button.hcm-search-btn,
.hcm-header button.hcm-search-btn,
button.hcm-search-btn,
.hcm-search-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  border: none !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  background-color: #0284c7 !important;
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  text-shadow: none !important;
  cursor: pointer !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35) !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  vertical-align: middle !important;
}

#wrapper .hcm-header button.hcm-search-btn:hover,
.hcm-search-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  background-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45) !important;
  transform: translateY(-0.5px) !important;
}

#wrapper .hcm-header button.hcm-search-btn:active,
.hcm-search-btn:active {
  transform: translateY(0.5px) !important;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3) !important;
}

.hcm-search-btn-icon {
  width: 14px;
  height: 14px;
  display: block;
  stroke: #ffffff;
  stroke-width: 2.5;
  flex-shrink: 0;
}

#wrapper .hcm-header button.hcm-search-btn .hcm-search-btn-text,
#wrapper .hcm-header button.hcm-search-btn span,
.hcm-search-btn span {
  display: inline-block !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* --- Search Autocomplete Results Popup --- */
.hcm-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.22);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), 0 4px 14px rgba(2, 132, 199, 0.08);
  max-height: 340px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  padding: 6px;
  backdrop-filter: blur(12px);
}

.hcm-search-results ul,
.hcm-search-results ul.search-results-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hcm-search-results li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.hcm-search-results li a,
.hcm-search-results .widget_term_id {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  color: #1e293b !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  transition: all 0.18s ease !important;
}

.hcm-search-results li a:hover,
.hcm-search-results .widget_term_id:hover {
  background: #f0f9ff !important;
  color: #0284c7 !important;
  padding-left: 18px !important;
}

.hcm-search-results .no-results {
  padding: 14px 18px;
  color: #64748b;
  font-size: 13.5px;
  text-align: center;
}

/* --- Navigation Links --- */
.hcm-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.hcm-nav__link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: none !important;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.hcm-nav__link:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

.hcm-nav__link.is-active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}

.hcm-nav__link.is-active span {
  color: #ffffff !important;
}

.hcm-nav__link--pill {
  border: 1px solid rgba(2, 132, 199, 0.25);
  background: rgba(2, 132, 199, 0.04);
  color: #0369a1;
}

.hcm-nav__link--pill:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
}

.hcm-nav__badge-hot {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  border-radius: 9999px;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
  letter-spacing: 0.03em;
}

/* --- Mobile Menu Burger Button --- */
#wrapper .hcm-header button.hcm-burger,
.hcm-header button.hcm-burger,
button.hcm-burger,
.hcm-burger {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  border: 1.5px solid rgba(2, 132, 199, 0.25) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0284c7 !important;
  cursor: pointer !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08) !important;
  transition: all 0.2s ease !important;
  text-transform: none !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

#wrapper .hcm-header button.hcm-burger:hover,
.hcm-burger:hover {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: #0284c7 !important;
}

.hcm-burger__icon {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hcm-burger__icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: #0284c7;
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hcm-burger.is-active .hcm-burger__icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hcm-burger.is-active .hcm-burger__icon span:nth-child(2) {
  opacity: 0;
}

.hcm-burger.is-active .hcm-burger__icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1140px) and (min-width: 961px) {
  .hcm-search-wrap {
    flex: 0 1 260px;
    max-width: 280px;
  }
  .hcm-nav {
    gap: 3px;
  }
  .hcm-nav__link {
    padding: 7px 10px;
    font-size: 13px;
  }
}

@media (max-width: 960px) {
  .hcm-header__inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px 0;
  }

  .hcm-logo {
    order: 1;
  }

  .hcm-logo__mark,
  .hcm-header .hcm-logo__img {
    width: 48px;
    height: 48px;
  }

  .hcm-logo__text {
    font-size: 18px;
  }

  .hcm-logo__brand-image {
    width: 225px;
    max-height: 64px;
  }

  #wrapper .hcm-header button.hcm-burger,
  .hcm-header button.hcm-burger,
  button.hcm-burger,
  .hcm-burger {
    order: 2;
    display: inline-flex !important;
  }

  .hcm-search-wrap {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .hcm-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid rgba(2, 132, 199, 0.20);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 6px;
    z-index: 100;
  }

  .hcm-nav.is-open {
    display: flex !important;
    animation: hcmNavSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes hcmNavSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hcm-nav__link {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: #1e293b;
  }

  .hcm-nav__link.is-active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border-color: transparent;
  }

  .hcm-nav__link:hover {
    background: #f0f9ff;
    border-color: rgba(2, 132, 199, 0.3);
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.hcm-footer {
  margin-top: 48px;
  background: linear-gradient(180deg, #0f172a 0%, #091322 100%);
  color: #94a3b8;
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.hcm-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 30px;
}

.hcm-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hcm-footer__brand-link {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hcm-footer__brand-mark {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}
.hcm-footer__brand-link:hover .hcm-footer__brand-mark {
  transform: translateY(-2px) scale(1.03);
}
.hcm-footer__wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
}
.hcm-footer__brand-kicker {
  color: #ffc43d;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}
.hcm-footer__brand-title {
  margin-top: 3px;
  color: #f8fafc;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.hcm-footer__brand-domain {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 9px;
  background: #075985;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}
.hcm-footer__brand-domain i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffc43d;
  flex: 0 0 auto;
}
.hcm-footer__top a { color: #e2e8f0; }

@media (max-width: 480px) {
  .hcm-footer__brand-link { gap: 11px; }
  .hcm-footer__brand-mark { width: 82px; height: 82px; }
  .hcm-footer__brand-kicker { font-size: 13px; }
  .hcm-footer__brand-title { font-size: 24px; }
  .hcm-footer__brand-domain {
    gap: 6px;
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12px;
  }
  .hcm-footer__brand-domain i { width: 7px; height: 7px; }
}

.hcm-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 20px;
}

.hcm-footer__links a {
  font-size: 12.5px;
  color: #94a3b8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.hcm-footer__links a:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}
