/*
.single-neubauprojekt .site-content {
  margin-left: var(--dynamic-margin);
  margin-right: var(--dynamic-margin);
}
*/

.single-neubauprojekt {
  --nbp-page-top: 6rem;
  --nbp-header-height: 293px; /* fallback = header(233px) + gap(60px); overridden by JS */
  --nbp-header-gap: 60px;
  --nbp-inner-top: 20px;
  --nbp-label-height: 25px;
  --nbp-label-gap: 30px;
  --nbp-label-stack: calc(var(--nbp-label-height) + var(--nbp-label-gap));
  --nbp-label-offset: 0px;
}

.single-neubauprojekt .hh-nbp-inhalt .hhbtn {
  align-items: center;
  background-color: var(--hh-text);
  color: var(--base-3);
  display: inline-flex;
  text-decoration: none;
  border-radius: 3px;
  padding: 8px 32px;
}

.hh-nbp-allgemein,
.hh-nbp-besonderheiten,
.hh-nbp-ausstattung {
  margin-bottom: 8rem;
}

.single-neubauprojekt h2 {
  margin-bottom: 40px;
}

.hh-nbp-besichtigungstermin p:last-child {
  margin-bottom: 0;
}

/*
body.single-neubauprojekt:has(#content.site-content #primary.content-area .hh-nbp-allgemein .hh-nbp-header .hh-nbp-labels) {
  --nbp-label-offset: var(--nbp-label-stack);
}

.single-neubauprojekt #content.site-content #right-sidebar aside.widget {
  padding: 30px;
  margin-top: calc(var(--nbp-page-top) + var(--nbp-header-height) + var(--nbp-header-gap) + var(--nbp-inner-top) - var(--nbp-label-stack) + var(--nbp-label-offset));
  background-color: var(--hh-rot);
  color: var(--base-3);
}
*/

.hh-nbp-header {
  /*height: calc(var(--nbp-header-height) - var(--nbp-label-stack) + var(--nbp-label-offset));*/
  margin-bottom: var(--nbp-header-gap);
}

.hh-nbp-besichtigungstermin-container {
  margin-top: var(--nbp-header-height);
  visibility: hidden;
}

.hh-nbp-besichtigungstermin-container.is-positioned {
  visibility: visible;
}

.hh-nbp-labels {
  height: var(--nbp-label-height);
  display: flex;
  gap: 1rem;
  margin-bottom: var(--nbp-label-gap);
}
.hh-nbp-label.new,
.hh-nbp-label.sold {
  text-transform: uppercase;
}
.hh-nbp-label.new {
  color: var(--wp--preset--color--hh-rot);
}
.hh-nbp-label.section {
  background-color: var(--hh-rot);
  color: var(--base-3);
  padding: 2px 10px;
  border-radius: 3px;
  line-height: 1.2;
}

.hh-nbp-image-container {
  margin-bottom: 5rem;
}

.hh-nbp-image-container .nbprojekt-main-image {
  width: 100%;
  height: auto;
}

.hh-nbp-description {
  margin-left: 6rem;
}

.hh-nbp-galerie {
  margin: 0;
}

.hh-nbp-besonderheiten-content {
  max-width: 80%;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.hh-nbp-besonderheiten-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
  column-gap: 22px;
  row-gap: 40px;
}

.hh-nbp-besonderheiten-item {
  padding: 20px 24px;
  box-shadow: 0 0 13.8px 5px #00000012;
}

.hh-nbp-besonderheiten-item h3::before {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 1rem;

  @supports (height: 1cap) {
    width: 1cap;
    height: 1cap;
    margin-right: 1cap;
  }

  background-color: var(--hh-rot);
}

.hh-nbp-galerie .hh-nbp-galerie-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 40px;
}

.hh-nbp-galerie figcaption {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  margin-top: 20px;
}

.hh-nbp-ausstattung {
  max-width: 80%;
  margin: 0 auto;
  margin-bottom: 4rem;
}

.hh-nbp-ausstattung-items-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 40px;
}

.hh-nbp-ausstattung-items .hhlist {
  list-style-type: none;
  margin: 0px 0px 3.75rem 0px;
  hyphens: auto;
}

.hh-nbp-ausstattung-item {
  position: relative;
  padding-left: 40px;
}

