:root {
  --qm-project-black: #0d0d0d;
  --qm-project-muted: #5b5852;
  --qm-project-line: #dcded6;
  --qm-project-paper: #f8f8f3;
  --qm-project-red: #ef3829;
}

@media (min-width: 981px) {
  body.post-type-archive-projects #main-header,
  body.single-projects #main-header {
    min-height: 100px;
    border-bottom: 1px solid #e2e3dc;
    box-shadow: none;
    background: #f8f8f3;
  }

  body.post-type-archive-projects #main-header,
  body.single-projects #main-header,
  body.post-type-archive-projects .et_menu_container,
  body.single-projects .et_menu_container {
    height: 100px;
  }

  body.post-type-archive-projects .et_menu_container,
  body.single-projects .et_menu_container {
    width: calc(100% - 100px) !important;
    max-width: none !important;
    margin-right: auto;
    margin-left: auto;
  }

  body.post-type-archive-projects .logo_container,
  body.single-projects .logo_container {
    height: 100px;
    opacity: 1 !important;
  }

  body.post-type-archive-projects #logo,
  body.single-projects #logo {
    width: 300px;
    height: auto;
    max-height: 56px;
  }

  body.post-type-archive-projects #et-top-navigation,
  body.single-projects #et-top-navigation {
    display: flex;
    height: 100px;
    align-items: center;
    padding-top: 0 !important;
    padding-left: 0 !important;
  }

  body.post-type-archive-projects #top-menu,
  body.single-projects #top-menu {
    height: 100px;
    padding-top: 0;
  }

  body.post-type-archive-projects #top-menu,
  body.single-projects #top-menu {
    display: flex;
    align-items: center;
  }

  body.post-type-archive-projects #top-menu > li,
  body.single-projects #top-menu > li {
    display: inline-flex;
    align-items: center;
    padding-right: 24px;
  }

  body.post-type-archive-projects #top-menu > li > a,
  body.single-projects #top-menu > li > a {
    padding: 0 !important;
    color: #343434 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
  }

  body.post-type-archive-projects #top-menu > li > a:hover,
  body.single-projects #top-menu > li > a:hover,
  body.post-type-archive-projects #top-menu > li.current-menu-item > a,
  body.single-projects #top-menu > li.current-menu-item > a,
  body.post-type-archive-projects #top-menu > li.current_page_item > a,
  body.single-projects #top-menu > li.current_page_item > a {
    color: #343434 !important;
    opacity: 1;
  }

  body.post-type-archive-projects #top-menu .menu-item-has-children > a:first-child:after,
  body.single-projects #top-menu .menu-item-has-children > a:first-child:after {
    position: static;
    display: inline-block;
    margin-left: 8px;
    color: #343434;
    font-size: 14px;
    line-height: 1;
  }

  body.post-type-archive-projects #top-menu li ul.sub-menu,
  body.single-projects #top-menu li ul.sub-menu {
    top: 30px;
    width: 260px;
    border-top: 0;
    background: #f8f8f3;
    box-shadow: 0 20px 42px rgba(0, 0, 0, .08);
    padding: 18px 0;
  }

  body.post-type-archive-projects #top-menu li li,
  body.single-projects #top-menu li li {
    width: 100%;
    padding: 0;
  }

  body.post-type-archive-projects #top-menu li li a,
  body.single-projects #top-menu li li a {
    width: 100%;
    padding: 13px 28px !important;
    color: #343434 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
  }

  body.post-type-archive-projects #top-menu > li:last-child,
  body.single-projects #top-menu > li:last-child {
    padding-right: 0;
  }

  body.post-type-archive-projects #top-menu > li:last-child > a,
  body.single-projects #top-menu > li:last-child > a {
    display: inline-flex;
    min-width: 88px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: #0d0d0d;
    color: #fff !important;
    padding: 0 24px !important;
  }

  body.post-type-archive-projects .qm-language-switcher,
  body.single-projects .qm-language-switcher {
    margin-left: 22px;
  }

}

body.post-type-archive-projects .qm-language-switcher,
body.single-projects .qm-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 42px;
  vertical-align: middle;
  z-index: 50;
}

body.post-type-archive-projects .qm-language-switcher .qm-lang-current,
body.single-projects .qm-language-switcher .qm-lang-current,
body.post-type-archive-projects .qm-language-switcher a,
body.single-projects .qm-language-switcher a {
  display: flex !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 38px !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #dcded6 !important;
  background: #f8f8f3 !important;
  color: #393631 !important;
  padding: 0 8px !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer;
}

body.post-type-archive-projects .qm-language-switcher .qm-lang-options,
body.single-projects .qm-language-switcher .qm-lang-options {
  position: absolute;
  top: 100%;
  right: 0;
  display: none !important;
  width: 48px !important;
  min-width: 48px !important;
  flex-direction: column;
  background: #f8f8f3 !important;
  border: 1px solid #dcded6 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .12) !important;
  z-index: 2147483647 !important;
}

body.post-type-archive-projects .qm-language-switcher:hover .qm-lang-options,
body.post-type-archive-projects .qm-language-switcher:focus-within .qm-lang-options,
body.post-type-archive-projects .qm-language-switcher.is-open .qm-lang-options,
body.single-projects .qm-language-switcher:hover .qm-lang-options,
body.single-projects .qm-language-switcher:focus-within .qm-lang-options,
body.single-projects .qm-language-switcher.is-open .qm-lang-options {
  display: flex !important;
}

body.post-type-archive-projects .qm-language-switcher .qm-lang-options a,
body.single-projects .qm-language-switcher .qm-lang-options a {
  border-top: 0 !important;
  padding: 0 !important;
}

