:root {
    --color-main: antiquewhite;
    --color-second: #545454;
    --line-color: gray;

    --border-main: 4px solid var(--color-main);
    --shadow-main: 0 0px 20px var(--color-main);
}

.front-block {
    background-color: var(--color-second);
    box-shadow: var(--shadow-main);
    border: var(--border-main);
}

html {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    overscroll-behavior: none;
    background-color: var(--color-main);
    background-image:
        linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
        url('/static/images/back.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 0;
}

h1 {
    font-size: 60px;
    color: var(--color-main);
}

h2 {
    font-size: 36px;
    margin-bottom: 80px;
    color: var(--color-main);
}

h3 {
    font-size: 28px;
}

header {
    display: flex;
    justify-content: center;
    position: fixed;
    width: 100vw;
    height: 60px;
    background-color: rgba(16, 16, 16, 0.4);
    z-index: 99;
}

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    align-items: center;
    bottom: 0;
    width: 100vw;
    padding: 20px 0;
    background-color: rgba(16, 16, 16, 0.4);
    color: #fff
}

footer h3 {
    margin: 4px;
}

footer p {
    margin: 0;
}

footer p:hover {
    color: var(--color-main);
}

#modal {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    position: fixed;
    width: 70vw;
    height: 100vh;
    padding: 0 10vw;
    background-color: #fff;
}

#modal_off {
    position: absolute;
    top: 20vh;
    right: 10vw;
}

ul {
    display: flex;
    list-style: none;
    flex-direction: row;
    gap: 40px;
    font-size: 16px;
}

li a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

li a:hover {
    color: var(--color-main);
    transform: scale(1.1);
}

#head h1, #head h2 {
    text-align: center;
    padding: 40px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

#head h2 {
    max-width: 660px;
}

#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 1600px;
}

#header-logo {

}

#header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

#header-contacts a {
    color: var(--color-main);
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

#header-contacts a:hover {
    transform: scale(1.1);
}

#logo img {
    width: 32px;
    transition: transform 0.3s ease, color 0.3s ease;
}

#logo img:hover {
    transform: scale(1.1);
}

section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 1200px;
    height: 100vh;
    background-color: gray;
    color: ghostwhite;
    background-image:
        linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
        url('/static/images/paper-texture.jpg');
}

#services-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.services-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px 30px 30px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.services-item img {
    width: 340px;
    height: 340px;
    padding: 30px;
    border: var(--border-main);
    object-fit: contain;
}

#about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

#about-img {
    width: 420px;
    padding: 20px;
}

#about-text {
    display: flex;
    flex-direction: column;
    padding: 0 40px;
    font-size: 36px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.visible {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

#statistics-container {
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
}

.statistics-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 380px;
    padding: 40px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.statistics-item p {
    font-size: 60px;
}

#principles-container {
    display: flex;
    justify-content: center;
    gap: 100px;
}

.principles-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.principles-item img {
    width: 200px;
}

.principles-item-text {
    display: flex;
    align-items: center;
    height: 140px;
}

.principles-item h3 {
    width: 200px;
}

#certificates-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.certificates-item {
    position: relative;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.certificates-item a {
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.8);
    color: #fff;
    text-decoration: none;
    font-size: 24px;
}

.certificates-item img {
    height: 280px;
    padding: 20px;
}

.container {
    width: 1600px;
}

#contacts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 800px;
    padding: 40px;
    font-size: 48px;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

#contacts-container p {
    margin-top: 0;
}

#contacts-container-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

#contacts-container-main a {
    color: var(--color-main);
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

#contacts-container-main a:hover {
    transform: scale(1.1);
}

#header-contacts-networks, #contacts-container-main-networks {
    display: flex;
    gap: 12px;
}

.colored {
    color: var(--color-main);
}

