:root {
    --background-color-light: hsl(0, 0%, 100%);
    --background-color-dark: hsl(0, 0%, 0%);
    --ci-accent: var(--yellow);
    --yellow:hsl(54, 100%, 50%);
    
    /*--yelllow:hsl(51, 100%, 50%);*/
    
    --schriftschwarz: hsl(0, 0%, 13%);
    --schriftweiss: hsl(0, 0%, 100%);
    --reinschwarz: hsl(0, 0%, 0%);
    --popover-background: hsla(0, 0%, 100%, .9);
    --popover-schrift: var(--reinschwarz);
}
body {
    margin: 0;
    font-family: sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: light-dark(var(--background-color-light) var(--background-color-dark));
}
*,::before,::after {
    box-sizing: border-box;
}
html {
    line-height: 1.4;
    color-scheme: light dark;
}
.skip-link {
    background-color: light-dark(hsl(0, 0%, 0%) hsl(0, 0, 100%));
    color: light-dark(hsl(0, 0%, 100%) hsl(0, 0, 0%));
    position: absolute;
    padding: 0.2em;
    display: block;
    z-index: 10;
}
.skip-link:not(:focus):not(:active) {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    width: 1px;
}
nav {
    display: flex;
    position: absolute;
    top: 50px;
    right: 50px;
    z-index: 20;
}
/*==== popover nav =====*/
button {
    font-size: 100%;
    padding: 0.75rem;
    background: var(--background-color-light);
    transition-duration: 0.5s;
    border: 4px solid var(--yellow);
    color: var(--popover-schrift);
    font-weight: bold;
    border-radius: 1rem;
}

[popover] {
    background: var(--popover-background);
    color: var(--popover-schrift);
    font-weight: 400;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    line-height: 1.8;
    top: 2rem;
    margin: 0 auto;
    font-size: 1.5rem;
    border-color: var(--ci-accent);
}

/* Animating the popover in */

/*   IS-OPEN STATE   */
[popover]:popover-open {
    translate: 0 0;
}

/*   EXIT STATE   */
[popover] {
    transition: translate 0.7s ease-out, display 0.7s ease-out allow-discrete,
        overlay 0.7s ease-out allow-discrete;
    translate: 0 -22rem;
}

/*   0. BEFORE-OPEN STATE   */
@starting-style {
    [popover]:popover-open {
        translate: 0 -22rem;
    }
}
[popover] a:any-link {
    color: var(--popover-schrift);
    text-decoration: underline;
}
[popover] ul {
    list-style-type: none;
    padding-left: 0;
    text-align: center;
}
[popover] ul li:last-child {
    display: none;
}
._index {
    position: relative;
}
._index h1, ._activities h1, ._project-team h1, ._publications h1, ._impressum h1 {
    font-size: calc(5.5vw + 1.8rem);
    font-weight: 500;
    line-height: 1.1;
    color: var(--ci-accent);
    text-align: center;
    max-width: 65ch; 
    position: relative;
}
.h1_underline {
    text-decoration: underline;
    text-decoration-thickness: .1em;
}
p, ul {
    font-size: 1.375rem;
}
p {
    line-height: 1.5;
}
._index p, ._index h2 {
    margin: 1lh 0;
}
.container {
    position: relative;
}
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center; 
}
.hero::before {
    content: "";  
    background-size: cover;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    filter: brightness(0.8);
}
._index .hero::before {
    background-image: url('../assets/ministerium-sw_1600.webp');
}
._activities .hero::before {
    background-image: url('../assets/activities_ostrava-2500-1200.webp');
    filter: brightness(0.98);
}
._project-team .hero::before {
    background-image: url('../assets/namensschilder-1600.webp');
}
._publications .hero::before {
    background-image: url('../assets/taking_photo-2000.webp');
}
._impressum .hero::before {
    background-image: url('../assets/justizpalast_dachstuhlrekonstruktion_gerlach-2195.webp');
    filter: brightness(1);
}
.hero-image {
    position: relative;
    height: 75vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
}
._activities article:not(:first-of-type), ._publications article:not(:first-of-type) {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;

}
.text, footer > .section, .section.address {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
}
._activities .section, ._publications .section, ._project-team .section, ._impressum .section {
    width: 90%;
}
.text > p:last-of-type {
    margin-bottom: 6rem;
}
.lead {
    font-size: 2.5rem;
    font-weight: 400;
    position: relative;
    line-height: 1.4;
}

