/* von Salis – Basis: Schrift, Variablen, Raster, Button, Kopf- und Fusszeile.
   Auf jeder Seite geladen. webapp/VonSalis.Web/wwwroot/css/basic.css ist eine Kopie dieser Datei. */

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/playfair-display-v30-latin-regular.woff2') format('woff2'),
         url('fonts/playfair-display-v30-latin-regular.woff') format('woff');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/playfair-display-v30-latin-italic.woff2') format('woff2'),
         url('fonts/playfair-display-v30-latin-italic.woff') format('woff');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/playfair-display-v30-latin-700.woff2') format('woff2'),
         url('fonts/playfair-display-v30-latin-700.woff') format('woff');
}

@font-face {
    font-family: 'Playfair Display SC';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/playfair-display-sc-v15-latin-regular.woff2') format('woff2'),
         url('fonts/playfair-display-sc-v15-latin-regular.woff') format('woff');
}


/* ---------- Variablen ---------- */

:root {
    --black: black;
    --white: white;
    --gray: gray;          /* Hover */
    --muted: #595959;      /* Hinweistexte */
    --error: #b00020;
    --border-width: 2px;
    --border: var(--border-width) solid var(--black);
    --gap: 20px;
    --focus-ring: 0 0 0 3px rgb(0 0 0 / 25%);
}


/* ---------- Grundlage ---------- */

/* 1rem ist die Textgrösse der Seite. Jedes Element startet bei 1rem und normaler Stärke;
   Abweichungen werden ausdrücklich gesetzt. */
html {
    font-size: 25px;
    scroll-behavior: smooth;
}

* {
    font-size: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    box-sizing: border-box;
    border-style: none;
    margin: 0;
    padding: 0;
}

h1 {
    font-family: 'Playfair Display SC', Georgia, serif;
    font-size: 4rem;
    text-align: center;
    margin-top: 2rem;
    line-break: loose;
}

h2 {
    font-weight: 700;
    font-size: 1.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    height: 100%;
}

b, strong {
    font-weight: 700;
}

a {
    text-align: center;
    color: var(--black);
    text-decoration: none;
    transition: all .4s ease-in-out;
}

a:hover {
    color: var(--gray);
    font-size: 1.01em;
    text-decoration: underline;
    transition: all .1s ease-in-out !important;
}

/* Links im Fliesstext sind sonst nicht vom Text zu unterscheiden. */
.textContainer a {
    font-weight: 700;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ---------- Raster: 10 Spalten, Inhalt in Spalte 2 bis 9 ---------- */

.gridContainer,
.BasicGridContainer,
.NavGridContainer {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: var(--gap);
    margin: var(--gap);
}

.gridContainer,
.BasicGridContainer {
    min-height: 100vh;
}

/* Feste Mindestzeilen; die Zeilenzahl überschreibt das CSS der jeweiligen Seite. */
.gridContainer {
    grid-template-rows: repeat(6, minmax(3rem, auto));
}

.BasicGridContainer,
.NavGridContainer {
    grid-auto-rows: minmax(3rem, auto);
}

/* Die IDs sind nur noch für ältere Templates da; neu die Klassen verwenden. */
.full, #full {
    grid-column: 2 / 10;
}

.half_Left, #half_Left {
    grid-column: 2 / 6;
}

.half_Right, #half_Right {
    grid-column: 6 / 10;
}

/* Leere Rasterzeile als Abstand */
.emptyContainer {
    height: 100%;
}


/* ---------- Button ---------- */

.button {
    background-color: var(--black);
    text-align: center;
    min-height: 3rem;
    transition: all .4s ease-in-out;
}

.button a {
    display: block;
    width: 100%;
    height: 100%;
}

.button span {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 100%;
    height: 100%;
    color: var(--white);
}

.button:hover {
    background-color: transparent;
    border-style: solid;
    border-width: var(--border-width);
    color: var(--black);
    transition: all .1s ease-in-out !important;
}

.button:hover * {
    color: var(--black);
    text-decoration: underline;
    transition: all .1s ease-in-out !important;
}

/* Aktuelle Seite im Menü */
.buttonActive {
    background-color: var(--white);
    border: var(--border);
}

.buttonActive span {
    color: var(--black);
}

.buttonActive:hover {
    border-color: var(--gray);
}

.buttonActive:hover * {
    color: var(--gray);
}


/* ---------- Suchfeld ---------- */

.searchInput, #myInput {
    grid-column: 2 / 10;
    border: var(--border);
    border-radius: 0;
    padding-left: 20px;
}


/* ---------- Kopfzeile ---------- */

.navBar {
    height: 100%;
}

.navEmpty {
    grid-column: 1 / 2;
}

.navIconContainer {
    grid-column: 9 / 10;
    display: flex;
    justify-content: center;
}

.navIcon {
    height: 5rem;
    object-fit: contain;
}


/* ---------- Fusszeile ---------- */

.footer {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: minmax(3rem, auto);
    grid-auto-flow: column;
    position: relative;
    height: 5rem;
    overflow: hidden;
    background-color: var(--black);
}

.wappenIconContainer {
    padding: 5% 0;
    height: 100%;
}

.wappenIcon {
    display: block;
    width: auto;
    height: 100%;
    filter: invert(100%);
}

.wappenBaum {
    height: 74%;
    transform: translate(0, 20%);
}

.wappenJungHelm {
    height: 109%;
    transform: translate(0, -3%);
}

.footerLinks {
    grid-column: 5 / 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.footerLinks a,
.footerLinks span {
    color: var(--white);
}


/* ---------- Tablet ---------- */

@media only screen and (max-width: 1000px) {
    html {
        font-size: 30px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .button {
        min-height: 0.5rem;
    }

    .footer {
        height: 3rem;
    }

    .footer img {
        display: none;
    }

    .footer a,
    .footer span {
        font-size: 0.75rem;
    }
}


/* ---------- Mobil ---------- */

@media only screen and (max-width: 800px) {
    html {
        font-size: 22px;
    }

    .navIconContainer img {
        display: none;
    }

    .half_Left, #half_Left,
    .half_Right, #half_Right {
        grid-column: 2 / 10;
    }
}
