/* Keep the regular and sticky mobile headers aligned. */
@media (max-width: 1024px) {
  #masthead .mheader11,
  #masthead #menuhopinm { min-height: 72px; padding: 0 16px; }
  #masthead .mheader11 > .elementor-container,
  #masthead #menuhopinm > .elementor-container {
    min-height: 72px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
  }
  #masthead .mheader11 > .elementor-container > .elementor-column,
  #masthead #menuhopinm > .elementor-container > .elementor-column {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }
  #masthead .mheader11 > .elementor-container > .elementor-column:first-child,
  #masthead #menuhopinm > .elementor-container > .elementor-column:last-child { flex: 1 1 auto; }
  #masthead .mheader11 .elementor-column > .elementor-widget-wrap,
  #masthead #menuhopinm .elementor-column > .elementor-widget-wrap {
    padding: 0;
    min-height: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
  }
  #masthead .mheader11 .elementor-column:first-child > .elementor-widget-wrap,
  #masthead #menuhopinm .elementor-column:first-child > .elementor-widget-wrap { justify-content: flex-start; }
  #masthead .mheader11 .elementor-widget-image img,
  #masthead #menuhopinm .elementor-widget-image img { width: clamp(130px, 21vw, 180px); height: auto; }
  #masthead .mheader11 .elementor-widget-premium-nav-menu,
  #masthead #menuhopinm .elementor-widget-premium-nav-menu,
  #masthead #menuhopinm .elementor-widget-button { width: auto; margin: 0; flex: 0 0 auto; }
  #masthead #menuhopinm .elementor-widget-button { order: 1; }
  #masthead #menuhopinm .elementor-widget-premium-nav-menu { order: 2; }
  #masthead .mheader11 .premium-ver-inner-container,
  #masthead #menuhopinm .premium-ver-inner-container { width: 44px; }
  #masthead .mheader11 .premium-hamburger-toggle,
  #masthead #menuhopinm .premium-hamburger-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 8px;
    line-height: 1;
  }
  #masthead .mheader11 .premium-hamburger-toggle i,
  #masthead #menuhopinm .premium-hamburger-toggle i { color: #fff; font-size: 24px; }
  #masthead .mheader11 .premium-hamburger-toggle svg,
  #masthead #menuhopinm .premium-hamburger-toggle svg { fill: #fff; width: 24px; height: 24px; }
  #masthead .mheader11 .premium-toggle-text,
  #masthead #menuhopinm .premium-toggle-text,
  #masthead .mheader11 .premium-toggle-close,
  #masthead #menuhopinm .premium-toggle-close { font-size: 0; line-height: 1; }
  #masthead #menuhopinm .premium-mobile-menu-container {
    position: fixed;
    top: 72px;
    left: 0 !important;
    right: 0;
    width: 100vw !important;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #122452;
    box-shadow: 0 12px 20px rgba(0,0,0,.2);
  }
  #masthead #menuhopinm .premium-mobile-menu-container a { color: #fff; min-height: 44px; }
  #masthead .premium-hamburger-toggle:focus-visible { outline: 2px solid #1590ff; outline-offset: 3px; }
}
@media (max-width: 767px) {
  #masthead #menuhopinm .elementor-widget-button { display: none; }
}
@media (max-width: 1024px) {
 #masthead .mheader11 .elementor-widget-image,
 #masthead #menuhopinm .elementor-widget-image { width: auto; text-align: left; }
}

/* Footer + legal bar redesign applies to phones only (<=767px).
   Tablet and desktop keep the original Elementor footer layout. */
@media (max-width: 767px) {
/* Shared four-column footer content, without changing its links or copy. */
#page .smartit-site-footer { padding: 48px 24px; }
#page .smartit-site-footer > .smartit-footer-grid {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) repeat(3,minmax(0,1fr));
  align-items: start;
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  padding: 0;
  margin: 0 auto;
}
#page .smartit-site-footer .smartit-footer-column,
#page .smartit-site-footer .smartit-footer-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  align-self: start;
  gap: 14px;
}
#page .smartit-site-footer .elementor-widget { min-width: 0; max-width: 100%; margin: 0; }
#page .smartit-site-footer .elementor-heading-title { color: #fff; font-size: 16px; line-height: 1.4; }
#page .smartit-site-footer .elementor-widget-text-editor,
#page .smartit-site-footer .elementor-widget-text-editor p,
#page .smartit-site-footer .elementor-icon-box-description { color: #cbd5e1; font-size: 14px; line-height: 1.65; }
#page .smartit-site-footer .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
#page .smartit-site-footer .elementor-icon-box-title { color: #fff; font-size: 14px; line-height: 1.5; }
#page .smartit-site-footer .elementor-icon-box-title span { font-size: inherit; }
#page .smartit-site-footer a { color: #59b0ff; overflow-wrap: anywhere; }
#page .smartit-site-footer a:hover { color: #fff; text-decoration: underline; }
#page .smartit-site-footer a:focus-visible { outline: 2px solid #1590ff; outline-offset: 3px; }
#page .smartit-site-footer .smartit-footer-brand img { width: 170px; max-width: 100%; height: auto; }
#page .smartit-site-footer .smartit-footer-brand .elementor-widget-text-editor { max-width: 70ch; }
#page .smartit-site-footer .hfe-nav-menu__toggle { display: none; }
#page .smartit-site-footer nav { display: block; width: 100%; }
#page .smartit-site-footer ul.hfe-nav-menu { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; }
#page .smartit-site-footer ul.hfe-nav-menu > li { margin: 0; width: 100%; }
#page .smartit-site-footer a.hfe-menu-item { padding: 8px 0; font-size: 14px; line-height: 1.5; min-height: 38px; background: transparent; }
#page .smartit-site-footer .elementor-social-icons-wrapper { display: flex; flex-wrap: wrap; gap: 12px; }

