/**
 * Contact Page Styles — Two-section redesign
 * Section 1: White contact info cards
 * Section 2: Dark brown form section
 */

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

.contact-info-section {
    padding: 70px 40px 60px;
    background: #fff;
}

.contact-info-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info-inner > h1 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 42px;
    font-weight: 400;
    margin: 0 0 10px;
    color: #2d1f1f;
    letter-spacing: 0.3px;
}

.contact-info-inner > p {
    font-size: 15px;
    color: #888;
    margin: 0 0 40px;
    line-height: 1.5;
}

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

.contact-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.contact-card-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #2d1f1f;
    margin: 0 0 12px;
}

.contact-card-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    margin: 0 0 auto;
    padding-bottom: 20px;
}

.contact-card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #2d1f1f;
    text-decoration: none;
    margin-top: auto;
}

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

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

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

.contact-form-section {
    background: #2d1f1f;
    padding: 80px 40px;
    color: #fff;
}

.contact-form-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

/* Left intro */
.contact-form-intro h2 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    margin: 0 0 16px;
    color: #fff;
    line-height: 1.2;
}

.contact-form-intro p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin: 0;
}

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

/* Hide old page content (text/headings) that comes before the CF7 form */
.contact-form-wrapper > *:not(.wpcf7):not(.contact-bottom-row) {
    display: none !important;
}

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

/* Reset all p margins inside CF7 form */
.contact-form-wrapper .wpcf7-form > p {
    margin: 0;
}

/* Textarea (5th p): full width */
.contact-form-wrapper .wpcf7-form > p:nth-of-type(5) {
    grid-column: 1 / -1;
}

/* Hidden customer-type field: invisible */
.contact-form-wrapper .wpcf7-form > p:nth-of-type(6) {
    display: none;
}

/* Hide the real CF7 submit button (custom bottom row is used) */
.contact-form-wrapper .wpcf7-form > p:nth-of-type(7) {
    display: none;
}

.contact-form-wrapper .wpcf7-submit {
    display: none !important;
}

/* Input styling */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

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

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

.contact-form-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

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

.contact-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.contact-whatsapp-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    flex-shrink: 1;
    min-width: 0;
}

.contact-whatsapp-note a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: underline;
}

.contact-whatsapp-note a:hover {
    color: #fff;
}

/* Toggle pills */
.contact-toggle {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.contact-toggle-pill.active {
    background: #fff;
    color: #2d1f1f;
    border-radius: 50px;
}

/* Submit button */
.contact-submit-custom {
    padding: 12px 36px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

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

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

.contact-form-wrapper .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 12px 0 0;
    padding: 14px 18px;
    font-size: 14px;
    border-radius: 8px;
    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 {
    margin: 12px 0 0;
    background-color: rgba(255, 255, 255, 0.5);
}

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

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

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

    .contact-info-inner > h1 {
        font-size: 28px;
    }

    .contact-info-inner > p {
        margin-bottom: 28px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-card {
        border-radius: 0;
        border-left: 1px solid #e5e5e5;
        border-right: 1px solid #e5e5e5;
        border-bottom: none;
        min-height: auto;
        padding: 24px;
    }

    .contact-card:first-child {
        border-top: 1px solid #e5e5e5;
        border-radius: 12px 12px 0 0;
    }

    .contact-card:last-child {
        border-bottom: 1px solid #e5e5e5;
        border-radius: 0 0 12px 12px;
    }

    /* Divider between cards */
    .contact-card + .contact-card {
        border-top: 1px solid #e5e5e5;
    }

    /* Section 2 */
    .contact-form-section {
        padding: 50px 20px;
    }

    .contact-form-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .contact-form-intro h2 {
        font-size: 28px;
    }

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

    .contact-form-wrapper .wpcf7-form > p:nth-of-type(5) {
        grid-column: 1;
    }

    /* Bottom row stacks */
    .contact-bottom-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .contact-whatsapp-note {
        text-align: center;
    }

    .contact-toggle {
        justify-content: center;
    }

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