
/* MENDELEY.ID — MODERN BORDEAUX HEADER */

:root {
  --mh-primary: #922B50;
  --mh-primary-dark: #76213F;
  --mh-primary-light: #F5E7EC;
  --mh-accent: #B85671;
  --mh-ink: #171C26;
  --mh-text: #353D46;
  --mh-muted: #65717D;
  --mh-white: #ffffff;
  --mh-border: #E9E2E4;
  --mh-gradient: #922B50;
  --mh-header-height: 84px;
  --mh-container: 1450px;
  --mh-ease: cubic-bezier(.22, 1, .36, 1);
}

/* BASE */

.mh-header *,
.mh-mobile-menu *,
.mh-mobile-backdrop {
  box-sizing: border-box;
}

.mh-header a,
.mh-mobile-menu a {
  text-decoration: none;
}

.mh-header button,
.mh-mobile-menu button {
  font: inherit;
}

.mh-header button,
.mh-mobile-menu button,
.mh-mobile-menu summary {
  -webkit-tap-highlight-color: transparent;
}

.mh-header button,
.mh-header a,
.mh-mobile-menu button,
.mh-mobile-menu a,
.mh-mobile-menu summary {
  touch-action: manipulation;
}

.mh-header :focus-visible,
.mh-mobile-menu :focus-visible,
.mh-skip-link:focus-visible {
  outline: 3px solid #AD3A61;
  outline-offset: 4px;
}

.mh-header [hidden],
.mh-mobile-backdrop[hidden],
.mh-dropdown__panel[hidden] {
  display: none !important;
}

.mh-skip-link {
  position: fixed;
  z-index: 10020;
  top: -100px;
  left: 18px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--mh-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.mh-skip-link:focus {
  top: 12px;
}

/* MAIN HEADER */

.mh-header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(230,224,225,.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-family: Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  transition: background .3s ease,
    box-shadow .3s ease, border-color .3s ease;
}

.mh-header.is-scrolled,
.mh-header.mh-header--scrolled {
  background: rgba(255,255,255,.96);
  box-shadow: 0 7px 30px rgba(23,28,38,.065);
  border-bottom-color: rgba(230,224,225,.95);
}

.mh-header__inner {
  width: min(calc(100% - 72px), var(--mh-container));
  min-height: var(--mh-header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

/* BRAND */

.mh-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;
  min-width: 0;
  color: var(--mh-ink);
}

.mh-brand__symbol {
  width: 53px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mh-brand__symbol svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Recolor existing inline SVG logo */

.mh-brand__symbol svg stop:first-child {
  stop-color: #BD6C86;
}

.mh-brand__symbol svg stop:nth-child(2) {
  stop-color: #922B50;
}

.mh-brand__symbol svg stop:last-child {
  stop-color: #682138;
}

.mh-brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.mh-brand__name {
  color: var(--mh-ink);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.25px;
  white-space: nowrap;
}

.mh-brand__tagline {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.08px;
  color: #65717D;
  white-space: nowrap;
}

/* DESKTOP NAVIGATION */

.mh-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 29px);
  min-width: 0;
}

.mh-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--mh-ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.12px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
}

.mh-nav__link:hover,
.mh-nav__link[aria-current="page"],
.mh-dropdown__trigger[aria-expanded="true"] {
  color: var(--mh-primary);
}

.mh-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  background: var(--mh-primary);
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--mh-ease);
}

.mh-nav__link:hover::after,
.mh-nav__link[aria-current="page"]::after,
.mh-dropdown__trigger[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.mh-dropdown__trigger svg {
  width: 15px;
  height: 15px;
  transition: transform .25s ease;
}

.mh-dropdown__trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* DROPDOWNS */

.mh-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.mh-dropdown__panel {
  position: absolute;
  top: calc(100% + 11px);
  left: -23px;
  min-width: 235px;
  padding: 9px;
  background: var(--mh-white);
  border: 1px solid var(--mh-border);
  border-radius: 15px;
  box-shadow:
    0 20px 55px rgba(23,28,38,.12),
    0 4px 12px rgba(23,28,38,.04);
  z-index: 50;
}

.mh-dropdown__panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 32px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid var(--mh-border);
  border-left: 1px solid var(--mh-border);
  transform: rotate(45deg);
}

.mh-dropdown__panel a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 41px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--mh-text);
  font-size: 13px;
  font-weight: 550;
  transition: background .2s ease,
    color .2s ease, padding .2s ease;
}

.mh-dropdown__panel a:hover,
.mh-dropdown__panel a:focus-visible {
  background: var(--mh-primary-light);
  color: var(--mh-primary);
  padding-left: 16px;
}

/* HEADER ACTIONS */

.mh-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-shrink: 0;
}

.mh-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--mh-ink);
  cursor: pointer;
  transition: color .2s ease,
    background .2s ease, transform .2s ease;
}

