/* ==========================================================================
   Header Parent Component (mc-header)
   ========================================================================== */

:root {
  --mc-header-height: 90px;
  --mc-header-scrolled-height: 72px;
  --mc-header-bg: transparent;
  --mc-header-text: #ffffff;
  --mc-header-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.mc-header {
  position: relative;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

/* Containers */
.mc-header__container--boxed {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.mc-header__container--fluid {
  width: 100%;
  max-width: 100%;
/*   padding: 0 150px; */
}

/* 1. Topbar */
.mc-header__topbar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-header__topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 2. Main Navbar Bar */
.mc-header__main {
  background: var(--mc-header-bg);
  color: var(--mc-header-text);
  height: var(--mc-header-height);
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1140px;
  margin: auto;
  gap: 32px;
}

/* Slots */
.mc-header__slot--left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mc-header__slot--center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.mc-header__slot--right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-shrink: 0;
}

/* Logo Component Styling */
.mc-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.mc-logo__img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  transition: max-height 0.3s ease;
}

.mc-logo__text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit;
}

.mc-logo__tagline {
  display: block;
  font-size: 11px;
  opacity: 0.7;
}

/* 3. Sticky / Fixed States */
.mc-header--sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}

/* Sticky Header on Scroll */
.mc-header.is-scrolled .mc-header__main {
  --mc-header-text: #164e3c;
  height: var(--mc-header-scrolled-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--mc-header-shadow);
  color: var(--mc-header-text);
}

.mc-header.is-scrolled .mc-logo__img {
  max-height: 40px;
}

.mc-header__action-theme .mc-btn {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly visible when transparent */
  color: var(--mc-header-text);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mc-header__action-theme .mc-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.mc-header.is-scrolled .mc-header__action-theme .mc-btn {
  background-color: #d1f2fa;
}
.mc-header__action-theme .mc-btn:hover {
  background-color: rgba(255, 255, 255, 0.3) !important;
}
.mc-header.is-scrolled .mc-header__action-theme .mc-btn:hover {
  background-color: #bce9f5 !important;
}

/* User Actions Dropdown */
.mc-header.is-hidden {
  transform: translateY(-100%);
}

/* Transparent Header Variant */
.mc-header--transparent:not(.is-scrolled) .mc-header__main {
  background: transparent;
  color: #ffffff;
}

.mc-header--transparent:not(.is-scrolled) .mc-logo__img--dark {
  display: none;
}

.mc-header--transparent:not(.is-scrolled) .mc-logo__img--light {
  display: block;
}

.mc-header.is-scrolled .mc-logo__img--light {
  display: none;
}

.mc-header.is-scrolled .mc-logo__img--dark {
  display: block;
}

/* 4. Hamburger Button (Mobile) */
.mc-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: inherit;
  transition: background-color 0.2s ease;
}

.mc-header__hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mc-header__hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* 5. Mobile Drawer / Offcanvas */
.mc-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.mc-drawer.is-open {
  visibility: visible;
}

.mc-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mc-drawer.is-open .mc-drawer__overlay {
  opacity: 1;
}

.mc-drawer__content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 360px);
  background: #ffffff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  overflow-y: auto;
}

.mc-drawer.is-open .mc-drawer__content {
  transform: translateX(0);
}

.mc-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.mc-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s ease;
}

.mc-drawer__close:hover {
  background: #f8fafc;
  color: #0f172a;
}

.mc-drawer__close svg {
  width: 16px;
  height: 16px;
}

.mc-drawer__body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mc-drawer__footer {
  padding: 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 991px) {
  .mc-header__slot--center {
    display: none; /* Ẩn menu desktop trên tablet/mobile */
  }

  .mc-header__action-cta {
    display: none; /* Đưa nút CTA vào trong Mobile Drawer */
  }

  .mc-header__hamburger {
    display: flex; /* Hiện nút Hamburger */
  }
}

