
/*color variables*/
* {
  --fs1: #ccac8a;
  --fs2: #6e675e;
  --fs3: #645746;
  /*farbschema 1 zum Testen*/
  --background-body1: #8A9163;
  --background-main1: #F1EBDD;
  --background-nav1: #1F2A44;
}



/* Page layout with nav, main content, and footer */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: Georgia, serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  margin: 0;
  background-color: var(--background-body1);
  overflow-x: hidden;
}

/* Responsive header image */
.navHeader {
  display: block;
  width: 100%;
  height: clamp(90px, 13vw, 150px);
  max-height: 150px;
  object-fit: cover;
  max-width: 100vw;
}

/* Floating heading above header image */
.navHeaderContainer {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.navHeaderTitle {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 60%);
  max-width: 100%;
  text-align: left;
  font-size: clamp(1rem, 2vw + 0.5rem, 2.2rem);
  line-height: 1.1;
  font-weight: bold;
  color: #ffffff;
  z-index: 2;
  padding-left: 0.5rem;
  box-sizing: border-box;
  pointer-events: none;
  text-shadow: 1px 1px 1px black;
  overflow-wrap: anywhere;
}

.navHeaderTitle span {
  white-space: nowrap;
  font-size: 1.3rem;
}

#nav-page{
  background-color: #f5f5f5;
  padding: 0.8rem 1rem;
  border-bottom: solid 0.5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  cursor: pointer;
}

#nav-page::before {
  content: "Seiten-Navigation ▾";
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: #1f2a44;
}

#nav-page #dropdown {
  display: none;
  position: absolute;
  left: 0.8rem;
  top: 35px;
  width: min(25%, 18rem);
  max-height: min(60vh, 40rem);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f5f5f5;
  z-index: 1001;
  padding: 5px 7px 5px 7px;
  border: solid 0.5px rgba(0, 0, 0, 0.2);
  border-radius: 0.35rem;
}

/* had to insert a scroll bar because some dropdowns are way too long for the window*/
#nav-page #dropdown::-webkit-scrollbar {
  width: 10px;
}

#nav-page #dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

#nav-page #dropdown::-webkit-scrollbar-track {
  background-color: transparent;
}

#nav-page #dropdown > a {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-top: 0.1rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  color: #1f2a44;
  box-sizing: border-box;
  white-space: nowrap;
}

#nav-page:hover #dropdown,
#nav-page:focus-within #dropdown,
#nav-page #dropdown:hover {
  display: block;
}

#nav-page.closing #dropdown {
  display: none;
}

#nav-page #dropdown > a:hover {
  background-color: rgba(31, 42, 68, 0.08);
}

/* Main content with two-column layout */
main {
  padding-left: 5px;
  padding-right: 5px;
  flex: 1;
  margin: 0 20% 0 20%;
  border-left: solid 0.5px rgba(0, 0, 0, 0.2);
  border-right: solid 0.5px rgba(0, 0, 0, 0.2);
  background-color: var(--background-main1);
}

/* Footer */
footer {
  background-color: #f5f5f5;
  padding: 2rem;
  border-top: solid 0.5px rgba(0, 0, 0, 0.2);
  margin-top: auto;
}

/* Main content (paragraphs and headings) */
main>p {
  padding: 0 20px 0 20px;
  position: relative;
  /* Explicit line-height, so that we can adjust content to be
       "exactly one line higher" than it would be otherwise. */
  line-height: 1.5rem;
  text-align: justify;
  margin: 0;
}

/*################### marginal notes and styles ###############################*/

/* Notes container */
.tei-pb{
  display: block;
  margin: 25px 0 0 2px;
}

/*no text-decoration for the links*/
a:link {
  text-decoration: none;
  color: black;
}

/*right margin notes*/
main>p>span.tei-milestone[data-unit="note"]{
  float: right;
  position: relative;
  margin: 0px;
  width: 30%;
  overflow-wrap: break-word;
  height: fit-content;
  z-index: 999;
}


/*vertical lines*/
span.tei-note.vertical.line {
  display: block;
  box-sizing: border-box;
  float: right;
  position: relative;
  width: 100%;
  border-left: 2px solid black;
  top: 0;
  min-width: 1px;
  padding-left: 10px;
}

/*vertical lines in Schiller's hand*/
span.tei-note.vertical.line[data-hand="#FS1"] {
  border-color: var(--fs1);
}
span.tei-note.vertical.line[data-hand="#FS2"] {
  border-color: var(--fs2);
}
span.tei-note.vertical.line[data-hand="#FS3"] {
  border-color: var(--fs3);
}

/*inline standoff-comments when expanded*/
.editorial-text.expanded {
  display: block;
  line-height:normal;
  font-size: 0.8em;
  text-align: left;
}

/*this is an experimental decl for styling the FS1 hand (when the editorial text is expanded)*/
span[data-hand="#FS1"] span[data-type="editorial"] {
  display: block;
  border: solid 0.5px rgba(0,0,0,0.2);
  padding-left: 8px;
  padding-right: 8px;
  padding-bottom: 5px;
  padding-top: 5px;
  background-color: var(--fs1);
  color: black;
  border-radius: 10px;
  -webkit-box-shadow: 0px 10px 11px -7px rgba(0,0,0,0.5), 5px 5px 15px 5px rgba(0,0,0,0);
  box-shadow: 0px 10px 11px -7px rgba(0,0,0,0.5), 5px 5px 15px 5px rgba(0,0,0,0);
}

