/*  (c) by www.wyss4web.ch
    stahelin.ch – Theme (stahelin-v1-1.css) inkl. der früheren Inline-Styles
    (Seitennavigation, Startseiten-Video, Galerie-Vergrösserung), damit eine strikte CSP möglich ist. */

:root {
    --text-base: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    --text-size-xs: 12px;
    --text-size-sm: 16px;
    --text-size-base: 18px;
    --text-nav-base: 20px;

    --text-color-base: #1b1b1b;
    --text-color-header: #1b1b1b;
    --text-color-navigation: #535456;
    --text-color-content: #1b1b1b;
    --text-color-footer: #ffffff;
    --text-color-footer-socialmedia: #010000;

    --bg-color-base: #ffffff;
    --bg-color-header: #ffffff;
    --bg-color-navigation: #ffffff;
    --bg-color-content: #ffffff;
    --bg-color-subcontent: #F5F3F6;
    --bg-color-footer: #85014d;
    --bg-color-footer-light: hsl(327deg 63% 30% / 10%);

    --4px: 4px;
    --8px: 8px;
    --16px: 16px;
    --32px: 32px;
    --40px: 40px;
    --64px: 64px;
}

/* ---------------- CSS RESET ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }

body {
    margin: 0;
    padding: 0;
    color: var(--text-color-base);
    background-color: var(--bg-color-base);
    text-align: center;
    font-family: var(--text-base);
    font-size: var(--text-size-base);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

img, picture, video, canvas, svg { max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
strong { font-weight: 500; }

/* ---------------- GENERIC STYLES ---------------- */
h1 { font-size: 2rem; font-weight: 400; padding: var(--4px) 0 var(--4px) 0; }
h2 { font-size: 1.3rem; font-weight: 500; padding: var(--16px) 0 var(--8px) 0; }
h3 { font-size: 1.1rem; font-weight: 500; padding: 0; }  /* bisher "var(--2px)" (undefiniert) -> wirkte als 0 */

ul { list-style-type: square; }
li { padding-top: var(--8px); }

a {
    position: relative;
    text-decoration: none;
    display: inline-block;
    color: black;
    padding: 0 3px;
    transition: color ease 0.3s;
}

a::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 0.5px;
    left: 0;
    bottom: 0;
    background-color: var(--bg-color-footer);
    transition: all ease 0.4s;
    border-radius: var(--4px);
}

a:hover { color: white; }
a:hover::after { height: 100%; }

.a-footer { text-decoration: none; color: white; padding: 0; }
.a-footer:hover { border-bottom: 1px dotted white; }
.a-footer::after { height: 0; }
.a-footer:hover::after { height: 0; }

hr { height: 0.5px; color: var(--bg-color-footer); }

.clear { clear: both; }
.text-bold { font-weight: 600; }
.font-xs { font-size: var(--text-size-xs); }
.font-sm { font-size: var(--text-size-sm); }
.font-base { font-size: var(--text-size-base); }

.pb-xs { padding-bottom: var(--4px); }
.pb-sm { padding-bottom: var(--8px); }
.pb-md { padding-bottom: var(--16px); }
.pb-lg { padding-bottom: var(--32px); }
.pb-xl { padding-bottom: var(--64px); }
.pt-xs { padding-top: var(--4px); }
.pt-sm { padding-top: var(--8px); }
.pt-md { padding-top: var(--16px); }
.pt-lg { padding-top: var(--32px); }
.pt-xl { padding-top: var(--64px); }
.pl-xs { padding-left: var(--4px); }
.pl-sm { padding-left: var(--8px); }
.pl-md { padding-left: var(--16px); }
.pl-lg { padding-left: var(--32px); }
.pl-xl { padding-left: var(--64px); }
.pr-xs { padding-right: var(--4px); }
.pr-sm { padding-right: var(--8px); }
.pr-md { padding-right: var(--16px); }
.pr-lg { padding-right: var(--32px); }
.pr-xl { padding-right: var(--64px); }
.mb-sm { margin-bottom: var(--8px); }
.mb-md { margin-bottom: var(--16px); }
.mt-md { margin-top: var(--16px); }
.mr-sm { margin-right: var(--8px); }

