/* =========================================
   3) NAVBAR
========================================= */

/* tune once */
:root{
  --nav-h: 90px;
  --mega-z: 9;
  --nav-z: 10;

  /* mobile contact bar spacing (matches mega-inner padding-bottom) */
  --mobile-sticky-space: 92px;
}

.navbar{
  width: 100%;
  height: var(--nav-h);
  position: fixed;
  inset: 0 auto auto 0;
  z-index: var(--nav-z);

  display: flex;
  align-items: stretch;
  justify-content: space-between;

  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.282);
  transition: transform 0.4s ease, background 0.3s ease;
}

/* states */
.navbar.at-top{ background: transparent !important; }
.navbar.open{ background:#000 !important; }
.navbar:not(.at-top).scrolled-up,
.navbar:not(.at-top).navbar-bg{ background:#000; }
.navbar:not(.at-top):hover{ background:#000; }

.nav-slice{
  position: relative;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  cursor:pointer;
  opacity:0.9;
  transition: opacity .25s ease;
}
.nav-slice:hover{ opacity: 0.7; }

/* corner overlay */
.nav-slice::after{
  content:"";
  position:absolute;
  inset:8px;
  pointer-events:none;
  opacity:0;

  background:
    linear-gradient(#ff0000,#ff0000) left top / 0px 2px no-repeat,
    linear-gradient(#ff0000,#ff0000) left top / 2px 0px no-repeat,
    linear-gradient(#ff0000,#ff0000) right top / 0px 2px no-repeat,
    linear-gradient(#ff0000,#ff0000) right top / 2px 0px no-repeat,
    linear-gradient(#ff0000,#ff0000) left bottom / 0px 2px no-repeat,
    linear-gradient(#ff0000,#ff0000) left bottom / 2px 0px no-repeat,
    linear-gradient(#ff0000,#ff0000) right bottom / 0px 2px no-repeat,
    linear-gradient(#ff0000,#ff0000) right bottom / 2px 0px no-repeat;

  transition: opacity .2s ease, background-size .35s cubic-bezier(.2,.9,.2,1);
  will-change: background-size, opacity;
}
.nav-slice:hover::after{
  opacity:1;
  background-size:
    22px 2px, 2px 22px,
    22px 2px, 2px 22px,
    22px 2px, 2px 22px,
    22px 2px, 2px 22px;
}

/* widths */
.nav-logo{
  flex: 0 0 250px;
  padding: 0 2rem;
  border-right: 1px solid rgba(255,255,255,0.35);
}
.nav-logo img{ width:120px; }

.nav-menu{ flex: 1 1 auto; min-width: 0; }

.nav-contact{
  flex: 0 0 220px;
  border-left: 1px solid rgba(255,255,255,0.35);
}

.contact-link{ font-size: 1rem; letter-spacing: .02em; }
.menu-text{ font-size: 1rem; letter-spacing: .08em; }

.menu-open-text{ display:inline; }
.menu-close-text{ display:none; }

.menu-icon{
  display:inline-flex;
  flex-direction:column;
  gap:4px;
  padding-left:.5rem;
  transition: gap .3s ease;
}
.menu-icon i{
  width:36px;
  height:1px;
  background: rgba(255,255,255,0.9);
  border-radius:2px;
  transition: transform .3s ease;
}

#menuBtn.is-open .menu-icon{ gap:0; }
#menuBtn.is-open .menu-icon i:first-child{ transform: translateY(1px); }
#menuBtn.is-open .menu-icon i:last-child{ transform: translateY(-1px); }
#menuBtn.is-open .menu-open-text{ display:none; }
#menuBtn.is-open .menu-close-text{ display:inline; }


/* =========================================
   4) MEGA MENU (DESKTOP BASE)
========================================= */

.mega-menu{
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100vw;

  height: auto;
  max-height: calc(100vh - var(--nav-h));
  overflow: hidden;

  background:#000;
  z-index: var(--mega-z);

  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;

  display:flex;
  flex-direction:column;
}
.mega-menu.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform: translateY(0);

  /* helps prevent scroll chaining on some devices */
  overscroll-behavior: contain;
}

.mega-inner{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* columns */
.mega-left{
  width: 550px;
  flex: 0 0 550px;
  border-right: 1px solid rgba(255,255,255,0.25);
  padding: 1.5rem 2rem;

  display:flex;
  flex-direction:column;
  gap:14px;
  position:relative;
}

.mega-right{
  flex: 1 1 auto;
  min-width: 0;
  padding: 2.3rem 2rem;

  display:flex;
  flex-direction:column;
}

/* desktop only: keep the “big panel” feel */
@media (min-width: 769px){
  .mega-left,
  .mega-right{
    min-height: 520px;
  }
}

/* left media */
.mega-left-media{
  position:absolute;
  left:0;
  top:2rem;
  bottom:2rem;
  width:60%;
  pointer-events:none;
  z-index:0;
}
.mega-left-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0.9;
}

/* main items */
.mega-main-item{
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  font-size: 2.05rem;
  letter-spacing: 0.06em;
  padding: 6px 0;
  font-weight: 300;

  transition:
    color 220ms cubic-bezier(.22,1,.36,1),
    opacity 220ms cubic-bezier(.22,1,.36,1),
    letter-spacing 220ms cubic-bezier(.22,1,.36,1);
}
.mega-main-item:hover{ color: rgba(255,255,255,0.95); }


/* panels */
.mega-panel{ display:none; width:100%; }
.mega-panel.is-active{ display:block; flex: 1 1 auto; }

.mega-panel h4{
  margin: 0 0 1rem 0;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 2rem;
}

/* links grid */
.mega-links{
  display:grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 22px;
  /* ⚠️ clamp min was extremely small; cleaned */
  font-size: clamp(1rem, 1.1vw, 1.5rem);
}

.mega-link-arrow{
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: auto;
}

/* link look + underline */
.mega-links a{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 1rem;
  min-width: 0;
  position: relative;
  max-width: 95%;
  color: rgba(255,255,255,0.75);
  opacity: 0.9;
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 0.04em;

  transition:
    color 220ms cubic-bezier(.22,1,.36,1),
    letter-spacing 220ms cubic-bezier(.22,1,.36,1),
    opacity 220ms cubic-bezier(.22,1,.36,1);
}
.mega-links a:hover{
  color: #fff;
  letter-spacing: 0.07em;
  opacity: 1;
}
.mega-links a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background: red;
  transition: width 260ms cubic-bezier(.22,1,.36,1);
}
.mega-links a:hover::after{ width: 100%; }

/* social */
.mega-social{
  padding-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.mega-social__btn{
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;

  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  border-bottom: 1px solid rgba(255, 0, 0, 0.694);
  color:#fff;
}
.mega-social__btn:hover{ transform: translateY(-1px); opacity:0.92; }


/* =========================================
   MOBILE CONTACT (sticky bar + button)
========================================= */

/* wrapper becomes the sticky bar (mobile only visible) */
.mobile-contact-wrap{
  display:none;
  width:100%;
  height:58px;
  background:#ffffff;
  border-top:1px solid rgba(255,255,255,0.249);
  border-bottom:1px solid rgba(255,255,255,0.249);

  align-items:center;
  justify-content:center;

  margin-top:auto;
}

/* link becomes the “button” */
.mega-mobile-contact{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:76px;
  padding: 0 62px;

  background:#ffffff;
  color:#000000 !important;

  border-radius: 40px;
  font-weight:600;
  letter-spacing:0.10em;
  text-transform:uppercase;
  text-decoration:none;

  /* subtle lift */
  transform: translateY(-20px);
  font-size: 1.5rem;

  border: 1px solid rgba(0, 0, 0, 0);
}



/* =========================================
   BUTTON: .btn-menu (mega)
========================================= */

.mega-menu .btn-menu{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;

  padding: .65rem 1rem;
  min-height: 44px;
  box-sizing: border-box;

  width: calc((95% - 22px) / 2);
  margin-bottom: 1rem;

  background: rgba(246, 13, 56, 0.857) !important;
  color: rgba(255,255,255,0.88);
  text-decoration: none;

  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255,255,255,0.14);

  font-weight: 600;
  font-size: 1rem;
}

/* hover overlay inside button (keeps hue) */
.mega-menu .btn-menu::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgb(255, 42, 63);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: -1;
}
.mega-menu .btn-menu:hover{
  transform: translateY(-1px);
  filter: brightness(0.78) saturate(1.05);
  border-color: rgba(255,255,255,0.22);
}
.mega-menu .btn-menu:hover::before{ opacity: 1; }

.btn-menu__arrow{
  width: 18px;
  height: auto;
  flex-shrink: 0;
  opacity: 0.95;
  transition: transform .2s ease, opacity .2s ease;
}


/* =========================================
   BREAKPOINTS (DESKTOP / MID)
========================================= */

@media (max-width: 1450px){
  .mega-links{
    grid-template-columns: 1fr;
    gap: 14px;
    font-size: 1.2rem;
  }
  .mega-menu .btn-menu{ width: 100%; }
}


/* =========================================
   MOBILE (ONE CLEAN BLOCK)
========================================= */

@media (max-width: 768px){

  /* NAV tweaks */
  .nav-contact{ display:none; }
  .nav-menu{ justify-content: flex-end; }
  .menu-icon{ margin-right: 2rem; }
  .nav-logo{ flex: 0 0 150px; }
  .nav-logo img{ width:120px; } /* keep if you want */

  /* mega menu becomes full-screen under nav */
  .mega-menu{
    top: var(--nav-h);
    bottom: 0;
    height: auto;
    max-height: none;
    overflow: hidden; /* contains scroll area + sticky contact */
  }

  /* make CONTENT scroll, not the whole menu */
  .mega-inner{
    display: block;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--mobile-sticky-space);
  }

  /* left becomes full width list */
  .mega-left{
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;

    border-right: 0;
    border-bottom: 0;
    padding: .75rem 1.25rem;
    gap: 6px;

    position: relative;
  }

  /* hide desktop right column completely on mobile */


  .mega-left-media{ display:none !important; }

  /* buttons become accordion triggers */
  .mega-main-item{
    width: 100%;
    text-align: left;
    font-size: 1.95rem;
    padding: .9rem 0;
    letter-spacing: .06em;

    display:flex;
    align-items:center;
    justify-content: space-between;
  }

  /* down chevron */
  .mega-main-item[data-panel]::after{
    content:"";
    width: 24px;
    height: 24px;
    padding-left: 2rem;
    flex-shrink: 0;

    background: url("/images/White%20Down%20Arrow.png") center / contain no-repeat;
    transition: transform .2s ease;
  }

  /* rotate arrow when open */
  .mega-main-item.is-active[data-panel]::after{
    transform: rotate(-180deg);
  }

  /* Slot sits right under each trigger */
  .mega-slot{
    width: 100%;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }

  /* panels now live inside .mega-slot (moved by JS) */
  .mega-panel{
    display: block;
    padding: .25rem 0 .9rem;
  }

  /* hide desktop panel title on mobile */
  .mega-panel h4{ display:none; }

  /* collapsed: hide content */
  .mega-panel:not(.is-open) .btn-menu,
  .mega-panel:not(.is-open) .mega-links{
    display:none !important;
  }

  /* open: show content */
  .mega-panel.is-open .btn-menu{
    display:flex !important;
    width: 100%;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1.5rem;
  }
  .mega-panel.is-open .mega-links{
    display:grid !important;
    grid-template-columns: 1fr;
    gap: 22px;
    font-size: 1.35rem;
    line-height: 1.5;
  }

  .btn-menu__text{
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
  }
  .btn-menu__arrow{ flex: 0 0 auto; }

  /* sticky contact bar */
  .mobile-contact-wrap{
    display:flex !important;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
  }
}


/* =========================================
   SCROLL LOCK (matches your JS: body.is-locked)
========================================= */

body.is-locked{
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}

/* optional: hide scrollbars when locked */
body.is-locked{ scrollbar-width:none; }
body.is-locked::-webkit-scrollbar{ width:0; height:0; }

@media (max-width: 1000px){
.mega-left{
  
  flex: 0 0 250px;
  
  padding: 1.5rem 2rem;

  display:flex;
  flex-direction:column;
  gap:14px;
  position:relative;
}
.mega-left-media{
  display: none;
}
.btn-menu {
  max-width: 95%;
}
}
@media (max-width: 769px){
  .mega-left{
    flex: 0 0 560px;
    width: 100%;
  }
  
.mega-panel:not(.is-open) .btn-menu,
.mega-panel:not(.is-open) .mega-links { display:none !important; }
}

/* hide arrows by default */
.mega-link-arrow{
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 220ms cubic-bezier(.22,1,.36,1),
    transform 220ms cubic-bezier(.22,1,.36,1);
}

/* reveal arrow on hover */
.mega-links a:hover .mega-link-arrow,
.mega-links a:focus-visible .mega-link-arrow{
  opacity: 1;
  transform: translateX(0);
}

/* hide button arrows by default */
.btn-menu__arrow{
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 220ms cubic-bezier(.22,1,.36,1),
    transform 220ms cubic-bezier(.22,1,.36,1);
}

/* show arrow on hover */
.mega-menu .btn-menu:hover .btn-menu__arrow,
.mega-menu .btn-menu:focus-visible .btn-menu__arrow{
  opacity: 1;
  transform: translateX(5px);
}
.mega-main-item.is-active{
  color: #ff0000;
  opacity: 1;
  letter-spacing: 0.09em;
}
.mega-main-item.is-active{
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* move the svg itself */
.mega-menu .mega-social__btn--phone .footer-contact__icon{
  width: 18px;              /* size */
  height: 18px;
  transform: translateX(-2px) translateY(4px); /* fine tune */
}
