/*  
Theme Name: historik
Author: Süsskind SGD
Description: Theme für historische Bilder
Version: 1.0 
*/

/* @import url("https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap"); */
@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400;1,7..72,600&display=swap");

/*  VARIABELN----------------------------------  */
:root {
  /*  Farben  */
  --col-main: #fff;
  --col-text: #000;
  --col-alternate: #eee;
  --col-bg-dark: #444;
  --col-bg-dark2: #555;

  /*  Schriften  */
  /* --ff-name: "PT Serif", serif; */
  --ff-name: "Literata", serif;
  --fs-basic: 18px;
  --fs-fliesstext: 1rem;
  --lh-fliesstext: 1.5rem;
  --fs-h1: 2rem;
  --fs-h2: 1.6rem;
  --fs-h3: 1.1rem;
  --fs-tooltip: 1.4rem;
  --fs-small: 0.6rem;
  --fs-menu: 0.8rem;

  /* Breiten / Abstände */
  --con-max-width-small: 500px;
  --con-width: 90vw;
  --con-width-home: calc(90vw - 70px);
  --con-fullwidth: 100%;
  --con-max-width: 1200px;
  --con-fuss-max-width: 800px;
  --mar-standard: 50px;
  --mar-big: 100px;
  --mar-small: 20px;

  /* --mar-huge: 300px; */
  --flex-gap: 50px;
  --header-height: 80px;
}

html {
  font-size: var(--fs-basic);
}

body {
  font-family: var(--ff-name);
  background-color: var(--col-main);
  color: var(--col-text);
  margin: 0;
  overflow-x: hidden;
}

body * {
  color: var(--col-text);
  box-sizing: border-box;
}

main {
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 100px;
}

/* Colors */
.alternate {
  background-color: var(--col-alternate);
}

.nopaddingbottom {
  padding-bottom: 0;
}

.nopaddingtop {
  padding-top: 0;
}

.hidden {
  opacity: 0;
}

/* Content not full width */
.contentwidth {
  width: var(--con-width);
  max-width: var(--con-max-width);
  margin: 0 auto;
}

.content {
  max-width: var(--con-max-width-small);
  min-width: calc(50% - (var(--flex-gap) / 2));
}

/* Content full width */
.fullwidth {
  width: var(--con-fullwidth);
}

body:not(.website-5) .twocolumns .wp-block-group {
  column-count: 2;
  gap: 50px;
  margin-bottom: 50px;
}

body:not(.website-5) .twocolumns .wp-block-group p:first-child {
  margin-top: 0;
}

.wp-block-button__link {
  border-radius: 0 !important;
  background-color: var(--col-bg-dark) !important;
}

.grid-gallery .wp-block-group__inner-container {
  display: grid !important;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  height: 380px;
}

.grid-gallery figure:first-child {
  grid-area: 1 / 1 / 3 / 2;
  height: 380px;
}

.grid-gallery figure:not(:first-child) {
  height: 179px;
}

.grid-gallery figure {
  width: 100% !important;
}

.grid-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* #second {
  grid-area: 1 / 2 / 2 / 3;
  }
  
  #third {
  grid-area: 2 / 2 / 3 / 3;
  } */

/* *********************************************************************** 
   *********************************************************************** 
   Typography */

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: normal;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: normal;
}

p {
  line-height: 1.5;
}

.home h1,
.single h2 {
  border-bottom: 1px solid var(--col-text);
  padding-bottom: 10px;
}

.home h1 {
  margin-left: 10px;
  margin-right: 10px;
}

/* *********************************************************************** 
   *********************************************************************** 
   Header */

header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  /* background: var(--col-alternate); */
  background: var(--col-main);
  display: flex;
  justify-content: center;
  align-items: center;
  /* border-bottom: 1px solid var(--col-text); */
  z-index: 9;
}

.logo {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo a {
  font-size: var(--fs-h3);
  text-decoration: none;
}

.header-social {
  margin-left: 5vw;
}

.header-social svg {
  width: 30px;
  height: 30px;
}
.sidebar-social svg {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
}

.sidebar-social {
  display: none;
}

nav {
  width: 50px;
}

.burger-menu {
  cursor: pointer;
  position: relative;
  z-index: 999;
}
.menu_open .burger-menu .bar {
  background-color: #fff;
}

.bar {
  width: 40px;
  height: 2px;
  background-color: var(--col-text);
  margin: 10px 0;
  transition: 0.4s;
}

.navigation {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  max-width: 100vw;
  height: 100%;
  padding-bottom: 50px;
  /* height: calc(100% - 50px); */
  background-color: var(--col-bg-dark);
  padding-top: 60px;
  transition: 0.5s;
  overflow: auto;
}

.navigation .menu,
.navigation .sorting {
  list-style: none;
  padding: var(--mar-small) 0 0 0;
}

.navigation .sort_submenu {
  padding: 0;
}
.navigation ul li {
  padding: 5px 20px;
}

.navigation ul li a,
.navigation ul li {
  text-decoration: none;
  color: white;
  cursor: pointer;
  font-size: var(--fs-menu);
}

.navigation li:hover {
  opacity: 0.8;
}

.navigation.active {
  right: 0;
}

.navigation::-webkit-scrollbar {
  display: none;
}

#menu-main-menu {
  margin-bottom: 0;
}

