/* Higher-specificity logo sizing overrides */
.homepage1-body .vl-transparent-header .vl-logo img.melq-brand-logo,
.homepage2-body .vl-transparent-header .vl-logo img.melq-brand-logo,
.homepage3-body .vl-transparent-header .vl-logo img.melq-brand-logo,
.homepage4-body .vl-transparent-header .vl-logo img.melq-brand-logo {
  width: min(70%, 135px);
  height: auto;
}

.vl-offcanvas .vl-offcanvas-logo,
.homepage2-body .vl-offcanvas .vl-offcanvas-logo,
.homepage4-body .vl-offcanvas .vl-offcanvas-logo {
  width: auto;
  height: auto;
  filter: none;
}

.vl-offcanvas .vl-offcanvas-logo img.melq-brand-logo,
.homepage2-body .vl-offcanvas .vl-offcanvas-logo img.melq-brand-logo,
.homepage4-body .vl-offcanvas .vl-offcanvas-logo img.melq-brand-logo {
  width: min(100%, 176px);
  height: auto;
}

.footer-cta-bg-area .vl-footer1-section-area .footer-time-area img.melq-brand-logo,
.footer-cta2-bg-area .vl-footer2-section-area .footer-time-area img.melq-brand-logo,
.vl-footer3-section-area .footer-time-area img.melq-brand-logo,
.vl-footer4-section-area .footer-time-area img.melq-brand-logo {
  width: min(100%, 172px);
  height: auto;
}

/* MELQ brand assets */
.melq-brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.melq-brand-logo--header {
  width: min(70%, 135px);
}

.melq-brand-logo--offcanvas {
  width: min(100%, 176px);
}

.melq-brand-logo--footer {
  width: min(100%, 172px);
}

.vl-logo a,
.vl-offcanvas-logo a {
  display: inline-flex;
  align-items: center;
}

/* MELQ language switcher */
.melq-navbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  transition:
    gap 0.32s ease,
    transform 0.32s ease;
}

.header-sticky .melq-navbar-actions {
  gap: 18px;
}

.melq-mobile-nav-actions {
  gap: 12px;
}

