/* ============================================================
 * Contact page (Template: Contact)
 *
 * Layout based on the design's ContactsV4: hero (no gradient,
 * editorial), then two-column grid of channel cards (email +
 * phone) and brief form. CF7 fields are restyled to match.
 * ============================================================ */

.contact-page-main.contacts-v4 {
    background: var(--lv-surface, #f8f9fa);
    color: var(--lv-on-surface, #191c1d);
    position: relative;
    overflow: hidden;
}

/* Address line in the quick-info block is a link to Google Maps.
   Inherit color from the surrounding text — underline only on hover. */
.contacts-v4__map-link {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
.contacts-v4__map-link:hover,
.contacts-v4__map-link:focus-visible {
    color: var(--lv-primary, #790000);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Breadcrumbs strip — no inline border (the global .pg-crumbs has its own).
   Width matches the site .container so the crumb line is aligned with the
   header navigation. Horizontal padding lives on the inner .pg-crumbs (40px
   via single-post.css) — adding our own here would double-pad the strip and
   push the first crumb 40px right of the logo. */
.contacts-v4__crumbs {
    background: var(--lv-surface, #f8f9fa);
}
.contacts-v4__crumbs-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 18px 0 0;
}

/* ──────────────────────────────────────────────
 * HERO — strict, balanced spacing top vs bottom
 * ────────────────────────────────────────────── */
.contacts-v4__hero {
    text-align: center;
    padding: 64px 24px 64px;
    position: relative;
}
.contacts-v4__hero-inner {
    max-width: 720px;
    margin: 0 auto;
}
.contacts-v4__hero h1 {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: clamp(40px, 5.4vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: var(--lv-on-surface, #191c1d);
    font-weight: 700;
    margin: 0 0 18px;
}
.contacts-v4__hero p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--lv-secondary, #545e76);
    max-width: 600px;
    margin: 0 auto;
}

/* ──────────────────────────────────────────────
 * GRID: left = channels + quick, right = form
 * Width matches the site .container so contact cards line up with the
 * header navigation above.
 * ────────────────────────────────────────────── */
.contacts-v4__grid {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 24px 32px 96px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* ─── Left column ─── */
.contacts-v4__skip {
    display: grid;
    gap: 16px;
}
.contacts-v4__skip-eyebrow {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lv-on-surface, #191c1d);
    margin-bottom: 4px;
}
.contacts-v4__skip-eyebrow--second { margin-top: 16px; }

/* Channel card (email / phone) */
.contacts-v4__card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.contacts-v4__card:hover {
    border-color: var(--lv-on-surface, #191c1d);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px -4px rgba(25, 28, 29, 0.12);
}

.contacts-v4__card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contacts-v4__card-icon--mail {
    background: rgba(121, 0, 0, 0.10);
    color: #790000;
}
.contacts-v4__card-icon--phone {
    background: rgba(46, 194, 126, 0.14);
    color: #1f8a5b;
}

.contacts-v4__card-body { min-width: 0; }
.contacts-v4__card-body h4 {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--lv-on-surface, #191c1d);
    font-weight: 700;
    margin: 0 0 6px;
}
.contacts-v4__card-body p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--lv-secondary, #545e76);
    margin: 0 0 10px;
}
.contacts-v4__card-link {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    color: #790000;
    word-break: break-word;
}
.contacts-v4__card-link--phone { color: #1f8a5b; }

/* Quick info table */
.contacts-v4__quick {
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    overflow: hidden;
}
.contacts-v4__quick-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 12px 18px;
    border-top: 1px solid var(--lv-border, #e4e6ea);
    font-size: 13px;
}
.contacts-v4__quick-row:first-child { border-top: 0; }
.contacts-v4__quick-row .lab {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lv-secondary, #545e76);
}
.contacts-v4__quick-row .val {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-weight: 500;
    color: var(--lv-on-surface, #191c1d);
    text-align: right;
}

/* ─── Right column ─── */
.contacts-v4__form-card {
    background: #ffffff;
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    padding: 36px 36px 32px;
    box-shadow: 0 4px 14px -8px rgba(25, 28, 29, 0.10);
}
.contacts-v4__form-card h2 {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 26px;
    letter-spacing: -0.02em;
    color: var(--lv-on-surface, #191c1d);
    font-weight: 700;
    margin: 0 0 24px;
}

/* Generic fallback form fields (when no CF7 shortcode is set) */
.contacts-v4__fallback-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.contacts-v4__fallback-form .field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.contacts-v4__fallback-form .field:last-of-type { margin-bottom: 24px; }
.contacts-v4__fallback-form label {
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--lv-on-surface, #191c1d);
    margin-bottom: 8px;
}
.contacts-v4__fallback-form input,
.contacts-v4__fallback-form textarea {
    background: var(--lv-surface-container, #edeeef);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 14px;
    color: var(--lv-on-surface, #191c1d);
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
    resize: vertical;
}
.contacts-v4__fallback-form input::placeholder,
.contacts-v4__fallback-form textarea::placeholder { color: #9aa1ab; }
.contacts-v4__fallback-form input:focus,
.contacts-v4__fallback-form textarea:focus {
    outline: none;
    border-color: #790000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(121, 0, 0, 0.18);
}

/* CF7 shortcode integration — restyle so fields look the same */
.contacts-v4__form-card .wpcf7-form p {
    display: flex;
    flex-direction: column;
    margin: 0 0 16px;
}
.contacts-v4__form-card .wpcf7-form label {
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--lv-on-surface, #191c1d);
    margin-bottom: 8px;
}
.contacts-v4__form-card .wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
    background: var(--lv-surface-container, #edeeef);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 14px;
    color: var(--lv-on-surface, #191c1d);
    width: 100%;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.contacts-v4__form-card .wpcf7-form-control:not([type="submit"]):focus {
    outline: none;
    border-color: #790000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(121, 0, 0, 0.18);
}

/* ──────────────────────────────────────────────
 * intl-tel-input integration with CF7 phone field
 * ────────────────────────────────────────────── */

/* The plugin wraps <input type=tel> in <div class=iti> — make the wrapper
   itself a block so the input still fills the form column. */
.contacts-v4__form-card .iti {
    width: 100%;
    display: block;
}

/* Match the rest of the form's input styling: same grey background, padding,
   radius and focus ring. The plugin sets inline padding-left on the input to
   leave room for the country flag + dial code, so we don't override that. */
.contacts-v4__form-card .iti input.wpcf7-tel,
.contacts-v4__form-card .iti input[type="tel"] {
    background: var(--lv-surface-container, #edeeef);
    border: 1px solid transparent;
    border-radius: 6px;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-right: 16px;
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 14px;
    color: var(--lv-on-surface, #191c1d);
    width: 100%;
}
.contacts-v4__form-card .iti input.wpcf7-tel:focus,
.contacts-v4__form-card .iti input[type="tel"]:focus {
    outline: none;
    border-color: #790000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(121, 0, 0, 0.18);
}

/* Dropdown z-index — `dropdownContainer: document.body` already detaches the
   list, but bump it above any sticky widgets just in case. */
.iti__country-list {
    z-index: 1000;
}

/* Submit button — square (6px), dark, hover red */
.contacts-v4__send,
.contacts-v4__form-card .wpcf7-submit,
.contacts-v4__form-card input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--lv-on-surface, #191c1d);
    color: #fff;
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.contacts-v4__send:hover,
.contacts-v4__form-card .wpcf7-submit:hover,
.contacts-v4__form-card input[type="submit"]:hover {
    background: #790000;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(121, 0, 0, 0.45);
    color: #fff;
}
.contacts-v4__send .icon { font-size: 16px; transform: rotate(-30deg); display: inline-block; }

.contacts-v4__fallback-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--lv-secondary, #545e76);
}
.contacts-v4__fallback-note a { color: #790000; font-weight: 600; }

/* CF7 messages */
.contacts-v4__form-card .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid var(--lv-border, #e4e6ea);
    background: var(--lv-surface, #f8f9fa);
    color: var(--lv-on-surface, #191c1d);
}
.contacts-v4__form-card .wpcf7-not-valid-tip {
    color: #c2185b;
    font-size: 12px;
    margin-top: 4px;
}

/* ──────────────────────────────────────────────
 * Responsive
 * ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .contacts-v4__hero { padding: 40px 20px 40px; }
    .contacts-v4__hero h1 { font-size: 38px; }
    .contacts-v4__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 20px 80px;
    }
    .contacts-v4__form-card { padding: 28px 24px 24px; }
    .contacts-v4__fallback-form .row { grid-template-columns: 1fr; gap: 0; }
    .contacts-v4__quick-row { padding: 12px 16px; }
}

@media (max-width: 480px) {
    .contacts-v4__card { padding: 18px; gap: 16px; }
    .contacts-v4__card-icon { width: 44px; height: 44px; }
    .contacts-v4__card-body h4 { font-size: 16px; }
    .contacts-v4__form-card h2 { font-size: 22px; }
}
