/* NAVBAR *//* Bottom nav container */
/* Bottom nav container: allow auto height (so two rows on tiny screens) */
.bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--bottom-nav-gap);
  width: min(60vw, 500px);
  display: grid;
  grid-template-columns: 1.36fr .64fr;  /* left / right */
  border-radius: 18px;
  box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.40);
  z-index: 1001;
  backdrop-filter: blur(6px);
  height: var(--bottom-nav-height);  /* was height: */
  background:
    linear-gradient(to bottom, rgba(255,255,255,.06), rgba(255,255,255,0)) ,
    linear-gradient(90deg, #a11318 0 68%, var(--blue-mid) 68% 102%) !important;
  overflow: visible; /* important so drop-up can show */
}

.bottom-nav .nav-left,
.bottom-nav .nav-right{ align-items: stretch; }

/* LEFT: gold — show ALL items (no horizontal scroll) */
.bottom-nav .nav-left{
  color: #fff;
  border-radius: 14px;
  padding: 0px;
  padding-inline: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* Home, Teams, Services, Portfolio, More */
  gap: 2px;
  align-items: stretch;           /* ← fill the row height */
  justify-items: stretch;  
  overflow: visible; /* was auto; prevents clipping the drop-up */
}

/* Ensure every cell contains a center-aligned clickable block */
.bottom-nav .nav-left > .item,
.bottom-nav .nav-left > .menu-wrap{
  display:flex;
  align-items:center;             /* ← vertical center */
  justify-content:center;         /* ← horizontal center */
  height: var(--bottom-nav-height);
  width: 100%;
}

/* If the button is inside .menu-wrap, make it fill the cell too */
.bottom-nav .nav-left > .menu-wrap > .item{
  height: 100%;
  width: 100%;
}

/* Right panel stays the same */
.bottom-nav .nav-right{
  position: relative;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label along top edge */
.next-label{
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--blue-dark);
  color: #fff;
  width: 80%;
  text-align: center;
}

/* Mini pill as 3 columns: logo | info | logo */
.next-mini{
  height: var(--bottom-nav-height);
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  column-gap: 10px;
  text-align: center;
  max-width: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  padding-bottom: 20px;
    padding-right: 5px;

}

/* side crests */
.next-mini .nm-side{
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--admin-border-2, rgba(255,255,255,.3));
  background: linear-gradient(135deg, rgba(var(--blue-rgb,37,53,112),.25), rgba(var(--blue-dark-rgb,27,42,89),.35));
  display: grid; place-items: center; overflow: hidden;
}
.next-mini .nm-side img{ width:100%; height:100%; object-fit: contain; display:block; }
.next-mini .nm-init{ font-weight:800; font-size:11px; color: var(--gold); letter-spacing:.04em; }

/* middle info */
.next-mini .nm-mid{ line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.next-mini .nm-when{ font-size: 12px; font-weight: 800; }
.next-mini .nm-vs{ font-size: 18px; opacity: .9; padding-left: 7px; padding-right: 0;}
.next-mini .nm-vs span{ opacity: .8; padding-inline: 0px; }

/* hide the old placeholder */
.next-mini .text{ display:none; }


/* Nav items */
.bottom-nav .item{
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  gap: 4px; text-decoration: none; color: inherit;
  padding: 6px 6px; border-radius: 12px; font-size: 12px;
  border: 1px solid transparent; white-space: nowrap;
  height: var(--bottom-nav-height);
  appearance: none;
  background: transparent;
}
.bottom-nav .item i{ font-size: 18px; line-height: 1;
    transform: translateY(-12px); /* adjust -1px … -4px if needed */
 }
.bottom-nav .item:hover{ color: rgba(var(--blue-dark-rgb), .80); }

/* Tidy icon/label blocks (prevents odd baseline spacing) */
.bottom-nav .item i,
.bottom-nav .item span{
  display:block;
  line-height: 1;
  margin: 0 auto;
}

/* Focus visible: high-contrast ring */
.bottom-nav .item:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 0 0 5px rgba(var(--brand-blue-rgb), .55);
}

/* ===== More drop-UP (dark blue card with gold border) ===== */
/* ===== More modal / bottom sheet ===== */
.more-modal[hidden] { display:none !important; }

.more-modal{
  position: fixed; inset: 0;
  z-index: 4000 !important;                   /* above the navbar (1001) */
  display: grid;
  grid-template-rows: 1fr auto;    /* backdrop area + panel at bottom */
}

