/* Header and navigation */
header {
    background-color: white;
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
}
header .menu {
    padding: 0 var(--s-text-padding);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5em;
    font-size: 1.2em;
}
header a {
    color: var(--c-ocean);
}

a.menu-link,
a.linkedin-logo {
    position: relative;
    font-family: "PT Sans", sans-serif;
    font-weight: 800;
}

/* Existing hover effects for menu-link remain the same */
a.menu-link:hover {
    text-decoration: none;
    color: var(--c-brightred-mminesweeper);
}
a.menu-link:hover::after {
    background-size: 123px 5px;
    height: 5px;
}

/* Styles for LinkedIn logo link */
a.linkedin-logo {
    display: inline-flex;
    align-items: center;
    min-height: 1cm;
    height: 1cm;
}

/* New CSS for spacing and font size */
a.linkedin-logo img {
    margin-right: 10px; /* Adjust space between the logo and hashtag */
}

a.linkedin-logo span {
    font-size: 0.8em; /* Decrease the size of the hashtag text */
}

/* Hover effects for linkedin-logo can mirror menu-link if desired */
a.linkedin-logo:hover {
    text-decoration: none;
    color: var(--c-brightred-mminesweeper);
}
a.linkedin-logo:hover::after {
    background-size: 123px 5px;
    height: 5px;
}


/*Main container, content will be relative to this*/
.dropdown{
    display: block;
    position: relative;
}

/* Section header, when you hover this, the child items will fold out */
.menu-dropdown-parent{
    padding: 0.5em 0; /*Make the parent more easily hoverable*/
}

/* Container for the child items */
.dropdown-content{
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); /* Slight shadow for a 3D effect */
    z-index: 1;
    padding: 0.2em;
    flex-direction: column;
    padding-bottom: 0.5em;
}

/* Child item */
.dropdown-content a {
    padding: 0.5em 0.5em; /* Extra padding to make the box look nicer */
    display: block;
}

/* Show child items when container is hovered */
.dropdown:hover .dropdown-content {
    display: flex;
}

.page-logo {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem;
    margin: 0;
}
.page-logo a {
    height: 4em;
}

.dam-logo a {
    height: 3em;
}

a.dam-logo {
    min-height: 0.6cm;
    height: 1.5em;
}

@media (min-width: 71rem) {
    header {
        grid-template-columns: 1fr calc(var(--s-text-width) + 2 * var(--s-text-padding)) 1fr;
    }
}

/* Mobile menu styles */
@media (orientation: portrait) {
  header {
    grid-template-columns: auto 1fr;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  header .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    align-self: center;
    margin-left: auto;
    margin-right: var(--s-text-padding);
  }

  header .mobile-menu-toggle-line {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--c-ocean);
    margin: 4px 0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  header .mobile-chevron {
    display: inline-block;
    float: right;
    margin-left: 10px;
    transition: transform 0.3s ease;
  }

  header .menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: calc(100vh - 3.5em);
    overflow-y: auto;
  }

  header .menu .dropdown {
    width: 100%;
  }

  header .menu .menu-dropdown-parent {
    padding: 1em var(--s-text-padding);
    cursor: pointer;
  }

  header .menu .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    background-color: #f9f9f9;
    flex-direction: column;
  }

  header .menu .dropdown-content .menu-dropdown-child,
  header .menu .dropdown-content .menu-link {
    padding: 0.75em var(--s-text-padding) 0.75em 2em;
    display: block;
  }

  header .menu a.menu-link {
    padding: 1em var(--s-text-padding);
    display: block;
  }

  header .page-logo {
    justify-content: flex-start;
    padding: 0.5em var(--s-text-padding);
  }

  header .page-logo a {
    height: 2.5em;
  }

  header.mobile-mode .mobile-menu-toggle {
    display: block;
  }

  header.mobile-mode .menu {
    display: none;
  }

  header.mobile-open .menu {
    display: flex !important;
  }

  header.mobile-mode .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  header.mobile-mode .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(2) {
    opacity: 0;
  }

  header.mobile-mode .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .dropdown-content.dropdown-open {
    display: flex !important;
  }

  /* Disable desktop hover dropdowns in portrait mode */
  header.mobile-mode .dropdown:hover .dropdown-content {
    display: none !important;
  }
}
