/*
 * Theme Name: fscoli next
 * Theme URI: https://gitlab.cl.uni-heidelberg.de/fachschaft/fscoli-next
 * Description: Ein zeitloses WordPress-Theme für die Fachschaft Computerlinguistik in Heidelberg, gehalten in den Farben rot, grau und schwarz. +++ Detaillierte Angaben zu Lizenz, Änderungen und beitragenden Autoren finden sich in der style.css sowie im beiliegenden README.
 * Tags: custom-header, custom-menu, blog, education, full-width-template
 *
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser
 * Author URI: https://personads.me/
 *
 * Version: 2.10.3-local-cdn
 * Requires PHP: 8.0
 *
 * License: GNU General Public License v3.0
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
 *
 * The "fscoli next" WordPress theme is based on the "Fachschaft Computerlinguistik WordPress Theme", Copyright 2015 personads.
 * "Fachschaft Computerlinguistik WordPress Theme" is distributed under the terms of the GNU GPL and can be obtained at
 * https://gitlab.cl.uni-heidelberg.de/fachschaft/fscoli-next/-/tags/original
 *
 * The "fscoli next" WordPress theme contains modifications made by Jakob Moser (2020--2025), which are listed in more detail in
 * the README.md provided with this theme. "fscoli next" is distributed under the terms of the GNU GPL.
 *
 * This file contains CSS rules adapted from the Stack Overflow answer https://stackoverflow.com/a/52226523/
 * (question title: "Fixed header in CSS Grid") by binaryfunt (https://stackoverflow.com/users/3217306/binaryfunt),
 * licensed under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). The adapted section is marked in the
 * code below with @@@, where an explanation of the changes can also be found.
 */

@import url("./typography.css");

* {
    margin: 0;
    padding: 0;
}

/* ==== Structural elements ==== */
body {
    /* Layout */
    display: grid;
    grid-template-rows: min-content 1fr min-content;
    grid-template-columns: 2fr 8fr;
    min-height: 100vh;

    /* Font and appearance */
    font-size: 17px;
}

body.has-admin-bar {
    min-height: calc(100vh - 32px);
}

main {
    display: grid;
}

/* By default: Let header, main and footer span the entire page */
body > header,
main,
body > footer {
    grid-column-start: 1;
    grid-column-end: 3;
}

/* However, when there is an aside, place the aside in the left column and main in the right column */
body > aside {
    grid-column-start: 1;
    grid-column-end: 2;

    padding: 1em;
    background-color: var(--background-color);
    border-right: 2px solid var(--accent-color);
    box-shadow: 0 0 5px var(--shadow-color);
}

body > aside + main {
    grid-column-start: 2;
    grid-column-end: 3;
}

/* A levitating aside only takes up the height its content needs and has a top margin, which looks less
massive than the classical aside that takes up all the page height */
body > aside.levitating {
    margin-top: 2em;
    height: max-content;
}

/* -- Header (containing the menu), footer (containing copyright info) */
body > header,
body > footer {
    font-family: var(--monospace);
    font-size: var(--monospace-font-size);
}

body > header {
    z-index: 100;
    border-style: solid;
    border-width: 0px 0px 4px 0px;
    border-color: var(--accent-color);
    box-shadow: 0px 0px 15px var(--shadow-color);

    background-color: var(--background-color);
}

/* @@@ The following lines of code are adapted from https://stackoverflow.com/a/52226523/ (license details above). @@@
 *
 * We modified the CSS selector for the header and included another CSS rule in case the
 * admin bar is shown before the header.
 */
body > header {
    position: sticky;
    top: 0;
}

body.has-admin-bar > header {
    top: 32px;
}
/* @@@ End of adapted code @@@ */

body > header::before {
    content: "";
    position: relative;
    float: right;
    top: 100%;
    border-width: 30px 0px 0px 30px;
    border-style: solid;
    border-color: var(--accent-color) transparent;
    z-index: -1;
}

