/*
 * Solvory Mobile-Only Header V19
 * Retains desktop header completely untouched. Native <details> provides the
 * accessible menu state; category <details> submenus remain independently operable.
 */
@media (max-width: 980px) {
  /* Just wordmark + 3-line hamburger in the glass capsule. */
  body .sv3-header.sv5-header .sv3-head-nav,
  body .sv3-header.sv5-header .sv5-head-nav,
  body .sv3-header.sv5-header .sv3-head-right {
    display: none !important;
  }
  body header.site-header.wp-block-template-part>.sv3-header.sv5-header{
    width: calc(100% - 24px)!important;
    max-width: calc(100% - 24px)!important;
    min-height: 66px!important;
    height: 66px!important;
    border-radius: 999px!important;
    box-shadow: 0 8px 26px rgba(23,19,57,.17),inset 0 1px 0 rgba(255,255,255,.16)!important;
  }
  body .sv3-header.sv5-header .sv3-head-inner{
    display: flex!important;
    align-items: center!important;
    justify-content: space-between!important;
    width: 100%!important;
    max-width: none!important;
    height: 100%!important;
    padding: 0 13px 0 18px!important;
    gap: 10px!important;
  }
  body .sv3-header.sv5-header .sv3-brand{
    min-width:0!important;
    max-width: calc(100% - 68px)!important;
    flex: 0 1 auto!important;
  }
  body .sv3-header.sv5-header .sv3-brand-word{
    overflow: hidden!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
    font-size: clamp(17px,4.1vw,23px)!important;
  }
  body .sv3-header.sv5-header .sv3-brand-emblem{
    width:40px!important;height:40px!important;flex:0 0 40px!important;
    border-radius:13px!important;
  }
  body .sv3-header.sv5-header .sv3-mobile.sv5-mobile{
    display:block!important;
    position:relative!important;
    margin-left:auto!important;
    flex:0 0 45px!important;
    width:45px!important;
    z-index:1100!important;
  }
  body .sv3-header.sv5-header .sv5-mobile>summary{
    list-style:none!important;
    display:flex!important;
    align-items:center!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:5px!important;
    width:45px!important;
    height:45px!important;
    min-width:45px!important;
    min-height:45px!important;
    margin:0!important;
    padding:10px!important;
    border:1px solid rgba(231,223,255,.34)!important;
    border-radius:14px!important;
    background:rgba(228,221,255,.13)!important;
    color:#f8f7ff!important;
    cursor:pointer!important;
    -webkit-tap-highlight-color:transparent;
    transition:background .18s,border-color .18s!important;
  }
  body .sv3-header.sv5-header .sv5-mobile>summary:hover,
  body .sv3-header.sv5-header .sv5-mobile[open]>summary{
    border-color:rgba(231,223,255,.50)!important;
    background:rgba(228,221,255,.23)!important;
  }
  body .sv3-header.sv5-header .sv5-mobile>summary::-webkit-details-marker{
    display:none!important;
  }
  body .sv3-header.sv5-header .sv5-mobile>summary>span{
    display:block!important;
    width:21px!important;
    height:2px!important;
    min-height:2px!important;
    flex:0 0 2px!important;
    border:0!important;
    border-radius:999px!important;
    background:#fff!important;
    opacity:1!important;
    transform-origin:center!important;
    transition:transform .2s,opacity .16s!important;
  }
  /* When opened the 3-line icon becomes an X; native details closes on second tap. */
  body .sv3-header.sv5-header .sv5-mobile[open]>summary>span:nth-child(1){
    transform:translateY(7px) rotate(45deg)!important;
  }
  body .sv3-header.sv5-header .sv5-mobile[open]>summary>span:nth-child(2){
    opacity:0!important;
  }
  body .sv3-header.sv5-header .sv5-mobile[open]>summary>span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg)!important;
  }
  /* Explicitly prevent old display:flex rules from exposing the closed dropdown. */
  body .sv3-header.sv5-header .sv5-mobile:not([open])>.sv5-mobile-panel{
    display:none!important;
  }
  body .sv3-header.sv5-header .sv5-mobile[open]>.sv5-mobile-panel{
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    position:absolute!important;
    top:calc(100% + 16px)!important;
    right:-3px!important;
    left:auto!important;
    width:min(390px,calc(100vw - 32px))!important;
    max-width:min(390px,calc(100vw - 32px))!important;
    max-height:min(73vh,calc(100dvh - 115px))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    padding:15px!important;
    margin:0!important;
    border:1px solid #e6ddf5!important;
    border-radius:21px!important;
    background:#fff!important;
    box-shadow:0 23px 65px rgba(28,20,62,.23)!important;
    z-index:1200!important;
    opacity:1!important;
    visibility:visible!important;
    color:#312a48!important;
    -webkit-text-fill-color:initial;
  }
  body .sv3-header.sv5-header .sv5-mobile-heading{
    padding:9px 10px 15px!important;
    margin:0 0 7px!important;
    gap:3px!important;
    border-bottom:1px solid #eee8f7!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-heading strong{
    font:850 17px/1.3 "Solvory Manrope",system-ui,sans-serif!important;
    color:#30274d!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-heading small{
    font:550 11px/1.5 "Solvory DM Sans",system-ui,sans-serif!important;
    color:#7f7990!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-panel>a{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    min-height:45px!important;
    padding:11px 13px!important;
    border-radius:11px!important;
    font:800 13px/1.45 "Solvory DM Sans",system-ui,sans-serif!important;
    color:#342c4f!important;
    -webkit-text-fill-color:#342c4f!important;
    text-decoration:none!important;
    opacity:1!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-panel>a:hover{
    background:#f2edff!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-panel>a.sv3-mobile-feature{
    justify-content:center!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    background:linear-gradient(110deg,#5951db,#8064ea)!important;
    min-height:46px!important;
    margin:9px 0 0!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-label{
    font:900 10px/1.4 "Solvory DM Sans",system-ui,sans-serif!important;
    color:#8374a9!important;
    letter-spacing:.13em!important;
    margin:14px 11px 7px!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-cat{
    border-radius:13px!important;
    border:1px solid #eee9f6!important;
    background:#fbfaff!important;
    margin:2px 0!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-cat>summary{
    display:flex!important;
    align-items:center!important;
    gap:11px!important;
    padding:11px 12px!important;
    min-height:49px!important;
    font:800 12.5px/1.4 "Solvory DM Sans",system-ui,sans-serif!important;
    color:#3b3158!important;
    cursor:pointer!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-cat>summary:focus-visible,
  body .sv3-header.sv5-header .sv5-mobile>summary:focus-visible{
    outline:3px solid #9e82ee!important;
    outline-offset:2px!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-links{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px!important;
    padding:9px!important;
    background:#fff!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-cat:not([open])>.sv5-mobile-links{
    display:none!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-links>a{
    padding:10px 8px!important;
    min-height:37px!important;
    line-height:1.45!important;
    color:#59516d!important;
    -webkit-text-fill-color:#59516d!important;
    overflow-wrap:anywhere;
    border-radius:9px!important;
  }
  body .sv3-header.sv5-header .sv5-mobile-links>a:hover{
    background:#f1ebff!important;
    color:#624ac2!important;
  }
}
@media(max-width:420px){
  body header.site-header.wp-block-template-part>.sv3-header.sv5-header{
    width:calc(100% - 18px)!important;
    max-width:calc(100% - 18px)!important;
    height:62px!important;
    min-height:62px!important;
  }
  body .sv3-header.sv5-header .sv3-head-inner{
    padding:0 9px 0 12px!important;
    gap:7px!important;
  }
  body .sv3-header.sv5-header .sv3-brand{gap:7px!important}
  body .sv3-header.sv5-header .sv3-brand-emblem{
    flex-basis:35px!important;
    width:35px!important;height:35px!important;
    border-radius:11px!important;
  }
  body .sv3-header.sv5-header .sv3-brand-emblem svg{
    width:26px!important;height:26px!important;
  }
  body .sv3-header.sv5-header .sv3-brand-word{
    font-size:clamp(16px,4.7vw,19px)!important;
  }
  body .sv3-header.sv5-header .sv3-mobile.sv5-mobile{
    width:43px!important;flex-basis:43px!important;
  }
  body .sv3-header.sv5-header .sv5-mobile>summary{
    min-width:43px!important;min-height:43px!important;
    width:43px!important;height:43px!important;
  }
  body .sv3-header.sv5-header .sv5-mobile[open]>.sv5-mobile-panel{
    width:calc(100vw - 26px)!important;
    max-width:calc(100vw - 26px)!important;
    right:-1px!important;
    padding:12px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body .sv3-header.sv5-header .sv5-mobile>summary,
  body .sv3-header.sv5-header .sv5-mobile>summary>span{
    transition:none!important;
  }
}
