@media (max-width: 1444px) {

  #infoboxPos {
    right: 20px;
  }

}

@media (max-width: 1377px) {

  #infoboxPos {
    right: 20px;
    top:135px;
  }

}

@media (max-width: 1190px) {

  #logoLink {
    margin-right: 20px;
  }

  #topNav li {
    margin-right: 20px;
  }

}

@media (max-width: 1140px) {

  #logoLink {
    margin-right: 10px;
  }

  #topNav li {
    margin-right: 15px;
  }

}

@media (max-width: 1090px) {

  #logoLink {
    margin-right: 10px;
  }

  #topNav li {
    margin-right: 5px;
  }

}

@media (max-width: 1045px) {

  #logoLink {
    margin-right: 0;
  }

  #topNav li {
    margin-right: 0;
  }

  #socialBar img {
    margin-left: 15px;
  }

}

@media (max-width: 1009px) {

  #topNav {
    display: none;
  }

  #menuButton {
    display: block;
    cursor: pointer;
    text-align: center;
    position: absolute;
    right: 24px;
    top: 42px;
  }

  #menuButton .menu {
    margin-top: 6px;
    text-transform: uppercase;
  }

  #openNav:checked ~ #topNav {
    display: block;
  }

  #openNav:checked ~ #topNav #closeMenuButton {
    display: inline-block;
    position: absolute;
    right: 27px;
    top: 35px;
  }

  #topNav {
    background: #FFDF43;
    position: fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    max-width: 100vw;
    z-index: 200;
    margin-top:0;
    padding-top: 170px;
    padding-left: 50px;
    overflow-y: auto;
  }

  #topNav > ul > li > a:hover::after, #topNav li:hover ul::before {
    display:none;
  }

  #topNav li {
    display: block;
    font-size: 26px;
    margin-bottom: 10px;
  }

  #topNav li ul {
    display: none;
    visibility: visible;
    position: static;
  }

 #topNav li ul li {
   padding-left: 0;
   margin-bottom: 0;
 }

 #topNav li :checked ~ ul::after {
   border-left-width: 10px;
   border-right-width: 10px;
   border-top-width: 10px;
 }

 #topNav li ul li a {
   font-size: 18px;
   line-height: 32px;
 }

  #topNav li :checked ~ ul::after {
    top: 35px;
    left: 10px;
  }

  #topNav li :checked ~ ul {
    display: block;
    margin-left: 1px;
  }

}