.mh-icon-button svg {
  display: block;
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.mh-icon-button:hover {
  color: var(--mh-primary);
  background: #F5E7EC;
}

.mh-icon-button:active {
  transform: scale(.96);
}

.mh-actions__divider {
  display: block;
  width: 1px;
  height: 26px;
  background: #E9E2E4;
}

.mh-language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--mh-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mh-language svg {
  display: block;
  width: 21px;
  height: 21px;
}

/* MAIN CTA BUTTON */

.mh-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 44px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--mh-gradient);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(146,43,80,.14);
  transition: transform .25s var(--mh-ease),
    box-shadow .25s ease, filter .25s ease;
}

.mh-header__cta svg {
  display: block;
  width: 17px;
  height: 17px;
  transition: transform .25s ease;
}

.mh-header__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(146,43,80,.22);
  filter: brightness(1.04);
}

.mh-header__cta:hover svg {
  transform: translateX(3px);
}

/* HEADER SEARCH PANEL */

.mh-header-search {
  position: absolute;
  top: 100%;
  right: max(36px,
    calc((100vw - var(--mh-container)) / 2));
  width: min(550px, calc(100vw - 40px));
  padding: 20px;
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 20px 50px rgba(23,28,38,.14);
  z-index: 60;
}

.mh-header-search form {
  margin: 0;
}

.mh-header-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--mh-ink);
  font-size: 13px;
  font-weight: 700;
}

.mh-header-search__field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 1px solid #E7DEE1;
  border-radius: 12px;
  background: #FAF9F6;
  transition: border-color .2s ease,
    box-shadow .2s ease;
}

.mh-header-search__field:focus-within {
  border-color: #B85671;
  box-shadow: 0 0 0 3px rgba(146,43,80,.09);
}

.mh-header-search__field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  flex: 1;
  padding: 9px 12px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--mh-ink);
  font: inherit;
  font-size: 13px;
}

.mh-header-search__field input::placeholder {
  color: #7A828A;
}

.mh-header-search__field button {
  min-height: 38px;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  background: var(--mh-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* MOBILE MENU */

.mh-menu-toggle {
  display: none;
}

.mh-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(23,28,38,.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease,
    visibility .3s ease;
}

.mh-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mh-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  width: min(390px, 88vw);
  height: 100vh;
  height: 100dvh;
  padding: 0;
  background: #fff;
  color: var(--mh-ink);
  font-family: Inter, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  box-shadow: -15px 0 60px rgba(23,28,38,.12);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .38s var(--mh-ease),
    visibility .38s ease;
  overflow: hidden;
}

.mh-mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

body.mh-menu-open {
  overflow: hidden;
}

/* MOBILE DRAWER HEADER */

.mh-mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 80px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--mh-border);
}

.mh-mobile-menu__title {
  color: var(--mh-ink);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
}

.mh-mobile-close {
  background: #F8F2F3;
  border-radius: 10px;
}

/* MOBILE NAVIGATION */

.mh-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-height: 0;
  padding: 22px 17px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mh-mobile-nav > a,
.mh-mobile-nav__group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 47px;
  padding: 13px 16px;
  border-radius: 11px;
  color: var(--mh-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background .2s ease,
    color .2s ease;
}

.mh-mobile-nav > a:hover,
.mh-mobile-nav > a[aria-current="page"],
.mh-mobile-nav__group > summary:hover {
  background: var(--mh-primary-light);
  color: var(--mh-primary);
}

.mh-mobile-nav__group {
  width: 100%;
}

.mh-mobile-nav__group > summary {
  list-style: none;
}

.mh-mobile-nav__group > summary::-webkit-details-marker {
  display: none;
}

.mh-mobile-nav__group > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.mh-mobile-nav__group[open] > summary {
  color: var(--mh-primary);
  background: #F5E7EC;
}

.mh-mobile-nav__group[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.mh-mobile-nav__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 5px 0 10px 12px;
  padding-left: 12px;
  border-left: 1px solid #E9E2E4;
}

.mh-mobile-nav__sub a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #65717D;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s ease,
    background .2s ease;
}

.mh-mobile-nav__sub a:hover {
  color: var(--mh-primary);
  background: #F8EFF2;
}

/* MOBILE DRAWER FOOTER */

.mh-mobile-menu__bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px 25px;
  padding-bottom: max(
    25px,
    env(safe-area-inset-bottom)
  );
  border-top: 1px solid var(--mh-border);
  background: #fff;
}

.mh-mobile-menu__bottom .mh-header__cta {
  display: flex;
  width: 100%;
  min-height: 49px;
  justify-content: center;
  font-size: 14px;
}