@media (min-width: 1000px) {
    #about-text {
        transform: translateX(120px);
    }

    .principles-item:nth-child(1) {
        transform: translateX(-500px);
    }

    .principles-item:nth-child(2) {
        transform: translateX(-840px);
    }

    .principles-item:nth-child(3) {
        transform: translateX(-1180px);
    }

    .principles-item:nth-child(4) {
        transform: translateX(-1520px);
    }

    .principles-item:nth-child(5) {
        transform: translateX(-1860px);
    }

    .certificates-item:nth-child(1) {
        transform: translateX(-500px);
    }

    .certificates-item:nth-child(2) {
        transform: translateX(-840px);
    }

    .certificates-item:nth-child(3) {
        transform: translateX(-1180px);
    }

    .certificates-item:nth-child(4) {
        transform: translateX(-1520px);
    }

    .certificates-item:nth-child(5) {
        transform: translateX(-1860px);
    }

    .certificates-item:nth-child(6) {
        transform: translateX(500px);
    }

    .certificates-item:nth-child(7) {
        transform: translateX(840px);
    }

    .certificates-item:nth-child(8) {
        transform: translateX(1180px);
    }

    .certificates-item:nth-child(9) {
        transform: translateX(1520px);
    }

    #head h1, #head h2 {
        transform: translateY(240px);
    }

    .services-item:nth-child(odd) {
        transform: translateY(120px);
    }

    .services-item:nth-child(even) {
        transform: translateY(-120px);
    }

    .statistics-item:nth-child(odd) {
        transform: translateY(120px);
    }

    .statistics-item:nth-child(even) {
        transform: translateY(-120px);
    }

    #contacts-container {
        transform: translateY(120px);
    }
}

@media (max-width: 1000px) {
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    section {
        width: 80vw;
        height: auto;
    }

    h1 {
        font-size: 8vw;
    }

    h2 {
        text-align: center;
        font-size: 8vw;
        margin-top: 60px;
        margin-bottom: 20px;
    }

    h3 {
        text-align: center;
        font-size: 5vw;
    }

    nav {
        display: none
    }

    #head {
        padding-top: 100px;
    }

    #header-container {
        width: 70vw;
    }

    #head h1, #head h2 {
        width: 60vw;
        padding: 4vw;
    }

    #head h2 {
        font-size: 4vw;
        margin: 0;
    }

    #about-container {
        flex-direction: column;
        gap: 20px;
    }

    #about-img {
        width: 60vw;
        padding: 4vw;
        opacity: 0;
        transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    }

    #about-text {
        width: 60vw;
        padding: 0 4vw;
        font-size: 4vw;
    }

    #services-container {
        flex-direction: column;
        align-items: center;
    }

    .services-item {
        width: 60vw;
        padding: 0 4vw 4vw 4vw;
    }

    .services-item img {
        width: 40vw;
        height: 40vw;
    }

    #principles-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .principles-item {
        width: 60vw;
        padding: 4vw;
    }

    .principles-item img {
        width: 20vw;
    }

    .principles-item-text {
        height: auto;
    }

    .principles-item h3 {
        width: auto;
        font-size: 5vw;
    }

    #statistics-container {
        flex-direction: column;
        align-items: center;
    }

    .statistics-item {
        width: 60vw;
        padding: 4vw;
    }

    #certificates-container {
        flex-direction: column;
    }

    .certificates-item img {
        width: 60vw;
        height: auto;
        padding: 4vw;
    }

    #contacts-container {
        margin-bottom: 100px;
        width: 60vw;
        padding: 4vw;
        font-size: 4vw;
    }

    #contacts-container img {
        width: 9vw;
    }

    #head h1, #head h2, #contacts-container, .services-item, .statistics-item {
        transform: translateY(0);
        transform: translateX(120vw);
    }

    #about-text, #about-img, .principles-item, .certificates-item {
        transform: translateX(120vw);
    }

    #modal h3, #modal p {
        font-size: 1em;
    }
}

@media (max-width: 1000px) {
    #contacts-container-main {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    #header-container {
        justify-content: center;
    }

    #header-logo {
        display: none;
    }
}