/* SEO YOLO responsive shell.
 * Restores the mobile behaviour from the 8 July redesign without changing
 * desktop brand styling or page content.
 */

html {
  overflow-wrap: anywhere;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

.sy-mobile-menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #1e1e1e;
  border-radius: 10px;
  background: #fff;
  color: #1e1e1e;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sy-mobile-menu-toggle__icon,
.sy-mobile-menu-toggle__icon::before,
.sy-mobile-menu-toggle__icon::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}

.sy-mobile-menu-toggle__icon {
  position: relative;
}

.sy-mobile-menu-toggle__icon::before,
.sy-mobile-menu-toggle__icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.sy-mobile-menu-toggle__icon::before {
  top: -7px;
}

.sy-mobile-menu-toggle__icon::after {
  top: 7px;
}

.sy-mobile-menu-toggle[aria-expanded="true"] .sy-mobile-menu-toggle__icon {
  background: transparent;
}

.sy-mobile-menu-toggle[aria-expanded="true"] .sy-mobile-menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.sy-mobile-menu-toggle[aria-expanded="true"] .sy-mobile-menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.sy-mobile-menu-toggle:focus-visible,
header nav a:focus-visible {
  outline: 3px solid #f7d147;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  [style*="display:grid"][style*="grid-template-columns:repeat(3"],
  [style*="display: grid"][style*="grid-template-columns: repeat(3"],
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="display: grid"][style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  html.sy-responsive-ready header > div {
    min-height: 56px;
    padding: 6px 20px !important;
  }

  html.sy-responsive-ready header > div > a img {
    width: auto !important;
    max-width: 148px !important;
    height: auto !important;
    max-height: 36px !important;
  }

  html.sy-responsive-ready .sy-mobile-menu-toggle {
    display: inline-flex;
  }

  html.sy-responsive-ready header nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    width: 100%;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 8px 20px 22px;
    border-bottom: 2px solid #1e1e1e;
    background: #fefbf0;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.1);
  }

  html.sy-responsive-ready header nav.sy-mobile-nav-open {
    display: flex !important;
  }

  html.sy-responsive-ready header nav a {
    display: flex !important;
    min-height: 48px;
    padding: 13px 2px !important;
    border-bottom: 1px solid #eee9db;
    align-items: center;
    font-size: 17px !important;
  }

  html.sy-responsive-ready header nav a:last-child {
    min-height: 48px;
    margin-top: 14px;
    padding: 12px 24px !important;
    border-bottom: 0;
    align-self: flex-start;
    justify-content: center;
  }

  [style*="display:grid"][style*="grid-template-columns"],
  [style*="display: grid"][style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [style*="max-width:"][style*="margin:0 auto"][style*="padding:"],
  [style*="max-width:"][style*="margin: 0 auto"][style*="padding:"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(36px, 10.2vw, 42px) !important;
    line-height: 1.08 !important;
  }

  h2 {
    max-width: 100%;
    font-size: clamp(30px, 8.4vw, 36px) !important;
    line-height: 1.12 !important;
  }

  h3 {
    max-width: 100%;
    font-size: clamp(22px, 6.4vw, 28px) !important;
  }

  input,
  textarea,
  select,
  button {
    max-width: 100%;
  }

  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  pre,
  code {
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
  }

  [style*="margin-left:-25px"],
  [style*="margin-left: -25px"] {
    margin-left: 0 !important;
  }
}

@media (max-width: 520px) {
  [style*="display:flex"][style*="justify-content:space-between"],
  [style*="display: flex"][style*="justify-content: space-between"] {
    flex-wrap: wrap !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sy-mobile-menu-toggle__icon,
  .sy-mobile-menu-toggle__icon::before,
  .sy-mobile-menu-toggle__icon::after {
    transition: none;
  }
}
