@font-face {
    font-family: 'Monotype Corsiva';
    font-style: normal;
    font-weight: normal;
    src: local('Monotype Corsiva Regular'), url('files/MTCORSVA.woff') format('woff');
}

/*--- Generic ---*/
html, body {
    height: 100%;
}
body {
    margin: 0 auto;
}
.hidden {
    display: none !important;
}
a, a:visited {
    color: #08f;
}
a:hover {
    color: #d33;
    text-shadow: 0px 0px 5px #faa;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
nav ul a.nav-button {
    display: block;
    white-space: nowrap;
    text-decoration: none;
}

.text-justify {
    text-align: justify;
}
.text-center {
    text-align: center;
}
.pre-line {
    white-space: pre-line;
}
.vertical-center {
    align-items: center;
}

/*--- Main ---*/

.page-wrapper {
    margin: 0 auto;
    min-height: 100%;

    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    font-size: 16px;
    font-family: Arial, sans-serif;

    display: flex;
    flex-direction: column;
}

/*-- Header --*/
header {
    display: flex;
    flex-direction: row;
    background: white;
    box-shadow: 0 0 5px #555;
    z-index: 10;
}
header > * {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #555;
}
.logo-wrapper .logo {
    border: none;
    height: 8em;
    margin: 0.5em;
    background-size: contain;
}

.heading {
    padding: 0.5em;
}
header .conference-name {
    color: #d33;
    text-shadow: 0 0 10px #faa;
    margin: 0.2em 0;
    font-size: 3em;
    font-family: Monotype Corsiva, Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
}
header .conference-name-long, header .conference-date-place {
    font-size: 1.1em;
    text-align: center;
}

/*-- Navigation --*/
nav {
    flex: 1 0 auto;
}
.horizontal-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 0 0.5em;
}
.horizontal-nav > li:last-of-type {
    border-right: 1px solid #555;
}
.horizontal-nav > li {
    border: 1px solid #555;
    border-width: 0 1px;
    margin-left: -1px;
    margin: 0.2em 0 0.2em -1px;
    flex: 1 0 auto;
}
nav .nav-button {
    padding: 1em 0.5em;
    transition: 200ms;
    color: #222;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    line-height: 150%;
}
.nav-button.live-button {
    color: #d22;
    font-weight: bold;
}
.nav-button:hover {
    background: #a22;
    box-shadow: 0 0 10px #faa;
    text-shadow: 0 0 10px 10px #fff;
    color: #eee;
}

.dropdown {
    position: relative;
}
.dropdown .subnav {
    z-index: 20;
    position: absolute;
    left: -1px;
    background: white;
    border: 1px solid #888;
    width: 100%;
    box-sizing: content-box;
    display: none;
}
.dropdown .subnav li:first-of-type {
    border: none;
}
.dropdown .subnav li {
    border-top: 1px solid #888;
}
.dropdown:hover > .nav-button {
    background: #444;
    color: #ddd;
}
.dropdown:hover .subnav {
    display: block;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

/*-- Content --*/
.content-container {
    flex: 1 0 auto;
    overflow-y: auto;
}
.section-header {
    color: #d33;
    text-shadow: 0 0 10px #faa;
    font-size: 2.8em;
    font-family: Monotype Corsiva, Arial, sans-serif;
    padding: 0.5em 0 0 1em;
}
.content-section {
    font-size: 1em;
    line-height: 150%;
    padding: 0 1.5em;
}

.block {
    padding: 0 1em;
    border-bottom: 0.2em dashed #a22;
    margin-top: 1em;
}
.block:last-of-type {
    border: none;
}
.block-header {
    font-size: 1.5em;
}
.sub-block {
    margin: 0.5em;
}
.sub-block-header {
    font-size: 1.3em;
}
p {
    margin: 1em 0;
}
.flex-row > * {
    flex: 1 0;
}
.flex-column > * {
    flex: 1 0 auto;
}
.flex-row {
    display: flex;
    flex-direction: row;
    flex: 1 0 auto;
    justify-content: center;
}
.flex-column {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.table-header {
    font-size: 2em;
    text-align: center;
}
table {
    width: 100%;
    border-collapse: collapse;
}
table td {
    border: 1px solid #888;
    padding: 0.5em 1em;
    white-space: nowrap;
    width: 50%;
    text-align: center;
}

.sponsor-section, .sponsor-section:visited {
    text-align: center;
    text-decoration: none;
    color: #222222;
    font-size: 1.5em;
    padding: 1em 0.5em;
    transition: 200ms;
}
a.sponsor-section:hover {
    color: #d33;
    box-shadow: 0px 0px 5px black;
}
.sponsor-img {
    max-height: 150px;
    display: block;
    margin: 0 auto;
}
.mephi-logo {
    font-size: 3em;
    font-family: Verdana;
    color: #990000;
    line-height: 150%;
}
.mephi-logo::before {
    content: "MEPhI";;
}

/*--- Registration Form ---*/

form {
    display: flex;
    flex-direction: column;
    min-width: 40ch;
    max-width: 70ch;
    margin: 0 auto;
    font-size: 1.2em;
}
.form-section {
    margin: 0 0 0.5em 0;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
}
.form-row {
    display: flex;
    flex-direction: row;
    margin: 0.5em 0;
    flex-wrap: wrap;
}
textarea {
    resize: none;
    min-height: 6em;
    line-height: 100%;
    font-size: 0.8em;
}
input[type="text"], input[type="email"], textarea, select {
    font-size: inherit;
    flex: 1 0 auto;
    border: 1px solid #888;
    margin-left: 1em;
}
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1em;
    height: 1em;
    background: #aaa;
    border: 2px solid #666;
    border-radius: 50%;
    margin: 0 0.5em 0 1em;
}
input[type="radio"]:checked {
    background: #4d4;
}
input[type="radio"]:focus {
    outline: none;
}
input:required, input:invalid {
    border-color: #a22;
}
input[type="button"], input[type="submit"], input[type="reset"] {
    flex: 1 0 auto;
    border: 1px solid #888;
    background: #ddd;
    border-radius: 2px;
    font-size: 1.2em;
    padding: 0.5em 1em;
    color: #222;
    margin: 0 1em;
    cursor: pointer;
}
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover {
    background: #383;
    color: #eee;
}

/*--- ---*/

dd {
    margin-bottom: 1em;
}

.pdf-object, .livestream-container > iframe {
    width: 100%;
    height: calc(100vh - 1em);
}

@media only screen and (max-width: 1500px) and (min-width: 1000px) {
    .horizontal-nav {
        grid-template-columns: repeat(3, 1fr);
    }
    .dropdown .subnav {
        right: -1px;
        left: unset;
    }
    .flex-row {
        flex-direction: column;
    }
    .flex-row > * {
        flex: 1 0 auto;
    }
}
@media only screen and (max-width: 1000px) {
    .page-wrapper {
        min-width: 00px;
    }
    .horizontal-nav {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .horizontal-nav > li:first-of-type {
        border-top: none;
    }
    .horizontal-nav > li:last-of-type {
        border-right: none;
    }
    .horizontal-nav > li {
        border: none;
        border-top: 1px solid #555;
        margin: 0;
    }
    .dropdown .subnav {
        left: unset;
        top: -1px;
        right: 100%;
    }
    .flex-row {
        flex-direction: column;
    }
    .flex-row > * {
        flex: 1 0 auto;
    }
}

@media only screen and (max-width: 600px) {
    .page-wrapper {
        font-size: 10px;
    }
}