.information_link {
  margin-bottom: 15px;
}

.sorting {
  border-top: 1px solid var(--col-main);
  margin-top: var(--mar-small);
}

.sort_submenu {
  list-style: none;
  padding-left: 20px;
  display: none;
  background-color: var(--col-bg-dark);
}

.sort_submenu > li {
  padding: 8px 10px;
  background-color: var(--col-bg-dark2);
  color: var(--col-main);
}

/* Arrow icon styling */
.arrow {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 10px;
  vertical-align: middle;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--col-main);
  transition: transform 0.3s ease;
}

.open .arrow {
  transform: rotate(180deg);
}

.button-icon {
  width: auto;
  height: 40px;
  max-width: 40px;
  pointer-events: none;
}
.button-icon rect,
.button-icon line,
.button-icon path {
  fill: none;
  stroke: var(--col-text);
  stroke-linecap: square;
  stroke-miterlimit: 10;
  stroke-width: 12px;
}

.button-icon-light rect,
.button-icon-light line,
.button-icon-light path {
  stroke: var(--col-main);
}

.buttonlist {
  position: fixed;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: end;
}

#viewtoggler {
  top: 130px;
}

#audiotoggler {
  bottom: 20px;
}

body:not(.home) #audiotoggler {
  display: none;
}

.buttonlist button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.sort-button {
  margin-right: 12px;
}

.website-5 #viewtoggler-button,
.website-6 #viewtoggler,
.website-1 #viewtoggler {
  display: none;
}
.search-wrapper,
.extern-link-div {
  position: fixed;
  right: -300px;
  transition: 0.5s;
  background: var(--col-bg-dark);
  padding: 20px;
  width: 300px;
  z-index: 5;
}

.search-wrapper {
  bottom: 50px;
}
.search-wrapper input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--col-main);
  background: transparent;
  color: var(--col-main);
  outline: none;
  font-size: 16px;
  padding: 5px;
  width: 100%;
  cursor: text;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: var(--ff-name);
}

.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.6); /* Bright gray */
}

.search-wrapper input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) grayscale(1); /* Makes it white */
  cursor: pointer;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::search-cancel-button {
  filter: brightness(1);
  color: var(--col-main);
}

.extern-link-div {
  bottom: 0;
}

.navigation.active .extern-link-div,
.navigation.active .search-wrapper {
  right: 0;
}

.extern-link {
  color: var(--col-main);
  text-decoration: none;
}

.logo-image {
  width: 60px;
  height: 60px;
  margin-right: 20px;
}

/* *********************************************************************** 
   *********************************************************************** 
   Animation */