/* Backdrop (click to close) */
.more-modal__backdrop{
  grid-row: 1 / -1;
  width: 100%; height: 100%;
  background: var(--brand-blue-dark);
  border: 0; padding: 0; margin: 0;
  cursor: default;
}

/* Panel (bottom sheet) */
.more-modal__panel{
  grid-row: 2;
  background: var(--blue);
  color: #fff;
  border-top: 3px solid var(--brand-red);
  border-radius: 18px 18px 0 0;
  width: min(96vw, 520px);                 /* nice on mobile/desktop */
  margin: 0 auto max(calc(var(--bottom-nav-gap) + var(--bottom-nav-height)), 16px);  /* sits above your bottom nav */
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  transform: translateY(24px);
  opacity: 0;
  animation: sheet-in .18s ease-out forwards;
}

@keyframes sheet-in{
  to { transform: translateY(0); opacity: 1; }
}

/* Header */
.more-modal__head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.more-modal__head h2{
  font-size: 1rem; margin: 0; letter-spacing:.02em;
}

.more-modal__close{
  background: transparent; border: 1px solid rgba(255,255,255,.2);
  color:#fff; border-radius: 10px; padding: 6px 8px; cursor: pointer;
}
.more-modal__close:hover{ background: rgba(255,255,255,.1); }

/* Links */
.more-modal__list{
  display: grid; gap: 8px;
  padding: 12px;
}
.more-modal__list a{
  display: grid; grid-template-columns: 18px 1fr; align-items:center; gap:10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff; text-decoration: none;
  padding: 12px; border-radius: 12px;
}
.more-modal__list a:hover{ background: rgba(255,255,255,.12); }

/* Optional: respect safe-area on iOS */
@supports (padding: max(0px)) {
  .more-modal__panel{ padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* Tighten on very small screens */
@media (max-width: 380px){
  .bottom-nav .item i{ font-size: 16px; }
  .bottom-nav .item{ font-size: 11px; padding: 6px 4px; }
  .bottom-nav .nav-left{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Ensure page content isn't hidden */
@media (max-width: 768px){
  main{ padding-bottom: var(--bottom-offset); }
}


/* Mobile: hide right side + next-match badge, left fills width */
@media (max-width: 600px){
  .bottom-nav{
    background: var(--red-dark) !important;
    grid-template-columns: 1fr;   /* left only */
    width: min(96vw, 900px);      /* a bit wider on mobile */
  }
  .bottom-nav .nav-right,
  .next-badge{                    /* if you use the floating badge */
    display: none !important;
  }
}

/* Tiny phones: icons-only to save space */
@media (max-width: 380px){
  .bottom-nav .item i{ font-size: 18px; }   /* keep icons readable */
}


/* ===== Bottom-nav drop-up menus ===== */
.bottom-nav .menu-wrap{ position: relative; }

.bottom-nav .item.has-pop[aria-expanded="true"]{
  color: var(--gold);
}

.bottom-nav .nav-pop{
  position: absolute;
  bottom: calc(100% + 10px);        /* drop UP */
  left: 50%;
  transform: translateX(-50%) scale(.98);
  transform-origin: bottom center;
  width: max(200px, 92%);
  max-width: 260px;
  background: color-mix(in oklab, var(--blue-dark, #0a1f3f) 75%, black);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  padding: 10px;
  z-index: 1101;                    /* above nav (1001) */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .14s ease, transform .18s ease;
}

.bottom-nav .menu-wrap.open .nav-pop{
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

/* little caret */
.bottom-nav .nav-pop::after{
  content:""; position:absolute; top:100%; left:50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: color-mix(in oklab, var(--blue-dark, #0a1f3f) 75%, black);
}

/* items in the popover */
.bottom-nav .nav-pop a{
  display: flex; align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #fff; text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  font-size: 14px; font-weight: 700;
}

.bottom-nav .nav-pop a + a{ margin-top: 8px; }
.bottom-nav .nav-pop a:hover{ background: rgba(255,255,255,.10); }
.bottom-nav .nav-pop a:focus-visible{
  outline: 2px solid var(--gold, #f9ec17);
  outline-offset: 2px;
}

/* Mobile: keep menus usable */
@media (max-width: 600px){
  .bottom-nav .nav-pop{
    left: 50%;
    width: min(92vw, 360px);
  }
}