body > header::after {
    content: "";
    display: block;
    position: absolute;
    right: 0px;
    border-width: 26px 0px 0px 26px;
    border-style: solid;
    border-color: var(--background-color) transparent;
    margin-top: -2px;
    z-index: -1;
}

body > header .logo {
    display: inline-block;
    max-width: 350px;
    max-height: 108px;
    background-image: url("img/logo.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000;
    width: 248px;
    height: 77px;
    margin: 8px 0px -5px 10px;
    transition: background-color 0.3s;
    border: none;
}

body > header .logo:hover {
    background-color: var(--accent-color);
}

body > footer {
    background-color: var(--light-gray);
    box-shadow: 0px 0px 10px #8d8d8d inset;
    color: #272727;
    padding: 1em;
}

body > footer .copyright {
    float: right;
}

body > footer a {
    color: #272727;
    border: none;
}

body > aside h2 {
    font-size: 1.1em;
    font-weight: normal;
}

@media (max-width: 705px) {
    body > footer {
        text-align: center;
    }

    body > footer .copyright {
        float: none;
        display: block;
        margin-top: 10px;
    }
}

@media (max-width: 300px) {
    body > header .logo {
        width: 197px;
        height: calc(77px*200/250);
    }
}

@media (max-width: 215px) {
    body > header .logo {
        width: 149px;
        height: calc(77px*150/250);
    }
}

/* -- Navigation bar -- */
header .nav-toggle {
    display: none;
}

header nav {
    display: inline-block;
    position: relative;
    vertical-align: bottom;
    text-transform: lowercase;
    hyphens: auto;
    -webkit-hyphens: auto;
}

header nav li {
    display: inline-block;
    padding: 3px 15px 7px 15px;
    transition: background-color 0.3s;
    border-radius: 5px 5px 0 0;
}

header nav li:hover {
    background-color: rgba(153, 0, 0, 0.1);
}

header nav li a {
    border: none;
    line-height: 100%;
}

header nav li a[href="#"] {
    cursor: default;
}

header nav li > ul {
    display: none;
    position: absolute;
    margin: 7px 0px 0px -15px;
    padding: 0px;
    border-width: 0px 4px 4px 4px;
    border-style: solid;
    border-color: var(--accent-color);
    background-color: var(--background-color);
    box-shadow: 0px 0px 10px var(--menu-shadow-color) inset;
    text-transform: initial;
}

header nav li > ul li {
    display: block;
    margin-left: -5px;
    border-radius: 0px;
}

header nav li:hover > ul {
    display: block;
}

@media (max-width: 615px) {
    body > header {
        padding-top: 5px;
        position: static;
    }

    body > header .logo {
        margin: 0 auto;
        display: block;
    }

    header .nav-toggle {
        display: block;
        padding: 0 15px;
        line-height: 35px;
        border: none;
    }

    header nav ul {
        margin: 0;
        padding: 0;
    }

    header nav li {
        display: block;
        padding: 0 15px;
        line-height: 35px;
    }

    header nav li:hover {
        border-radius: 0;
    }

    header nav li > ul {
        display: block;
        border: none;
        box-shadow: none;
        position: inherit;
        margin: 0;
        padding: 0;
    }

    header nav li > ul li {
        margin-left: 0;
    }

    header nav {
        display: none;
    }

    header nav:target {
        display: block;
    }
}

/* ==== General styles: Articles ==== */
article {
    padding: 2em;
    hyphens: auto;
    -webkit-hyphens: auto;
}

article .content p, article .content blockquote {
    margin: 1em 0;
}

article .content ul, article .content ol {
    margin-top: 1em;
    margin-bottom: 1em;
}

article .content img {
    max-width: 100%;
    height: auto;
}

article footer .date {
    font-size: 0.7em;
    display: block;
}

article footer .different.modified.date {
    font-weight: bold;
}

article .content h1,
article .content h2 {
    margin: 0.25em 0em;
    padding: 0.25em;
    border-style: solid;
    border-color: var(--accent-color);
    border-width: 0px 0px 0px 2px;
}

article > header h1,
article > header h3 a,
.headinglike {
    display: inline-block;
    padding: 0.5em;
    background-color: rgba(0, 0, 0, 0.8);
    border-style: solid;
    border-color: var(--accent-color);
    border-width: 0 0 0 2px;
    box-shadow: 0 0 3px var(--shadow-color);
    text-align: left;
    font-family: var(--monospace);
    font-weight: normal;
    color: #fff;
    margin-bottom: -2.5em;
}

/* ==== Custom styles: Articles on their own page (page.php or single.php) ==== */
article:only-child {
    display: grid;
    grid-template-rows: max-content 1fr max-content;
    overflow-x: auto;
}

article:only-child:not(:has(> header)) {
  grid-template-rows: 1fr max-content;
}

article:only-child > header {
    width: 100%;
    height: 200px;
    margin: -2em 0 0 -2em;
    padding: 2em;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    box-shadow: 0px 0px 15px var(--shadow-color) inset;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    justify-items: left;
    align-items: end;
}

article:only-child > footer {
    margin: 2em -2em -2em -2em;
    padding: 1em;
    background-color: rgba(153, 0, 0, 0.5);
    text-align: right;
    color: #fff;
}

article:only-child .content {
    position: relative;
}

article:only-child header + .content {
    margin-top: 3.5em;
}

article:only-child .content :first-child {
    margin-top: 0;
}

article:only-child .content::after {
    content: "";
    display: block;
    position: absolute;
    right: -2em;
    width: 0;
    height: 0;
    bottom: -62px;
    border-width: 30px 0 0 30px;
    border-style: solid;
    border-color: #fff transparent;
}

/* ==== Custom styles: Landing page ==== */
main.landing > header {
    height: 260px;

    background-image: url("img/header.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    background-color: rgba(0, 0, 0, 0.2);
    background-blend-mode: overlay;

    font-family: var(--monospace);
    color: #fff;
    padding-left: 2em;

    display: grid;
    grid-template-rows: 1fr max-content max-content 1fr;
    grid-template-columns: max-content;
}

main.landing > header h1 {
    font-size: 145%;
    grid-row-start: 2;
}

main.landing > header h2 {
    font-size: 105%;
    opacity: 0.75;
    grid-row-start: 3;
    text-align: right;
    font-weight: normal;
}

main.landing section {
    border-style: solid;
    border-color: var(--accent-color);
    border-width: 1px 0px 0px 0px;
    padding: 2em;
}

main.landing section::before {
    display: block;
    position: absolute;
    left: 50%;
    width: 60px;
    height: 60px;
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(-50%, -40%);
    margin-top: -2em;
    content: "";
}

main.landing section.ticker::before {
    background-image: url("img/ticker.png");
    left: 2em;
}

main.landing section.news::before {
    background-image: url("img/news.png");
}

main.landing section.varia::before {
    background-image: url("img/rocket.png");
}

main.landing section.varia > :first-child {
    margin-top: 1em;
}

main.landing section.varia .seamless {
    margin-bottom: 2.5em;
}

main.landing section.news {
    display: grid;
    grid-template-columns: 75fr 25fr;
    column-gap: 2em;
}

main.landing section.news article {
    padding: 0;
}

main.landing section.news article .content {
    margin-top: 2em;
}

main.landing section.news aside {
    border-style: solid;
    border-color: var(--light-gray);
    border-width: 0px 0px 0px 1px;
}

main.landing section.news aside li {
    list-style: none;
    margin: 0.25em 0;
}

main.landing section.news aside li a {
    margin-bottom: initial !important;
}

main.landing section.news aside .more {
    text-align: right;
}

main.landing section.varia {
    text-align: center;
}

@media(max-width: 515px) {
    main.landing > header {
        padding: 0;
        text-align: center;
        grid-template-columns: 1fr;
    }

    main.landing > header h2 {
        text-align: inherit;
    }
}

/* Responsiveness for news section: Place sidebar below article if screen is to small */
@media (max-width: 570px) {
    main.landing section.news {
        grid-template-columns: 1fr;
    }

    main.landing section.news aside {
        border: none;
        margin-top: 2em;
    }

    main.landing section.news aside ul {
        margin-left: 0;
    }

    main.landing section.news aside .more {
        line-height: 30px;
        text-align: left;
    }
}

/* ==== Custom styles: Post listing (e.g. blog) page ==== */
main.list {
    padding: 0 8%;
}

main.list article {
    margin: 2em 0;
}

main.list article:first-of-type {
    margin-top: 4em;
}

main.list article > header h1 {
    padding: 0;
    position: absolute;
    top: -1em;
}

main.list article > header h1 a {
    display: block;
    color: inherit;
    border: none;
    padding: 0.27em;
}

main.list .content {
    margin-top: 1.5em;
}

main.list footer .date {
    position: absolute;
    top: 0.5em;
    right: 1em;
    font-size: 1em;
    opacity: 0.5;
}

main.list footer .date .label {
    display: none;
}

main.list article .content {
    position: relative;
    z-index: 1;
}

main.list article > header {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-size: 100%;
    background-position-y: center;
}

/* Only apply background-color and blending to headers that have a background-image set, otherwise all posts would have grey background */
main.list article header[style*="background-image"] {
    background-blend-mode: overlay;
    background-color: #e8e8e8;
}

main.list article > header h1 {
    left: 1.1em;
}

.list-meta > h2 {
    margin: 1em 0;
}

.list-meta > h1::before {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0.25em;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    vertical-align: middle;
    background-image: url("img/news.png");
    content: "";
}

.list-meta select {
    margin-left: 2em;
}

.list-meta a.rss {
    display: block;
    border: none;
    font-size: 0.8em;
    color: #8d8d8d;
    text-align: right;
    margin-top: 2em;
}

.list-meta .categories li a, .list-meta select {
    font-size: 0.8em;
}

@media (max-width: 615px) {
    body {
        grid-template-columns: 1fr;
    }
    
    body > header,
    body > aside,
    main,
    body > aside + main,
    body > footer {
        grid-column-start: 1;
        grid-column-end: 2;
    }

    body > aside {
        border: none;
    }

    body > aside.levitating {
        margin-top: 0;
    }
}

/* ### Shared styles: "Speech bubble look" for list articles and blockquotes ### */
main.list article, blockquote {
    position: relative;
}

main.list article {
    box-shadow: 0 0 10px var(--shadow-color);
}

blockquote {
    box-shadow: 0 0 5px var(--shadow-color);
}

main.list footer::before, blockquote::before {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    width: 0;
    height: 0;
    bottom: -2em;
    border-width: 32px 0 0 32px;
    border-style: solid;
    border-color: var(--light-gray) transparent;
}

main.list footer::after, blockquote::after {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    width: 0;
    height: 0;
    border-width: 30px 0 0 30px;
    border-style: solid;
    border-color: #fff transparent;
}

main.list footer::after {
    bottom: -1.7em;
}

blockquote::after {
    bottom: -1.8em;
}

/* ### End shared styles ### */

/* ==== Utilities: Pagination ==== */
.pagination {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    margin-bottom: 1em;
}

.pagination a {
    display: block;
    margin: 0.25em;
    padding: 0.3em;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 5px var(--light-gray);
}

.pagination .older-posts {
    grid-column-start: 1;
    grid-column-end: 2;
}

.pagination .newer-posts {
    grid-column-start: 3;
    grid-column-end: 4;
}

/* ==== Utilities: Search term strings ==== */
.search-term {
    color: gray;
}

.search-term::before {
    content: "„";
}

.search-term:empty::before {
    content: "Kein Suchterm angegeben";
    font-style: italic;
}

.search-term::after {
    content: "“";
}

.search-term:empty::after {
    content: "";
}

/* ==== Utilities: Jumbo content (used on 404 page) ==== */
.content.jumbo {
    text-align: center;
}

.content.jumbo .icon {
    margin: 0.25em;
    font-size: 10em;
}

.content.jumbo div {
    display: inline-block;
    vertical-align: middle;
}

/* ==== Text markup elements ==== */
/* Most of those are found in typography.css */

/* -- Heading -- */
h2 {
    font-family: inherit;
    border: none;
    padding: inherit;
}

/* -- Lists -- */
ul,
ol {
    margin-left: 1.5em;
}

/* -- Form elements -- */
input, select, button, textarea, .signature-pad, .digital_signature-pad {
    margin: 0.25em;
    padding: 0.25em;
    font-size: 1em;

    background-color: #fff;
    border-radius: 5px;
    border: none;
}

input, textarea, .signature-pad, .digital_signature-pad {
    box-shadow: 0 0 2px #8d8d8d inset;
}

select {
    -webkit-appearance: none;
    appearance: none;

    padding: 0.25em 1.5em 0.25em 0.25em;
    
    background-image: url("img/dropdown.png");
    background-repeat: no-repeat;
    background-position: center right;
    background-size: contain;

    border: 1px solid var(--accent-color);
}

input[type="submit"], input[type="button"], button {
    padding: 0.25em 0.5em;
    
    box-shadow: 0 0 2px var(--accent-color);
    color: var(--accent-color);
    
    transition: box-shadow 0.1s;
}

input[type="submit"]:hover, input[type="button"]:hover, button:hover {
    box-shadow: 0 0 5px var(--accent-color);
}

.wpcf7-list-item.first {
    margin-left: 0;
}

.form-field-introduction + .wpcf7-form-control-wrap .wpcf7-list-item.first {
    margin-left: 1em;
}

label .wpcf7-form-control-wrap {
    margin-top: 0.4em;
    display: inline-block;
}

input.wpcf7-text, input.wpcf7-number, textarea.wpcf7-textarea {
    margin: 0;
}

.wpcf7-checkbox input, .wpcf7-radio input {
    margin-left: 0;
}

/* -- Embedded content -- */
iframe {
    border: none;
}

.privacy-consent-prompt-area {
    background-color: #ededed;
	text-align: center;
	display: grid;
	align-items: center;
	justify-items: center;
	box-shadow: 0px 0px 3px #797979 inset;
}

.privacy-consent-prompt-area .unloaded-content {
    display: none;
}

.privacy-consent-prompt-area .privacy-consent-prompt {
    font-size: small;
}

/* -- Galleries -- */
.wp-block-gallery {
    width: 70%;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Easter egg: Pictures that change on hover */
.wp-block-gallery.easteregg .wp-block-image:nth-child(2) {
    display: none;
}

.wp-block-gallery.easteregg:hover .wp-block-image:nth-child(1) {
    display: none;
}

.wp-block-gallery.easteregg:hover .wp-block-image:nth-child(2) {
    display: flex;
}

/* -- Pills --
 * Pills are a rounded group of multiple button-like entries, one of which can be active (red background), inactive
 * entries have a white background (therefore making the whole thing looking somewhat like a pill)
 */
.pill {
    border: 2px solid var(--accent-color);
    margin: 0;
    border-radius: 10px;
    display: inline-flex;
}

.pill li {
    display: inline;
    list-style: none;
    border-right: 2px solid var(--accent-color);
    padding: 0 7px;
    cursor: pointer;
}

.pill li:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.pill li:last-child {
    border: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.pill li.active {
    background-color: var(--accent-color);
    color: white;
}
