/* Contact Us page - template-specific overrides */

.page-template-page-contact-us .rum-contact-us-page__legacy-hero .title,
.page-template-page-contact-us .rum-contact-us-page__legacy-hero h1 {
    font-family: var(--rum-font-display) !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.page-template-page-contact-us #search-content {
    overflow: hidden;
}

.page-template-page-contact-us #search-content:not(.active) {
    pointer-events: none;
    visibility: hidden;
}

.page-template-page-contact-us #search-content:not(.active) .close-modal,
.page-template-page-contact-us #search-content:not(.active) .close-modal svg {
    opacity: 0;
}

.page-template-page-contact-us #search-content .close-modal svg {
    height: 2rem;
    max-height: 2rem;
    width: 2rem;
}

.page-template-page-contact-us .rum-contact-us-page__form-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Unified cream contact block: title + form only (footer patterns stay outside) */
.page-template-page-contact-us .rum-contact-us-page__shell {
    background: var(--rum-color-cream-100);
    box-sizing: border-box;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    overflow-x: clip;
    padding: clamp(64px, 9vw, 112px) clamp(24px, 5vw, 48px) clamp(88px, 11vw, 136px);
    position: relative;
    width: 100vw;
}

.page-template-page-contact-us .rum-contact-us-page__shell::before {
    background-color: var(--rum-color-cream-100);
    background-image: url("../img/rumchata-contact-book-binding.svg");
    background-position: left top;
    background-repeat: repeat-y;
    background-size: 24px 14px;
    bottom: 0;
    content: "";
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 24px;
    z-index: 0;
}

.page-template-page-contact-us .rum-contact-us-page__shell > * {
    position: relative;
    z-index: 1;
}

.page-template-page-contact-us .rum-contact-us-page__form-fallback .rum-contact-us-locator {
    margin-top: clamp(24px, 4vw, 48px);
}

.page-template-page-contact-us .homepage-entry .rum-contact-us-locator {
    box-sizing: border-box;
    max-width: none;
}

.page-template-page-contact-us .homepage-entry:not(:has(.rum-contact-us-locator)) > .rum-contact-us-locator,
.page-template-page-contact-us .homepage-entry:not(:has(.rum-contact-us-locator)) .wp-block-shortcode .rum-contact-us-locator,
.homepage-entry:not(:has(.rum-contact-us-locator)) > .rum-contact-us-locator,
.homepage-entry:not(:has(.rum-contact-us-locator)) .wp-block-shortcode .rum-contact-us-locator {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

/* Gutenberg page title above the contact form */
.page-template-page-contact-us .rum-contact-us-page__title {
    box-sizing: border-box;
    color: var(--rum-color-teal-800);
    font-family: "Heatrix", var(--rum-font-display);
    font-size: clamp(4rem, 7vw, 6.5rem);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 0.9;
    margin: 0 auto clamp(40px, 6vw, 72px) !important;
    max-width: min(100%, 743px);
    text-align: center !important;
    text-transform: uppercase;
    width: 100%;
}

.page-template-page-contact-us .rum-contact-us-page__shell > .rum-contact-us-page__title {
    background: transparent;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: min(100%, 743px);
    padding: 0;
    width: 100%;
}

.page-template-page-contact-us .rum-contact-us-page__shell > .rum-contact-us-page__title + .rum-contact-us-locator,
.page-template-page-contact-us .rum-contact-us-page__shell > .rum-contact-us-page__title + .wp-block-shortcode .rum-contact-us-locator,
.page-template-page-contact-us .rum-contact-us-page__shell > .rum-contact-us-page__title + .wp-block-group .rum-contact-us-locator {
    padding-top: 0;
}

/* Hide duplicate SDK heading when the page supplies a Gutenberg title */
.page-template-page-contact-us .rum-contact-us-page__shell:has(> .rum-contact-us-page__title) #ejgContactUs #formHeaderWrapper,
.page-template-page-contact-us .rum-contact-us-page__shell:has(> .rum-contact-us-page__title) #ejgContactUs #formHeaderText,
.page-template-page-contact-us .rum-contact-us-page__shell:has(> .rum-contact-us-page__title) #ejgContactUs .formHeaderText,
.page-template-page-contact-us .rum-contact-us-page__shell:has(> .rum-contact-us-page__title) #ejgContactUs > h1,
.page-template-page-contact-us .rum-contact-us-page__shell:has(> .rum-contact-us-page__title) #ejgContactUs > h2 {
    display: none !important;
}

