/*
 * custom-service.css
 * Universal styling for the service listing cards.
 *
 * Expected HTML structure:
 * .service-card
 *   .service-card-title
 *   .service-card-description
 *   .service-card-image
 *   .service-card-button
 */

/* ================================
   Service Card
   ================================ */

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* ================================
   Service Title
   ================================ */

.service-card-title {
    min-height: 40px;
    margin: 0 0 10px  0;
    line-height: 20px;
    overflow: hidden;
}


/* ================================
   Service Description
   ================================ */

.service-card-description {
    min-height: 48px;
    margin-bottom: 20px;
    line-height: 24px;

    /* Keep cards aligned when descriptions have different lengths */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* ================================
   Service Image
   ================================ */

.service-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    margin: 0 0 20px 0;
}


/* ================================
   Read More Button
   ================================ */

.service-card-button {
    width: 100%;
    margin-top: auto;
}


/* ================================
   Responsive Adjustments
   ================================ */

/* Tablet */
@media (max-width: 991px) {
    .service-card-title {
        min-height: 48px;
    }

    .service-card-description {
        min-height: 48px;
    }
}


/* Mobile */
@media (max-width: 767px) {
    .service-card {
        height: auto;
        margin-bottom: 40px;
    }

    .service-card-title {
        height: auto;
        min-height: 0;
    }

    .service-card-description {
        height: auto;
        min-height: 0;
        -webkit-line-clamp: 3;
    }

    .service-card-image {
        aspect-ratio: 3 / 4;
    }

    .service-card-button {
        margin-top: 0;
    }
}

/* =========================================
   Recruitment Process
   ========================================= */

.recruitment-process {
    width: 100%;
    margin: 50px auto 0;
}


/* =========================================
   Individual Step
   ========================================= */

.recruitment-step {
    display: grid;
    grid-template-columns: 42% 40px 58%;
    align-items: stretch;

    position: relative;
}


/* =========================================
   Step Title
   ========================================= */

.recruitment-step-title {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;

    padding-right: 20px;
}

.recruitment-step-title h4 {
    display: inline-block;

    margin: 0;

    padding: 10px 20px;

    border: 1px solid #cfcfcf;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;

    background: #fff;

    white-space: normal;
}


/* =========================================
   Center Marker / Timeline
   ========================================= */

.recruitment-step-marker {
    position: relative;

    display: flex;
    justify-content: center;

    min-height: 100%;
}


/* Vertical line */

.recruitment-step-marker::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    left: 50%;

    width: 1px;

    background: #bdbdbd;

    transform: translateX(-50%);
}


/* Remove line above first step */

.recruitment-step:first-child .recruitment-step-marker::before {
    top: 10px;
}


/* Remove line below last step */

.recruitment-step:last-child .recruitment-step-marker::before {
    bottom: calc(100% - 10px);
}


/* Dot */

.recruitment-step-marker span {
    position: relative;
    z-index: 2;

    width: 7px;
    height: 7px;

    margin-top: 18px;

    border-radius: 50%;

    background: #333;
}


/* =========================================
   Description
   ========================================= */

.recruitment-step-content {
    padding: 8px 0 35px 20px;

    font-size: 16px;
    line-height: 1.6;

    color: #666;
}


/* =========================================
   Last Step
   ========================================= */

.recruitment-step:last-child .recruitment-step-content {
    padding-bottom: 0;
}


/* =========================================
   Tablet
   ========================================= */

@media (max-width: 767px) {

    .recruitment-process {
        margin-top: 35px;
    }

    .recruitment-step {
        grid-template-columns: 38% 30px 62%;
    }

    .recruitment-step-title {
        padding-right: 10px;
    }

    .recruitment-step-title h4 {
        padding: 8px 12px;

        font-size: 16px;
    }

    .recruitment-step-content {
        padding-left: 12px;

        font-size: 14px;
        line-height: 1.5;
    }
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 575px) {

    .recruitment-step {
        grid-template-columns: 1fr;
        position: relative;

        padding-left: 30px;
    }

    .recruitment-step-title {
        justify-content: flex-start;

        padding-right: 0;
    }

    .recruitment-step-title h4 {
        width: 100%;
    }

    .recruitment-step-marker {
        position: absolute;

        left: 0;
        top: 0;
        bottom: 0;

        width: 20px;

        min-height: 100%;
    }

    .recruitment-step-content {
        padding: 12px 0 30px 0;
    }

    .recruitment-step-marker::before {
        left: 50%;
    }
}


