:root {
    --gl-gold: #C5A267;

    --bs-link-color: #C5A267;
    --bs-link-color-rgb: 197, 162, 103;
    --bs-link-hover-color: #C5A267;
    --bs-link-hover-color-rgb: 197, 162, 103;
}

/* Form agreement links */
.form__agree-text a,
.form__agree-text a:visited {
    color: #C5A267;
    text-decoration-color: #C5A267;
}

.form__agree-text a:hover,
.form__agree-text a:focus {
    color: #C5A267;
    text-decoration-color: #C5A267;
    opacity: 0.8;
}

/* Cookie banner links */
.cookie-banner a,
.cookie-banner a:visited,
.cookie-link,
.cookie-link:visited {
    color: #C5A267;
    text-decoration-color: #C5A267;
}

.cookie-banner a:hover,
.cookie-banner a:focus,
.cookie-link:hover,
.cookie-link:focus {
    color: #C5A267;
    text-decoration-color: #C5A267;
    opacity: 0.8;
}

/* Bootstrap focus blue fix */
.form__input:focus,
.form__textarea:focus,
.form__agree-input:focus-visible + .form__agree-box,
.cookie-btn:focus-visible,
.gl-btn:focus-visible {
    outline-color: #C5A267;
    box-shadow: 0 0 0 3px rgba(197, 162, 103, 0.25);
}

.cookie-banner,
.cookie-banner p {
    color: var(--osnovnoy-platina);
}

.cookie-banner .cookie-link,
.cookie-banner .cookie-link:visited {
    color: #C5A267;
    text-decoration-color: #C5A267;
}

/* Cookie banner buttons */
.cookie-banner .cookie-btn {
    border-radius: 4px;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cookie-banner .cookie-btn--primary,
.cookie-banner .cookie-btn--secondary {
    color: #C5A267;
    border-color: #C5A267;
}

.cookie-banner .cookie-btn--primary:hover,
.cookie-banner .cookie-btn--secondary:hover {
    color: #C5A267;
    border-color: #C5A267;
    background-color: rgba(197, 162, 103, 0.08);
}

.stages {
    padding: 90px 0 130px 0;
}

/* Footer */
.footer {
    background: rgba(26, 26, 27, 0.98);
}

.footer__container {
    padding-top: 42px;
    padding-bottom: 32px;
}

.footer__top {
    display: grid;
    grid-template-columns: 153px minmax(80px, 1fr) 270px 290px;
    column-gap: 50px;
    align-items: start;
}

.footer__logo {
    grid-column: 1;
    display: inline-flex;
    width: 153px;
    line-height: 0;
    text-decoration: none;
}

.footer__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.footer__legal {
    grid-column: 3;
}

.footer__contacts {
    grid-column: 4;
    justify-self: end;
    width: max-content;
}

.footer__legal,
.footer__contacts {
    display: grid;
    gap: 14px;
}

.footer__contact,
.footer__legal-item {
    display: grid;
    gap: 6px;
}

.footer__label {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: 0.14em;
    color: #C5A267;
}

.footer__text {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: 0.18em;
    color: var(--osnovnoy-platina);
    text-decoration: none;
}

.footer__legal .footer__text {
    text-transform: none;
}

.footer__link {
    transition: color var(--transition);
}

.footer__link:hover,
.footer__link:focus {
    color: #C5A267;
}

.footer__messengers {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__messenger {
    list-style: none;
}

.footer__messenger-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--osnovnoy-platina);
    text-decoration: none;
    transition: color var(--transition), transform var(--transition);
}

.footer__messenger-link svg {
    display: block;
    width: 24px;
    height: 24px;
}

.footer__messenger-link:hover,
.footer__messenger-link:focus {
    color: #C5A267;
}

.footer__messenger-link:active {
    transform: scale(0.92);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 44px;
}

.footer__bottom a {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0.08em;
    color: #C5A267;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.footer__bottom a:hover,
.footer__bottom a:focus {
    opacity: 0.8;
}

@media (max-width: 1199.98px) {
    .footer__top {
        grid-template-columns: 153px minmax(40px, 1fr) 260px 280px;
        column-gap: 34px;
    }

    .footer__bottom {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 14px 28px;
    }
}

@media (max-width: 991.98px) {
    .footer__top {
        grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 44px;
    }

    .footer__logo {
        grid-column: 1;
    }

    .footer__legal {
        grid-column: 2;
    }

    .footer__contacts {
        grid-column: 3;
        justify-self: end;
        width: max-content;
    }
}

@media (max-width: 767.98px) {
    .footer__container {
        padding-top: 36px;
        padding-bottom: 32px;
    }

    .footer__top {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }

    .footer__logo,
    .footer__legal,
    .footer__contacts {
        grid-column: auto;
        justify-self: start;
        width: auto;
    }

    .footer__bottom {
        display: grid;
        gap: 16px;
        margin-top: 34px;
    }

    .footer__bottom a {
        white-space: normal;
    }

    .footer__text,
    .footer__link {
        word-break: break-word;
    }
}

/* Form agreement custom checkbox */
.form__agree_checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form__agree_checkbox .form__agree-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}

.form__agree_checkbox .form__agree-box {
    position: relative;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border: 1px solid #C5A267;
    border-radius: 2px;
    background: transparent;
}

.form__agree_checkbox .form__agree-input:checked + .form__agree-box::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border-right: 1px solid #C5A267;
    border-bottom: 1px solid #C5A267;
    transform: rotate(45deg);
}

.form__agree_checkbox .form__agree-input:focus-visible + .form__agree-box {
    box-shadow: 0 0 0 3px rgba(197, 162, 103, 0.25);
}

.form__agree_checkbox .form__agree-input.err + .form__agree-box {
    border-color: #dc3545;
}
