@import "nav.css?v=2";
@import "variables.css";

:root
{
    --text: black;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    line-height: 150%;
    margin: 0;
    padding: 0;
    top: 0;
    text-align: left;
    height: 100%;
    color: var(--text);
    background-color: white;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

/*------------------------------------------------*/

.box {
    width: 100%;
}

.box-content {
    box-sizing: border-box;
    width: 95%;
    max-width: 945px;
    padding: 30px 0;
    margin: 0 auto;
}

#content img {
    max-width: 500px;
}

/*--------------------------------------------------*/

#header {
    background-color: #828181;
    color: white;
}

#header .box-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    padding: 50px 0;
}

#header .logo {
    text-decoration: none;
    display: block;
    text-align: left;
    height: 60px;
}

#header .logo img {
    max-width: 100%;
    height: 60px;
}

#content {
    min-height: calc(100vh - 258px);
}

#footer {
    background-color: #CBC9C9;
    text-align: center;
}

#footer .box-content {
    padding: 20px 0;
}

#footer p {
    padding: 0;
    margin: 0;
}

#footer p:first-of-type {
    font-size: 18px;
    padding-bottom: 10px;
}

/*----------------------------------------------------*/

.trainings {
    display: flex;
    margin-top: 0;
}

.trainings-box {
    width: 100%;
    display: none;
    flex-wrap: wrap;
    justify-content: left;
}

.trainings-box.active {
    display: flex;
}

/*----------------------------------------------------*/

.loading i{
    animation-name: loading-animation;
    animation-timing-function: linear;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    font-size: 50px;
    color: var(--red);
}

.loading {
    display: block;
    padding-top: 30px;
    padding-bottom: 30px;
}

@keyframes loading-animation{
    0% {transform: rotate(0);}
    100% {transform: rotate(360deg);}
}

.loading-error {
    margin-top: 30px;
}

/*------------------------------------------------------*/

h1 {
    font-size: 30px;
    margin-top: 50px;
    line-height: 1.2;
}

h2 {
    font-size: 20px;
}

a, a:hover, a:visited {
    color: black;
}

a:hover {
    text-decoration: none;
}

table {
    border-collapse: collapse;
    max-width: 100%;
}

table th, table td {
    padding: 5px 0 5px 0;
    white-space: normal;
}

#absolved-trainings table td {
    vertical-align: top;
    /*border-bottom: 1px solid rgb(220,220,220);*/
    padding: 5px 5px 5px 5px;
}

#absolved-trainings table tr:nth-of-type(2n+1) td {
    background-color: rgb(240,240,240);
}

#absolved-trainings table td:nth-of-type(2) {
    text-align: right;
    padding-left: 20px;
    min-width: 105px;
}

/*---------------------------------------------*/

button, .button, a.button {
    border: 4px solid var(--button-grey);
    color: var(--button-grey);
    font-weight: bold;
    display: inline-block;
    padding: 10px 15px;
    white-space: nowrap;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    transition: 0.3s;
}

button.active, .button.active, a.button.active {
    border-color: var(--text);
    color: var(--text);
}

button.green, .button.green, a.button.green {
    border-color: var(--green);
}

button i, .button i, a.button i {
    margin-right: 8px;
}

.button, .button:hover, .button:visited {
    text-decoration: none;
}

button:hover, a.button:hover, .button:hover {
    border-color: var(--red);
    color: var(--red);
}

button:hover::before, button:hover::after, .button:hover::before, .button:hover::after, a.button:hover::before, a.button:hover::after {
    transform: translateY(-50%) scaleY(0);
}

button::before, button::after, .button::before, .button::after, a.button::before, a.button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    transform: translateY(-50%);
    width: 4px;
    height: 15px;
    background-color: white;
    transition: 0.3s;
}

button::after, .button::after, a.button::after {
    left: auto;
    right: -4px;
}

/*-------------------------------------------*/

.trainings-switch {
    display: flex;
    max-width: 400px;
    width: 100%;
    padding: 20px 0;
    position: relative;
}

.trainings-switch .button {
    z-index: 5;
    margin-right: -4px;
    font-size: 20px;
    background-color: white;
}

.trainings-switch .button.active {
    z-index: 6;
}

.trainings-switch .button:hover {
    z-index: 7;
}

/*-------------------------------------------*/

#training iframe{
    width: 100%;
    max-width: 800px;
    margin-top: 50px;
    margin-bottom: 50px;
    height: 400px;
}

#training .training-buttons .button {
    margin-bottom: 10px;
}

#training .training-buttons {
    padding-bottom: 40px;
}

/*--------------------------------------------------*/

.trainings-boxes {
    display: flex;
    flex-wrap: wrap;
    padding-top: 20px;
    gap: 20px;
}

.training-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--light-grey);
    padding: 20px 20px 0 20px;
    width: calc((100% - 40px)/3);
}

.training-box h3 {
    font-size: 20px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
}

.training-box span {
    font-size: 15px;
}

.training-box-image {
    width: 100%;
    padding-top: 55.4%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--button-grey);
    margin-top: 15px;
}

.training-box-links {
    min-height: 65px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.training-box a {
    display: block;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
}

.training-box a:hover {
    color: var(--red);
}

.training-box span {
    margin-top: 10px;
}

/*-------------------------------------------*/

@media screen and (max-width: 1000px) {
    #header .box-content {
        padding: 30px 0;
    }

    #header .logo {
        height: 40px;
    }

    #header .logo img {
        height: 40px;
    }

    #content {
        min-height: calc(100vh - 198px);
    }
}

@media screen and (max-width: 900px) {
    .trainings {
        flex-direction: column;
    }

    .trainings-box {
        width: 100%;
    }

    .training-box {
        width: calc(50% - 10px);
        max-width: 300px;
    }
}

@media screen and (max-width: 520px) {
    .trainings-switch .button {
        font-size: 18px;
        padding: 8px 10px;
        white-space: normal;
        text-align: center;
    }
}

@media screen and (max-width: 590px) {
    .training-box {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 380px) {
    #absolved-trainings table td:nth-of-type(2) {
        width: 60px;
    }
}