/* =========================================================
   Reunionary Navigation System (LVP + MVP + SVP)
   Scope: ONLY Navigation blocks using "Reunionary Nav Pill"
   ========================================================= */

/* -----------------------------
   0) Base (all viewports)
------------------------------ */

/* Nav pill style (desktop + base) */
.wp-block-navigation.is-style-reunionary-nav-pill
.wp-block-navigation-item__content {
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
}

/* Keep UI clean: no underlines inside nav or buttons */
.wp-block-navigation.is-style-reunionary-nav-pill a,
.wp-block-button__link {
  text-decoration: none;
}

/* Keep dropdowns readable */
.wp-block-navigation.is-style-reunionary-nav-pill
.wp-block-navigation__submenu-container {
  border-radius: 12px;
  overflow: hidden;
}


/* -----------------------------
   1) LVP + MVP (>=321px)
   - No hamburger behavior changes here.
   - Allows menu to wrap gracefully.
------------------------------ */
@media (min-width: 321px) {

  /* Let the flex header wrap if needed at MVP widths */
  header .wp-block-group {
    flex-wrap: wrap;
  }

  /* Make the nav line behave nicely when wrapping */
  .wp-block-navigation.is-style-reunionary-nav-pill {
    flex-wrap: wrap;
  }

  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__container {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  /* Keep dropdown chevrons aligned inline */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  /* Ensure submenu chevron stays beside the label */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-icon {
    margin-left: 0.25rem;
  }

  /* Submenu dropdown styling */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-container {
    padding: 10px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
  }

  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
    padding: 10px 12px;
    border-radius: 10px;
  }
}


/* -----------------------------
   2) SVP (<=320px) overlay menu
   - This is the ONLY viewport that gets the overlay treatment.
   - Does NOT affect MVP/LVP.
------------------------------ */
@media (max-width: 320px) {

  /* Overlay panel background */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container.is-menu-open {
    background: #ffffff;
  }

  /* Close button position */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container-close {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 10px;
    line-height: 1;
  }

  /* Panel padding */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container-content {
    padding: 72px 20px 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  /* Vertical list */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Full-width rows */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item {
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  /* Links fill the row */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item__content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* keeps chevron next to text */
    padding: 18px 0;
    font-size: 20px;
    font-weight: 600;
    color: #121826;
    background: transparent;
    border-radius: 0;
  }

  /* Submenus: keep them clean + indented */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 14px;
  }

  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
    font-size: 18px;
    font-weight: 600;
    padding: 14px 0;
  }

  /* Accessible focus */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item__content:focus-visible {
    outline: 2px solid var(--wp--preset--color--reunionary-gold);
    outline-offset: 4px;
    border-radius: 8px;
  }
}

/* =========================================================
   Small phones (375px + 425px)
   - Keep overlay menu clean like SVP
   - Prevent submenu "floating cards"
   - Does NOT affect MVP/LVP
   ========================================================= */
@media (min-width: 321px) and (max-width: 480px) {

  /* Overlay panel background */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container.is-menu-open {
    background: #ffffff;
  }

  /* Panel padding */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container-content {
    padding: 72px 20px 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  /* Vertical list */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Full-width rows */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item {
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  /* Clean row links */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item__content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: #121826;
    background: transparent;
    border-radius: 0;
  }

  /* 🔥 Key fix: make submenus behave like an indented list (not floating cards) */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__submenu-container {
    position: static !important;      /* stop popover positioning */
    transform: none !important;       /* stop center “card” transform */
    inset: auto !important;           /* neutralize inset rules */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 0 16px !important;   /* indent */
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  /* Submenu rows */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
    padding: 14px 0;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0;
  }

  /* Focus */
  .wp-block-navigation.is-style-reunionary-nav-pill
  .wp-block-navigation-item__content:focus-visible {
    outline: 2px solid var(--wp--preset--color--reunionary-gold);
    outline-offset: 4px;
    border-radius: 8px;
  }
}

.skip-to-content-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-to-content-link:focus,
.skip-to-content-link:focus-visible {
	position: fixed;
	left: 16px;
	top: 16px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	background: #ffffff;
	color: #000000;
	border: 2px solid #000000;
	border-radius: 6px;
	z-index: 999999;
	text-decoration: none;
}