.text-left { text-align: left; }
.text-center { text-align: center; }

.border-radius-md { border-radius: var(--4px); }
.border-radius-lg { border-radius: var(--8px); }
.border-sm { border: 1px solid var(--bg-color-footer); }

/* neu (statt Inline-Styles) */
.d-ib { display: inline-block; }
.d-block { display: block; }
.va-m { vertical-align: middle; }
.pt-25 { padding-top: 25px; }
.mt-25 { margin-top: 25px; }
.radius-10 { border-radius: 10px; }
.w-100px { width: 100px; }
.addr { font-style: italic; }

/* Vimeo-Video im 16:9-Format */
.video-16x9 { padding: 56.25% 0 0 0; position: relative; }
.video-16x9 iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0; border-radius: 5px;
}

/* ---------------- LAYOUT ---------------- */
article {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color-header);
    z-index: 10000;
}

.header-content {
    max-width: 1260px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 220px;
}

main {
    margin: 0 auto;
    width: 100%;
    max-width: 1260px;
    text-align: left;
    padding: var(--64px);
}

footer {
    color: var(--text-color-footer);
    background-color: var(--bg-color-footer);
}

.footer-content {
    display: grid;
    grid-template-columns: calc(33.3% - 50px) calc(33.3% - 50px) calc(33.3% - 50px) 150px;
    text-align: left;
    margin: 0 auto;
    max-width: 1260px;
    padding-left: var(--64px);
    padding-right: var(--64px);
}

.footer-media {
    margin: 0 auto;
    max-width: 1260px;
    padding-left: var(--64px);
    padding-right: var(--64px);
    color: var(--text-color-footer-socialmedia);
}

.footer-a { border-bottom: 1px solid var(--text-color-footer-socialmedia); }
.social-link::after { height: 0; }

/* ---------------- CONTENT ---------------- */
.home-topic--container { background-color: var(--bg-color-subcontent); }

.home-topic--buttons {
    margin: 0 auto;
    max-width: 1260px;
    padding: var(--64px);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--64px);
}

.home-topic--button { position: relative; }

.home-topic--button-overlay {
    position: absolute;
    bottom: 0;
    left: var(--4px);
    right: 0;
    height: 15%;
    width: calc(100% - var(--8px));
    opacity: 0.8;
    transition: .5s ease;
    background-color: hsl(0deg 0% 15% / 90%);
    color: var(--text-color-footer);
}

.home-topic--button:hover .home-topic--button-overlay {
    opacity: 1;
    height: 100%;
    cursor: pointer;
    background-color: hsl(0deg 0% 15% / 60%);
}

.home-topic--button-text {
    font-size: var(--text-size-sm);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.home-topic--button:hover .home-topic--button-text { font-size: var(--text-nav-base); }
.home-topic--button > a { color: var(--text-color-base); }

.home-link > a::after,
.home-topic--button > a::after { height: 0; }

.col3-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--32px);
}

.publications {
    display: grid;
    grid-template-columns: 150px minmax(800px, auto);
    gap: var(--32px);
}

.milestones {
    display: grid;
    grid-template-columns: minmax(800px, 1fr);
    gap: var(--32px);
}

.education-card,
.gallery-card {
    float: left;
    width: calc(100px + var(--32px));
    text-align: center;
}

.education-card:hover,
.gallery-card:hover {
    background-color: var(--bg-color-footer-light);
    border-radius: var(--4px);
    cursor: pointer;
}

.education-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-size-xs);
    height: var(--32px);
}

.gallery-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-size-sm);
    height: var(--32px);
}

.pager { font-size: var(--text-size-sm); }
.pager-active { font-size: var(--text-size-sm); background-color: var(--bg-color-footer-light); }

