/* GLOBALS */
:root {
    --font-main: #56585b;
    --contrast: #749513;
    --highlight: #669a30;
    --font-inverse: #fdfeff;
    --bg: #e3ebd7; /* also used as contrast for white bg */
    --bg-transparent: #e3ebd780;
    --bg-contrast: #d6e2c9;
    --content-width: 1000px;
    --gallery-height: 450px;
}

/* GENERAL */

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    background: center url("resources/img/bg.webp");
    background-size: cover;
    background-attachment: fixed;
}

body * {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: var(--font-main);
    display: flex;
    flex-direction: column;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 1000px;
    height: 100vh;
    background-color: var(--bg);
    box-shadow: 0 0 100px darkgreen;
}

@media (max-width: 999px) {
    html {
        font-size: 48px;
    }


    body {
        width: 100vw;
    }
}

h1, script {
    display: none;
}


h2, h3 {
    color: var(--highlight);
    margin-block: 0.25rem 0;
}

strong {
    font-weight: bolder;
}

/* BASE STRUCTURE */

/* header */

header {
    flex-direction: row-reverse;
}

.logo {
    margin-right: 10%;
    width: 30%;
}

@media (max-width: 999px) {
    .logo {
        margin: 0 auto;
        width: 70%;
    }
}

/* navigation bar */

.main-nav {
    font-size: 18px;
    margin: 0;
}

.main-nav *, .competence {
    align-items: center;
    justify-content: center;
}

.main-nav > ul, .footer-columns, .footer-columns > ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.main-nav > ul {
    background-color: var(--highlight);
    min-height: 3rem;
    flex-direction: row;
    box-sizing: border-box;
    border-top: 0.2rem var(--bg-contrast) solid;
}

.main-nav > ul > li {
    height: 100%;
    width: calc(var(--content-width)/5);
}

.main-nav > ul > li:not(:last-of-type), .footer-columns > ul:not(:last-of-type) {
    border-right: 0.1rem var(--bg-contrast) dotted;
}

.main-nav > ul > li > a {
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--font-inverse);
    width: 90%;
}

.main-nav > ul > li > a:hover {
    text-decoration: underline;
}

.nav-highlight {
    background-color: #6B8E23;
}

@media (max-width: 999px) {
    .main-nav > ul {
        flex-direction: column;
        border-top: 0.2rem var(--bg-contrast) solid;
    }

    .main-nav > ul > li {
        width: 100%;
        font-size: 1rem;
        height: 2rem;
    }

    .main-nav > ul > li:not(:last-of-type), .footer-columns > ul:not(:last-of-type) {
        border-right: 0;
        border-bottom: 0.1rem var(--bg-contrast) dotted;
    }
}

/* main content */

main {
    padding: 10px 2vw;
    border: 0.2rem var(--bg-contrast) solid;
    background-color: var(--font-inverse);
    flex-grow: 1;
}

/* footer */

footer {
    background-color: var(--highlight);
}

footer *{
    color: var(--font-inverse);
}

.footer-columns {
    font-size: 0.75rem;
    flex-direction: row;
    min-height: 3em;
}

.footer-columns > ul {
    margin: 1em 1em 0;
    flex-grow: 1;
}

.logo-end {
    align-items: center;
}

.logo-end > img {
    width: 10%;
    padding: 1rem 0;
}

@media(max-width:999px){
    .footer-columns {
        flex-direction: column;
    }
    .footer-columns > ul {
        padding: 1em;
        margin: 0;
    }
    .logo-end > img{
        width: 30%;
    }

}

/* FORMATS */

/* split page */

.split-page, .split-page-reverse {
    flex-grow: 0;
    align-items: flex-start;
    gap: 0.25rem;
}

.split-page {
    flex-direction: row;
}

.split-page-reverse {
    flex-direction: row-reverse;
}

@media (max-width: 999px) {
    .split-page, .split-page-reverse {
        flex-direction: column-reverse;
        gap: 0;
    }
}

/* SITE SPECIFIC */

/* "Willkommen" */

#welcome-address{
    margin-top: 0.75rem;
}

#welcome-logo {
    margin: 0.5rem auto;
    max-width: 50%;
}

/* "Ich biete Ihnen an" & "Ich bin für Sie da" */

.list-img {
    max-width: 350px;
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 10px;
}

.split-page-reverse > .list-img {
    margin-right: 0.5rem;
}

@media (max-width: 999px) {
    .list-img {
        border: 0.2rem solid var(--contrast);
        margin: 0.25rem 0 0;
    }
    .split-page-reverse > .list-img{
        margin-right: 0rem;
    }
}

/* "Über mich" */

.aboutme-text {
    flex-grow: 1;
}

.aboutme-text > h3{
    margin: 0;
}

.aboutme-text > ul{
    margin: 0.25rem 0;
}

img.picture-cv, .list-img {
    border: 0.2rem solid var(--contrast);
}

img.picture-cv {
    object-fit: cover;
    object-position: 0% 20%;
    width: 250px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 999px) {
    .aboutme-text > ul{
        margin: 0.25rem 0;
    }
    
    img.picture-cv {
        margin: 0.25rem auto;
        width: 70%;
        border-width: 0.2rem;
    }
}

/* "Kontakt & Anfahrt" */

#map {
    height: 400px;
}

