@import "./menu-motion.css";
@import "./resources-nav.css";

/* Shared phone layouts. Keep content tracks fluid; never shrink copy into icon columns. */
@media (max-width: 760px) {
  body.experience-site.quality-2026 .how-item {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    padding: 22px 18px;
    gap: 14px;
  }
  body.experience-site.quality-2026 .how-index { display: none; }
  body.experience-site.quality-2026 .how-item > div { min-width: 0; }
  body.experience-site.quality-2026 .how-item .how-icon { margin-top: 2px; }
  body.experience-site.quality-2026 .how-item h3 { font-size: 20px; line-height: 1.35; }
  body.experience-site.quality-2026 .how-item p { width: auto; max-width: none; overflow-wrap: normal; word-break: normal; line-height: 1.65; }
  body.experience-site.quality-2026 :is(.catalog-intro-grid, .about-head, .partner-head, .how-head, .quality-process-grid) > * { min-width: 0; max-width: 100%; }
  body.experience-site.quality-2026 :is(.hero-buttons, .future-hero-actions, .account-entry-ctas) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  body.experience-site.quality-2026 :is(.hero-buttons, .future-hero-actions, .account-entry-ctas) .button {
    flex: none;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 13px 18px;
    font-size: 15px;
    line-height: 1.4;
    gap: 10px;
    text-align: center;
    border-radius: 16px;
    white-space: normal;
  }
  body.experience-site.quality-2026 .button > :is(svg, .icon) { flex-shrink: 0; }
  body.experience-site.quality-2026 .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.experience-site.quality-2026 .value-card { min-width: 0; }
  body.experience-site.quality-2026 .value-card h3 { font-size: 19px; }
  body.experience-site.quality-2026 .value-card p { line-height: 1.65; }
  body.experience-site.quality-2026 .mg-header { width: calc(100% - 20px); top: 8px; border-radius: 20px; }
  body.experience-site.quality-2026 .mg-header .header-in { height: 68px; width: calc(100% - 24px); gap: 8px !important; }
  body.experience-site.quality-2026 .mg-header .brand-logo { width: 76px; height: 51px; }
  body.experience-site.quality-2026 .mg-header .logo { min-width: 76px; flex-shrink: 0; }
  body.experience-site.quality-2026 .mg-header .header-actions { gap: 6px; min-width: 0; }
  body.experience-site.quality-2026 .mg-header :is(.header-account, .header-search, .menu-toggle) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; }
  body.experience-site.quality-2026 .mobile-convert { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); padding: 8px; border-radius: 20px; }
  body.experience-site.quality-2026 .mobile-convert .button { min-height: 48px; padding: 12px 18px; font-size: 15px; border-radius: 14px; }
  body.experience-site.quality-2026 .mg-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.experience-site.quality-2026 :is(.dark-cta, .service-guided-cta) .button { max-width: 100%; white-space: normal; line-height: 1.4; text-align: center; }
}
@media (max-width: 620px) {
  body.experience-site.quality-2026 .values-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.experience-site.quality-2026 .value-card { padding: 22px; }
  body.experience-site.quality-2026 .value-card > .icon { margin-bottom: 14px; }
  body.experience-site.quality-2026 .value-card h3 { font-size: 20px; margin-bottom: 10px; }
}

/* Match the quote bar to the white glass mobile header. */
@media(max-width:760px){
 body.experience-site.quality-2026 .mg-header,
 body.experience-site.quality-2026 .mobile-convert {
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
 }
 body.experience-site.quality-2026 .mobile-convert {
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(216, 232, 250, .66));
  border-color: rgba(240, 247, 255, .72);
 }
 body.experience-site.quality-2026 .mg-header{background:rgba(255,255,255,.7);border-color:#ffffffc9;box-shadow:0 8px 32px #1836580d,0 0 0 1px #dbe5f270}
 body.experience-site.quality-2026 .mg-header .header-in{background:transparent}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body.experience-site.quality-2026 .mg-header{background:#fffffffa}
 @media(max-width:760px){body.experience-site.quality-2026 .mobile-convert{background:#edf4fc}}
}

.mobile-nav-item-icon { display: none; }

@media (max-width: 900px) {
  body.experience-site.quality-2026 .mg-header {
    --mg-menu-glass: rgba(255, 255, 255, .7);
    --mg-menu-blur: blur(24px) saturate(150%);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /* Keep the header and menu as separate backdrop layers. */
  body.experience-site.quality-2026 .mg-header::before,
  body.experience-site.quality-2026 .mg-header .nav {
    background: var(--mg-menu-glass);
    -webkit-backdrop-filter: var(--mg-menu-blur);
    backdrop-filter: var(--mg-menu-blur);
  }

  body.experience-site.quality-2026 .mg-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
  }

  body.experience-site.quality-2026 .mg-header .nav {
    max-height: calc(100dvh - 122px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: #ffffffc9;
    box-shadow: 0 8px 32px #18365812, 0 0 0 1px #dbe5f270;
    padding: 10px;
    gap: 4px;
  }

  body.experience-site.quality-2026 .mg-header .navlink {
    gap: 11px;
    padding: 10px 12px;
    min-height: 46px;
  }

  .mg-header .mobile-nav-item-icon {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #365d90;
  }

  .mg-header .navlink.active .mobile-nav-item-icon { color: currentColor; }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.experience-site.quality-2026 .mg-header { --mg-menu-glass: #fffffffa; }
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .mg-header .nav.open {
    transform-origin: top center;
    animation: mg-mobile-menu-in 190ms cubic-bezier(.2,.75,.25,1) both;
  }
  .mg-header .nav.open > a {
    animation: mg-mobile-menu-item-in 150ms ease-out both;
  }
  .mg-header .nav.open > a:nth-child(2) { animation-delay: 12ms; }
  .mg-header .nav.open > a:nth-child(3) { animation-delay: 24ms; }
  .mg-header .nav.open > a:nth-child(4) { animation-delay: 36ms; }
  .mg-header .nav.open > a:nth-child(5) { animation-delay: 48ms; }
  .mg-header .nav.open > a:nth-child(6) { animation-delay: 60ms; }
  .mg-header .nav.open > a:nth-child(7) { animation-delay: 72ms; }
}

@keyframes mg-mobile-menu-in {
  from { transform: translateY(-6px) scale(.99); }
  to { transform: none; }
}
@keyframes mg-mobile-menu-item-in {
  from { opacity: 0; translate: 0 -4px; }
  to { opacity: 1; translate: none; }
}

@media (max-width: 900px) {
  body.experience-site.quality-2026 .mg-header .nav.open .account-mobile-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
  }
  body.experience-site.quality-2026 .mg-header .nav .nav-mobile-cta {
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }
}