/* =========================================
   Contact Form
   ========================================= */

.contact-form-layout {
    width: 100%;
}

/* =========================================
   Heading
   ========================================= */

.contact-form-heading {
    width: 100%;
    text-align: center;
    margin-bottom: 35px;
}

.contact-form-heading h1 {
    margin-bottom: 15px;
}

/* =========================================
   Fields - Desktop
   ========================================= */

.contact-form-fields {
    display: grid;

    grid-template-columns: 1fr 1fr;

    column-gap: 24px;
    row-gap: 4px;

    width: 100%;
}

.contact-field {
    width: 100%;
}

.contact-field .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* Message */
.contact-message-field {
    grid-column: 2;
    grid-row: span 2;
}

.contact-message-field textarea {
    min-height: 62px;
    resize: vertical;
}

/* =========================================
   Submit
   ========================================= */

.contact-form-submit {
    margin-top: 25px;
}

.contact-form-submit .btn-line {
    margin-top: 0;
}

/* =========================================
   Mobile
   ========================================= */

@media (max-width: 767px) {

    .contact-page-form form .col-md-12 {
        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .contact-page-form form .col-md-12 > div {
        margin: 0 !important;
        padding: 0 !important;
    }

    .contact-page-form form .form-control {
        width: 100%;
        margin: 0 0 4px 0 !important;
        box-sizing: border-box;
    }

    .contact-page-form form textarea.form-control {
        min-height: 100px;
    }

    .contact-page-form form button.btn-line {
        margin-top: 15px;
    }
}

/* =========================================
   Contact Page Form
   ========================================= */

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


/* Form fields */
.contact-page-form form .form-control {
    width: 100%;
    box-sizing: border-box;
}


/* Consistent field spacing */
.contact-page-form form .col-md-12 {
    margin-bottom: 4px;
}


/* Form heading */
.contact-page-form form h3 {
    margin-bottom: 15px;
}


/* Message field */
.contact-page-form form textarea.form-control {
    min-height: 100px;
    resize: vertical;
}


/* Submit button */
.contact-page-form form button.btn-line {
    margin-top: 15px;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 767px) {

    .contact-page-form {
        padding-left: 18px;
        padding-right: 18px;
    }

    /*
     * Prevent Bootstrap/theme row margins
     * from creating horizontal overflow.
     */
    .contact-page-form > .row {
        margin-left: 0;
        margin-right: 0;
    }

    /*
     * Form column becomes full width.
     */
    .contact-page-form .col-md-8,
    .contact-page-form #sidebar {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /*
     * Form itself uses full available width.
     */
    .contact-page-form form {
        width: 100%;
    }

    /*
     * Remove excessive Bootstrap/theme spacing
     * between fields.
     */
    .contact-page-form form .col-md-12 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 4px;
    }

    /*
     * Heading
     */
    .contact-page-form form h3 {
        margin-bottom: 18px;
        font-size: 24px;
        line-height: 1.3;
    }

    /*
     * Inputs
     */
    .contact-page-form form .form-control {
        width: 100%;
        min-height: 38px;
    }

    /*
     * Message
     */
    .contact-page-form form textarea.form-control {
        min-height: 110px;
    }

    /*
     * Submit button
     */
    .contact-page-form form button.btn-line {
        margin-top: 15px;
    }

    /*
     * Contact information moves below form.
     */
    .contact-page-form #sidebar {
        margin-top: 40px;
    }

    /*
     * Prevent long email/address values
     * from creating horizontal overflow.
     */
    .contact-page-form #sidebar address span {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}