:root {
    --padding-inline: 20px;
    --golden-color: #ffbf00;
    --text-color: #333333;
    --on-primary: white;
    --primary-color: #4CAF50;
    --primary-hover-background-color: rgb(0 146 90 / 10%);
    --left-card-border-radius: 20px 100px 20px 100px;
    --right-card-border-radius: 100px 20px 100px 20px;
    --transition: 0.3s;
    --scale-in-size: 0.9;
    --scale-out-size: 0.9;
    --box-shadow: 0 0 20px rgba(189, 189, 189, 0.5);
    --background-linear-gradient: linear-gradient(45deg, #4CAF50, #00897B);
}

::selection {
    color: white;
    background: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    outline-offset: 2px;
    outline-color: var(--primary-color);
    box-sizing: border-box;
    font-family: "Comfortaa", sans-serif;
}

html {
    color: var(--text-color);
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    z-index: 10;
}

header.scrolled {
    background-color: rgb(51 102 28 / 70%);
}

header nav {
    padding-block: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header nav>a {
    color: var(--primary-color);
    font-size: 22px;
}

aside {
    position: fixed;
    top: -100%;
    z-index: 5;
    display: none;
    width: 100%;
    height: 100%;
    padding: 126px 20px 20px 20px;
    background: rgb(255 255 255 / 80%);
    backdrop-filter: blur(10px);
    transition: calc(var(--transition) * 2);
}

aside.show {
    top: 0;
}

aside ul {
    display: flex;
    list-style-type: none;
    flex-direction: column;
    gap: 20px;
}

aside ul a {
    color: var(--text-color);
}

@media (hover:hover) {
    aside ul a:hover {
        color: var(--golden-color);
    }
}

header nav ul {
    display: flex;
    gap: 10px;
    list-style-type: none;
    text-transform: uppercase;
}

header nav ul a {
    font-size: 14px;
    color: white;
    text-wrap-mode: nowrap;
    transition: var(--transition);
}

header nav ul a:hover {
    color: var(--golden-color);
}

h1 {
    text-transform: uppercase;
    font-size: 50px;
}

h2 {
    padding-bottom: 60px;
    font-size: 30px;
    text-align: center;
    text-transform: uppercase;
}

section {
    padding-block: 140px 60px;
}

.order-container {
    max-width: 600px;
    margin-inline: auto;
}

.order-container .contacts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-container .contacts ul {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.order-container .contacts ul li:has(a img) {
    display: flex;
    gap: 10px;
}

.order-container .contacts ul li a img {
    width: 40px;
    aspect-ratio: 1 / 1;
    transition: var(--transition);
}

.order-container .contacts ul li a img:hover {
    scale: 1.1;
}

.order-container .contacts ul li span {
    font-size: 18px;
    line-height: 2;
}

.order-container iframe {
    border-radius: 16px;
    width: 100%;
    height: 300px;
}

form {
    width: 100%;
    max-width: 500px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    --border-radius: 10px;
}

.form-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container>img {
    width: 70px;
    height: 70px;
}

.logo-names {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-names .ru-name {
    height: 24px;
}

.logo-names .en-name {
    height: 44px;
}

.scale-out-animation {
    animation: scaleOut 1s both;
    animation-timeline: view();
    animation-range: cover 80% exit 0%;
}

.scale-in-animation {
    animation: scaleIn 1s both;
    animation-timeline: view();
    animation-range: cover 0% cover 40%;
}

.scale-in-out-animation {
    animation: scaleInOut 1s both;
    animation-timeline: view();
}

.top-menu-btn {
    display: none;
    padding: 8px;
    border: none;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    background-color: transparent;
    transition: var(--transition);
}

.top-menu-btn:active {
    scale: 0.9;
}

.top-menu-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.hero {
    padding-inline: 10px;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1;
    color: white;
    text-align: center;
    background-image: url('img/1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    z-index: -1;
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: brightness(0.4);
}

.hero-img {
    width: 100%;
    max-width: 700px;
}

.hero-subtitle {
    font-size: 20px;
}

.hero-button {
    display: inline-block;
    padding: 10px 18px;
    color: var(--on-primary);
    text-transform: uppercase;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 30%);
    transition: var(--transition);
    letter-spacing: 1px;
}

.hero-button:active {
    scale: 0.96;
}

.shine {
    position: relative;
    overflow: hidden;
}

.shine::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100%;
    background-image: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, .8),
            rgba(255, 255, 255, 0) 70%);
    top: 0;
    left: -100px;
    animation: shine 3s infinite linear;
}

.container {
    width: 100%;
    max-width: 1124px;
    margin-inline: auto;
    padding-inline: var(--padding-inline);
}

.price-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 20px;
}

