/**
 * Contact Page Styles — Figma-exact two-section redesign
 * Section 1: White contact info cards with beige separator
 * Section 2: Dark #2D1F1F form section
 */

/* ==========================================
   SECTION 1 — CONTACT INFO (WHITE)
   ========================================== */

.contact-info-section {
    padding: 96px 0;
    background: #fff;
}

.contact-info-inner {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.contact-info-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-header h1 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 56px;
    margin: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    color: #2d1f1f;
}

.contact-info-header p {
    font-size: 16px;
    line-height: 20px;
    color: #666;
    margin: 0;
}

/* Cards — individual bordered cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    gap: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
}

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

.contact-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 22px;
    color: #2d1f1f;
    margin: 0;
}

.contact-card-desc {
    font-size: 14px;
    line-height: 22px;
    color: #555;
    margin: 0;
}

/* Card contact — full-width dark pill button */
.contact-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #2d1f1f;
    color: #fff;
    border-radius: 900px;
    font-size: 14px;
    font-weight: 600;
    line-height: 17px;
    text-decoration: none;
    box-sizing: border-box;
    transition: opacity 0.2s;
}

.contact-card-link:hover {
    opacity: 0.85;
}

.contact-card-link svg {
    flex-shrink: 0;
}

/* ==========================================
   SECTION 2 — FORM (DARK BROWN)
   ========================================== */

.contact-form-section {
    background: #2d1f1f;
    padding: 96px 0;
}

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

/* Left column — intro */
.contact-form-intro {
    flex: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    min-width: 0;
}

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

.contact-form-intro h2 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 73px;
    margin: 0;
    color: #fff;
    text-transform: capitalize;
}

.contact-form-intro-text p {
    font-size: 16px;
    line-height: 20px;
    color: #fff;
    margin: 0;
}

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

/* Right column — form */
.contact-form-wrapper {
    flex: 0 1 45%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 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 — no border, subtle bg */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
    width: 100%;
    height: 44px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 17px;
    box-sizing: border-box;
    outline: none;
    transition: background 0.2s;
}

.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 {
    background: rgba(255, 255, 255, 0.1);
}

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

.contact-form-wrapper textarea {
    height: 176px;
    padding: 13px 12px;
    resize: vertical;
}

/* ==========================================
   BOTTOM ROW — Toggle + Submit
   ========================================== */

.contact-bottom-row {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 24px;
}

/* Toggle pills */
.contact-toggle {
    display: none;
    align-items: center;
    padding: 4px;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 900px;
}

.contact-toggle-pill {
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    border-radius: 20px;
    white-space: nowrap;
    user-select: none;
    transition: all 0.25s ease;
}

.contact-toggle-pill:hover {
    color: rgba(255, 255, 255, 0.9);
}

.contact-toggle-pill.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 900px;
}

/* Submit button — solid white, no border */
.contact-submit-custom {
    padding: 18px;
    background: #fff;
    color: #2d1f1f;
    border: none;
    border-radius: 900px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 17px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.25s ease;
}

.contact-submit-custom:hover {
    opacity: 0.85;
}

/* ==========================================
   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: 6px;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
}

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

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

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

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

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

@media (max-width: 767px) {
    /* Section 1 */
    .contact-info-section {
        padding: 48px 0;
    }

    .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;
        border: 1px solid #e0e0e0;
        border-radius: 14px;
        overflow: hidden;
    }

    .contact-card {
        padding: 24px;
        gap: 20px;
        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: 48px 0;
    }

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

    .contact-form-intro {
        gap: 20px;
    }

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

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

    .contact-form-intro-text p {
        font-size: 14px;
        line-height: 24px;
    }

    .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;
    }

    /* Bottom row stacks */
    .contact-bottom-row {
        flex-direction: column;
        gap: 24px;
    }

    .contact-toggle {
        width: 100%;
    }

    .contact-toggle-pill {
        flex: 1 1 auto;
        text-align: center;
    }

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

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

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