/**
 * Contact Page Styles
 * Light gray page background, single white "card" container that
 * holds the info cards (Qatar / International / Email Us) and the
 * "Send Us A Message" form below.
 */

/* ==========================================
   PAGE WRAP — gray bg + white container
   ========================================== */

body.contact-page-body {
    background: #F5F5F5;
}

/* Outer wrap — provides 150px gray edges + top/bottom spacing */
.contact-page-wrap {
    padding: 96px 150px 96px;
    background: #F5F5F5;
}

/* Page header — title + subtitle sit ON the gray background, ABOVE the white card */
.contact-page-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 56px;
}

.contact-page-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: -2%;
    color: #2D1F1F;
    margin: 0;
    text-transform: none;
}

.contact-page-header p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    color: rgba(45, 31, 31, 0.7);
    margin: 0;
}

/* White card — holds the 3 info cards + the form */
.contact-page-card {
    background: #fff;
}

/* Embedded line break inside contact.description — mobile only */
.contact-mobile-br {
    display: none;
}

/* ==========================================
   SECTION 1 — CONTACT INFO CARDS (inside white card)
   ========================================== */

.contact-info-section {
    padding: 0;
    background: transparent;
}

/* Cards — flush row with horizontal frame lines + vertical separators */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #E5E5E5;
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    gap: 104px;
    background: #fff;
    border-right: 1px solid #E5E5E5;
}

.contact-card:last-child {
    border-right: none;
}

.contact-card-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: -2%;
    color: #2D1F1F;
    margin: 0;
}

.contact-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0;
    color: rgba(45, 31, 31, 0.7);
    margin: 0;
}

/* Card link — outlined pill: white bg, 1px dark border, dark icon + text */
.contact-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    background: #fff;
    color: #2D1F1F;
    border: 1px solid #2D1F1F;
    border-radius: 900px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease;
}

.contact-card-link:hover {
    background: #2D1F1F;
    color: #fff;
}

.contact-card-link-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: block;
}

/* ==========================================
   SECTION 2 — FORM (LIGHT — "Send Us A Message")
   ========================================== */

.contact-form-section {
    background: #fff;
    padding: 42px 0;
}

.contact-form-inner {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 150px;
    display: flex;
    align-items: flex-start;
    gap: 150px;
}

/* Left column — intro */
.contact-form-intro {
    flex: 0 0 607px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.contact-form-intro-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form-intro h2 {
    font-family: 'Inter', sans-serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    margin: 0;
    color: #2D1F1F;
    text-transform: none;
}

.contact-form-intro-text p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    color: rgba(45, 31, 31, 0.7);
    margin: 0;
}

.contact-form-whatsapp-note {
    display: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #2D1F1F;
    margin: 0;
}

/* Right column — form */
.contact-form-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;

}

/* Hide old page content from the_content() */
.contact-form-wrapper > *:not(.wpcf7):not(.contact-bottom-row) {
    display: none !important;
}

/* ==========================================
   FORM INPUTS — CF7 OVERRIDES
   ========================================== */

.contact-form-wrapper .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/*
 * CF7 may wrap all fields in one <p> or in separate <p>/<label> tags.
 * display:contents collapses the wrapper so children become grid items.
 */
.contact-form-wrapper .wpcf7-form > p,
.contact-form-wrapper .wpcf7-form > p > label {
    display: contents;
    margin: 0;
}

/* Hide <br> tags CF7 inserts between fields */
.contact-form-wrapper .wpcf7-form br {
    display: none;
}

/* Textarea: full width */
.contact-form-wrapper .wpcf7-form span[data-name="your-message"] {
    grid-column: 1 / -1;
}

/* Hidden customer-type field */
.contact-form-wrapper .wpcf7-form input[name="customer-type"] {
    display: none;
}

/* Real CF7 submit — hidden (custom button used) */
.contact-form-wrapper .wpcf7-form input[type="submit"],
.contact-form-wrapper .wpcf7-form button[type="submit"],
.contact-form-wrapper .wpcf7-form .wpcf7-submit,
.contact-form-wrapper .wpcf7-submit {
    display: none !important;
}

/* CF7 internal hidden fields div */
.contact-form-wrapper .wpcf7-form > div[style] {
    display: none;
}

/* Input styling — light theme: white bg, 1px border */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(45, 31, 31, 0.2);
    border-radius: 6px;
    color: #2D1F1F;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"] {
    height: 44px;
    padding: 0 12px;
}

