@import url("//fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900");

body {
    background: #222833;
}

body:after {
    content:
        url(images/back.webp)
    ;
    display: none;
}

body, input, select, textarea, button {
    color: #555555;
    font-family: 'Raleway', sans-serif;
    font-size: 13pt;
    font-weight: 300;
    overflow-x: hidden;
    max-width: 99%;
    touch-action: pan-y;
}

input, select, button {
    border-radius: 0.3em;
    background-color: rgba(255,255,255,0.5);
    border: 1px solid white;
    padding: 0.5em;
    margin: 0.5em;
}

button {
    background-color: #4CAF50;
    font-size: 1.2em;
    color: white;
    border: none;
}

a {
    color: #3ac984;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

.case-block a {
    text-decoration: none;
}

strong, b {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

p, ul, ol, dl, table, blockquote {
    margin: 0 0 2em 0;
}

ul li {
    text-align: start;
}

h1, h2, h3, h4, h5, h6 {
    color: inherit;
    font-weight: 700;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
    text-decoration: none;
}

table {
    width: 100%;
    border: none;
}

table th {
    border-bottom: 1px solid gray;
}
table td {
    font-size: 0.8em;
    text-align: start;
}

h2 {
    font-size: 1.5em;
}

h3 {
    font-size: 1.25em;
}

sub {
    font-size: 0.8em;
    position: relative;
    top: 0.5em;
}

sup {
    font-size: 0.8em;
    position: relative;
    top: -0.5em;
}

hr {
    border-top: solid 1px #888888;
    border: 0;
    margin-bottom: 1.5em;
}

blockquote {
    border-left: solid 0.5em #888888;
    font-style: italic;
    padding: 1em 0 1em 2em;
}

body {
    height: 100vh;
    margin: 0;
    text-align: center;
    background-color: #2c3e50;
}
header {
    height: 8em;
    justify-content: center;
    align-items: center;
    color: #e67e22;
    background-color: #2c3e50;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

header > h1, header > ul {
    z-index: 500;
}

header a {
    text-decoration: none;
}

header ul {
    list-style-type: none;
    display: block;
}

header li {
    margin: 0 2em;
    display: inline;
}

.second-block {
    margin: 0;
    margin-top: 8em;
    width: 100%;
}

.second-block > div {
    min-height: calc(30vh);
}

.random-phrases {
    position: relative;
    overflow: clip;
}

.random-phrases::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 101;
    background-image: url(images/back.webp);
    background-position: center;
    opacity: 0.1;
}

.random-phrases div {
    display: none;
    color: white;
    font-weight: 300;
    opacity: 1;
}
.random-phrases div.visible {
    display: block;
}

footer {
    height: 10%;
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #2c3e50;
    opacity: 1;
    min-height: 30%;
    padding: 2em 0 1em 0;
}
footer div {
    font-size: 1em;
    flex-grow: 1;
}
.text-block {
    width: 96%;
    padding: 2%;
    margin: 0 auto;
    height: auto;
    background-color: #34495e;
    color: white !important;
    z-index: 90;
}

.text-block h2 {
    font-size: 3em;
    text-align: center;
    opacity: 0.2;
    font-weight: 200;
}

.doubled, .integration, .cases {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.case-block {
    position: relative;
    flex: 1;
    min-height: 8em;
    margin: 1em;
    padding: 1em;
    border-radius: 0.5em;
}

.case-block div.backicon {
    position: absolute;
    top: 1em;
    right: 1em;
    width: 8.5em;

}

div.backicon svg {
    fill: rgba(255, 208, 0, 0.1)
}

.doubled .case-block {
    flex-basis: 25%;
    background: rgba(100,100,100,0.3);
}
.integration .case-block {
    flex-basis: 15%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(170, 170, 170, 0.1) 3%, rgba(255, 255, 255, 0) 6%, rgba(255, 255, 255, 0) 100%);
    background-size: 200% 200%;
    animation: shine 4s linear infinite;
    border: 1px solid #ccc;
    position: relative;
    overflow: hidden;
}

.case-block h3 {
    text-align: left;
}

.doubled .case-block h3 {
    color: rgba(20, 190, 10, 0.8);
}

.integration .case-block h3 {
    color: rgba(255, 208, 0, 0.8);
}

.integration .shine {
    border: 1px solid red;
}

.case-block p {
    text-align: left;
    font-size: 90%;
    font-style: italic;
    opacity: 0.8;
}

#contacts > div {
    margin: 2em auto;
    display: flex;
    width: 80%;
    max-width: 500px;
}

#contacts > div > input, #contacts > div > label, #contacts > div > select {
    display: inline;
}
#contacts > div > input, #contacts > div > select {
    width: 60%;
}
#contacts > div > label {
    padding-top: 1em;
    flex: 1;
}

#messenger-selector {
    display: flex;
    flex-direction: row;
    background-color: rgba(220,220,220,0.4);
    border-radius: 1.5em;
    margin: auto;
    padding: 1em;
}

.messenger-card {
    flex: 1;
    text-align: center;
}

#formmessage {
    text-align: center;
    font-size: 120%;
}

#formmessage .warning {
    color: red;
}

#contacts {
    margin-top: 2em;
    border:1px solid gray;
    border-radius: 0.5em;
    width: 80%;
    max-width: 700px;
}

@keyframes shine {
    0% {
        background-position: 0 100%;
    }
    100% {
        background-position: 0 -100%;
    }
}

@media (max-width: 600px) {
    header, .random-phrases, footer, .services, .integration, .cases {
        font-size: 14px;
    }

    header li {
        margin: 0.7em;
        font-size: 120%;
    }

    .doubled, .integration, footer {
        display: flex;
        flex-direction: column;
    }

    .case-block {
        flex-grow: 0;
        flex: 0;
        min-height: auto;
        margin: 1em;
        padding: 1em;
    }

    footer {
        flex-direction: column-reverse;
    }
    footer div {
        font-size: 1em;
        flex-grow: 0;
        padding: 1em;
    }

    #contacts > div {
        width: 100%;
        max-width: none;
    }

    #messenger-selector {
        font-size: 80%;
        width: auto !important;
    }

    .messenger-card {
        padding: 0.5em;
    }

    #contacts > div > label {
        font-size: 80%;
    }
}