@media (max-width: 991px) {

  main {
    padding-bottom: 123px;
  }

  h1 ~ .subline {
    margin-top: 7px;
  }

  .header_layout_1 {
    margin-bottom: 30px;
  }

  #footerBar {
    top: -70.5px;
  }

  #pageHeader, #logoLink {
    height: 95px;
  }

  #menuButton {
    top: 30px;
  }

  #willkommen, #karte, #oeffnungszeiten, #rundgang, #slider, #anreise, #preise, #cafe {
    width: 100%;
    float: none;
  }

  .flexRow {
    display: block;
  }

  .startseite h1 {
    font-size: 52px;
  }

  #willkommen {
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
  }

  #willkommen .inner {
    margin-left: 0;
  }

  #willkommen {
    padding-top: 30px;
  }

  #willkommen header.container {
    margin-left:0;
    margin-right:0;
  }

  #slider, #slider .slickItem {
    height: 60vh;
  }

  #slider .overlay {
    height: 50px;
    width: 100%;
    background: linear-gradient(to left top, #fff 50%, transparent 50.3%);
    bottom: 0;
  }

  #slider .slick-prev {
    left: 10px;
  }

  #slider .slick-next {
    right: 10px;
  }

  #startTop {
    display: flex;
    flex-direction: column-reverse;
  }

  #infobox, .infoboxUntenWrap {
    transform: none;
    width: auto;
  }

  #infobox {
    display: flex;
    flex-direction: column-reverse;
  }

  .oeffnungszeiten .text, #infobox .informationen .inner {
    display: none;
  }

  #infobox .informationen img {
    display: inline-block;
  }

  #infobox .oeffnungszeiten .inner, #infobox .informationen .inner {
    transform: none;
  }

  #infoboxPos {
    position: fixed;
    right: 0;
    left: unset;
    bottom:10vh;
    top: unset;
    z-index: 100;
    display: flex;
    flex-direction:column-reverse;
    -webkit-backface-visibility: hidden;
  }

  #infoboxMenuIcon::after {
    display:none;
  }

  #infoboxMenu {
    display:none;
    visibility: visible;
  }

  #mobileExpandInfobox:checked ~ .infoboxUntenWrap #showInfoboxMenu:checked ~ #infoboxMenu {
    display: block;
    margin-bottom: 5px;
  }

  .infoboxUntenWrap {
    left: 0;
    height: unset;
  }

  #mobileExpInfoLabel, #mobileExpandInfobox:checked ~ #infobox #mobileExpOeffnung {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
    z-index: 1;
  }

  #mobileExpandInfobox:checked ~ #infobox #mobileExpInfoLabel {
    display: none;
  }

  #mobileExpandInfobox:checked ~ #infobox .oeffnungszeiten .text,
  #mobileExpandInfobox:checked ~ #infobox .informationen .inner {
    display:block;
  }

  #mobileExpandInfobox:checked ~ #infobox .oeffnungszeiten .inner {
    display: flex;
    align-items: center;
  }

  #mobileExpandInfobox:checked ~ #infobox .oeffnungszeiten img {
    top: unset;
    margin-left: 3px;
    margin-right: 9px;
  }

  #mobileExpandInfobox:checked ~ #infobox .informationen .inner {
    text-align: left;
    margin-left: 41px;
    line-height: 19px;
  }

  #mobileExpandInfobox:checked ~ #infobox .informationen img {
    float: left;
    margin-left: 8px;
  }

  #mobileExpandInfobox:checked ~ #infobox .informationen::before {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid black;
    top:-12px;
    content: '';
    position: absolute;
    z-index: 1;
  }

  #oeffnungszeiten .inner, #preise .inner, #cafe .inner {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 0;
  }

  #cafe .inner {
    margin-top: 40px;
    margin-bottom: 40px;
  }

  #oeffnungszeiten .inner {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 22px;
    padding-bottom: 64px;
  }

  #preise .inner {
    margin-top:0;
    padding-top: 50px;
  }

  #preise.kanteDiagonal::before {
    height: 32px;
    width: 100%;
    background: linear-gradient(to left bottom, #000 50%, transparent 50.3%);
  }

  footer > .container {
    box-sizing: border-box;
  }

  #footerNav {
    margin-top: 35px;
  }

  #socialBar {
    height: auto;
    line-height: normal;
    padding-top: 25px;
    padding-bottom: 25px;
  }

  #socialLinks {
    display: block;
    margin-top: 12px;
  }

  #footerNav .col-12 {
    margin-bottom: 40px;
  }

  #cafe {
    background: #fff;
  }

  /* umpositionieren */
  #cafe::before {
    display:none;
  }

  #preise {
    text-align: center;
  }

  #preise h2 {
    text-align: left;
  }

  #ticketKaufen {
    position: relative;
    left:unset;
    bottom:unset;
    top: -23px;
    max-width: 347px;
    box-sizing: border-box;
    width: 80%;
  }

  #karte {
    height: 50vh;
  }

  #anreise {
    padding-right: 20px;
    padding-left: 20px;
  }

  #anreise h2, #anreise h3 {
    margin-left:0;
  }

  #anreise header.container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  #rundgang::before, #rundgang::after {
    position: absolute;
    top:0;
    left:0;
    content:'';
    height: 32px;
    width: 100%;
    background: linear-gradient(to right bottom, #fff 50%, transparent 50.3%);
  }

  #rundgang::after {
    top: unset;
    bottom: 0;
    background: linear-gradient(to left bottom, transparent 50.3%, #fff 50%);
  }

  #rundgang {
    padding-left: 20px;
    box-sizing: border-box;
    background: #F5F5F5;
    margin-top: 30px;
  }

  #rundgang .inner {
    margin: 0;
    padding: 70px 0;
  }

  #rundgang .kleinesBildMitButtonUndText .bild {
    margin-left: 0;
  }

  .kleinesBildMitButtonUndText.bildButton .bild {
    margin-bottom: 55px;
  }

  .startseite h2, .bildlinksrechtstextmitbutton h2 {
    font-size: 44px;
    line-height: 42px;
    letter-spacing: -0.9px;
  }

  #aktuelles h2 {
    font-size: 72px;
    margin-left: 20px;
    top: 4px;
    margin-bottom: 30px;
  }

  #eventHighlights {
    padding-top:0;
    padding-bottom: 40px;
  }



  #willkommen {
    padding-bottom: 64px;
  }

  #eventDetail #detailHeader {
    margin-top: 33px;
    margin-bottom: 25px;
  }

  #eventDetail #detailHeader .playfairItalic, .eventTermin.playfairItalic {
    font-size: 30px;
    letter-spacing: -0.9px;
  }

  a.zurueckKalender {
    font-size: 15px;
  }

  a.zurueckKalender::before {
    border-right: 7px solid black;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    top: 1px;
    left: 0;
  }

  #kalenderWrap {
    padding-bottom: 100px;
  }

  #toggleKalenderLegende {
    display:block;
    margin-top: 22px;
    font-size: 14px;
  }

  #kalenderLegende {
    display: none;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
  }

  #kalenderLegende li {
    width: 100%;
    margin: 5px 10px;
  }

  #kalenderLegende.show {
    display: block;
  }

  .legendeItem p {
    margin-left: 10px;
  }

  #toggleKalenderLegende.messageActive {
    display: none;
  }

  #toggleKalenderLegende.messageActive + #kalenderLegende {
    display: none;
  }



  .zweiSpalten.eventDetail {
    display: flex;
    flex-direction: column-reverse;
  }

  .zweiSpalten.eventDetail > div {
    float: none;
  }

  .zweiSpalten.eventDetail .links {
    margin-left:unset;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .zweiSpalten.eventDetail .bildCol {
    width: 100%;
    margin-bottom: 35px;
  }

  .zweiSpalten.eventDetail .bildCol img {
    height: 475px;
    object-fit: cover;
  }

  .zweiSpalten.eventDetail .bildCol::before, .zweiSpalten.eventDetail .bildCol::after {
    content: '';
    height: 32px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to right bottom, #fff 50%, transparent 50.3%);
  }

  .zweiSpalten.eventDetail .bildCol::after {
    top: unset;
    left: 0;
    bottom: 0;
    background: linear-gradient(to left bottom, transparent 50%, #fff 50.3%);
  }

  .eventTermin {
    margin: 25px auto;
    float: none;
    width: 80%;
    max-width: 360px;
  }

  figure.table {
    overflow-x: auto;
  }

  .bildlinksrechtstextmitbutton .bild {
    position: relative;
    width: 100%;
    height: auto;
  }

  .bildlinksrechtstextmitbutton .textCol {
    margin-left: 0;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 28px;
  }

  .bildlinksrechtstextmitbutton .bild.kanteDiagonal::before {
    height: 32px;
    width: 100%;
    top: unset;
    left: 0;
    bottom: 0;
    background: linear-gradient(to right bottom, transparent 50%, #F5F5F5 50.3%);
  }

  #eventDetail > .container {
    box-sizing: border-box;
  }

  h1 {
    font-size: 42px;
    line-height: 38px;
    margin-top: 72px;
  }

  .sonderausstellung {
    box-sizing: border-box;

  }

  .sonderausstellung .bildWrap {
    width: 100%;
    position: static;
  }

  .sonderausstellung .bildWrap::after {
    display: none;
  }

  .sonderausstellung .eckdaten {
    float:none;
    margin-left: unset;
    padding-left: 20px;
    padding-right: 20px;
  }

  header.container h1{
    word-break: break-word;
  }

  .pageInner {
    margin-top:72px;
  }

  .subline {
    font-size: 30px;
  }

  .tx-schloss-events .container {
    box-sizing: border-box;
  }

  .event .details {
    top: unset;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .event .eckdaten {
    margin-left:0;
    margin-top: 0;
    margin-bottom: 35px;
    padding-left: 35px;
    padding-right: 35px;
    clear:both;
  }

  .event h2 {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .event .wochentag {
    margin-bottom: 15px;
  }

  .event .uhrzeiten {
    font-size: 17px;
    margin: 25px 0;
    margin-top: 18px;
  }

  .mobileCenter {
    text-align: center;
  }

  .sonderausstellung .button {
    margin-left: unset;
  }

  .textlinksbildsliderrechts {
    display: flex;
    flex-direction: column-reverse;
  }

  .textlinksbildsliderrechts .textCol, .textlinksbildsliderrechts.bildSchmaler .textCol {
    width: 100%;
    float: none;
    box-sizing: border-box;
    padding-right: 0.75rem;
    margin-left: unset;
  }

  .textlinksbildsliderrechts .bild, .textlinksbildsliderrechts.auto .bild, .textlinksbildsliderrechts.bildSchmaler .bild, .textlinksbildsliderrechts.bildSchmaler.auto .bild, .bildMitZweiSpalten .bild {
    position: relative;
    width: 100%;
    left: unset;
    height: auto;
  }

  .textlinksbildsliderrechts .bild {
    margin-bottom: 45px;
  }

  .textlinksbildsliderrechts .bild img {
    max-height: 550px;
  }

  /* umpositionieren */
  .textlinksbildsliderrechts .bild.kanteDiagonal::before {
    display: none;
  }

  .bildMitZweiSpalten {
    margin-bottom: 10px;
  }

  .bildMitZweiSpalten.links .bild::before, .bildMitZweiSpalten.rechts .bild::before {
    content: '';
    height: 32px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to left bottom, #fff 50%, transparent 50.3%);
  }

  .bildMitZweiSpalten.rechts .bild::before {
    background: linear-gradient(to right bottom, #fff 50%, transparent 50.3%);
  }

  .bildMitZweiSpalten.links .bild::after, .bildMitZweiSpalten.rechts .bild::after {
    left: 0;
    bottom: 0;
    top: unset;
    right: unset;
    height: 32px;
    width: 100%;
    background: linear-gradient(to right bottom, transparent 50.3%, #fff 50%);
  }

  .bildMitZweiSpalten.rechts .bild::after {
    background: linear-gradient(to left bottom, transparent 50.3%, #fff 50%);
  }

  .bildMitZweiSpalten h2 {
    margin-bottom: 3px;
  }

  .bildMitZweiSpalten h3 {
    margin-bottom: 2px;
  }

  .bildMitZweiSpalten.grau {
    background: #fff;
  }

  .bildMitZweiSpalten .bild img {
    display: block;
    height: 350px;
  }

  .bildMitZweiSpalten.rechts {
    display: flex;
    flex-direction: column-reverse;
  }

  .textColsWrapper {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    width: 100%;
  }

  .bildMitZweiSpalten .textCol, .bildMitZweiSpalten.rechts .text1 {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding-top: 30px;
    padding-bottom: 15px;
    float: none;
    padding-right: calc(var(--bs-gutter-x)* .5);
    padding-left: calc(var(--bs-gutter-x)* .5);
  }

  .bildMitZweiSpalten .text2 {
    padding-top: 0;
  }

  .zweiSpalten {
    box-sizing: border-box;
  }

  #c583, #c598 {
    margin-bottom: -65px;
  }

  .frame-layout-1 {
    margin-left: calc(var(--bs-gutter-x)* -.5);
    margin-right: calc(var(--bs-gutter-x)* -.5);
    max-width: none;
    float: none;
  }

  .kalenderMonat .arrowLeft, .kalenderMonat .arrowRight {
    left: 25px;
    bottom: -65px;
    top: auto;
  }

  .kalenderMonat .arrowRight {
    right: 25px;
    left: auto;
  }

  #kalenderMessage {
      width: 60%;
      margin-left: auto;
      margin-right: auto;
      left: 0;
      right: 0;
      margin-top: 30px;
  }

  .imgCopyright {
    bottom: 42px;
    --abstandSeite: 12px;
  }

  .textlinksbildsliderrechts .imgCopyright {
    bottom: 10px;
    right: var(--abstandSeite);
    left: unset;
    padding-right: 14px;
  }

  .imgCopyright::after {
    transform: unset;
    clip-path: polygon(0px 0px, 100% 0px, 100% 100%, 8px 100%);
  }

  .textlinksbildsliderrechts .imgCopyright::after {
    clip-path: unset;
    transform: unset;
  }

} /* max-width: 991px */

@media (min-width: 890px) and (max-width: 991px) {

  #eventHighlights {
    width: 80%;
  }

  .eventHighlight {
    max-width: 330px;
  }

  #aktuelles > .container {
    max-width: 100%;
  }

}

@media (max-width: 890px) {

  #eventHighlights {
    max-width: 370px;
    margin: 0;
    margin-left: 22px;
  }

  .eventHighlight {
    max-width: 370px;
  }

}

@media (max-width: 767px) {

  .bildMitZweiSpalten .textCol, .bildMitZweiSpalten.rechts .text1 {
    max-width: 540px;
  }

  .frame-layout-1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 32px;
    width: 100%;
    background: linear-gradient(to right bottom, #fff 50%, transparent 50.3%);
  }

  .frame-layout-1 {
    margin-left: calc( var(--containerMarginWidth) * -1 - 1.5rem);
    margin-right: calc( var(--containerMarginWidth) * -1 - 1.5rem);
    padding-left: calc( var(--containerMarginWidth) + 1.5rem);
    padding-right: calc( var(--containerMarginWidth) + 1.5rem);
  }

  #c576 .bild::before, #c599 .bild::before {
    background: linear-gradient(to left bottom, #FFDF43 50%, transparent 50.3%);
  }

  #aktuelles > .container, #partner > .container  {
    box-sizing: border-box;
  }

  #socialLinks a:first-child img {
    margin-left: 0;
  }

  #socialLinks a img {
    width: 30px;
    height: auto;
    margin-left: 20px;
  }

  .footerBarWrap {
    position: relative;
  }

  #harzLogo {
    position: absolute;
    bottom: -23px;
    right: 0;
    height: 75px;
    line-height: 75px;
    padding-left: 5px;
    padding-right: 23px;

  }

  #harzLogo::after {
    background: #fff;
  }

  #socialBar em {
    font-size: 20px;
  }

  .partner {
    height: auto;
    margin-bottom: 60px;
  }

  .kalenderFeld {
    width: 40px;
    height: 50px;
    line-height: 45px;
    font-size: 24px;
    letter-spacing: -0.7px;
    margin: 5px;
  }

  .kalenderFeld.closed {
      background-image: url('/typo3conf/ext/theme_schloss/Resources/Public/Icons/kalender-closed-mobile.svg');
      background-size: cover;
  }

  .kalenderFeld.today.closed {
      background-image: url('/typo3conf/ext/theme_schloss/Resources/Public/Icons/kalender-closed-today-mobile.svg');
  }

  .kalenderClose {
    width: 20px;
    height: 20px;
    background-size: cover;
    top: -20px;
  }

  #toggleKalenderLegende {
    margin-top: 30px;
  }

  .kalenderMonat .arrowLeft, .kalenderMonat .arrowRight {
    width: 15px;
    height: 27px;
    left: 47px;
    background-size: cover;
  }

  .kalenderMonat .arrowRight {
    right: 47px;
    left: auto;
  }

  .video .play-button {
    width: 30px;
  }


}

