* {
    --iframe-size: 450px;
    --link-color: hsl(211, 100%, 50%);
}

.contact-page h1,
.contact-page h2,
.contact-page h3 {
    color: hsla(0, 0%, 20%, 1);
}

.contact-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 38px;
}

h1 {
    font-size: 40px;
    font-weight: 600;
    line-height: 46px;
    letter-spacing: 0.3px;
    margin-bottom: 48px;
}

.emoji {
    font-size: 46px !important;
    user-select: none;
}

/* details */

.contact-details {
    text-align: left;
    width: 100%;
    max-width: 432px;
}

.contact-details > div {
    display: flex;
    flex-direction: column;
}

.contact-details > div:not(:last-of-type)::after {
    content: '';
    display: block;
    height: 1px;
    background-color: hsla(240, 1%, 62%, 0.18);
    margin: 24px 0;
}

.contact-details > div > div,
.contact-details > div > p {
    max-width: 410px;
    margin-top: 4px;
}

.contact-details > div > b {
    font-size: 16px;
    letter-spacing: -0.2px;
}

.contact-details > div p,
.contact-details > div span {
    font-size: 14px;
    letter-spacing: -0.1px;
    color: hsla(240, 2%, 18%, 60%);
}

.contact-details > div a {
    font-size: 14px;
    color: var(--link-color);
    font-weight: 500;
    margin: 12px auto 0 0;
}

.contact-details > div > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-details > div > a > svg {
    width: 20px;
    height: auto;
}

/* form */

.contact-form {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    border-radius: 18px;
    padding: 18px;
    background-color: hsl(210, 50%, 97%);
    text-align: left;
    margin-bottom: auto;
}

.contact-form h2 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.contact-form p,
.contact-form a {
    font-size: 14px;
    font-weight: 500;
    color: hsla(0, 0%, 20%, 1);
    letter-spacing: -0.1px;
    margin-top: 4px;
}

.contact-form a {
    color: var(--link-color);
}

.contact-form input:first-of-type {
    margin-top: 24px;
}

.contact-form input,
.contact-form textarea {
    border: 1px hsla(240, 1%, 62%, 0.18) solid;
    margin-top: 12px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--link-color);
}

.contact-form textarea {
    min-height: 197px;
    max-height: 280px;
    resize: vertical;
}

.contact-form button {
    justify-content: center;
    height: auto;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 24px;
}

.contact-form button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* address */

.contact-address {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 55px;
    padding: 48px 0;
    text-align: left;
}

.contact-address > div:last-of-type {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.contact-address > div:last-of-type iframe {
    display: none;
}

.contact-address iframe {
    min-width: var(--iframe-size);
    max-width: 100%;
    width: var(--iframe-size);
    height: var(--iframe-size);
    border: 0;
    border-radius: 12px;
}

.contact-address h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.2px;
    margin-top: 12px;
}

.contact-address .subtitle {
    font-size: 18px;
    letter-spacing: -0.2px;
    color: hsla(240, 2%, 18%, 0.6);
    max-width: 520px;
    margin-top: 10px;
}

.headquarters {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.headquarters > b {
    font-size: 18px;
    letter-spacing: -0.2px;
    color: rgb(0, 122, 255);
}

.headquarters > p {
    font-size: 16px;
    letter-spacing: -0.2px;
    line-height: 22px;
    color: hsl(0, 0%, 20%);
    margin-top: 4px;
}

.map-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 24px;
}

.map-buttons > * {
    display: inline-flex;
    align-items: center;
    height: unset;
    padding: 8px;
    border-radius: 6px;
    background-color: rgb(239, 239, 241);
    color: black;
    font-weight: 500;
}

.map-buttons > * svg {
    width: 15px;
    min-width: 15px;
    margin-left: 5px;
}

/* media queries */

@media screen and (max-width: 980px) {
    * {
        --iframe-size: 350px;
    }

    section {
        width: 100%;
    }

    .contact-details,
    .contact-form {
        width: 100%;
    }

    .contact-address {
        gap: 30px;
    }

    .headquarters {
        margin-top: 40px;
    }
}

@media screen and (max-width: 720px) {
    .contact-top {
        flex-direction: column;
    }

    .contact-details,
    .contact-form {
        max-width: unset;
    }

    .contact-address {
        flex-direction: column;
    }

    .contact-address > iframe {
        display: none;
    }

    .contact-address > div:last-of-type iframe {
        display: flex;
        margin: 0 auto;
        margin-top: 48px;
    }
}

@media screen and (max-width: 450px) {
    .map-buttons {
        flex-direction: column;
    }

    .map-buttons > * {
        justify-content: center;
    }
}
