/*
 Theme Name:   NCH
 Theme URI:    https://generatepress.com
 Description:  GeneratePress Child Theme
 Author:       Gerold Ritter
 Author URI:   https:/e-hist.ch
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  nch
*/

/* ===================================
   CUSTOM STYLES HIER EINFÜGEN
   =================================== */

/* Beispiel: Globale Schriftart */
body {
    /* font-family: 'Your Font', sans-serif; */
}

/* Beispiel: Linkfarbe anpassen */
a {
    /* color: #0073aa; */
}

/* Beispiel: Header anpassen */
.site-header {
    /* background-color: #ffffff; */
}

/* Beispiel: Navigation */
.main-navigation {
    /* font-size: 16px; */
}

/* Beispiel: Inhaltsbereich */
.entry-content {
    /* line-height: 1.8; */
}

/* Beispiel: Footer */
.site-footer {
    /* background-color: #1a1a1a; */
    /* color: #ffffff; */
}

/* lists */

/*
 * Database lists rendered by the list shortcodes (memorials, legal and
 * defamation cases, UN resolutions, codes of ethics, campaigns). The intro
 * sections above them are styled in the Customizer (.nch-memorial, .nch-legal
 * …: blue #204778, 900px column); the lists follow the same column and type.
 */
.nch-list-header,
.nch-legal-ref-legend,
.memorial-list,
.legal_cases-list,
.defamation_cases-list,
.un_resolutions-list,
.codes_of_ethics-list,
.campaigns-list,
:has(> .nch-list-header) > :is(h1, h2, h3, h4, h5, h6, p) {
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
    color: #204778;
}

/* Editor headings placed above a list, in the same group (e.g. Campaigns) */
:has(> .nch-list-header) > :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #204778;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.nch-list-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.nch-list-sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nch-list-header a.nch-list-sort-button {
    margin: 0;
    padding: 6px 16px;
    border: 2px solid #204778;
    border-radius: 0;
    background-color: transparent;
    color: #204778;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.nch-list-header a.nch-list-sort-button:hover,
.nch-list-header a.nch-list-sort-button:focus,
.nch-list-header a.nch-list-sort-button.active {
    background-color: #204778;
    color: #fffdf7;
}

.nch-list-header [class$="-last-update"] {
    font-size: 14px;
    font-style: italic;
}

.nch-legal-ref-legend {
    font-size: 16px;
    font-style: italic;
}

/* Group headings: country, year, topic, section */
:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) h2 {
    margin: 35px 0 12px;
    color: #204778;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) h3 {
    margin: 20px 0 8px;
    color: #204778;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) ul {
    margin: 0 0 10px;
    padding-left: 30px;
}

:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) li {
    color: #204778;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 5px;
}

:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list, .nch-legal-ref-legend) a {
    color: #204778;
    text-decoration: underline;
    text-underline-offset: 3px;
}

:is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list, .nch-legal-ref-legend) a:hover {
    color: #3569a0;
}

@media (max-width: 767px) {
    .nch-list-header,
    .nch-legal-ref-legend,
    .memorial-list,
    .legal_cases-list,
    .defamation_cases-list,
    .un_resolutions-list,
    .codes_of_ethics-list,
    .campaigns-list,
    :has(> .nch-list-header) > :is(h1, h2, h3, h4, h5, h6, p) {
        padding-left: 18px;
        padding-right: 18px;
    }

    :is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) h2 {
        font-size: 18px;
        margin-top: 28px;
    }

    :is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) ul {
        padding-left: 22px;
    }

    :is(.memorial-list, .legal_cases-list, .defamation_cases-list, .un_resolutions-list, .codes_of_ethics-list, .campaigns-list) li {
        font-size: 15px;
        overflow-wrap: anywhere;
    }
}
/* search */

/* GeneratePress removes the underline from titles; on the results page they must read as links */
.search-results .entry-title a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.search-results article + article {
    margin-top: 2.5em;
}

.nch-search-source {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.2em;
}

.nch-search-pdf {
    font-size: 0.9em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.nch-search-pdf-snippet {
    color: #666;
}

.nch-search-pdf-more summary {
    cursor: pointer;
    color: var(--nch-blue);
}

.nch-search-pdf-more ul {
    margin: 0.5em 0 0 1.5em;
}

.nch-search-pdf-onpage {
    margin-left: 0.5em;
    white-space: nowrap;
}

.nch-search-pdf-onpage::before {
    content: "→ ";
}

/* list entry / PDF link reached via a search result anchor */
li:target,
a[id^="pdf-"]:target {
    background-color: #fff3b0;
    scroll-margin-top: 100px;
}