/* Headings */
h1 {
  margin-top: 40px;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}


h2 {
  margin-top: 15px;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-left: 15px;
  text-align: center;
}

h3, h4, h5 {
  margin-top: 15px;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-left: 15px;
}



/*################ line numbers, fs-color, font-weights, hovers and styles #######################*/

/*lb-number if I use js
.lb-number { 
margin-left: .25rem; 
color:#666; 
font-size:.85em; 
}
*/

/* styling of line numbers if I use css (current solution)*/
span.tei-lb[data-n]::after {
  content: attr(data-n);
  margin-left: 0.25rem;
  margin-right: 0.25rem;
  color: #666;
  font-size:10px;
}

/*set the color according to schiller's hand*/
span.tei-note[data-hand="#FS1"] {
  color: var(--fs1);
}
span.tei-note[data-hand="#FS2"] {
  color: var(--fs2);
}
span.tei-note[data-hand="#FS3"] {
  color: var(--fs3);
}


/* Highlighted text */
.tei-hi.aq {
  font-family: sans-serif;
}

/*headings = gesperrt*/
.tei-hi.g{
  letter-spacing: 0.5rem;
}

/* bigger text in main, indent*/
.tei-hi.ls {
  font-size: 1.17rem;
  font-style: normal;
}

.tei-hi.b {
  font-weight: bold;
}

/*initial letter is bigger than the rest of the text*/
.tei-hi.in {
  font-size: 2rem;
  font-style: normal;
}

.tei-hi.u {
  text-decoration: underline;
}

.tei-hi.u2 {
  text-decoration: underline double;
}

/* Hover box for corrections and sic */
.tei-corr, .tei-sic {
  color: #DC111E;
  position: relative;
  cursor: pointer;
}

.tei-hover-box {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fffbe6;
  color: #333;
  font-weight: bold;
  border: 1px solid #bfa76f;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.9em;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-top: 2px;
}

.tei-corr:hover .tei-hover-box,
.tei-sic:hover .tei-hover-box {
  display: block;
}

/* #################### Footer styles ####################### */
.site-footer {
  background-color: #f5f5f5;
  padding: 1rem 2rem;
  border-top: solid 0.5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logos {
  display: flex;
  gap: 8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: 25px;
}

.footer-logos img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.95rem;
  color: #333;
}

.impressum-link {
  color: inherit;
  text-decoration: underline;
}


/* #######################  Metamark styling *) #############################*/
.tei-metamark {
  display: inline-block;
}

/* Indent metamark inside footnote notes */
.tei-note[data-type="fn"]{
  font-size: 0.8em;
  display: block;
  margin-left: 1.5rem;
  margin-top: 10px;
  margin-bottom: 0.2rem;
}

/* get rid of the line feed caused by lb*/
.tei-note[data-type="fn"] .tei-metamark {
  display: inline;
  vertical-align: baseline;
}


.tei-note[data-type="fn"] .tei-lb {
  display: inline;
  margin: 0;
  padding: 0;
}


/*##################### Landing page grid and boxes ###########################*/
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 5rem auto;
  padding: 0 1rem;
}

.landing-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--background-main1, #F1EBDD);
  border: solid 2px var(--background-nav1);
  border-radius: 1rem;
  box-shadow: 0 2px 8px var(--background-nav1);
  padding: 5rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.landing-box:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 24px var(--background-nav1);
  border-color: var(--background-nav1);
}

.landing-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: black;
  font-size: 1.4rem;
}
.landing-box p {
  margin: 0;
  font-size: 1rem;
}


/*########### button up styling ##############*/
#button-up {
  position: fixed;
  right: 2rem;
  bottom: 6rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 3rem;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0);
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.25s ease;
  z-index: 999;
}

#button-up::before {
  content: '↑';
  display: inline-block;
}

#button-up.show {
  opacity: 1;
  visibility: visible;
}

#button-up:hover {
  background: rgba(0, 0, 0, 0.85);
}




/*################# Table styling for chapter 9 #############################*/
table {
  margin: 1rem 0;
  text-align: left;
}

table tr:first-child{
  font-size: 1.2rem;
}

table td {
  padding: 0.5rem 1rem;
}

/*######################### media screen < 850px ################################*/
@media (min-width: 850px) and (max-width: 1150px) {
  main {
    margin: 0 10% 0 10%;
  }
  main>p>span.tei-milestone[data-unit="note"]{
    width: 20%;
  }
  .navHeaderTitle {
    font-size: clamp(0.95rem, 2vw + 0.35rem, 1.4rem);
    width: min(90vw, 45%);
    left: 50%;
    padding-left: 0.2rem;
    margin-left: 0;
  }

}


/*######################### media screen < 600px ################################*/
@media (max-width: 850px) {
  .site-footer {
    padding: 1rem;
  }
  .footer-logos img {
    height: 27px;
  }
  .footer-meta {
    width: 100%;
    justify-content: flex-start;
  }
  main {
    margin: 0 1rem 0 1rem;
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8rem;
  }
  main>p>span.tei-milestone[data-unit="note"]{
    width: 20%;
  }
  .navHeaderTitle {
    font-size: clamp(0.85rem, 1.8vw + 0.25rem, 1rem);
    width: min(92vw, 48%);
    left: 50%;
    padding-left: 0.2rem;
    margin-left: 0;
  }

  .landing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  table tr:first-child{
  font-size: 1rem;
  }

  #button-up {
    display: none;  
  }  
}