.melq-language-switcher--nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  overflow: visible;
  background:
    radial-gradient(
      circle at 30% 28%,
      rgba(100, 182, 255, 0.95) 0%,
      rgba(40, 120, 255, 0.84) 28%,
      rgba(10, 47, 122, 0.94) 62%,
      rgba(5, 28, 82, 1) 100%
    ),
    linear-gradient(145deg, #1b5fe4 0%, #0b2b75 56%, #061b55 100%);
  color: #ffffff;
  box-shadow:
    0 14px 28px rgba(4, 20, 63, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.melq-language-switcher--nav::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.melq-language-switcher--nav:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 18px 32px rgba(4, 20, 63, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  filter: saturate(1.08);
}

.melq-language-switcher--nav:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(42, 119, 255, 0.18),
    0 18px 32px rgba(4, 20, 63, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.melq-language-switcher__globe {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
  font-size: 1.55rem;
  transform: translateY(1px);
  transition:
    transform 0.28s ease,
    color 0.28s ease;
}

.melq-language-switcher__code {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(5, 20, 56, 0.42);
  backdrop-filter: blur(6px);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.melq-language-switcher__swap {
  position: absolute;
  right: -2px;
  bottom: -3px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(145deg, #66b5ff 0%, #2b7bff 38%, #103e9b 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 68, 170, 0.36);
  transition: transform 0.28s ease;
}

.melq-language-switcher__swap i {
  font-size: 0.64rem;
}

.melq-language-switcher--nav:hover .melq-language-switcher__globe {
  transform: translateY(1px) rotate(-12deg) scale(1.05);
  color: rgba(255, 255, 255, 0.3);
}

.melq-language-switcher--nav:hover .melq-language-switcher__swap {
  transform: rotate(180deg) scale(1.04);
}

.homepage2-body .melq-language-switcher--nav {
  box-shadow:
    0 14px 28px rgba(6, 46, 126, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.homepage2-body .melq-language-switcher--nav:hover {
  box-shadow:
    0 18px 30px rgba(6, 46, 126, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

@media (max-width: 991.98px) {
  .melq-brand-logo--header {
    width: min(70%, 135px);
  }

  .melq-language-switcher--nav {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .melq-language-switcher__code {
    min-width: 28px;
    min-height: 28px;
    font-size: 0.82rem;
  }
}

/* =========================================================
   MELQ language switcher v2 — folded ribbon tag
   ========================================================= */
.melq-navbar-actions {
  gap: 7px;
}

.header-sticky .melq-navbar-actions {
  gap: 18px;
}

.melq-language-switcher--nav {
  position: relative;
  width: auto;
  height: 48px;
  min-width: 78px;
  padding: 0 19px 0 14px;
  border: 1px solid rgba(45, 112, 255, 0.22);
  border-radius: 15px 15px 5px 15px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #0c2558;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(247, 250, 255, 0.98) 58%,
    rgba(229, 238, 255, 0.98) 100%
  );
  box-shadow:
    0 9px 26px rgba(13, 43, 99, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  cursor: pointer;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease;
}

.melq-language-switcher--nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0 52%,
    rgba(50, 125, 255, 0.08) 52% 67%,
    transparent 67% 100%
  );
  transform: none;
  opacity: 1;
  pointer-events: none;
}

.melq-language-switcher--nav::after {
  content: "";
  position: absolute;
  left: -28px;
  top: -38px;
  width: 72px;
  height: 108px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(39, 117, 255, 0.2), rgba(19, 67, 162, 0));
  transform: rotate(35deg);
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
  pointer-events: none;
}

.melq-language-switcher__icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 10px 10px 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, #2d7cff 0%, #1551c4 55%, #0b2e78 100%);
  box-shadow:
    0 7px 14px rgba(24, 79, 185, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.melq-language-switcher__icon i {
  font-size: 0.82rem;
}

.melq-language-switcher__code {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
}

.melq-language-switcher__fold {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #72bcff 0%, #2e7dff 45%, #15499e 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  filter: drop-shadow(-2px -2px 4px rgba(15, 58, 139, 0.1));
  transition:
    width 0.28s ease,
    height 0.28s ease,
    filter 0.28s ease;
}

.melq-language-switcher--nav:hover {
  transform: translateY(-2px);
  color: #0a2b6c;
  border-color: rgba(45, 112, 255, 0.4);
  box-shadow:
    0 14px 30px rgba(13, 43, 99, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  filter: none;
}

.melq-language-switcher--nav:hover::after {
  transform: translateX(30px) rotate(35deg);
}

.melq-language-switcher--nav:hover .melq-language-switcher__icon {
  transform: rotate(-5deg) translateY(-1px);
  box-shadow:
    0 9px 18px rgba(24, 79, 185, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.melq-language-switcher--nav:hover .melq-language-switcher__fold {
  width: 23px;
  height: 23px;
  filter: drop-shadow(-3px -3px 6px rgba(15, 58, 139, 0.14));
}

.melq-language-switcher--nav:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(45, 112, 255, 0.14),
    0 14px 30px rgba(13, 43, 99, 0.17);
}

/* Keep the switcher visually attached to the primary CTA before sticky state. */
.vl-header-area:not(.header-sticky) .melq-navbar-actions .melq-language-switcher--nav {
  margin-inline-end: -1px;
}

/* After scroll, give both actions room so the sticky nav feels lighter. */
.vl-header-area.header-sticky .melq-navbar-actions .melq-language-switcher--nav {
  transform: translateX(0);
}

.homepage2-body .melq-language-switcher--nav {
  color: #0c2558;
  background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 62%, #e7efff 100%);
  box-shadow:
    0 9px 26px rgba(13, 43, 99, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.homepage2-body .melq-language-switcher--nav:hover {
  box-shadow:
    0 14px 30px rgba(13, 43, 99, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

@media (max-width: 991.98px) {
  .melq-language-switcher--nav {
    height: 44px;
    min-width: 70px;
    padding: 0 16px 0 12px;
    border-radius: 14px 14px 5px 14px;
    gap: 7px;
  }

  .melq-language-switcher__icon {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 9px 9px 4px 9px;
  }

  .melq-language-switcher__icon i {
    font-size: 0.76rem;
  }

  .melq-language-switcher__code {
    font-size: 0.82rem;
  }

  .melq-mobile-nav-actions {
    gap: 10px;
  }
}