/* Legal links remain visible rather than collapsing into a second menu. */
#colophon .elementor-top-section { padding: 24px 0; }
#colophon .elementor-top-section > .elementor-container { width: 100%; max-width: 1200px; padding: 0 24px; gap: 24px; align-items: center; }
#colophon .elementor-column { width: auto; flex: 1 1 0; min-width: 0; }
#colophon .elementor-column > .elementor-widget-wrap { padding: 0; }
#colophon .elementor-widget-text-editor { font-size: 13px; line-height: 1.6; color: #cbd5e1; }
#colophon .elementor-widget-text-editor p { margin: 0; }
#colophon .hfe-nav-menu__toggle { display: none; }
#colophon nav.hfe-nav-menu__layout-horizontal { display: block; width: 100%; }
#colophon ul.hfe-nav-menu { display: flex; flex-wrap: wrap; flex-direction: row; gap: 8px 16px; justify-content: flex-end; }
#colophon ul.hfe-nav-menu > li { margin: 0; }
#colophon a.hfe-menu-item { padding: 4px 0; font-size: 13px; line-height: 1.5; min-height: 32px; white-space: nowrap; }
@media (max-width: 767px) {
  #page .smartit-site-footer { padding: 40px 20px; }
  #page .smartit-site-footer > .smartit-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
  #page .smartit-site-footer .smartit-footer-brand,
  #page .smartit-site-footer .smartit-footer-contact { grid-column: 1 / -1; }
  #page .smartit-site-footer a.hfe-menu-item { min-height: 44px; }
  #page .smartit-site-footer .elementor-icon-box-description a { min-height: 38px; display: inline-flex; align-items: center; }
  #page .smartit-site-footer .smartit-footer-contact .smartit-footer-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }
  #page .smartit-site-footer .smartit-footer-contact .elementor-widget-heading,
  #page .smartit-site-footer .smartit-footer-contact .elementor-widget-divider,
  #page .smartit-site-footer .smartit-footer-contact .elementor-widget-social-icons { grid-column: 1 / -1; }
  #page .smartit-site-footer .smartit-footer-contact .elementor-widget-icon-box { grid-column: 2; grid-row: auto; }
  #page .smartit-site-footer .smartit-footer-contact .elementor-widget-text-editor { grid-column: 2; }
  #page .smartit-site-footer .elementor-social-icon { width: 40px; height: 40px; font-size: 18px; }
  #colophon .elementor-top-section > .elementor-container { flex-direction: column; align-items: stretch; gap: 12px; padding: 0 20px; }
  #colophon .elementor-column { width: 100%; }
  #colophon ul.hfe-nav-menu { justify-content: center; }
  #colophon a.hfe-menu-item { min-height: 40px; }
}

/* Let content determine height instead of Elementor's saved device dimensions. */
#page .smartit-site-footer, #page .smartit-site-footer .e-con { height: auto; min-height: 0; }
#page .smartit-site-footer .smartit-footer-content { display: flex; flex-direction: column; align-items: stretch; }
#page .smartit-site-footer .elementor-widget-icon-box { width: 100%; }
#colophon .elementor-top-section, #colophon .elementor-container,
#colophon .elementor-column, #colophon .elementor-widget-wrap { height: auto; min-height: 0; }
@media (max-width: 767px) {
 #page .smartit-site-footer .smartit-footer-contact .smartit-footer-content { display: grid; }
 #page .smartit-site-footer .smartit-footer-contact .elementor-widget-icon-box:nth-child(3) { grid-column: 1; grid-row: 3 / span 2; }
 #colophon .elementor-column { flex: 0 0 auto; }
}
#colophon ul.hfe-nav-menu > li { width: auto; flex: 0 0 auto; }
#colophon .elementor-widget { margin: 0; }
#colophon .elementor-widget-wrap { align-content: flex-start; }
/* Override the footer menu plugin's mobile block layout. */
#colophon nav ul.hfe-nav-menu { display: flex !important; }
#colophon .elementor-widget-container { padding: 0; margin: 0; }
@media (max-width: 359px) {
 #page .smartit-site-footer .smartit-footer-contact .smartit-footer-content { grid-template-columns: minmax(0,1fr); }
 #page .smartit-site-footer .smartit-footer-contact .smartit-footer-content > .elementor-widget { grid-column: 1; grid-row: auto; }
}
}
