/* V55: menu-only hotfix. Existing design/layout remains unchanged. */

/* Menu overlay opens and closes with the same duration and exact reverse motion. */
.menu{
  transition:none!important;
}
.menu.v55-opening{
  visibility:visible!important;
  pointer-events:auto!important;
  animation:v55MenuOpen .68s cubic-bezier(.22,.8,.22,1) both!important;
}
.menu.v55-closing{
  visibility:visible!important;
  pointer-events:none!important;
  animation:v55MenuClose .68s cubic-bezier(.22,.8,.22,1) both!important;
}
@keyframes v55MenuOpen{
  from{opacity:0;transform:translateY(-8px) scale(1.012);backdrop-filter:blur(3px)}
  to{opacity:1;transform:translateY(0) scale(1);backdrop-filter:blur(18px)}
}
@keyframes v55MenuClose{
  from{opacity:1;transform:translateY(0) scale(1);backdrop-filter:blur(18px)}
  to{opacity:0;transform:translateY(-8px) scale(1.012);backdrop-filter:blur(3px)}
}

/* Menu cards use a light fade/slide; never enlarge on tap. */
.menu .menu-links a{
  transform:none!important;
  transition:
    opacity .40s ease,
    translate .52s cubic-bezier(.22,.8,.22,1),
    border-color .24s ease,
    background-color .24s ease!important;
}
.menu.v55-opening .menu-links a{
  animation:v55ItemOpen .54s cubic-bezier(.22,.8,.22,1) both;
  animation-delay:calc(var(--menu-index,1)*.045s);
}
.menu.v55-closing .menu-links a{
  animation:v55ItemClose .42s ease both;
  animation-delay:calc((9 - var(--menu-index,1))*.035s);
}
@keyframes v55ItemOpen{
  from{opacity:0;translate:0 10px}
  to{opacity:1;translate:0 0}
}
@keyframes v55ItemClose{
  from{opacity:1;translate:0 0}
  to{opacity:0;translate:0 -8px}
}

/* Three lines morph to X; close is the exact reverse. */
.menu-btn{
  transform:none!important;
  transition:
    border-color .30s ease,
    box-shadow .30s ease!important;
}
.menu-btn i{
  position:absolute!important;
  left:50%!important;
  width:24px!important;
  height:2px!important;
  margin:0!important;
  background:currentColor!important;
  transform-origin:center!important;
  transition:
    top .56s cubic-bezier(.22,.8,.22,1),
    transform .56s cubic-bezier(.22,.8,.22,1),
    opacity .30s ease!important;
}
.menu-btn i:nth-child(1){
  top:calc(50% - 8px)!important;
  transform:translateX(-50%) rotate(0)!important;
}
.menu-btn i:nth-child(2){
  top:50%!important;
  transform:translate(-50%,-50%) scaleX(1)!important;
}
.menu-btn i:nth-child(3){
  top:calc(50% + 6px)!important;
  transform:translateX(-50%) rotate(0)!important;
}
.menu-btn.open i:nth-child(1){
  top:50%!important;
  transform:translate(-50%,-50%) rotate(45deg)!important;
}
.menu-btn.open i:nth-child(2){
  opacity:0!important;
  transform:translate(-50%,-50%) scaleX(0)!important;
}
.menu-btn.open i:nth-child(3){
  top:50%!important;
  transform:translate(-50%,-50%) rotate(-45deg)!important;
}

/* Prevent the "selected item becomes bigger" bug everywhere. */
button:active,
a:active,
[role="button"]:active,
.menu .menu-links a:active,
.consultation-dialog button:active,
.consultation-dialog select:active,
.consultation-dialog input:active,
.consultation-dialog textarea:active{
  transform:none!important;
  scale:1!important;
}

/* Keep feedback premium using brightness/border only, without zoom. */
button,
a,
[role="button"],
select,
input,
textarea{
  -webkit-tap-highlight-color:transparent;
}
button:active,
a:active,
[role="button"]:active{
  filter:brightness(.92);
}
.menu .menu-links a:active{
  background-color:rgba(201,146,81,.09)!important;
  border-color:rgba(201,146,81,.52)!important;
}

/* Mobile select fields remain exactly the same size when focused/opened. */
select:focus,
input:focus,
textarea:focus{
  transform:none!important;
  scale:1!important;
}