@media (max-width: 620px) {

  #logoLink {
      background: linear-gradient(to right, #000 50%, transparent 50%) no-repeat;
  }

  #logoLink img {
    margin-left: -28px;
  }

  .kleinesBildMitButtonUndText.bildButton .textCol {
    max-width: 400px;
  }

  .kleinesBildMitButtonUndText.bildButton .bild {
    margin-right: 0;
  }


}

@media (max-width: 580px) {

  #footerBar {
    text-align: left;
  }

  #socialBar {
    padding-left: 20px;
    padding-right: 10px;
  }

}

@media (max-width: 575px) {

  .frame-layout-1 {
    padding-left: calc(var(--bs-gutter-x)* .5);
    padding-right: calc(var(--bs-gutter-x)* .5);
    margin-left: calc(var(--bs-gutter-x)* -.5);
    margin-right: calc(var(--bs-gutter-x)* -.5);
  }

  .kleinesBildMitButtonUndText .bild img {
    height: auto;
    width: 30vw;
    margin-top: 40px;
  }

  .kleinesBildMitButtonUndText.bildButton .bild img {
    width: 100%;
    margin-top: 0;
  }

  .kleinesBildMitButtonUndText .bild  {
    margin-right: 7.5vw;
  }

  .kleinesBildMitButtonUndText .textCol {
    max-width: 50vw;
    word-break: break-word;
  }

  #c592 figure.table:last-child strong:first-child {
    margin-top: -8px;
    margin-bottom: 20px;
    display: inline-block;
  }

}

