* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --yellow: rgba(225, 145, 0, 1);
    --grey: rgba(69, 69, 69, 1);
    --black-transparent: rgba(0, 0, 0, 0.8)
}

body {
    font-family: Inter, sans-serif;
    color: white;
    background-color: var(--grey);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

input, button, textarea, select {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

.p-24 {
    font-size: 24px;
}

.p-26 {
    font-size: 26px;
}

.p-50 {
    font-size: 50px;
}

.bold {
    font-weight: bold;
}

.underlined {
    text-decoration: underline;
}

.yellow {
    color: var(--yellow);
}

header {
    display: flex;
    justify-content: space-between;
    background-color: var(--yellow);
    padding: 15px 40px;
    height: 80px;
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

section {
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
 }

.socials {
    display: flex;
    gap: 30px;
}

.socials img {
    width: 50px;
    height: 50px;
}

.banner {
    background: linear-gradient(269.36deg, rgba(16, 16, 16, 0.8) 28.31%, rgba(69, 69, 69, 0) 87.02%),
    url("images/banner-bg.png") center / cover no-repeat;
    height: calc(100vh - 80px);
}

.banner .container {
    align-items: end;
    justify-content: start;
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 80px;
    text-align: end;
    text-wrap: nowrap;
}

.banner-header {
    width: min-content;
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 10px;
}

.banner-list {
    list-style-type: none;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.banner-list li {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.banner-list img {
    max-width: 30px;
}

.banner-button {
    background-color: var(--yellow);
    padding: 20px 70px;
    font-weight: bold;
}

.advantages .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.advantages-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.advantages-item img {
    max-width: 200px;
}

.materials {
    background-color: var(--yellow);
}

.materials .container {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.materials-set-container {
    width: 100%;
    padding: 40px 40px 20px 40px;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.materials-set {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    align-items: center;
}

.materials-item {
    color: var(--grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.materials-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.materials-toggle {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    cursor: pointer;
}

.materials-toggle.active {
    transform: rotate(180deg);
}


.process {
    background:  linear-gradient(var(--black-transparent), var(--black-transparent)),
    url("images/process-bg.png") center / cover no-repeat;
    padding: 40px;
}

.process .container {
    display: grid;
    grid-template-columns:
        1fr 50px
        1fr 50px
        1fr 50px
        1fr 50px
        1fr;
    gap: 20px;
    align-items: start;
}

.process-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.process-line {
    margin-top: 50px;
}

.case {
    display: none;
}
.case.active {
    display: block;
}

.case .container {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.case-images {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.case-images img {
    flex: 1 1 0;
    width: 100%;
    max-width: 405px;
    min-width: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 10px solid white;
}

.case-text {
    color: black;
    background-color: white;
    border-radius: 10px;
    margin-top: 0;
    padding: 15px;
}

.case-text p {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: black;
    margin: 0;
}

.case-materials {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: calc(1.4em * 2);
}

.case-description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: calc(1.4em * 5);
}

.arrow-wrap {
    display: flex;
    align-items: center;
    width: 100%;
}

.arrow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.arrow-next {
    margin-left: auto;
}

.gallery {
    background: linear-gradient(var(--black-transparent), var(--black-transparent));
}

.gallery .arrow-wrap {
    display: flex;
    gap: 40px;
}

.gallery .container {
    align-items: start;
    gap: 40px;
}

.gallery-slider {
    width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 20px;
    align-items: center;
    align-self: center;
}

.gallery-images {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 550px));
    justify-content: center;
    gap: 20px;
}

.gallery-images img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-slider-arrow {
    width: 30px;
    cursor: pointer;
}

.gallery-slider-arrow:first-child {
    transform: rotate(90deg);
}

.gallery-slider-arrow:last-child {
    transform: rotate(270deg);
}

.gallery-page .container {
    align-items: start;
    gap: 30px;
}

.gallery-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.gallery-back img {
    transform: rotate(180deg);
}

.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 385px), 385px));
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.gallery-page-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.questions .container {
    align-items: start;
    gap: 40px;
}

.questions-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.questions-item-header {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: start;
    cursor: pointer;
}

.questions-item-header img {
    max-width: 20px;
    margin-top: 5px;

    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.questions-item-answer {
    background-color: white;
    border-radius: 10px 10px 0 10px;
    margin-top: 0;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease-out;
}

.questions-item.active .questions-item-header img {
    transform: rotate(-90deg);
}

.questions-item.active .questions-item-answer {
    margin-top: 10px;
}

.questions-item-answer p {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: black;
    margin: 0;
    padding: 15px;
}

.application {
    background: var(--yellow);
}

.application .container {
    display: grid;
    grid-template-columns: minmax(280px, 500px) minmax(300px, 1fr);
    grid-template-areas:
        "header promo"
        "form promo";
    column-gap: clamp(40px, 8vw, 120px);
    align-items: start;
    gap: 40px;
}

.application-header {
    grid-area: header;
    max-width: 500px;
}

.application-grid {
    display: contents;
}

.application-form {
    grid-area: form;
    border-radius: 6px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-line {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-line label {
    color: white;
    font-size: 16px;
}

.form-line input {
    background-color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 20px;
    outline: none;
}

.form-line input::placeholder {
    color: var(--grey);
}

.submit-btn {
    background-color: var(--grey);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 20px;
    cursor: pointer;
    max-width: 150px;
}

.submit-btn:disabled {
    cursor: wait;
    opacity: 0.75;
}

.application-promo {
    grid-area: promo;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: fit-content;
    text-align: center;
    align-self: center;
    justify-self: center;
    transform: translateX(24px);
}

.contacts .container {
    align-items: start;
    gap: 40px;
}

.contacts .container > .p-50 {
    align-self: center;
    width: 100%;
    text-align: center;
}

.contacts-wrap {
    display: grid;
    grid-template-columns: minmax(280px, max-content) minmax(320px, 640px);
    justify-content: center;
    align-items: center;
    gap: clamp(40px, 7vw, 110px);
    width: 100%;
}

.contacts-info {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(2, max-content);
    gap: 30px;
    align-items: center;
    align-self: start;
    justify-self: center;
}

.contacts .socials img {
    width: 100px;
    height: 100px;
}

.contacts-links {
    display: flex;
    flex-direction: column;
}

.contacts-info > div:nth-child(3) {
    text-align: right;
}

.contacts-map {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 20px;
    text-align: end;
    justify-self: center;
}

.map {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 5 / 3;
}

.map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.map__link {
    position: absolute;
    left: 0;
    color: #eee;
    font-size: 12px;
}

.map__link--second {
    top: 14px;
}

.map__link--third {
    top: 28px;
}

.map__link:first-child {
    top: 0;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background-color: var(--yellow);
    padding: 15px clamp(70px, 10vw, 160px);
    min-height: 80px;
}

.policies {
    color: var(--grey);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.policy-content {
    align-items: flex-start;
    gap: 20px;
    max-width: 1040px;
}

.form-line input.invalid {
    box-shadow: 0 0 0 2px #8b1e1e;
}

.form-message {
    color: #8b1e1e;
    font-size: 14px;
    min-height: 18px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 20;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--grey);
    color: white;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.active {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.success {
    background: #16803a;
}

.toast.error {
    background: #b42318;
}

@media (max-width: 768px) {
    .p-50 {
        font-size: 24px;
    }

    .p-26 {
        font-size: 16px;
    }

    .p-24 {
        font-size: 14px;
    }

    header {
        padding: 10px;
        height: auto;
    }

    nav {
        gap: 15px;
    }

    .socials {
        gap: 10px;
    }

    .socials img {
        width: 30px;
        height: 30px;
    }

    .banner {
        height: calc(50vh - 50px);
        background: linear-gradient(var(--black-transparent), var(--black-transparent)),
        url("images/banner-bg.png") center / cover no-repeat;
    }

    .banner .container {
        padding: 50px 30px;
        align-items: center;
    }

    .banner-header {
        width: 100%;
        align-items: center;
    }

    .banner-content {
        height: 100%;
        gap: 0;
        justify-content: space-between;
    }

    .banner-list {
        display: flex;
        flex-direction: column;
        align-items: end;
    }

    .banner-list li {
        align-items: start;
    }

    .banner-list p {
        text-wrap: wrap;
        text-align: end;
        display: block;
        width: fit-content;
        max-width: 175px;
    }

    .banner-button {
        width: 100%;
        text-align: center;
        padding: 15px;
    }

    .advantages .container {
        height: 50vh;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .advantages-item img {
        max-width: 120px;
    }

    .materials-set {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .materials-set-container {
        padding: 20px;
    }

    .process .container {
        padding: 0;
        display: grid;
        grid-template-columns: repeat(3, auto);
        grid-template-rows: repeat(3, auto);
        column-gap: 0;
        row-gap: 20px;
    }

    .process-item {
        gap: 10px;
    }

    .process-item img {
        max-width: 50px;
    }

    .process-line {
        justify-self: center;
        max-width: 50px;
        margin-top: 25px;
    }

    .process-line:nth-child(4) {
        display: none;
    }

    .process-line:nth-child(n+7) {
        display: none;
    }

    .process-item:nth-child(9) {
        grid-column: 2;
    }

    .case-images {
        flex-direction: column;
    }

    .case-images img {
        width: 100%;
        max-width: none;
    }

    .arrow-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gallery-slider {
        grid-template-columns: 20px minmax(0, 1fr) 20px;
        gap: 10px;
    }

    .gallery-slider-arrow {
        width: 20px;
    }

    .gallery-images {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .gallery-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .application .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .application-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .application-promo {
        order: -1;
        transform: none;
    }

    .application-form {
        text-align: start;
        width: 100%;
    }

    .submit-btn {
        max-width: 100%;
    }

    .contacts .socials img {
        width: 45px;
        height: 45px;
    }

    .contacts-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contacts-info {
        gap: 20px;
        justify-self: start;
    }

    .contacts-map {
        align-items: flex-start;
        text-align: start;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        height: auto;
        padding: 15px 40px;
    }

    footer nav {
        display: none;
    }
}