.page-template-page-contact-us .rum-contact-us-locator {
    margin: 0 auto;
    max-width: min(100%, 743px);
}

.page-template-page-contact-us .b-contact_us {
    background: var(--rum-surface-card);
    border: 1px solid var(--rum-color-border-soft);
    border-radius: var(--rum-radius-card);
    box-shadow: 0 24px 60px var(--rum-color-shadow-soft);
    margin: 0 auto;
    max-width: 680px;
    padding: 32px 28px 36px;
}

.page-template-page-contact-us .b-contact_us .form {
    display: block;
    margin: 0 auto;
    max-width: 680px;
    text-align: left;
}

.page-template-page-contact-us .b-contact_us #formHeaderText,
.page-template-page-contact-us .b-contact_us .formHeaderText {
    color: var(--rum-text-body);
    font-family: var(--rum-font-body);
    font-size: 1rem;
    margin: 0 auto 24px;
    max-width: 680px;
    text-align: center;
}

.page-template-page-contact-us .b-contact_us label,
.page-template-page-contact-us .b-contact_us .label {
    color: var(--rum-text-heading);
    font-family: var(--rum-font-header) !important;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.page-template-page-contact-us .b-contact_us input[type="text"],
.page-template-page-contact-us .b-contact_us input[type="email"],
.page-template-page-contact-us .b-contact_us textarea {
    background: var(--rum-color-cream-100);
    border: 1px solid var(--rum-color-border-soft);
    color: var(--rum-text-body);
    font-family: var(--rum-font-body);
    min-height: 56px;
    padding: 0.9rem 1rem;
    width: 100%;
}

.page-template-page-contact-us .b-contact_us select,
.page-template-page-contact-us .b-contact_us select.custom-select {
    background-color: var(--rum-color-cream-100);
    border: 1px solid var(--rum-color-border-soft);
    color: var(--rum-text-body);
    font-family: var(--rum-font-body);
    min-height: 56px;
    padding: 0.9rem 1rem;
    width: 100%;
}

.page-template-page-contact-us .b-contact_us input[type="text"]:focus,
.page-template-page-contact-us .b-contact_us input[type="email"]:focus,
.page-template-page-contact-us .b-contact_us textarea:focus {
    border-color: var(--rum-color-aqua-400);
    box-shadow: var(--rum-focus-ring);
    outline: 0;
}

.page-template-page-contact-us .b-contact_us select:focus,
.page-template-page-contact-us .b-contact_us select.custom-select:focus {
    background-color: var(--rum-color-cream-100);
    border-color: var(--rum-color-aqua-400);
    box-shadow: var(--rum-focus-ring);
    outline: 0;
}

.page-template-page-contact-us .b-contact_us #submit {
    margin: 32px auto 0;
    min-width: 200px;
}

.page-template-page-contact-us .b-contact_us .parsley-errors-list {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    margin-top: 8px;
}

.page-template-page-contact-us #thankyou-overlay,
.page-template-page-contact-us #thankyou-overlayContent {
    position: fixed;
    z-index: 99990;
}

@media (max-width: 767px) {
    .page-template-page-contact-us .rum-contact-us-page__title {
        font-size: clamp(2.75rem, 12vw, 4rem);
        margin-bottom: 2.5rem;
    }

    .page-template-page-contact-us .b-contact_us {
        padding: 24px 20px 28px;
    }
}