.price-card {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
}

@media (hover:hover) {
    .price-card:hover {
        filter: drop-shadow(0px 0px 20px rgb(0 146 90 / 20%));
        scale: 1.3;
    }
}

.price-card .price {
    font-size: 22px;
    color: var(--primary-color);
}

.price-card .name {
    font-size: 18px;
    text-transform: uppercase;
}

.price-card .img {
    width: 100%;
    max-width: 200px;
    overflow: hidden;
    aspect-ratio: 1/1;
    border-radius: 20px;
}

.price-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-card .info {
    font-size: 14px;
    line-height: 1.4;
}

.price-card .btn {
    margin-top: auto;
    display: inline-block;
    width: fit-content;
    padding: 8px 16px;
    text-transform: uppercase;
    border-radius: 100px;
    color: var(--primary-color);
    font-weight: bolder;
    background: var(--primary-hover-background-color);
    transition: var(--transition);
}

@media (hover:hover) {
    .price-card .btn:hover {
        color: white;
        background: var(--background-linear-gradient);
    }
}

.price-card .btn:active {
    scale: 0.95;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    width: 100%;
    font-size: 16px;
    outline: none;
    padding: 22px 8px 8px 8px;
    border-radius: 0px;
    border: 0px;
    border-bottom: 2px solid rgb(202, 202, 202);
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.input-group input:not(:placeholder-shown)+label,
.input-group input:focus+label,
.input-group input:active+label {
    top: 8px;
    font-size: 13px;
    translate: 0;
}

.input-group label {
    pointer-events: none;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 8px;
    color: rgb(190, 190, 190);
    translate: 0 calc(-50% + 2px);
    transition: var(--transition);
}

form button[type="submit"] {
    padding: 16px;
    font-size: 16px;
    cursor: pointer;
    color: var(--on-primary);
    border: none;
    font-weight: bolder;
    border-radius: var(--border-radius);
    background: #6f935f;
    transition: var(--transition);
}

form button[type="submit"]:active {
    scale: 0.96;
}

footer {
    background-image: url(img/footer.jpg);
    background-size: cover;
    background-position: top;
    background-attachment: fixed;
    z-index: 1;
    position: relative;
    color: white;
    padding-block: 40px;
    background-color: var(--primary-color)
}

footer::before {
    z-index: -1;
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: brightness(0.35);
}

footer .content {
    display: grid;
    justify-items: center;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
    row-gap: 40px;
}

.footer-img {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.footer-img>img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

footer h3 {
    font-weight: bolder;
    padding-bottom: 10px;
}

footer ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

footer ul li a {
    font-size: 14px;
    color: white;
    transition: var(--transition);
}

footer ul li a:hover {
    color: var(--golden-color)
}

footer .social {
    display: flex;
    gap: 10px;
    padding-top: 10px;
}

footer .social img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
}

footer .social img:hover {
    scale: 1.1;
}

footer .address {
    font-size: 13px;
}

footer .graph {
    font-size: 14px;
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: space-between;
}

footer .callback a {
    display: inline-block;
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 100px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    text-transform: uppercase;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

footer .callback a:active {
    scale: 0.95;
}

dialog .close-btn:active {
    scale: 0.9;
}

dialog .close-btn svg {
    width: 30px;
    height: 30px;
}

.form-status-box {
    position: relative;
    height: 30px;
}

@starting-style {
    .form-status-box p {
        scale: 0.9;
        translate: 0 -100%;
    }
}

.form-status-box p {
    position: absolute;
    z-index: -1;
    padding: 10px;
    width: 100%;
    color: white;
    text-align: center;
    border-radius: 10px;
    transition: var(--transition);
}

.form-status-box p.close {
    scale: 0.8;
    opacity: 0;
}

.form-status-box p.success {
    background-color: rgb(81 185 146);
}

.form-status-box p.failed {
    background-color: rgb(223, 47, 47);
}

.services-carousel {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: scroll;
    overflow-y: hidden;
    gap: 20px;
    margin-inline: auto;
    padding: 20px;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
}

.services-carousel::-webkit-scrollbar {
    display: none;
}

.services-carousel .card {
    scroll-snap-align: center;
    flex-shrink: 0;
    border-radius: 20px;
    transition: var(--transition);
}

@media (hover:hover) {
    .services-carousel .card.active {
        scale: 1.04;
        box-shadow: var(--box-shadow);
    }
}

.services-carousel .card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 20px;
    transition: var(--transition);
}

@media (hover: hover) {
    .services-carousel .card.active img {
        border-radius: 20px 20px 0 0;
    }
}

.services-carousel .card .body {
    padding: 4px 8px;
}

.services-carousel .card .title {
    text-align: center;
    padding-block: 4px 8px;
}

#service-type {
    padding-bottom: 200px;
}