.contact-form-wrapper textarea {
    height: 108px;
    padding: 12px;
    resize: vertical;
    line-height: 1.5;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper input[type="tel"]:focus,
.contact-form-wrapper textarea:focus {
    border-color: #2D1F1F;
}

.contact-form-wrapper input::placeholder,
.contact-form-wrapper textarea::placeholder {
    color: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

/* ==========================================
   BOTTOM ROW — Submit (toggle pills hidden)
   ========================================== */

.contact-bottom-row {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.contact-toggle {
    display: none;
}

.contact-toggle-pill {
    display: none;
}

/* Submit button — full-width pill with border + icon */
.contact-submit-custom {
    flex: 1;
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    background: #fff;
    color: #2D1F1F;
    border: 1px solid #2D1F1F;
    border-radius: 900px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.contact-submit-custom span {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0;
    text-transform: none;
    text-underline-offset: 2px;
}

.contact-submit-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.contact-submit-custom:hover {
    background: #2D1F1F;
    color: #fff;
}

/* ==========================================
   CF7 FEEDBACK — DARK THEME
   ========================================== */

/* Hide response output until form is submitted */
.contact-form-wrapper .wpcf7-response-output[aria-hidden="true"] {
    display: none;
}

.contact-form-wrapper .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 12px 0 0;
    padding: 14px 18px;
    font-size: 14px;
    border-radius: 4px;
    color: #2D1F1F;
    border-color: rgba(45, 31, 31, 0.2);
}

.contact-form-wrapper .wpcf7 form.sent .wpcf7-response-output {
    border-color: #28a745;
    color: #1e7a35;
}

.contact-form-wrapper .wpcf7 form.invalid .wpcf7-response-output,
.contact-form-wrapper .wpcf7 form.unaccepted .wpcf7-response-output {
    border-color: #d93b3d;
    color: #b1282a;
}

.contact-form-wrapper .wpcf7-not-valid-tip {
    color: #b1282a;
    font-size: 12px;
    margin-top: 4px;
}

.contact-form-wrapper .wpcf7-spinner {
    display: none;
    grid-column: 1 / -1;
    background-color: rgba(45, 31, 31, 0.3);
}

/* ==========================================
   CONTACT-PAGE OVERRIDES — when form sits inside .contact-page-wrap
   (cards section + form share a single white container)
   ========================================== */

body.contact-page-body .contact-form-section {
    padding: 0;
}

body.contact-page-body .contact-form-inner {
    padding: 42px;
    margin: 0;
    max-width: none;
    gap: 290px;
}

body.contact-page-body .contact-form-intro {
    flex: 0 0 488px;
}

body.contact-page-body .contact-form-intro h2 {
    font-family: 'Inter', sans-serif;
    font-size: 20.5px;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: -2%;
}

body.contact-page-body .contact-form-intro-text {
    gap: 16px;
}

body.contact-page-body .contact-form-intro-text p {
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    font-weight: 400;
    line-height: 150%;
    color: rgba(45, 31, 31, 0.7);
}

/* ==========================================
   RESPONSIVE — TABLET (max-width: 1023px)
   ========================================== */

@media (max-width: 1023px) {
    .contact-page-wrap {
        padding: 48px 40px 64px;
    }
}

/* ==========================================
   RESPONSIVE — MOBILE (≤ 767px)
   ========================================== */

@media (max-width: 767px) {
    .contact-page-wrap {
        padding: 48px 24px;
    }

    .contact-page-header {
        padding-bottom: 32px;
        gap: 12px;
    }

    .contact-page-header h1 {
        font-size: 32px;
    }

    /* Force a line break inside the description after the full stop */
    .contact-mobile-br {
        display: inline;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        border-left: none;
        border-right: none;
    }

    .contact-card {
        border-right: none;
        border-bottom: 1px solid #E5E5E5;
        padding: 20px;
    }

    .contact-card:last-child {
        border-bottom: none;
    }

    body.contact-page-body .contact-form-inner {
        padding: 32px 24px 48px;
        gap: 32px;
        flex-direction: column;
    }

    body.contact-page-body .contact-form-intro {
        flex: none;
        width: 100%;
    }

    body.contact-page-body .contact-form-intro h2 {
        font-size: 20px;
    }

    /* Section 1 */


    .contact-info-inner {
        padding: 0 24px;
        gap: 32px;
    }

    .contact-info-header {
        gap: 12px;
    }

    .contact-info-header h1 {
        font-size: 32px;
        line-height: 36px;
        border-bottom: none;
        padding-bottom: 0;
    }

    .contact-info-header p {
        font-size: 14px;
        line-height: 24px;
    }

    /* Cards — merged into one bordered container */
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 0;
        overflow: hidden;
    }

    .contact-card {
        padding: 20px;
        gap: 108px;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #e0e0e0;
    }

    .contact-card:last-child {
        border-bottom: none;
    }

    .contact-card-desc {
        font-size: 13px;
        line-height: 20px;
    }

    /* Section 2 */
    .contact-form-section {
        padding: 32px 0;
        padding-bottom: 0px;
        margin-bottom: -8px;
    }

    .contact-form-inner {
        padding: 0 24px;
        flex-direction: column;
        gap: 32px;
    }

    .contact-form-intro {
        flex: none;
        width: 100%;
        gap: 16px;
    }

    .contact-form-intro-text {
        gap: 12px;
    }

    .contact-form-intro h2 {
        font-size: 32px;
        line-height: 100%;
    }

    .contact-form-intro-text p {
        font-size: 13.5px;
        line-height: 150%;
    }

    .contact-form-whatsapp-note {
        font-size: 14px;
        line-height: 17px;
    }

    .contact-form-wrapper {
        flex: none;
        width: 100%;
    }

    /* Form — single column, tighter gap */
    .contact-form-wrapper .wpcf7-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contact-form-wrapper .wpcf7-form span[data-name="your-message"] {
        grid-column: 1;
    }

    .contact-form-wrapper textarea {
        height: 132px;
    }

    .contact-submit-custom {
        width: 100%;
    }

    .contact-form-wrapper .wpcf7-response-output {
        grid-column: 1;
    }

    .contact-form-wrapper .wpcf7-spinner {
        grid-column: 1;
    }
    .contact-card-link {
        font-size: 14px;
    }
    .contact-page-header p{
        font-size: 14px;

    }
}
