/* =========================================================
   CONTACTS PAGE
========================================================= */

.contacts {
    padding: 100px 0;
    background: #f3f3f3;
}

.contacts__container {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

/* =========================================================
   LEFT
========================================================= */

.contacts__left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contacts__title {
    margin: 0 0 12px;
    color: #222222;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 700;
}

.contacts__text {
    max-width: 480px;
    margin: 0 0 12px;
    color: #666666;
    font-size: 15px;
    line-height: 1.55;
}

.contacts__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: fit-content;
    margin: 0 0 32px;
    padding: 0;
    border: none;
    border-bottom: 1px dashed var(--orange-color);
    background: none;
    color: var(--orange-color);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contacts__link:hover {
    color: #d96508;
    border-color: #d96508;
}

.contacts__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 40px;
    margin-bottom: 32px;
}

.contacts__label {
    margin: 0 0 8px;
    color: #8fa3ad;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contacts__value {
    color: #222222;
    font-size: 14px;
    line-height: 1.5;
}

.contacts__value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contacts__value a:hover {
    color: var(--orange-color);
}

.contacts__socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contacts__socials .site-footer__socials {
    margin-top: 0;
}

.contacts__map {
    position: relative;
    margin-top: auto;
    height: 300px;
    border-radius: 18px;
    overflow: hidden;
    background: #dcdcdc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contacts__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================
   RIGHT / FORM CARD
========================================================= */

.contacts__right {
    flex: 1;
    padding: 40px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.form__title {
    margin: 0 0 10px;
    color: #222222;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
}

.form__text {
    margin: 0 0 24px;
    color: #777777;
    font-size: 14px;
    line-height: 1.55;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form input,
.form textarea,
.form select {
    width: 100%;
    border: none;
    border-bottom: 1px solid #dcdcdc;
    padding: 12px 0;
    background: transparent;
    color: #222222;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.form input::placeholder,
.form textarea::placeholder,
.form select::placeholder {
    color: #8b8b8b;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    border-color: #222222;
}

.form textarea {
    min-height: 90px;
    height: 90px;
    resize: none;
}

.form__file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dcdcdc;
    cursor: pointer;
}

.form__file-input {
    display: none;
}

.form__file-text {
    color: #777777;
    font-size: 14px;
    line-height: 1.4;
}

.form__file-btn {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid #00a0d2;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #00a0d2;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #777777;
    font-size: 12px;
    line-height: 1.45;
}

.form__checkbox input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 16px;
}

.form__checkbox a {
    color: var(--orange-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form__checkbox a:hover {
    color: #d96508;
}

.form__submit {
    width: fit-content;
    margin-top: 10px;
    padding: 14px 26px;
    border: none;
    border-radius: 10px;
    background: #ff5a00;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.form__submit:hover {
    background: #e14e00;
    transform: translateY(-1px);
}

/* =========================================================
   POPUP
========================================================= */

.popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.popup.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.55);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.popup__content {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: min(640px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 32px 32px 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    transform: translate(-50%, -50%) scale(0.96);
    transition: transform 0.25s ease;
}

.popup.is-active .popup__content {
    transform: translate(-50%, -50%) scale(1);
}

.popup__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #e7e7e7;
    border-radius: 50%;
    background: #ffffff;
    color: #666666;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.popup__close::before,
.popup__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.popup__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.popup__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.popup__close:hover {
    border-color: var(--orange-color);
    background: #fff7f1;
    color: var(--orange-color);
    transform: rotate(90deg);
}

.popup__content h3 {
    margin: 0 0 26px;
    padding-right: 56px;
    color: #222222;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.popup__row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid #ececec;
}

.popup__row:first-of-type {
    border-top: none;
}

.popup__row span {
    color: #8c8c8c;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.popup__row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    background: #fbfbfb;
    color: #444444;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.popup__row button:hover {
    border-color: var(--orange-color);
    background: #fff7f1;
    color: var(--orange-color);
    box-shadow: 0 0 0 3px rgba(244, 122, 19, 0.08);
}

html.popup-open,
body.popup-open {
    overflow: hidden;
}

/* =========================================================
   ADAPTIVE
========================================================= */

@media (max-width: 1024px) {
    .contacts__container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .contacts {
        padding: 72px 0;
    }

    .contacts__grid {
        grid-template-columns: 1fr;
    }

    .contacts__right {
        padding: 28px 20px;
    }

    .contacts__title {
        font-size: 32px;
    }

    .form__submit {
        width: 100%;
    }

    .popup__content {
        width: calc(100% - 20px);
        padding: 24px 16px 18px;
        border-radius: 18px;
    }

    .popup__content h3 {
        margin-bottom: 18px;
        font-size: 24px;
        padding-right: 48px;
    }

    .popup__close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    .popup__row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .popup__row button {
        min-height: 44px;
        font-size: 14px;
    }
}