.mh-mobile-menu__bottom > span {
  color: var(--mh-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

/* MEDIUM DESKTOP */

@media (max-width: 1350px) {
  .mh-header__inner {
    width: calc(100% - 48px);
    gap: 20px;
  }

  .mh-nav {
    gap: 16px;
  }

  .mh-nav__link {
    font-size: 12.5px;
  }

  .mh-brand__name {
    font-size: 23px;
  }

  .mh-brand__symbol {
    width: 47px;
  }

  .mh-header__actions {
    gap: 12px;
  }

  .mh-header__cta {
    padding: 11px 15px;
    font-size: 12.5px;
  }
}

/* TABLET AND SMALL LAPTOP */

@media (max-width: 1120px) {
  :root {
    --mh-header-height: 74px;
  }

  .mh-header__inner {
    width: calc(100% - 44px);
    gap: 15px;
  }

  .mh-menu-toggle {
    display: inline-flex;
    order: 0;
  }

  .mh-brand {
    order: 1;
    margin-right: auto;
  }

  .mh-nav {
    display: none;
  }

  .mh-header__actions {
    order: 2;
  }

  .mh-brand__symbol {
    width: 47px;
    height: 43px;
  }

  .mh-brand__name {
    font-size: 23px;
  }

  .mh-header__cta {
    min-height: 42px;
  }
}

/* MOBILE */

@media (max-width: 767px) {
  :root {
    --mh-header-height: 68px;
  }

  .mh-header__inner {
    width: calc(100% - 28px);
    gap: 9px;
  }

  .mh-menu-toggle {
    width: 39px;
    height: 42px;
    padding: 8px 6px;
  }

  .mh-brand {
    gap: 6px;
    margin-right: auto;
  }

  .mh-brand__symbol {
    width: 40px;
    height: 38px;
  }

  .mh-brand__name {
    font-size: 20px;
    letter-spacing: -.8px;
  }

  .mh-brand__tagline {
    display: none;
  }

  .mh-header__actions {
    gap: 5px;
  }

  .mh-header__actions > .mh-header__cta {
    display: none;
  }

  .mh-actions__divider {
    height: 22px;
    margin-inline: 2px;
  }

  .mh-icon-button svg {
    width: 22px;
    height: 22px;
  }

  .mh-language {
    gap: 5px;
    font-size: 12px;
  }

  .mh-language svg {
    width: 20px;
    height: 20px;
  }

  .mh-header-search {
    right: 10px;
    left: 10px;
    width: auto;
    padding: 16px;
    border-radius: 0 0 15px 15px;
  }
}

/* SMALL MOBILE */

@media (max-width: 390px) {
  .mh-header__inner {
    width: calc(100% - 20px);
    gap: 5px;
  }

  .mh-brand__symbol {
    width: 34px;
    height: 34px;
  }

  .mh-brand__name {
    font-size: 18px;
    letter-spacing: -.7px;
  }

  .mh-header__actions {
    gap: 2px;
  }

  .mh-menu-toggle,
  .mh-icon-button {
    width: 35px;
  }

  .mh-language svg {
    width: 18px;
    height: 18px;
  }

  .mh-language {
    gap: 3px;
  }

  .mh-actions__divider {
    display: none;
  }

  .mh-header-search__field button {
    padding-inline: 11px;
  }

  .mh-mobile-menu {
    width: min(350px, 92vw);
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .mh-header *,
  .mh-mobile-menu,
  .mh-mobile-backdrop,
  .mh-mobile-menu * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================
   MENDELEY.ID — REFINED BRAND TYPOGRAPHY
===================================== */

.mh-brand {
    gap: 11px;
    align-items: center;
}

.mh-brand__text {
    display: flex;
    justify-content: center;
}

.mh-brand__name {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.3px;
    color: #171C26;
}

.mh-brand__tagline {
    display: none !important;
}

@media (max-width: 767px) {
    .mh-brand__name {
        font-size: 21px;
        letter-spacing: -1px;
    }
}

@media (max-width: 390px) {
    .mh-brand__name {
        font-size: 18px;
        letter-spacing: -.7px;
    }
}

/* ==============================================
   MENDELEY.ID — OUTFIT HEADER TYPOGRAPHY
============================================== */

.mh-header,
.mh-mobile-menu {
    font-family: "Outfit", Arial, sans-serif;
}

/* Logo */

.mh-brand__tagline {
    display: none !important;
}

.mh-brand__name {
    font-family: "Outfit", sans-serif;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.7px;
    color: #171C26;
}

/* Desktop navigation */

.mh-nav__link {
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
}

/* Dropdown menu */

.mh-dropdown__panel a {
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

/* Header button */

.mh-header__cta {
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Search and language */

.mh-language,
.mh-header-search input,
.mh-header-search button {
    font-family: "Outfit", sans-serif;
}

/* Mobile navigation */

.mh-mobile-menu__title {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.mh-mobile-nav > a,
.mh-mobile-nav__group > summary {
    font-family: "Outfit", sans-serif;
    font-weight: 500;
}

.mh-mobile-nav__sub a {
    font-family: "Outfit", sans-serif;
    font-weight: 400;
}

/* Responsive branding */

@media (max-width: 1350px) {
    .mh-brand__name {
        font-size: 24px;
    }

    .mh-nav__link {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .mh-brand__name {
        font-size: 21px;
        letter-spacing: -0.5px;
    }
}

@media (max-width: 390px) {
    .mh-brand__name {
        font-size: 18px;
    }
}