.hh-nbp-ausstattung-items .hhlist li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 50%;
  color: var(--hh-rot);
  font-size: 1.75rem;
  transform: translateY(calc(-50% - 0.15em));
}

.hh-nbp-lage {
  max-width: 80%;
  margin: 0 auto;
  margin-bottom: 6rem;
}

/* ---------------------------------------------------------------------------
   Neubauprojekt Post Listing
--------------------------------------------------------------------------- */

.hh-nbp-listing {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(374px, auto);
  column-gap: 20px;
  row-gap: 54px;
}

.hh-nbp-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 40px;
  text-decoration: none;
  color: #fff;
  background-color: lightgray;
  background-size: cover;
  background-position: 50%;
  border-radius: 3px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hh-nbp-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 22px -5px rgba(0, 0, 0, 0.2);
}

.hh-nbp-card:nth-child(-n + 2) {
  grid-column: span 3;
}

.hh-nbp-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hh-nbp-card__badge {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  padding: 0 10px;
  margin-bottom: 24px;
  border-radius: 3px;
}

.hh-nbp-card__badge--new {
  background-color: var(--wp--preset--color--hh-rot, #c32519);
  color: #fff;
}

.hh-nbp-card__badge--sold {
  background-color: #fff;
  color: var(--wp--preset--color--hh-rot, #c32519);
}

.hh-nbp-listing .hh-nbp-card__title {
  margin: 0;
  margin-bottom: 8px;
  color: #fff;
}

.hh-nbp-card__baubeginn {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

/* Weitere Projekte: always 3 equal columns, no featured-card overrides */
.hh-nbp-listing--weitere {
  grid-template-columns: repeat(3, 1fr);
}

.hh-nbp-listing--weitere .hh-nbp-card,
.hh-nbp-listing--weitere .hh-nbp-card:nth-child(-n + 2) {
  grid-column: span 1;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hh-nbp-listing {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 20px;
  }

  .hh-nbp-card:nth-child(-n + 2) {
    grid-column: span 2;
  }

  .hh-nbp-card {
    grid-column: span 1;
  }

  .hh-nbp-listing--weitere {
    grid-template-columns: repeat(2, 1fr);
  }

  .hh-nbp-listing--weitere .hh-nbp-card,
  .hh-nbp-listing--weitere .hh-nbp-card:nth-child(-n + 2) {
    grid-column: span 1;
  }
}

@media (max-width: 767px) {
  .hh-nbp-listing {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .hh-nbp-card,
  .hh-nbp-card:nth-child(-n + 2) {
    grid-column: span 1;
    padding: 20px;
  }

  .hh-nbp-description {
    margin-left: 0;
  }

  .hh-nbp-besonderheiten-content,
  .hh-nbp-ausstattung,
  .hh-nbp-lage {
    max-width: 100%;
  }

  .hh-nbp-besonderheiten-items,
  .hh-nbp-ausstattung-items-container {
    grid-template-columns: 1fr;
  }

  .hh-nbp-besichtigungstermin-container {
    margin-top: 4rem;
  }
}

/* ---------------------------------------------------------------------------
   Stellenangebote Post
--------------------------------------------------------------------------- */
.hh-job-inhalt .hhlist ul {
  list-style-type: none;
  margin: 0px 0px 3.75rem 0px;
}
.hh-job-inhalt .hhlist ul li {
  position: relative;
  padding-left: 40px;
}
.hh-job-inhalt .hhlist ul li:not(:last-child) {
  margin-bottom: 28px;
}
.hh-job-inhalt .hhlist ul li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 50%;
  color: var(--hh-rot);
  font-size: 1.75rem;
  transform: translateY(calc(-50% - 0.15em));
}

.hh-job-inhalt .hh-job-cta h2.hh-job-cta__titel {
  text-transform: none;
}

.hh-job-allgemein,
.hh-job-beschreibung,
.hh-job-wir,
.hh-job-du,
.hh-job-cta {
  margin-bottom: 80px;
}

.hh-job-inhalt .hh-job-allgemein__details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 22px;
}
.hh-job-inhalt .hh-job-allgemein__ort {
  display: flex;
  gap: 16px;
}
.hh-job-inhalt .hh-job-allgemein__ort-icon {
  height: 25px;
  width: auto;
}

/* ---------------------------------------------------------------------------
   Overlay Navigation
--------------------------------------------------------------------------- */
/* Reset GP */
#generate-slideout-menu.slideout-navigation {
  text-align: left;
}
#generate-slideout-menu.slideout-navigation .inside-navigation {
  display: block;
  max-width: none;
  padding: 0;
  text-align: left;
}
#generate-slideout-menu.slideout-navigation .main-nav {
  display: none;
}
#generate-slideout-menu.slideout-navigation .hh-overlay-nav li {
  text-align: left;
}
#generate-slideout-menu.slideout-navigation .hh-submenu-panel:not([hidden]) ul {
  display: flex;
}