@media (max-width: 500px) {

  #eventHighlights {
    margin: 0 auto;
  }

  .horizontalScroll .slick-next,
  .horizontalScroll .slick-next:focus,
  .horizontalScroll .slick-prev,
  .horizontalScroll .slick-prev:focus {
    width: 16px;
    height: 29px;
    background-size: contain;
    background-repeat: no-repeat;
  }

  .horizontalScroll .slick-prev {
    left: -25px;
  }

  .horizontalScroll .slick-next {
    right: -25px;
  }

}




@media (max-width: 440px) {

  #ticketKaufen {
    padding: 14px;
  }

  #ticketKaufen span {
    margin-left: 10px;
  }

  #ticketKaufen img {
    width: 40px;
  }

  #aktuelles h2 {
    margin-left: 0;
  }

  .bildlinksrechtstextmitbutton .subline {
    font-size: 28px;
    margin-top: -2px;
  }
}

@media (max-width: 375px) {

  .kleinesBildMitButtonUndText .bild img {
    width: 28vw;
  }

  .kleinesBildMitButtonUndText .bild  {
    margin-right: 6vw;
  }

  .kleinesBildMitButtonUndText .textCol {
    max-width: 57vw;
  }

  .kalenderFeld {

    margin: 3px;

    width: 30px;
    height: 37.5px;
    line-height: 35px;

  }

  .kalenderFeld.mitEvent::before {
    height: 5px;
  }

  .kalenderMonat .arrowLeft, .kalenderMonat .arrowRight {
    left: 15px;
  }

  .kalenderMonat .arrowRight {
    right: 15px;
    left: auto;
  }


}

@media (max-width: 366px) {

  #ticketKaufen span {
    margin-left: 0;
  }

  #ticketKaufen img {
    display: none;
  }
}

@media (max-width: 330px) {
  .kleinesBildMitButtonUndText .bild img {
    width: 20vw;
  }

  .kleinesBildMitButtonUndText .bild  {
    margin-right: 3vw;
  }

  .kleinesBildMitButtonUndText .textCol {
    max-width: 65vw;
  }
}

@media (max-width: 325px) {
    .startseite h1 {
        font-size: 15.5vw;
    }

    #aktuelles h2 {
      font-size: 21vw;
      top: -0;
    }

    .startseite h2, .bildlinksrechtstextmitbutton h2 {
      font-size: 14vw;
    }

    #harzLogo {
      position: relative;
      bottom: -20px;
      left: 30px;
    }

    #footerNav {
        margin-top: 130px;
    }

    .horizontalScroll .slick-prev {
      left: -22px;
    }

    .horizontalScroll .slick-next {
      right: -22px;
    }
}
