header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.desktop_nav{
  display: none;
}

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

.container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
}

.logo {
  position: fixed;
  top: 1.5rem;
  left: 1rem;
  z-index: 9999;
  padding: 7px 16px;
  background-color: var(--scotland-blue);
  border-radius: var(--border-radius);
}

.test-logo a {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  font-weight: 700;
  font-size: clamp(1.5rem, 6vw, 1rem);
  text-decoration: none;
}

.logo-first { color: #ffffff; }
.logo-last  { color: #d04b43; }

/************************** Mobile-menu **************************/

.menu_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

.menu_btn_burger {
  width: 40px;
  height: 4px;
  background-color: var(--danish-red);
  border-radius: 70px;
  transition: all 0.5s ease-in-out;
}

.menu_btn_burger::before,
.menu_btn_burger::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 4px;
  background-color: var(--danish-red);
  border-radius: 70px;
  transition: all 0.5s ease-in-out;
}
.menu_btn_burger::before {
  transform: translateY(-16px);
}
.menu_btn_burger::after {
  transform: translateY(16px);
}
.menu_btn.open .menu_btn_burger {
  transform: translateX(-50px);
  background: transparent;
}
.menu_btn.open .menu_btn_burger::before {
  transform: rotate(45deg) translate(35px, -35px);
}
.menu_btn.open .menu_btn_burger::after {
  transform: rotate(-45deg) translate(35px, 35px);
}

.menu_items {
  display: none;
  position: fixed;
  top: 0;
  right: 0vw;
  height: 100vh;
  line-height: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background-color: var(--white);
  padding: 60px;
}

.menu_items a {
    color: var(--danish-red);
    cursor: pointer;
    font-weight: var(--fw-bold);
    font-size: var(--copy);
    position: relative;
    margin-bottom: 16px;
}

.menu_items a::after {
  content: "";
  position: absolute;
  left: 0;           
  bottom: -4px;       /* move underline slightly below text */
  width: 0;
  height: 3px;
  background: var(--danish-red);
  transition: width .35s ease;
}

.menu_items a:hover::after {
  width: 100%;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@media (min-width: 1170px) { /******* Desktop-menu *******/

.logo {
  position: fixed;
  top: 1.5rem;
  left: 1.25rem;
  z-index: 9999;
  padding: 7px 16px;
  background-color: var(--scotland-blue);
  border-radius: var(--border-radius);
}

.test-logo a,
.test-logo a:visited {
  display: inline-flex;
  align-items: baseline;
  gap: .75rem;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 1rem) !important;
  text-decoration: none;
}
.test-logo a {
  display: inline-flex;
  align-items: baseline;
  gap: .75rem;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 1rem);
  text-decoration: none;
}

.menu_items {
    display: none;
}

/* --- the red pill container --- */
.desktop_nav{
  display: inline-flex;
  align-items: center;   /* vertical centering */
  flex-wrap: nowrap;


  position: fixed;      /* sticks to viewport */
  top: 1.25rem;
  right: 1.25rem;

  display: inline-flex;
  width: fit-content;
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 1.75rem;             /* controls spacing BETWEEN links */
  padding: 1rem 1.5rem;     /* controls "pill breathing room" */
  border-radius: 999px;

  background: var(--danish-red);
  color: #fff;
  z-index: 1000;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.desktop_nav > a {
  font-weight: 700;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  color: #fff;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  background: transparent;
  text-decoration: none;
  transition: background-color .3s ease, color .3s ease;
}

.desktop_nav > a,
.nav_summary {
  padding: 10px 15px;
  border-radius: var(--border-radius);
}

.nav_accordion,
.nav_details{
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav_summary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  padding: 10px 15px;        /* must match your <a> padding */
  border-radius: 9999px;
  list-style: none;
}
.nav_summary::-webkit-details-marker{ 
  display: none; 
}
.desktop_nav > a:hover, summary:hover {
  background-color: var(--white);
  color: var(--danish-red);
}
.nav_accordion{ position: relative; }

.nav_summary{
  list-style: none;
}
.nav_summary::-webkit-details-marker{ display: none; }

.nav_summary::after{
  content: "▾";
  margin-left: .5rem;
  font-size: .9em;
  opacity: .95;
}
/* rotate caret when open */
.nav_details[open] .nav_summary::after{
  transform: rotate(180deg);
  display: inline-block;
}
/* dropdown panel */
.nav_panel{
  position: absolute;
  right: 0;
  top: calc(100% + .75rem);
  display: grid;
  gap: .75rem;
  min-width: 220px;
  padding: 1rem;
  background: #fff;
  color: var(--danish-red);
  border: 2px solid var(--danish-red);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.nav_panel a{
  font-weight: 700;
  font-size: 1rem;
  color: #d04b43;
}

.nav_panel a:hover{
  text-decoration: underline;
}
.nav_details{ 
  position: relative; 
  z-index: 50; 
}

}