/* Styles for the CodePen-style full-screen burger menu with golden cross and scroll lock */

/* Ensure the header sticks to the top and is a positioning context for the button */
.hdr {
  position: sticky;
  top: 0;
  z-index: 2500;
  background: var(--bg);
}
.hdr .content {
  position: relative;
}

/* Burger button styling */
.menu2-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4000;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  cursor: pointer;
  background: radial-gradient(120% 140% at 30% 20%, #23242D, #101117);
  border: 1px solid rgba(212, 175, 55, .4);
  box-shadow: 0 12px 28px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.03);
}

.menu2-btn span,
.menu2-btn:before,
.menu2-btn:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 30%;
  width: 40%;
  border-bottom: 3px solid #d4af37;
  transition: transform .6s cubic-bezier(0.215, 0.61, 0.355, 1);
  filter: drop-shadow(0 0 10px rgba(212,175,55,.35));
}

.menu2-btn:before { transform: translateY(-10px); }
.menu2-btn:after  { transform: translateY( 10px); }

/* Full-screen click target for closing the menu */
.menu2-close {
  position: fixed;
  inset: 0;
  z-index: 2995;
  background: transparent;
  pointer-events: none;
  transition: background .6s;
}

/* The overlay wrapper that holds the navigation links */
/* Fullscreen overlay wrapper.  Use flexbox to center content vertically and
   horizontally so nested lists remain in-flow and avoid overlap. */
.menu2-wrapper {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10, 10, 14, .96);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-4%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s, transform .6s, visibility 0s .6s;
}

/* Center the list in the overlay */
.menu2-wrapper ul {
  /* The main list should not be absolutely positioned; center via flexbox */
  position: static;
  top: auto;
  left: auto;
  transform: none;
  list-style: none;
  text-align: center;
  width: min(92vw, 520px);
  margin: 0;
  padding: 0;
}

.menu2-wrapper ul li {
  margin: 18px 0;
}

.menu2-wrapper ul li.sub a {
  font-size: 22px;
  opacity: .9;
}

/* Menu link styling */
.menu2-wrapper ul li a {
  display: inline-block;
  text-decoration: none;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  padding: 10px 32px;
  color: transparent;
  border-radius: 50px;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
}

/* Gradient gold text shimmering effect */
.menu2-wrapper ul li a,
.menu2-wrapper ul li a span {
  background: linear-gradient(120deg, #7f6920, #d4af37 25%, #ffe08c 50%, #d4af37 75%, #7f6920);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: goldshift 5s linear infinite;
  text-shadow: 0 0 24px rgba(212,175,55,.13);
}

@keyframes goldshift {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* Hover fill effect under links */
.menu2-wrapper ul li a:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: rgba(255,255,255,.12);
  transform: scaleY(0);
  transition: transform .3s ease;
  z-index: -1;
}
.menu2-wrapper ul li a:hover:after {
  transform: scaleY(1);
}

/* Morph burger to a golden cross when menu is open */
#menu2-active:checked + .menu2-btn span {
  /* Hide the middle bar of the burger */
  transform: scaleX(0);
}
#menu2-active:checked + .menu2-btn:before,
#menu2-active:checked + .menu2-btn:after {
  /* Rotate the top/bottom bars to form a cross */
  border-bottom-color: #d4af37;
  border-color: #d4af37;
}
#menu2-active:checked + .menu2-btn:before {
  transform: rotate(45deg);
}
#menu2-active:checked + .menu2-btn:after {
  transform: rotate(-45deg);
}

/* Show overlay and block scroll when menu is open */
#menu2-active:checked ~ .menu2-close {
  background: rgba(0, 0, 0, .55);
  pointer-events: auto;
}
#menu2-active:checked ~ .menu2-wrapper {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

/* Reveal each link with a stagger */
#menu2-active:checked ~ .menu2-wrapper ul li a {
  opacity: 1;
  transform: none;
}
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(1) a { transition-delay: .04s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(2) a { transition-delay: .08s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(3) a { transition-delay: .12s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(4) a { transition-delay: .16s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(5) a { transition-delay: .20s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(6) a { transition-delay: .24s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(7) a { transition-delay: .28s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(8) a { transition-delay: .32s; }
#menu2-active:checked ~ .menu2-wrapper ul li:nth-child(9) a { transition-delay: .36s; }

@media (max-width: 480px) {
  .menu2-wrapper ul li a {
    font-size: 26px;
    padding: 10px 24px;
  }
  .menu2-wrapper ul li.sub a {
    font-size: 20px;
  }
}

/*-----------------------------------------
  Submenu for "Ο Στόλος μας" in the overlay
-------------------------------------------*/
/* Container styling for list item with submenu */
.menu2-wrapper .menu2-has-submenu {
  /* Let it behave like a normal list item */
  position: relative;
  padding: 0;
  margin: 18px 0;
}

/* Align the parent link and toggle button horizontally */
.menu2-has-submenu > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Toggle button styling (the arrow) */
.menu2-sub-toggle {
  background: none;
  border: none;
  margin-left: 8px;
  padding: 0;
  cursor: pointer;
  outline: none;
  width: 24px;
  height: 24px;
  position: relative;
}
/* Draw a right-pointing arrow using CSS; rotate when open */
.menu2-sub-toggle::after {
  content: '▸';
  display: block;
  font-size: 20px;
  line-height: 1;
  color: #d4af37;
  transition: transform .3s ease;
}
/* When the submenu is open, rotate the arrow down */
.menu2-has-submenu.open > .menu2-sub-toggle::after {
  transform: rotate(90deg);
}

/* Submenu list is hidden by default */
/*
 * Submenu animation
 *
 * The submenu for the Fleet categories is hidden via max-height and opacity
 * rather than toggling display directly. This allows a smooth slide/fade
 * animation when the user opens or closes the submenu. The initial
 * max-height value should be small (0) so the list collapses gracefully.
 */
.menu2-submenu {
  list-style: none;
  /* indent submenus to distinguish hierarchy */
  margin: 6px 0 0;
  padding-left: 28px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}
/* When the parent has the `open` class applied via JavaScript, expand the
   submenu. The max-height should be large enough to accommodate the
   tallest possible submenu. */
/* When the parent has the `open` class applied via JavaScript, expand the
   submenu.  Set a large max-height to accommodate all items and fade it in.
   Also draw a subtle golden border around the submenu to distinguish it
   from the main links. */
.menu2-has-submenu.open > .menu2-submenu {
  max-height: 600px;
  opacity: 1;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 8px;
  padding: 8px 16px;
  margin-top: 12px;
}

/* Add extra bottom spacing to the list item when the submenu is open so
   subsequent top-level items are pushed further down */
.menu2-has-submenu.open {
  margin-bottom: 24px;
}

/* Provide spacing between submenu items */
.menu2-submenu li {
  margin: 6px 0;
}

/* Styling for submenu links */
.menu2-submenu li a {
  font-size: 22px;
  opacity: .9;
}
