/*
Theme Name: UCUM
Theme URI: https://ucum.org
Author: Regenstrief Institute
Author URI: https://regenstrief.org/
Description: ...
Requires at least: 5.9
Tested up to: 5.9.3
Requires PHP: 7.4
Version: 1.4
*/

:root {
    --fonts-sans-serif: 'helvetica neue', helvetica, -apple-system, BlinkMacSystemFont, 'avenir next', avenir, 'segoe ui', Ubuntu, roboto, noto, arial, sans-serif;
    --fonts-mono: Menlo, Consolas, Monaco, 'Liberation Mono', 'Lucida Console', monospace;
    --fonts-icon: 'Font Awesome 5 Pro' !important;
    --fonts-icon-brand: 'Font Awesome 5 Brands' !important;
    --clr-text: #111;
    --clr-link: #1c658c;
    --clr-body: #fff;
    --clr-gray: #e6e6e6;
    --clr-header: #1c658c;
    --clr-header-text: #fff;
    --clr-nav: #398ab9;
    --clr-nav-text: #1c658c;
    --clr-nav-link: #fff;
    font-size: 16px;
    line-height: 150%;
}

h1,
h2,
h3 {
    margin: 0;
}

a,
a:visited {
    color: var(--clr-link);
}

a.external::after {
    content: '\f08e';
    font-family: var(--fonts-icon);
    font-weight: 300;
    font-size: .8rem;
    margin-left: .25rem;
    position: relative;
    bottom: 2px;
    z-index: -1;
}

header a,
header a:visited {
    color: var(--clr-nav-link);
}

p,
ol,
ul {
    font-size: .9rem;
    line-height: 150%;
}

body {
    font-family: var(--fonts-sans-serif);
    background-color: var(--clr-body);
    /* text-rendering: optimizeLegibility; */
    font-display: optional;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    color: var(--clr-text);
}

header {
    padding: .5rem;
    margin: 0;
    background-color: var(--clr-header);
    color: var(--clr-header-text);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

header h1,
header p {
    margin: 0;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 2rem;
    letter-spacing: -1px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

main h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

main h1.title {
    border-bottom: 1px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 0;
}

.dateline {
    text-transform: uppercase;
    font-family: var(--fonts-mono);
    color: gray;
    margin-top: .75rem;
    margin-bottom: 2rem;
    font-size: .85rem;
}

header a {
    text-decoration: none;
    color: #fff;
}

#hb {
    display: block;
    font-size: 1.25rem;
    line-height: 1.25rem;
    padding: 3px 5px;
    border-radius: .2rem;
}

#s {
    text-align: right;
}

header nav {
    position: fixed;
    left: -600px;
    top: 0;
    width: 400px;
    max-width: 70%;
    height: 100%;
    background-color: #398ab9;
    padding: 1rem 0;
    z-index: 100;
    color: var(--clr-nav-text);
    transition: all 500ms ease-out;
}

header nav h2 {
    margin-top: 3rem;
    margin-bottom: .75rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--clr-text);
}

header nav a {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: .25rem;
    margin-bottom: .25rem;
}

header nav li li a {
    padding-left: 2rem;
}

header nav a {
    text-decoration: none;
    display: block;
}

header nav li a:hover {
    background-color: rgba(0, 0, 0, .25);
}

header nav.open {
    left: 0;
}

header button {
    color: var(--clr-nav-link);
    font-size: 1.5rem;
    padding: 0;
    border: 0;
    margin: 0;
    background-color: transparent;
}

header button:hover,
header a:hover {
    cursor: pointer;
    color: var(--clr-gray);
}

header nav button {
    position: absolute;
    right: 1rem;
    top: .5rem;
}

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

nav ul li {
    list-style-type: none;
    margin: 0;
}

main,
footer {
    width: 95%;
    max-width: 960px;
    margin: 0 auto;
}

main {
    min-height: 70vh;
    background-color: var(--clr-bg2);
    margin-top: 5rem;
    margin-bottom: 3rem;
}

.home main h3 a {
    color: var(--clr-text);
    text-decoration: none;
}

footer {
    display: grid;
    border-top: 1px solid #000;
    padding: 1rem 0 1rem 0;
    font-size: .8rem;
    grid-gap: .5rem;
    grid-template-columns: 1fr 10rem;
}

footer p {
    margin: 0;
}

footer .ri {
    order: 2;
    text-align: right;
}

footer .ri img {
    width: 8.5rem;
    height: auto;
}

footer .menu {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: .5rem;
}

footer .menu li {
    list-style-type: none;
}

blockquote {
    border-left: 5px solid grey;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

main h2 {
    margin-top: 2rem;
}


/* ul li,
ol li {
    margin-bottom: .8rem;
    margin-right: 1.5rem;
}

ul li:last-child,
ol li:last-child {
    margin-bottom: 0;
} */

.icon-head {
    color: var(--clr-header);
    padding: 0;
}

.icon-head a:hover {
    color: var(--clr-nav);
}

.icon-head a:hover i {
    background-size: 6rem;
}

.icon-head i {
    width: calc(100% - 1rem);
    color: var(--clr-nav);
    font-size: 2rem;
    line-height: 2rem;
    padding: .5rem;
    margin-bottom: 1rem;
    background-color: var(--clr-gray);
    display: block;
    border-radius: .125rem;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 4rem;
    transition: background-size 300ms;
}

.propose-changes {
    margin-top: 2rem;
    background-color: var(--clr-gray);
    padding: .8rem;
    font-size: .8rem;
}


/* .icon-head i::after {
    content: 'A';
    position: absolute;
    left: 50%;
    font-size: 3rem;
    color: var(--clr-body);
    z-index: 0;
} */


/*
* UTILITY
*/

.flex {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3rem;
}

.flex>* {
    flex: 1 0 30%;
    /* flex-grow: 1; */
    /* flex-basis: 0; */
}

.grid {
    display: grid;
    grid-gap: 2rem;
}

.grid.col3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid.col4 {
    grid-template-columns: repeat(4, 1fr);
}

@media screen and (max-width: 600px) {
    main {
        min-height: 70vh;
    }
    header {
        border-bottom: 0;
    }
    body {
        position: relative;
    }
    .flex {
        flex-direction: column;
        gap: 2rem;
    }
    .grid {
        grid-gap: 1rem;
    }
    .grid.col3 {
        grid-template-columns: repeat(1, 1fr);
    }
    .grid.col4 {
        grid-template-columns: repeat(2, 1fr);
    }
    footer {
        grid-template-columns: auto;
    }
    footer .ri {
        order: 0;
        text-align: left;
    }
    h3.icon-head i {
        display: inline-block;
        width: auto;
        font-size: 1.5rem;
        background-color: transparent;
        background-image: none;
        padding: 0;
        margin-right: .5rem;
        margin-bottom: 0;
    }
    h3.icon-head {
        margin-bottom: .25rem;
    }
}