#service-type .infos {
    position: relative;
}

#service-type .infos>div {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 50%;
    width: calc(100% - var(--padding-inline));
    padding: 20px;
    border-radius: 20px;
    background-color: white;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    translate: -50%;
}

#service-type .infos>div ul {
    margin-top: 20px;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style-type: circle;
}

#service-type .infos>div.active {
    opacity: 1;
    pointer-events: all;
    background-color: white;
}

.team-cards {
    display: flex;
    justify-content: space-evenly;
    gap: 40px;
}

.team-cards .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    transition: var(--transition);
}

@media (hover:hover) {
    .team-cards .card:hover {
        scale: 1.02;
        filter: drop-shadow(0px 0px 10px rgb(76 175 80 / 40%));
    }
}

.team-cards .card:hover img {
    scale: 1.04;
}

.team-cards .card .img {
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.team-cards .card img {
    width: 102%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-cards .card .name {
    color: var(--primary-color);
    font-size: 26px;
    text-transform: uppercase;
    margin-block: 16px;
    text-align: center;
}

.team-cards .card .text {
    font-size: 14px;
    line-height: 1.6;
    text-wrap: balance;
    padding-inline: 10px;
    text-align: justify;
}

.copyright {
    margin-top: 20px;
    font-size: 12px;
}

.works-grid {
    padding: 10px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.works-grid-video {
    padding: 10px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
}

.works-grid img,
.works-grid-video video {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

@media (hover:hover) {
    .works-grid img:hover {
        scale: 1.02;
        box-shadow: var(--box-shadow);
    }
}

dialog {
    border-radius: 2rem;
    border: none;
    padding: 20px;
    outline: none;
    left: 50%;
    top: 50%;
    overflow: visible;
    translate: -50% -50%;
    transition: var(--transition);
}

@starting-style {
    dialog {
        opacity: 0;
        scale: 0.6;
    }

    dialog::backdrop {
        opacity: 0;
    }
}

dialog::backdrop {
    backdrop-filter: blur(1px);
    transition: var(--transition);
}

dialog .close-btn {
    position: absolute;
    top: 0;
    right: 0;
    translate: 30% -30%;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    display: flex;
    padding: 4px;
    transition: var(--transition);
}

dialog.close {
    opacity: 0;
    scale: 0.6;
}

dialog.close::backdrop {
    opacity: 0;
}

.hide {
    opacity: 0;
    pointer-events: none;
}

@media screen and (width <=1024px) {
    .swipeable-carousel .items {
        gap: 60px;
    }

    header nav ul {
        display: none;
    }

    .top-menu-btn {
        display: flex;
    }

    aside {
        display: block;
    }
}

@media screen and (width > 768px) {
    .services-carousel .info {
        display: none;
    }
}

@media screen and (width <=768px) {
    h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 14px;
        text-wrap: balance;
    }

    #service-type {
        padding-bottom: 0px;
    }

    #service-type .infos {
        display: none;
    }

    .services-carousel {
        display: flex;
    }

    .services-carousel .card:first-child {
        margin-left: 200px;
    }

    .services-carousel .card:last-child {
        margin-right: 200px;
    }

    .services-carousel .card {
        width: 70%;
    }

    .services-carousel .card img {
        width: 100%;
    }

    .services-carousel .card .title {
        text-align: center;
        font-size: 22px;
        padding-block: 10px 6px;
    }

    .services-carousel .card .info {
        text-align: justify;
        font-size: 16px;
        padding-block: 4px 8px;
    }

    .services-carousel .card .info ul {
        margin-top: 20px;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        list-style-type: circle;
    }

    .price-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .price-container .price-card {
        max-width: 400px;
    }

    .team-cards {
        flex-direction: column;
        gap: 80px;
    }

    .team-cards .card {
        max-width: 400px;
        margin-inline: auto;
    }
}

@media screen and (width <=700px) {
    :root {
        --padding-inline: 10px;
    }

    .logo-container {
        gap: 10px;
    }

    header nav {
        padding-block: 10px;
    }

    .works-grid,
    .works-grid-video {
        gap: 10px;
    }

    .services-carousel .card {
        width: 90%;
    }
}

@media screen and (width <=580px) {
    footer .content {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .swipeable-carousel .item:first-child {
        margin-left: 150px;
    }

    .swipeable-carousel .item:last-child {
        margin-right: 150px;
    }

    .ru-name {
        width: 100%;
    }
}

@media screen and (width <=500px) {
    .logo-names .ru-name {
        height: 20px;
    }

    .logo-names .en-name {
        height: 40px;
    }

    .services-carousel .card .info {
        font-size: 14px;
    }

    .price-container {
        gap: 10px;
    }

    .team-cards {
        gap: 60px;
    }

    .works-grid,
    .works-grid-video {
        display: flex;
        overflow-x: scroll;
        overflow-y: hidden;
    }

    .works-grid::-webkit-scrollbar,
    .works-grid-video::-webkit-scrollbar {
        display: none;
    }

    .works-grid img,
    .works-grid-video video {
        width: 70%;
    }

    .works-grid-video {
        padding: 0 10px 10px;
    }
}

@media screen and (width <=425px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .services-carousel {
        padding-inline: 10px;
    }

    .swipeable-carousel .items .img {
        height: 320px;
        width: 240px;
    }

    .swipeable-carousel .items .name {
        font-size: 20px;
        margin-bottom: 0;
    }

    .swipeable-carousel .items .text {
        padding-inline: 0;
        line-height: 1.4;
    }

    .swipeable-carousel .item:first-child {
        margin-left: 100px;
    }

    .swipeable-carousel .item:last-child {
        margin-right: 100px;
    }

    .swipeable-carousel .nav-button {
        display: none;
    }
}

@keyframes scales {
    0% {
        opacity: 0.6;
        scale: 0.8;
    }

    45% {
        opacity: 1;
        scale: 1;
    }

    65% {
        opacity: 1;
        scale: 1;
    }

    100% {
        opacity: 0.6;
        scale: 0.8;
    }
}

@keyframes scaleOut {
    from {
        scale: 1;
    }

    to {
        scale: var(--scale-out-size);
    }
}

@keyframes scaleIn {
    from {
        scale: var(--scale-in-size);
    }

    to {
        scale: 1;
    }
}

@keyframes scaleInOut {
    0% {
        border-radius: 100px;
        scale: var(--scale-in-size);
    }

    40% {
        border-radius: 40px;
        scale: 1;
    }

    80% {
        border-radius: 40px;
        scale: 1;
    }

    100% {
        scale: var(--scale-out-size);
    }
}

@keyframes shine {
    0% {
        left: -100px
    }

    20% {
        left: 100%
    }

    100% {
        left: 100%
    }
}