/* =========================
   CONTACT PAGE
========================= */

.contact-page {
    min-height: calc(100vh - 155px);

    display: grid;
    grid-template-columns: 0.9fr 1.15fr;
    align-items: start;

    gap: 135px;

    padding:
        55px
        max(var(--page-padding), calc((100vw - 1320px) / 2))
        75px;

    background-color: var(--off-white);
}


/* =========================
   LEFT INTRO
========================= */

.contact-page-intro {
    max-width: 470px;

    padding-top: 5px;
}

.contact-page-intro h1 {
    color: var(--charcoal);

    font-size: clamp(72px, 6vw, 102px);
    font-weight: 900;
    line-height: 0.88;

    text-transform: uppercase;

    letter-spacing: -3px;
}

.contact-page-intro p {
    max-width: 460px;

    margin-top: 35px;

    color: var(--charcoal);

    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
}


/* =========================
   FORM
========================= */

.contact-page-form {
    width: 100%;
    max-width: 590px;
}

.contact-fieldset {
    margin: 0;
    padding: 0;

    border: 0;
}

.contact-fieldset legend {
    margin-bottom: 10px;

    color: var(--charcoal);

    font-size: 14px;
    font-weight: 400;
}


/* =========================
   FORM GRIDS
========================= */

.contact-two-columns,
.phone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
}


/* Country and Number are equal width */

.phone-grid {
    grid-template-columns: 1fr 1fr;
}


/* =========================
   FIELDS
========================= */

.contact-field {
    margin-bottom: 18px;
}

.contact-field label {
    display: block;

    margin-bottom: 6px;

    color: var(--charcoal);

    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
}

.required-text {
    margin-inline-start: 5px;

    color: #777;

    font-size: 12px;
}


/* =========================
   INPUTS
========================= */

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;

    border: 1px solid var(--charcoal);

    background-color: transparent;
    color: var(--charcoal);

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}


/* =========================
   TEXT INPUT + SELECT
========================= */

.contact-field input,
.contact-field select {
    height: 35px;

    padding: 0 14px;

    border-radius: 100px;
}


/* =========================
   SELECT
========================= */

.contact-field select {
    cursor: pointer;
}


/* =========================
   TEXTAREA
========================= */

.contact-field textarea {
    min-height: 85px;

    padding: 13px 16px;

    border-radius: 20px;

    resize: vertical;
}


/* =========================
   HOVER + FOCUS
========================= */

.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover,
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    background-color: var(--yellow);
}


/* =========================
   PLACEHOLDER
========================= */

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #999;
    opacity: 1;
}


/* =========================
   PHONE INPUT
========================= */

.phone-input-wrapper {
    display: flex;
    align-items: center;

    width: 100%;
    height: 35px;

    padding: 0 14px;

    border: 1px solid var(--charcoal);
    border-radius: 100px;

    background-color: transparent;

    overflow: hidden;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}


/* =========================
   PHONE COUNTRY CODE
========================= */

.phone-country-code {
    flex-shrink: 0;

    margin-right: 8px;

    color: var(--charcoal);

    font-family: inherit;
    font-size: 15px;
    font-weight: 400;

    line-height: 1;
}


/* =========================
   PHONE NUMBER INNER INPUT
========================= */

.contact-field .phone-input-wrapper input {
    flex: 1;

    width: 100%;
    min-width: 0;
    height: 100%;

    padding: 0;

    border: 0;
    border-radius: 0;

    background-color: transparent;

    color: var(--charcoal);

    font-family: inherit;
    font-size: 15px;

    outline: none;
}


/* Prevent only the inner input
   from becoming yellow */

.contact-field .phone-input-wrapper input:hover,
.contact-field .phone-input-wrapper input:focus {
    background-color: transparent;
}


/* Make the entire phone field yellow */

.phone-input-wrapper:hover,
.phone-input-wrapper:focus-within {
    background-color: var(--yellow);
}


/* =========================
   SEND BUTTON
========================= */

.contact-page-submit {
    min-width: 95px;
    height: 56px;

    padding: 0 28px;

    border: 0;
    border-radius: 100px;

    background-color: var(--coral);
    color: var(--off-white);

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.contact-page-submit:hover {
    background-color: #ff9d80;
}


/* =========================
   ACTIVE NAV
========================= */

.main-nav a.active {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}


/* =========================
   ARABIC / RTL
========================= */

html[lang="ar"] .contact-page-intro h1 {
    letter-spacing: 0;
    line-height: 1.1;
}

html[lang="ar"] .contact-page-intro,
html[lang="ar"] .contact-page-form {
    text-align: start;
}

html[lang="ar"] .contact-field input,
html[lang="ar"] .contact-field select,
html[lang="ar"] .contact-field textarea {
    text-align: start;
}


/* Phone code direction */

html[dir="rtl"] .phone-country-code {
    margin-right: 0;
    margin-left: 8px;
}


/* Keep phone numbers LTR even on Arabic */

html[dir="rtl"] .phone-input-wrapper {
    direction: ltr;
}

html[dir="rtl"] .phone-input-wrapper input {
    text-align: left;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1100px) {

    .contact-page {
        grid-template-columns: 0.75fr 1.25fr;

        gap: 70px;

        padding-top: 45px;
    }

    .contact-page-intro h1 {
        font-size: 72px;
    }

    .contact-page-form {
        max-width: none;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 760px) {

    .contact-page {
        min-height: auto;

        grid-template-columns: 1fr;

        gap: 50px;

        padding:
            45px
            22px
            65px;
    }


    .contact-page-intro {
        max-width: 100%;

        padding-top: 0;
    }


    .contact-page-intro h1 {
        font-size: 62px;
    }


    .contact-page-intro p {
        margin-top: 25px;

        font-size: 15px;
    }


    .contact-page-form {
        max-width: 100%;
    }


    /* Stack First/Last Name
       and Country/Number */

    .contact-two-columns,
    .phone-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }


    .contact-field {
        margin-bottom: 18px;
    }


    /* Mobile field height */

    .contact-field input,
    .contact-field select,
    .phone-input-wrapper {
        height: 44px;
    }


    .contact-field textarea {
        min-height: 120px;
    }


    .contact-page-submit {
        height: 58px;

        min-width: 110px;
    }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .contact-page-intro h1 {
        font-size: 52px;
    }

}

/* Contact page CV upload */
#c-cv {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1.5px solid #221f20;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: #221f20;
    cursor: pointer;
}

#c-cv::file-selector-button {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    margin-right: 14px;
    background: #221f20;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#c-cv::file-selector-button:hover {
    opacity: 0.8;
}