/* Häufige Fragen */
.faq-collapsible {
    background-color: var(--bg-color-footer);
    color: white;
    cursor: pointer;
    padding: 18px 50px 18px 18px;
    width: 100%;
    text-align: left;
    outline: none;
    border: solid 1px var(--bg-color-footer);
    border-bottom: 1px solid #ffffff47;
}

.faq-collapsible:focus-visible { outline: 2px solid #C791AB; outline-offset: -4px; }

.faq > div:first-child > .faq-collapsible { border-radius: var(--8px) var(--8px) 0 0; }
.faq > div:last-child > .faq-collapsible { border-radius: 0 0 var(--8px) var(--8px); }

.faq-collapsible::after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    right: -35px;
    position: relative;
    top: 0;
}

.faq-active::after { content: "\2212"; }

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border: solid 1px var(--bg-color-footer);
    padding: 0 16px;
}

.faq-content.is-open { padding: 16px; }

/* Grossansicht (Galerie, Weiterbildung) */
.zoomable { cursor: zoom-in; }

.modal {
    display: none;
    position: fixed;
    z-index: 100000;
    padding-top: 70px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal.is-open { display: block; }

.modal-content {
    margin: auto;
    display: block;
    max-height: 90vh;
    width: auto;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #bbb;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    background: none;
    border: 0;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #f1f1f1;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .modal-content { height: auto; width: 90vw; }
    .close { top: 0; }
}

/* ---------------- Startseite: Video ---------------- */
.header--media-image { position: relative; }
.header--media-image video { width: 100vw; height: auto; }

.header--media-button {
    position: absolute;
    right: var(--64px);
    bottom: var(--64px);
    text-decoration: none;
    color: #fff;
    z-index: 100;
    padding: var(--16px) var(--32px);
    text-align: center;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #c1bcd887;
}

.header--media-button-text {
    position: relative;
    z-index: 50;
    padding-bottom: 1px;
    padding-right: 3px;
}

.first-btn { bottom: 220px; }
.second-btn { bottom: 140px; }

/* ---------------- Navigation ---------------- */
/* https://moderncss.dev/css-only-accessible-dropdown-navigation-menu/ */
nav {
    padding: 0 0.7rem;
    position: sticky;
    top: 0;
    display: grid;
    place-items: center;
    z-index: 1000;
    border-bottom: 1px solid #e2e2e2;
}

nav > ul { grid-auto-flow: column; }
nav > ul > li { margin: 10px 2rem; }

nav > ul > li a,
nav > ul > li .dropdown__title {
    text-decoration: none;
    text-align: left;
    display: inline-block;
    color: #545454;
    border-top: 3px solid transparent;
}

nav > ul > li a:focus,
nav > ul > li .dropdown__title:focus { outline: none; }

nav > ul > li > a:hover,
nav > ul > li > a:focus,
nav > ul > li .dropdown__title:hover,
nav > ul > li .dropdown__title:focus {
    border-top-color: #C791AB;
    color: #545454;
    background-color: transparent;
}

nav ul { list-style: none; margin: 0; padding: 0; display: grid; }
nav ul li { padding: 0; text-indent: 0; }
nav ul li ul { list-style-type: none; }

.nav-link { background-color: transparent; font-size: var(--text-nav-base); }

.dropdown { position: relative; }

.dropdown .dropdown__title {
    display: inline-flex;
    align-items: center;
    font-size: var(--text-nav-base);
    cursor: default;
}

.dropdown .dropdown__title::after {
    content: "";
    border: 0.35rem solid transparent;
    border-top-color: #e9bdba;
    margin-left: 0.25em;
    transform: translateY(0.15em);
}

.dropdown .dropdown__menu {
    position: absolute;
    min-width: 16vw;
    left: 50%;
    top: calc(100% + 16px);
    transition: 280ms all 120ms ease-out;
    transform: rotateX(-90deg) translateX(-50%);
    transform-origin: top center;
    opacity: 0.3;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.dropdown .dropdown__menu a {
    color: hsla(0, 0%, 44%, 1);
    display: block;
    padding: 0.4em 1.2em;
    opacity: 0;
    transition: 280ms all 120ms ease-out;
    white-space: nowrap;
}

.dropdown .dropdown__menu a:hover { background-color: var(--bg-color-footer-light); }
.dropdown .dropdown__menu a:focus { outline: none; }

.dropdown::after {
    content: "";
    border: 0.5rem solid transparent;
    border-bottom-color: #fff;
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    transition: 280ms all 120ms ease-out;
    opacity: 0;
    will-change: opacity;
}

.dropdown:hover .dropdown__title,
.dropdown:focus-within .dropdown__title,
.dropdown.is-open .dropdown__title { border-top-color: #C791AB; }

.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu,
.dropdown.is-open .dropdown__menu {
    opacity: 1;
    transform: rotateX(0) translateX(-50%);
}

.dropdown:hover .dropdown__menu a,
.dropdown:focus-within .dropdown__menu a,
.dropdown.is-open .dropdown__menu a { opacity: 1; }

.dropdown:hover::after,
.dropdown:focus-within::after,
.dropdown.is-open::after { opacity: 1; }

a.dropdown__item::after,
a.nav-link::after { height: 0; }

/* Mobile Seitennavigation */
.sidenav {
    height: 100%;
    width: 350px;
    max-width: 100vw;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: -350px;
    background-color: #F5F3F6;
    overflow-x: hidden;
    padding-top: 30px;
    padding-bottom: 30px;
    transition: 0.5s ease-out;
    border-right: 1px solid #b3b3b3;
    display: block;
}

.sidenav.is-open { left: 0; }

.sidenav a {
    padding: 6px 8px 6px 32px;
    text-decoration: none;
    font-size: 20px;
    color: #545454;
    display: block;
    transition: 0.3s;
    background: transparent;
    text-align: left;
}

.sidenav .link-mobile {
    padding: 6px 8px 6px 60px;
    font-size: 16px;
}

.sidenav a:hover { color: #f1f1f1; }
.sidenav a::after { height: 0; }

.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

.hamburger-cnt {
    display: block;
    position: absolute;
    right: var(--16px);
    top: var(--16px);
    border: 1px solid #EDE7EB;
    border-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
}

.top-nav { display: none; }

.hamburger::before {
    content: '\2630';
    font-size: 1.8rem;
    color: gray;
}

@media screen and (max-height: 450px) {
    .sidenav { padding-top: 15px; }
    .sidenav a { font-size: 18px; }
}

@media only screen and (min-width: 768px) {
    .sidenav { display: none; }
    .hamburger-cnt { display: none; }
    .top-nav { display: grid; top: 0; position: sticky; }
}

/* ---------------- DEVICE SETTINGS ---------------- */
@media screen and (max-width: 767px) {
    :root {
        --text-size-xs: 12px;
        --text-size-sm: 14px;
        --text-size-base: 16px;
        --text-nav-base: 18px;

        --4px: 2px;
        --8px: 4px;
        --16px: 12px;
        --32px: 16px;
        --40px: 22px;
        --64px: 28px;
    }

    h1 { line-height: 1.3; font-size: 1.6rem; }

    main { padding: var(--64px) var(--40px) var(--40px) var(--40px); }

    .header-content { grid-template-columns: auto 120px; font-size: 0.9rem; }

    .publications,
    .col3-container,
    .milestones { grid-template-columns: 1fr; }

    .footer-content { grid-template-columns: 1fr; }

    .footer-media {
        grid-template-columns: 1fr;
        text-align: center;
        padding-left: 20px;
        padding-right: 20px;
    }

    .home-topic--buttons { grid-template-columns: 1fr 1fr; gap: var(--32px); }

    .gallery-card,
    .education-card { width: auto; }

    .education-text,
    .gallery-text { height: var(--40px); }

    .header--media { margin-top: 50px; }

    .header--media-button {
        font-size: 16px;
        padding: var(--8px) var(--16px);
        background-color: #976071cf;
        right: var(--16px);
    }

    .first-btn { right: 140px; }
    .first-btn, .second-btn { bottom: 10px; }
}