body.post-type-archive-projects .qm-language-switcher .qm-lang-options a:hover,
body.post-type-archive-projects .qm-language-switcher .qm-lang-options a:focus,
body.post-type-archive-projects .qm-language-switcher .qm-lang-options a[aria-current="page"],
body.single-projects .qm-language-switcher .qm-lang-options a:hover,
body.single-projects .qm-language-switcher .qm-lang-options a:focus,
body.single-projects .qm-language-switcher .qm-lang-options a[aria-current="page"] {
  background: #0d0d0d !important;
  color: #fff !important;
}

.qm-projects-main {
  background: #fff;
  color: var(--qm-project-black);
  font-family: Arial, Helvetica, sans-serif;
}

.qm-projects-shell {
  width: min(1680px, calc(100% - 80px));
  margin: 0 auto;
}

.qm-projects-hero {
  padding: 110px 0 72px;
  border-bottom: 1px solid var(--qm-project-line);
}

.qm-project-eyebrow {
  margin: 0 0 22px;
  color: var(--qm-project-muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.qm-projects-hero h1,
.qm-project-title {
  max-width: 760px;
  margin: 0;
  padding: 0;
  color: var(--qm-project-black);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(46px, 4.55vw, 72px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: 0;
}

.qm-projects-intro {
  max-width: 820px;
  margin: 34px 0 0;
  color: #333;
  font-size: 21px;
  line-height: 1.5;
}

.qm-project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 34px 0;
}

.qm-project-filter {
  border: 1px solid var(--qm-project-black);
  border-radius: 0;
  background: #fff;
  color: var(--qm-project-black);
  padding: 12px 16px;
  font: 900 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
}

.qm-project-filter:hover,
.qm-project-filter:focus-visible,
.qm-project-filter.is-active {
  background: var(--qm-project-black);
  color: #fff;
}

.qm-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 58px 24px;
  padding: 18px 0 120px;
}

.qm-project-card[hidden] {
  display: none;
}

.qm-project-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.qm-project-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eceeea;
}

.qm-project-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.qm-project-card a:hover img {
  transform: scale(1.025);
}

.qm-project-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: end start;
  box-sizing: border-box;
  padding: 28px;
  background: #eceeea;
  color: var(--qm-project-black);
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 900;
  line-height: .95;
}

.qm-project-card-copy {
  padding-top: 18px;
}

.qm-project-card-type {
  margin: 0 0 10px;
  color: var(--qm-project-red);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.qm-project-card h2 {
  margin: 0 0 8px;
  padding: 0;
  font: 900 30px/1.02 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.qm-project-card-location {
  margin: 0;
  color: var(--qm-project-muted);
  font-size: 15px;
  line-height: 1.4;
}

.qm-project-draft-note {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 4px solid var(--qm-project-red);
  background: var(--qm-project-paper);
  font-size: 13px;
  font-weight: 700;
}

.qm-project-single-head {
  padding: 100px 0 64px;
}

.qm-project-layout {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 2fr);
  gap: clamp(44px, 6vw, 110px);
  align-items: start;
  padding-bottom: 72px;
}

.qm-project-sidebar {
  position: sticky;
  top: 28px;
}

.admin-bar .qm-project-sidebar {
  top: 60px;
}

.qm-project-facts {
  margin: 0;
}

.qm-project-facts > div {
  padding: 18px 0;
  border-top: 1px solid var(--qm-project-line);
}

.qm-project-facts > div:last-child {
  border-bottom: 1px solid var(--qm-project-line);
}

.qm-project-facts dt {
  margin: 0 0 7px;
  color: var(--qm-project-muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.qm-project-facts dd {
  margin: 0;
  color: var(--qm-project-black);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.qm-project-sidebar-intro {
  padding-top: 42px;
}

.qm-project-sidebar .qm-project-richtext {
  font-size: 17px;
  line-height: 1.55;
}

.qm-project-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eceeea;
}

.qm-project-hero-media img,
.qm-project-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qm-project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 24px;
}

.qm-project-gallery figure:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.qm-project-gallery figure {
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: #eceeea;
}

.qm-project-content-section {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 40px;
  padding: 88px 0;
  border-bottom: 1px solid var(--qm-project-line);
}

.qm-project-section-label {
  margin: 0;
  color: var(--qm-project-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.qm-project-richtext {
  max-width: 850px;
  font-size: 22px;
  line-height: 1.5;
}

.qm-project-richtext p:last-child {
  margin-bottom: 0;
}

.qm-project-product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.qm-project-product-links a {
  border-bottom: 1px solid var(--qm-project-black);
  color: var(--qm-project-black);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.qm-project-cta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 92px 0 110px;
}

.qm-project-cta h2 {
  max-width: 760px;
  margin: 0;
  padding: 0;
  font: 900 clamp(48px, 6vw, 92px)/.95 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.qm-project-cta a {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--qm-project-black);
  background: var(--qm-project-black);
  color: #fff;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.qm-project-cta a:hover,
.qm-project-cta a:focus-visible {
  background: #fff;
  color: var(--qm-project-black);
}

@media (max-width: 980px) {
  .qm-projects-shell {
    width: min(100% - 36px, 1680px);
  }

  .qm-projects-hero,
  .qm-project-single-head {
    padding-top: 64px;
  }

  .qm-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qm-project-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .qm-project-sidebar {
    position: static;
  }

  .qm-project-content-section {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 60px 0;
  }

  .qm-project-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .qm-projects-hero h1,
  .qm-project-title {
    font-size: 54px;
  }

  .qm-projects-intro,
  .qm-project-richtext {
    font-size: 18px;
  }

  .qm-project-grid,
  .qm-project-gallery {
    grid-template-columns: 1fr;
  }

  .qm-project-grid {
    gap: 44px;
  }

  .qm-project-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 20px;
  }

  .qm-project-filter {
    flex: 0 0 auto;
  }
}
