/* Screen Reader */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; /* prevent line breaks */
  border: 0;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  width: 100%;
  max-width: 1440px;
  z-index: 9999;
  left: 0;
  right: 0;
  top: 0;
  margin: 0 auto;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 15px;
  margin: 30px 30px;
  border: 1px solid var(--light);
  background-color: var(--white);
}

.site-title .logo img {
  height: 80px;
  width: auto;
}

@media screen and (min-width: 1441px) {
  .site-header .container {
    margin: 30px auto;
  }
}

@media screen and (max-width: 1440px) {
  .site-header .container {
    margin: 20px 10px;
  }
}

@media screen and (max-width: 834px) {
  .site-header .container {
    margin: 20px 10px;
  }

  .site-title .logo img {
    height: 65px;
  }
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation li {
  display: inline-block;
}

.main-navigation li a,
.footer-navigation li a {
  font-size: 20px;
  line-height: 160%;
  font-weight: 400;
  color: var(--black);
}
nav li:not(.li-button):hover a {
  opacity: 0.5;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background-color: unset !important;
}

.main-navigation {
  position: relative;
}

.menu-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile breakpoint */
/* mobile */
@media (max-width: 834px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  /* the top row inside the card */
  .header-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  #header-container {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  /* NAV BECOMES A COLLAPSIBLE PANEL INSIDE THE CARD */
  .main-navigation {
    width: 100%;
    position: static; /* <-- no overlay */

    /* collapse animation */
    max-height: 0;
    overflow: clip; /* or hidden if you need wider support */
    opacity: 0;
    pointer-events: none;

    transition: max-height 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .main-navigation[data-state="open"],
  .menu-list {
    /* how far it may grow; tweak to taste */
    padding-top: 40px;
    display: flex;
    max-height: 75dvh;
    opacity: 1;
    pointer-events: auto;
  }

  /* vertical stack for links */
  .menu-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    height: 100dvh;
  }
  .menu-list a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
  }

  .menu-list > li {
    box-sizing: border-box;
    width: 100%;
  }

  .menu-list > li.li-button {
    margin-top: auto;
  }
  .menu-list > li.li-button > a {
    width: 100%;
    text-align: center;
  }

  /* lock page scroll when card is expanded (optional) */
  body[data-nav-open="true"] {
    overflow: hidden;
  }

  .nav-toggle svg {
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* Animate toggle button */
  body[data-nav-open="true"] {
    .nav-toggle svg {
      transform: rotate(90deg);
    }
  }

  /* in nav.css (global is fine) */
  .main-navigation a:focus,
  .nav-toggle:focus {
    outline: none; /* remove UA ring */
  }
}

/* LANG Switcher */
/* Position the parent as a dropdown container */
.pll-parent-menu-item {
  position: relative;
}
.pll-parent-menu-item > a {
  padding-right: 25px;
}
.pll-parent-menu-item a {
  opacity: 1 !important;
}

.pll-parent-menu-item > a::after {
  content: ""; /* required to render a pseudo-element */
  display: inline-block;
  width: 16px; /* size of your SVG */
  height: 16px;
  background-image: url("/wp-content/themes/notariat-onepager/assets/icons/chevron_down.svg");
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  right: 0; /* stick to the right edge */
  top: 25%;
  pointer-events: none; /* don’t block clicks */
  transition: transform 0.2s ease-in;
}
.pll-parent-menu-item:hover > a::after {
  transform: rotate(-180deg);
}

/* Hide the submenu by default */
.pll-parent-menu-item .sub-menu {
  display: none;
  position: absolute;
  top: 100%; /* directly under the parent link */
  left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ddd;
  z-index: 999;
  border-radius: 5px;
}

/* Show submenu on hover */
.pll-parent-menu-item:hover > .sub-menu {
  display: block;
}

/* Optional: style the links */
.pll-parent-menu-item .sub-menu a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
}

.pll-parent-menu-item .sub-menu a:hover {
  background: #f5f5f5;
}

@media screen and (max-width: 1000px) {
  .pll-parent-menu-item > a {
    display: none;
  }

  .pll-parent-menu-item .sub-menu {
    display: flex;
    gap: 5px;
    justify-content: center;
    position: static;
    text-align: center;
    border: 0;
  }

  .pll-parent-menu-item .sub-menu li a {
    display: inline-block;
  }

  .pll-parent-menu-item .sub-menu li {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
  }
  .pll-parent-menu-item .sub-menu li.current-lang {
    opacity: 1;
  }

  .pll-parent-menu-item .sub-menu li::after {
    content: "|";
    display: inline;
  }
  .pll-parent-menu-item .sub-menu li:last-child::after {
    content: "";
  }

  .pll-parent-menu-item .sub-menu a {
    padding: 2px;
  }

  .pll-parent-menu-item:hover > .sub-menu {
    display: flex;
  }
}
