/*
 * Contact page (page-templates/contact.php) restyled after the new home page (MILESTONES #20, pilot).
 * Shared blocks (titles, FAQ, ambassadors, counter, registration, headquarters) are in site-components.css.
 * style_tymek.css sets several of these boxes with !important below 500px, hence the !important there.
 */

body.amg-skin #page-container #contacttous {
    margin: 0 !important;
    padding: clamp(40px, 4.6vw, 72px) 0 clamp(8px, 1.6vw, 24px);
    background: linear-gradient(180deg, var(--amg-soft-blue) 0%, var(--amg-soft) 60%, #fff 100%);
}

body.amg-skin #page-container #contacttous .contacttous-container {
    align-items: stretch;
    gap: clamp(20px, 2.4vw, 36px);
    width: min(100% - 32px, 1290px);
    margin: 0 auto !important;
}

body.amg-skin #page-container #contacttous .contacttous-container .contact-info-container,
body.amg-skin #page-container #contacttous .contacttous-container .contact-form-container {
    flex: 1 1 0;
    min-width: 0;
    max-width: none !important;
    height: auto;
    margin: 0;
    padding: clamp(24px, 2.6vw, 40px) !important;
    border: 1px solid var(--amg-line);
    border-radius: var(--amg-radius-lg);
    background: #fff;
    box-shadow: var(--amg-shadow);
}

body.amg-skin #page-container #contacttous .contact-title {
    margin: 0 0 18px !important;
    padding: 0 !important;
    color: var(--amg-navy);
    font-family: var(--amg-font);
    font-size: clamp(24px, 2vw, 32px) !important;
    font-weight: 800;
    line-height: 1.2;
}

body.amg-skin #page-container #contacttous .contact-title-small {
    margin: 0 0 12px !important;
    color: var(--amg-blue);
    font-family: var(--amg-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.4;
    text-transform: uppercase;
}

body.amg-skin #page-container #contacttous .contact-desc {
    margin-bottom: 26px;
    color: var(--amg-text);
}

body.amg-skin #page-container #contacttous .contact-desc:empty {
    display: none;
}

/* The card is as tall as the form next to it: the button goes to its bottom, level with "Send message". */
body.amg-skin #page-container #contacttous .contact-buttons-container {
    margin-top: auto;
    padding-top: 28px;
}

/* style_tymek.css below 500px: #wpcf7-f658-p39-o1 { padding-top: 3rem } — a gap under "Message us" in the card. */
body.amg-skin #page-container #contacttous .contact-form-container .wpcf7 {
    padding-top: 0;
}

/* Contact Form 7 (form 658): the fields had a fixed 255px with space-between — one field per row and a gap at
   1024px, the two far apart at 820px. Two equal columns now; below 500px style_tymek.css makes them full width. */
body.amg-skin #page-container .contact-form-container .wpcf7-form .cf-field-item:not(.cf-type-ta):not(.cf-field-item-submit):not(.max-width) {
    max-width: calc(50% - 8px);
}

body.amg-skin #page-container .contact-form-container .wpcf7-form .cf-field-item input,
body.amg-skin #page-container .contact-form-container .wpcf7-form .cf-field-item select {
    max-width: 100%;
}

/* The headquarters columns in the card: three equal columns (the logo column is hidden by style_tymek.css) wherever
   they sit in a row; below 576px they are stacked and keep their own height (flex-basis 0 would collapse them). */
@media (min-width: 576px) {
    body.amg-skin #page-container .contact-info-container #headquarters .headquarters-column {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
}

@media (min-width: 992px) {
    body.amg-skin #page-container .contact-info-container #headquarters .mb-phone {
        white-space: nowrap;
    }
}

@media (max-width: 980px) {
    body.amg-skin #page-container #contacttous .contacttous-container {
        flex-direction: column !important;
    }
}