nav li, .footer, .team {
    list-style-type: none;
}
.section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.article-text {
    display: flex;
    flex-direction: column;
}
picture, .article-img {
    width: 100%;
    max-width: 1000px;
}
article.activity {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "article-text" "article-img";
    column-gap: 2.5rem;
    row-gap: 1.5rem;
    background-color: light-dark(var(--background-color-light) var(--background-color-dark));
    margin-bottom: 6rem;
}
.article {
    grid-auto-rows: auto;
    box-shadow: 2px 2px 4px 0 #ccc;
}
.article-text h1 {
    font-size: calc(1vw + 1.8rem);
    font-weight: 500;
    line-height: 1.1;
    color: light-dark(var(--schriftschwarz) var(--schriftweiss));
    text-align: left;
    max-width: 65ch;
    position: relative;
    margin-bottom: 0;
    margin-top: 0;
    text-decoration: underline;
    text-decoration-thickness: 5px;
}
.article-text .lead {
    font-size: 2rem;
    margin-top: 1rem;
    line-height: 1.2;
}
p.date {
    margin-top: 0;
    font-weight: bold;
    margin-bottom: .3rem;
}
p.date ~ p {
    margin-top: 0;
}
.article-text {
    max-width: 100%;
}
footer {
    border-top: 4px solid var(--ci-accent);
    
} 
footer a:any-link, 
._project-team .section a:any-link {
    text-decoration: underline;
    color: light-dark(var(--schriftschwarz) var(--schriftweiss));
}
.contact {
    margin-top: 3rem;
    margin-bottom: 3rem;
}
._project-team .section {
    padding-left: .5rem;
    padding-right: .5rem;
}
._project-team .address b {
    font-size: 1.5rem;
}
[target="_blank"]::after {
    content: " (opens in a new tab)";
    font-size: smaller;
}
._project-team h2 {
    font-size: 1.5rem;
    font-weight: bold;
}
.section.address {
    margin-top: 6rem;
}
.teammembers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
    gap: 3rem;
}
.logofriedhof {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-top: 6rem;
    margin-bottom: 5rem;
}
.linktomap:any-link, .link:any-link {
    color: light-dark(var(--schriftschwarz) var(--schriftweiss));
}
p a:any-link {
    padding-top: .5rem;
    padding-bottom: .5rem;
} 
h2.zwischenueberschrift {
    font-size: calc(2.3vw + 1.8rem);
    font-weight: 500;
    line-height: 1.1;
    color: light-dark(var(--schriftschwarz) var(--schriftweiss));
    text-align: left;
    max-width: 65ch;
    position: relative;
    margin-top: 7rem;
    margin-bottom: 4.5rem;
    text-decoration-thickness: 5px;
}
._impressum .section {
    font-size: 1.375rem;
    line-height: 1.5;
}
.uppercase {
    text-transform: uppercase;
}
ul {
    list-style-type: none;
    padding-left: 0;
}
footer .section p {
    line-height: 1.4;
}
.logo {
    width: 200px;
    height: auto;
    max-width: 100%;
    background-color: #fff;
}
.ihb {
    width: 107px;
    height: 70px;
}
.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
._index a:any-link {
    text-underline-offset: 4px;
}
[popover] a:hover {
    text-decoration-color: var(--yellow);
    text-decoration-thickness: 5px;
}
details>p:last-of-type {
    margin-bottom: 3lh;
}
summary {
    font-size: 1.375rem;
    margin-bottom: 3lh;
    font-weight: bold;

}
.readmore {
    text-decoration: underline;
}
@view-transition {
    navigation: auto;
}

@media (orientation: portrait) {
    .hero {
        height: 50vh;
    }
}
    

@media screen and (min-width:900px) {
    article.activity {
        grid-template-columns: 3fr minmax(450px, 1fr);
        grid-template-areas: "article-text article-img";
    }
}