.hh-overlay-nav {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(300px, 420px) 1fr;
  gap: 48px;
  box-sizing: border-box;
}

.hh-overlay-nav .hh-panel-toggle {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 0;
  cursor: pointer;
}

.hh-overlay-nav .hh-arrow-icon {
  display: block;
  width: 30px;
  height: 30px;
  max-width: none;
}

.hh-overlay-nav .hh-panel-toggle:hover,
.hh-overlay-nav .hh-panel-toggle:active,
.hh-overlay-nav .hh-panel-toggle:focus {
  background: transparent;
  color: inherit;
}

.hh-overlay-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hh-primary-menu,
.hh-secondary-menu,
.hh-submenu-panel ul,
.hh-overlay-cta {
  display: flex;
  flex-direction: column;
}

.hh-primary-menu {
  margin-bottom: 70px;
  gap: 40px;
}

.hh-overlay-nav .hh-submenu-panel ul {
  gap: 24px;
  padding-left: 24px;
}

#generate-slideout-menu.slideout-navigation .hh-primary-menu a {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
#generate-slideout-menu.slideout-navigation a:hover,
#generate-slideout-menu.slideout-navigation a:active,
#generate-slideout-menu.slideout-navigation a:focus {
  color: var(--hh-rot);
}

.hh-overlay-panel-wrap {
  padding-left: 24px;
}

#hh-panel-haeusertypen {
  border-left: 3px solid #d2d2d2;
}

.hh-submenu-panel[hidden] {
  display: none;
}

.hh-overlay-cta {
  align-self: end;
}

.hh-has-panel {
  display: flex;
  align-items: center;
  gap: 140px;
}

/* ---------------------------------------------------------------------------
   Beiträge Post
--------------------------------------------------------------------------- */
.single-post .hh-post-subtitle {
  margin-bottom: 3.5rem;
}

.hh-post-content {
  margin-top: 3.5rem;
}

/* Remove top margin when subtitle is present */
.single-post .hh-post-container:has(.hh-post-subtitle) .hh-post-content {
  margin-top: 0;
}

.single-post .hh-post-content h2,
.single-post .hh-post-content h3 {
  margin-bottom: 40px;
}

.single-post .hh-post-content ul {
  list-style-type: none;
  margin: 0px 0px 3.75rem 0px;
}
.single-post .hh-post-content ul li {
  position: relative;
  padding-left: 40px;
}
.single-post .hh-post-content ul li:not(:last-child) {
  margin-bottom: 28px;
}
.single-post .hh-post-content ul li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 50%;
  color: var(--hh-rot);
  font-size: 1.75rem;
  transform: translateY(calc(-50% - 0.15em));
}

/* ── Single post: share widget aligned to featured image top ── */
.hh-share-post {
  margin-top: var(--featured-img-top);
  visibility: hidden;
}

.hh-share-post.is-positioned {
  visibility: visible;
}

/* ---------------------------------------------------------------------------
   Media Queries
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
  #generate-slideout-menu.slideout-navigation .hh-overlay-nav ul.hh-primary-menu {
    display: block;
  }

  .hh-overlay-nav {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hh-has-panel {
    gap: 16px;
  }

  #hh-panel-haeusertypen {
    border-left: none;
  }

  .hh-overlay-nav .hh-submenu-panel ul {
    padding-left: 0;
  }

  .hh-overlay-panel-wrap {
    padding-left: 0;
  }
}

@media (min-width: 768px) {
  .hh-overlay-nav {
    min-height: 318px;
  }
  .main-navigation .hh-submenu-panel a {
    font-size: 22px;
  }
}