#map, #alt-map {
    border: 0.2rem solid var(--contrast);
    border-radius: 0.5rem;
    margin: 0.25rem 0 1rem;
    background-color: #e0dfdf;
}

#alt-map {
    display: none;
    object-fit: none;
    box-sizing: border-box;
}


.leaflet-control-attribution, .leaflet-control-attribution *{
    display: inline;
}

.way-descriptions {
    flex-direction: row;
    gap: 4%;
}

.way-descriptions > *{
    flex-direction: column;
}

.transport-stop {
    display: inline-block;
    margin: 0.25rem 0;
    padding: 0.25rem;
    border-radius: 0.2rem;
    width: 100%;
    background-color: var(--bg);
}

.transport-options {
    display: block;
    padding-left: 0.15rem;
    background-color: RGB(200,200,200);
    border-radius: 0.2rem;
    margin: 0.25rem 0;
}

span.transport-options > span {
    padding: 0 2px;
}

.public-transport, .car {
    min-width: 48%;
}

.transport-stop > h4 {
    font-weight: bold;
    margin-left: 0.25rem;
}

.transport-stop > a {
    display: block;
    text-align: end;
    margin-right: 0.25rem;
}

@media (max-width: 999px) {
    #map {
        display: none;
    }
    
    #alt-map{
        display: flex;
    }
    
    .way-descriptions {
        flex-direction: column;
    }
    
    .transport-stop {
        width: unset;
    }
    
    .transport-stop > span.no-break {
        display: block;
    }
    
    span.transport-options > span {
        border: 0;
    }
}



/* gallery */

#gallery {
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    height: var(--gallery-height);
    display: flex;
    flex-direction: row;
}

#gallery-images {
    width: 75%;
    position: relative;
}

#gallery-text-container {
    width: 25%;
    padding: 1rem 5px;
    background: var(--bg);
    z-index: 103;
}

.gallery-image {
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.gallery-border {
    position: absolute;
    border-top: var(--gallery-height) solid var(--bg);
    border-left: 50px solid transparent;
    height: 0;
    width: 0;
    right: 25%;
    z-index: 102;
}

.gallery-border-back{
    position: absolute;
    border-top: var(--gallery-height) solid var(--bg-contrast);
    border-left: 50px solid transparent;
    border-right: 10px solid var(--bg-contrast);
    height: 0;
    width: 5%;
    right: 25%;
    top: 0%;
    bottom: 0%;
    z-index: 101;
}

#gallery-selectors-row {
    position: absolute;
    width: 100%;
    height: 7%;
    bottom: 5%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    z-index: 100;
}

#gallery-selectors {
    box-sizing: border-box;
    background: var(--bg-transparent);
    border-radius: 0.2rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 0.2rem;
    padding: 0 0.5rem;
}

#gallery-selectors > div {
    background: white;
    border-radius: 10px;
    height: 20px;
    aspect-ratio: 1;
    cursor: pointer;
}

#gallery-selectors > div:hover {
    background: grey;
}

@media (max-width: 999px) {
    
    #gallery-selectors, #gallery-selectors-row {
        display: none;
    }
    
    #gallery {
        height: fit-content;
        border-radius: 0.2rem;
        border: 0.2rem solid var(--contrast);
    }
        
    #gallery-images {
        width: 100%;
        aspect-ratio: 14 / 9;
    }
    
    #gallery-text-container {
        display: none;
    }
    
    .gallery-border {
        display: none;
    }
    
    .gallery-border-back {
        display: none;
    }
}

/* gallery animation */

.gallery-image.hidden {
    display: none;
}

.gallery-image.fade-in {
    z-index: 2;
    animation: 1s gallery-fade-in;
}

.gallery-image.fade-out {
    z-index: 1;
}

@keyframes gallery-fade-in {
    0%      {opacity: 0;}
    100%    {opacity: 1;}
}



/* licenses */

#license-grid {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: auto auto auto auto;

}

#license-grid * {
    display: block;
}

.license-heading {
    background: var(--bg);
    font-weight: bolder;
}

@media(max-width: 999px) {
    #license-grid {
        font-size: 0.75rem;
    }
}



/* specific mobile adjustments */

#spaziergang {
    display: none;
}

@media(max-width:999px){
    #behandlung, #spaziergang {
        height: 550px;
        max-width: 100%;
        object-fit: cover;
    }

    #behandlung {
        object-position: 2% 85%;
    }

    #spaziergang {
        display: flex;
        object-position: 45%;
    }

    #treppe {
        display: none;
    }

}


/* helper classes */

.no-break, .no-break > *{
    display: inline;
    white-space: nowrap;
    white-space-collapse: preserve-spaces;
}

.inline, .inline > * {
    display: inline;
}

.no-padding {
    padding: 0;
}

p {
    margin: 0.25rem 0;
}

p.no-break {
    margin-bottom: 0;
}

.pre-line {
    white-space: pre-line;
}

/* anything else */

main > ul {
    list-style-type: circle;
}

.tidy-list > li:first-of-type {
    padding: 0 0 0.5rem;
}

.tidy-list > li:not(:first-of-type) {
    border-top: 0.2rem var(--bg-contrast) dotted;
    padding: 0.5rem 0;
}

.tidy-list > li:last-of-type {
    padding-bottom: 0;
}

.tidy-list {
    margin: 0.5rem 0;
}