.animation {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* State when in view: fully visible and moved to original position */
.animation.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* *********************************************************************** 
   *********************************************************************** 
   Intro */

.hometext {
  height: 80vh;
}

.hometext .video-wrapper-div {
  height: 60vh;
  padding-top: 10vh;
  display: flex;
  gap: 50px;
  overflow: auto;
}

.hometext .video-div {
  height: 100%;
  display: flex;
}

.hometext .video-div:nth-child(even) {
  align-items: flex-end;
}

.fullwidth-banner {
  height: 24vw;
  max-height: 300px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.home.website-1 h1 {
  margin-top: 0;
}

/* *********************************************************************** 
   *********************************************************************** 
   Bilder Wrapper */

/* .sorting {
  display: none;
} */

body.grid .wrapper {
  display: flex;
  flex-wrap: wrap;
}
body.website-6.grid .wrapper {
  justify-content: space-between;
}

body.grid .wrapper .el {
  width: calc(100% / 3);
  margin-bottom: 50px;
  transition: all 0.5s ease;
}

body.grid .wrapper.columns-1 .el:not(.hide) {
  width: 100%;
}

body.grid .wrapper.columns-2 .el:not(.hide) {
  width: 50%;
}

body.grid .wrapper.columns-4 .el:not(.hide) {
  width: 25%;
}

body.grid .wrapper.columns-5 .el:not(.hide) {
  width: 20%;
}

body.grid .wrapper.columns-6 .el:not(.hide) {
  width: calc(100% / 6);
}

body.website-6.grid .wrapper .el:not(.hide) {
  width: calc(50% - 20px);
}
body.website-6 .img-wrapper-div {
  height: 300px;
}

body.grid .wrapper.columns-6 h3 {
  font-size: var(--fs-menu);
}

body.grid .year-number,
body.grid .text-el {
  display: none;
}

body.timeline .wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
}

body.timeline .wrapper .el {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: space-between;
}

body.timeline .wrapper .text-el {
  margin: 50px 0;
}

body.timeline .wrapper .text-el p:first-child {
  font-size: var(--fs-h2);
  margin-bottom: 0;
}

body.timeline .wrapper .el > a,
body.timeline .wrapper .text-el .text-wrapper-div {
  width: 40%;
  position: relative;
  display: block;
}

body.timeline .wrapper .year-number {
  width: 47%;
  display: flex;
  align-items: center;
}

body.timeline .wrapper .year-number h2 {
  margin: 0 0 -0.4em;
}

body.timeline .wrapper .el:nth-child(even) {
  flex-direction: row-reverse;
}

body.timeline .wrapper .el:nth-child(even) .year-number {
  justify-content: flex-end;
}

body.timeline .wrapper .el:nth-child(odd) h2 {
  text-align: right;
}

body.timeline .wrapper .el:after {
  content: "";
  width: 15px;
  height: 15px;
  background: var(--col-text);
  position: absolute;
  top: 50%;
  display: block;
  border-radius: 100%;
  border: 3px solid white;
  z-index: 2;
}

body.timeline .wrapper .el:nth-child(odd):after {
  right: calc(50% - 9px);
  left: auto;
}

body.timeline .wrapper .el:nth-child(even):after {
  left: calc(50% - 12px);
  right: auto;
}

body.timeline .wrapper:after {
  content: "";
  width: 3px;
  background: var(--col-text);
  height: 100%;
  position: absolute;
  right: 50%;
}

body.timeline .columnAmount-slider {
  display: none;
}

body .wrapper .el.hide {
  width: 0;
  height: 0;
  visibility: hidden;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.img-wrapper-div {
  margin: 10px;
  height: 500px;
  position: relative;
  overflow: hidden;
  background-color: var(--col-alternate);
  border: 10px solid var(--col-alternate);
}

.website-5 .img-wrapper-div {
  background: transparent;
  border: none;
  height: 400px;
  transition: transform 0.1s;
}

body.grid .wrapper.columns-1 .img-wrapper-div {
  height: 750px;
}

body.grid .wrapper.columns-2 .img-wrapper-div {
  height: 600px;
}

body.grid .wrapper.columns-4 .img-wrapper-div {
  height: 400px;
}

body.grid .wrapper.columns-5 .img-wrapper-div {
  height: 300px;
}

body.grid .wrapper.columns-6 .img-wrapper-div {
  height: 200px;
}

.text-wrapper-div {
  padding: 10px 0;
  margin: 0 10px;
}

.text-wrapper-div h2 p {
  margin-bottom: -0.4em;
}

.wrapper .text-wrapper-div h3:has(+ p) {
  margin-bottom: 0;
  font-weight: bold;
  hyphens: auto;
}

.wrapper .text-wrapper-div p {
  margin-top: 0;
}

.wrapper a {
  text-decoration: none;
}

.wrapper img,
.single-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.5s ease;
}

.wrapper a:hover img {
  transform: scale(1.05);
}

/* *********************************************************************** 
   *********************************************************************** 
   Weichen Seite */

.weiche-wrapper {
  display: flex;
  flex-wrap: wrap;
}

.weiche-wrapper article {
  width: calc(25% - 20px);
  margin: 10px;
}

.weiche-wrapper img {
  width: 100%;
  height: 100%;
}

/* *********************************************************************** 
   *********************************************************************** 
   Bilder Wrapper single page */

.single main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.single-image-wrapper {
  display: flex;
  align-items: stretch;
  gap: 40px;
}

.single-image-wrapper .image-wrapper {
  width: calc(50% - 20px);
  background-color: var(--col-alternate);
  border: 10px solid var(--col-alternate);
}

.website-5 .single-image-wrapper .image-wrapper {
  background: transparent;
  border: none;
}

.single-image-wrapper .text-wrapper-div {
  padding: 20px;
  align-self: center;
}

.back-button {
  background: transparent;
  border: none;
  font-size: var(--fs-basic);
  font-family: var(--ff-name);
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 20px;
}

.other-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: var(--mar-small);
}

.other-images-single {
  background: var(--col-alternate);
  width: calc(20% - 16px);
}

.other-images img {
  width: 100%;
  height: calc((var(--con-width) * 1.2) / 5);
  max-height: calc((var(--con-max-width) * 1.2) / 5);
  object-fit: contain;
}

/* *********************************************************************** 
   *********************************************************************** 
   Lightbox */

