/* Extracted and simplified mobile styles */
@media screen and (max-width: 767px) {
  .header-display-desktop {
    display: none;
  }

  .header-display-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
  }

  .header-nav {
    display: none;
  }

  .header-burger {
    display: flex;
  }

  .header-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 152px 0 0;
    text-align: center;
    transition: visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Background layer for the menu */
  .header-menu-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(250, 250, 250);
    z-index: -1;
  }

  /* Pure CSS menu toggle - Clone production design */
  body:has(#mobile-menu-toggle:checked) .header-menu {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Menu nav list styling */
  body:has(#mobile-menu-toggle:checked) .header-menu-nav-list {
    display: block !important;
    position: relative !important;
    transform: matrix(1, 0, 0, 1, 0, 0) !important;
  }

  /* Menu items styling */
  body:has(#mobile-menu-toggle:checked) .header-menu-nav-item {
    display: block !important;
    position: relative !important;
    padding: 0 15px !important;
    text-align: center !important;
  }

  /* Menu links styling - matching production */
  body:has(#mobile-menu-toggle:checked) .header-menu-nav-item a {
    display: inline-flex !important;
    font-size: 31.875px !important;
    font-weight: 400 !important;
    margin: 11.25px 18.75px !important;
    text-align: center !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Fallback without :has() - target all possible paths */
  #mobile-menu-toggle:checked ~ * .header-menu,
  #mobile-menu-toggle:checked ~ * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * * * * * .header-menu,
  #mobile-menu-toggle:checked ~ * * * * * * * * * * .header-menu {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Make label clickable */
  label[for="mobile-menu-toggle"] {
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  }

  /* Container for all folders - applies when menu is open */
  body:has(#mobile-menu-toggle:checked) .header-menu-nav-list {
    position: relative !important;
    width: 100% !important;
    min-height: 400px !important;
    overflow: hidden !important;
  }

  /* All folders - always visible, positioned with transforms - applies when menu is open */
  @media screen and (max-width: 767px) {
    .header-menu-nav-folder {
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      width: 100% !important;
      min-height: 400px !important;
      display: flex !important;
      flex-direction: column !important;
      visibility: visible !important;
      opacity: 1 !important;
      padding: 0 !important;
      margin: 0 !important;
      transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Folder content wrapper */
    .header-menu-nav-folder-content {
      position: relative !important;
      width: 100% !important;
      display: flex !important;
      flex-direction: column !important;
    }
  }

  /* Menu items inside folders */
  body:has(#mobile-menu-toggle:checked) .header-menu-nav-folder .header-menu-nav-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin: 11.25px 18.75px !important;
  }

  body:has(#mobile-menu-toggle:checked) .header-menu-nav-folder .header-menu-nav-item a {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 31.875px !important;
    font-weight: 400 !important;
    text-align: center !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body:has(#mobile-menu-toggle:checked) .header-menu-nav-folder .header-menu-nav-item-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Add arrow to folder items */
  .header-menu-nav-item-content-folder::after {
    content: '›' !important;
    display: inline-block !important;
    margin-left: 10px !important;
    font-size: 1.2em !important;
    transition: transform 0.25s ease !important;
  }

  /* Arrow animation on hover */
  .header-menu-nav-item a:hover .header-menu-nav-item-content-folder::after {
    transform: translateX(5px) !important;
  }

  /* Style the back button */
  .header-menu-controls {
    display: block !important;
    margin-bottom: 30px !important;
    margin-top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .header-menu-controls-control {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 20px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    color: inherit !important;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    visibility: visible !important;
  }

  .header-menu-controls-control span {
    display: inline-block !important;
    visibility: visible !important;
  }

  .header-menu-controls-control:hover {
    opacity: 0.7 !important;
  }

  /* Add left arrow to back button */
  .header-menu-controls-control::before {
    content: '‹' !important;
    display: inline-block !important;
    margin-right: 8px !important;
    font-size: 1.3em !important;
  }

  /* Fallback for JavaScript approach */
  .header--menu-open .header-menu {
    display: flex;
    flex-direction: column;
  }

  .header-menu-nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .header-menu-nav-item {
    padding: 10px 0;
  }

  .header-title {
    flex-grow: 1;
  }

  body {
    font-size: 16px;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: 1.5em;
  }
}