/*--- General ---*/
:root {
    font: 16px Arial, sans-serif;
}

body {
    margin: 0;
}

a {
    text-decoration: none;
}
a:hover {
    color: #d44;
}
ul.nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.text-justify {
    text-align: justify;
}
.text-center {
    text-align: center;
}
.nobullet {
    list-style: none;
}
.flex-horizontal {
    display: flex;
    flex-direction: row;
}
.flex-center {
    justify-content: center;
}
.flex-gap > * {
    margin: 0 1em;
}

i.fas {
    margin-right: 0.2em;
    font-size: 1.5em;
}

/*--- ---*/

.wrapper {
    display: grid;
    grid-template-areas: "header header header"
        "nav nav nav"
        "sidebar view photos"
        "footer footer footer";
    -ms-grid-rows: min-content min-content 1fr min-content;
    -ms-grid-columns: min-content 1fr min-content;
    grid-template-rows: min-content min-content 1fr min-content;
    grid-template-columns: min-content 1fr min-content;

    min-height: 100vh;
    min-width: 1080px;
    width: 70%;
    margin: 0 auto;

    border: 1px solid #444;
    border-width: 0 1px;
    box-shadow: 0px 0px 10px #888;
    box-sizing: border-box;
}

header {
    grid-area: header;

    background: url("./images/header.jpg");
    height: 280px;
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    position: relative;
}
header .conference-title {
    font-size: 2rem;
    text-align: right;

    width: 100%;
    box-sizing: border-box;
    position: absolute;
    top: 2em;
    padding: 0.2em 1em;
    background: white;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9) 45ch, rgba(255, 255, 255, 0) 60ch);
}
.conference-title .title {
    font-size: inherit;
}
.conference-title .subtitle {
    font-size: 1.8rem;
}
header .conference-info {
    font-size: 1.2rem;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    padding: 0.2em 1em;
    background: white;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9) 25ch, rgba(255, 255, 255, 0) 40ch);
}

/* --- */

ul.horizontal-nav {
    grid-area: nav;
    display: flex;
    flex-direction: row;
    margin-bottom: 1em;
}
ul.horizontal-nav li {
    margin-right: 1em;
}
ul.horizontal-nav li:last-of-type {
    margin-right: 0;
}
ul.horizontal-nav a {
    padding: 0.5em 1em;
    display: block;
    text-transform: uppercase;
    color: #fff;
    font-weight: bold;
    font-family: Verdana, Arial, sans-serif;
    text-align: center;
}

/* --- */

.sidebar {
    grid-area: sidebar;
}
.sidebar a {
    display: block;
}
ul.vertical-nav > li > a {
    padding: 0.5em 1em;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    font-family: Verdana, Arial, sans-serif;
}

.subnav {
    background: #aaa;
}
.subnav > li {
    margin-bottom: 1px;
}
.subnav a {
    padding: 0.5em 1em;
    border-left: 0.5em solid transparent;
    color: #444;
    font-weight: bold;
    font-size: 0.8rem;
    height: 100%;
    box-sizing: border-box;
}
.subnav li:last-of-type {
    margin-bottom: 0;
}

/*--- Content ---*/
.view-container {
    grid-area: view;

    padding: 0 2em;
    line-height: 1.4;
}
h1.content-header {
    margin: 0;
    font-size: 1.8rem;
    border-bottom: 0.1em solid #000;
}
.content-text p {
    margin: 1em 0;
}
.content-text h2 {
    font-size: 1.4rem;
    text-decoration: underline;
}

/*--- Photo reel ---*/
.photo-reel {
    grid-area: photos;

    width: 220px;
    flex-shrink: 0;
}
.element-header {
    text-transform: uppercase;
    color: #fff;
    padding: 0.5em 1em;
    font-family: Verdana, Arial, sans-serif;
    font-weight: bold;
    word-break: keep-all;
    white-space: pre;
}
img.photo-thumb {
    display: block;
    width: 100%;
    height: auto;
    padding: 1em;
    box-sizing: border-box;
    border-top: 1px solid #aaa;
}
.photo-reel img:first-of-type {
    margin-top: 0;
    border-top: 0;
}

footer {
    grid-area: footer;

    color: #eee;
    text-align: center;
    padding: 0.4em 1em;
}
.footer-link {
    color: inherit;
    text-decoration: underline;
}

/*--- ---*/

.dash-list {
    margin-top: 0.5em;
    list-style: none;
}
.dash-list > li::before {
    content: "-";
    margin: 0 1em 0 -1em;
}

@media only screen and (max-width: 1080px) {
    .wrapper {
        min-width: 700px;
        width: 100%;
        border: none;

        grid-template-areas: "header"
            "nav"
            "sidebar"
            "view"
            "photos"
            "footer";
        -ms-grid-columns: 1fr;
        -ms-grid-rows: min-content min-content min-content 1fr min-content min-content;
        grid-template-columns: 1fr;
        grid-template-rows: min-content min-content min-content 1fr min-content min-content;
    }

    .sidebar {
        margin: 0.5em 0;
    }
    .sidebar .vertical-nav {
        display: flex;
        flex-direction: row;
        text-align: center;
    }
    .sidebar .vertical-nav > li {
        flex: 1 0 30%;
        margin-left: 0.5em;
    }
    .sidebar .vertical-nav > li:first-of-type {
        margin-left: 0;
    }
    .sidebar .vertical-nav .subnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        background: transparent;
        grid-gap: 0.1em;
    }
    .sidebar .subnav > li {
        text-align: center;
        margin: 0;
    }
    .subnav a {
        border-left: none;
        border-bottom: 0.2em solid transparent;
    }

    .photo-reel {
        width: 100%;
    }
    .photo-reel .element-content {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    img.photo-thumb {
        border: none;
        min-width: 0;
        max-height: 100%;
        flex: 1 1 30%;
    }
}

/*--- Theme coloring ---*/

header {
    background-color: #27456d;
}
header .conference-info {
    color: #27456d;
}
a, header .conference-title, header .conference-subtitle, h1.content-header, .content-text h2 {
    color: #39649d;
}
h1.content-header {
    border-color: #39649d;
}
ul.horizontal-nav a, ul.vertical-nav > li > a, .element-header {
    background: #39649d;
}
.subnav a {
    background: #e0edff;
}
.subnav a:hover {
    border-color: #39649d;
}
ul.horizontal-nav, footer {
    background: #27456d;

}
ul.horizontal-nav a:hover, ul.vertical-nav > li > a:hover {
    background: #569040;
}
.subnav a:hover {
    color: #017801;
}
.special-header {
    background: #569040;
}
.special-block {
    background: #c2e8a0;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}