dialog {
  padding: 0;
  border: none;
  line-height: 0;
  max-width: 1000px;
  max-height: 750px;
  width: calc(100% - 150px);
  height: calc(100% - 150px);
  background: var(--col-bg-dark);
  overflow: visible;
}

dialog button {
  background: transparent;
  border: none;
  cursor: pointer;
  position: absolute;
  color: white;
}

dialog .close {
  top: -50px;
  right: 0;
}

dialog .prev,
dialog .next {
  top: 50%;
  transform: translateY(-50%);
}

dialog .prev {
  left: -50px;
}

dialog .next {
  right: -50px;
}

.dialog-navigation.hidden {
  display: none;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-opener {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.lightbox-opener img {
  transition: all 0.5s ease;
}

.lightbox-opener:hover img {
  transform: scale(1.05);
}

/* *********************************************************************** 
   *********************************************************************** 
   Range Slider */

#columnAmount,
#audioTrackToggler {
  width: 40px;
  height: 40px;
  border: 2px solid var(--col-text);
  font-size: 20px;
  font-family: var(--ff-name);
}

/* *********************************************************************** 
   *********************************************************************** 
   Responsive */

@media only screen and (max-width: 1400px) {
  .buttonlist {
    left: 5vw;
  }
}

@media only screen and (max-width: 1127px) {
  .img-wrapper-div {
    height: 300px;
  }
  .columnAmount-slider {
    display: none;
  }

  #audiotoggler,
  #viewtoggler {
    width: 70px;
    right: 0px;
    background: white;
    padding: 20px 10px 20px 20px;
    left: auto;
  }
  #audiotoggler {
    bottom: 0px;
  }

  #viewtoggler {
    z-index: 8;
    top: 80px;
  }

  .home .contentwidth {
    width: var(--con-width-home);
    margin: 0 70px 0 auto;
  }
  .header-social {
    margin-left: calc((100vw - var(--con-width-home)) / 2);
  }
}

@media only screen and (max-width: 950px) {
  .img-wrapper-div {
    height: 200px;
  }
}

@media only screen and (max-width: 840px) {
  .single .contentwidth {
    margin-top: 50px;
  }

  .single-image-wrapper {
    flex-wrap: wrap;
  }

  .single-image-wrapper .image-wrapper {
    width: 100%;
  }

  .weiche-wrapper article {
    width: calc((100% / 3) - 20px);
  }
}

@media only screen and (max-width: 767px) {
  :root {
    --fs-h2: 1.3rem;
  }
  body.grid .wrapper .el {
    width: 50%;
  }

  .img-wrapper-div {
    height: 400px;
  }

  body:not(.website-5) .twocolumns .wp-block-group {
    column-count: 1;
  }

  body.timeline .wrapper:after {
    right: auto;
    left: 0;
  }

  body.timeline .wrapper .el:after {
    top: 10px;
  }

  body.timeline .wrapper .el:nth-child(odd):after,
  body.timeline .wrapper .el:nth-child(even):after {
    right: auto;
    left: -8px;
  }
  body.timeline .wrapper .el,
  body.timeline .wrapper .el:nth-child(even) {
    flex-direction: column-reverse;
    padding-left: 20px;
  }

  body.timeline .wrapper .year-number {
    width: 100%;
    display: block;
    margin-left: 10px;
  }
  body.timeline .wrapper .el > a,
  body.timeline .wrapper .text-el .text-wrapper-div {
    width: 100%;
  }
  body.timeline .wrapper .year-number h2 {
    font-weight: bold;
  }
  body.timeline .wrapper .el:nth-child(odd) h2 {
    text-align: left;
  }

  dialog {
    width: 100%;
    height: 100%;
  }

  dialog .close {
    top: 10px;
  }
  dialog .next {
    right: 10px;
  }
  dialog .prev {
    left: 10px;
  }
  .weiche-wrapper article {
    width: calc(50% - 20px);
  }
}

@media only screen and (max-width: 580px) {
  body.grid .wrapper .el {
    width: 100%;
  }

  .img-wrapper-div {
    height: 70vw;
  }

  .weiche-wrapper article {
    width: 100%;
  }

  .header-social {
    display: none;
  }

  .sidebar-social {
    display: block;
  }
}

@media only screen and (min-width: 1338px) {
  .header-social {
    margin-left: calc((100vw - var(--con-max-width)) / 2);
  }
}

/* *********************************************************************** 
   *********************************************************************** 
   Text selection */

/*  ::-moz-selection { 
  background: var(--col-alternate); 
  color: var(--col-main); 
}
::selection { 
  background: var(--col-alternate); 
  color: var(--col-main); 
}

.alternate ::-moz-selection { 
  background: var(--col-main); 
  color: var(--col-alternate); 
}
.alternate ::selection { 
  background: var(--col-main); 
  color: var(--col-alternate); 
}  */
