/* =====================================================
   Contact Page
   ===================================================== */

main.container {
    max-width: 100% !important;
    padding-inline: 0 !important;
    overflow-x: clip;
}

.contact-page {
    background: #fff;
    margin-top: calc(-1 * var(--header-height, 78px));
}

/* Compressed hero — title flush at navbar bottom, slim bottom padding,
   smaller-but-readable typography. Applies to every page using the
   .contact-hero pattern (contact, library, news-and-blog, accomplishments,
   memberships, donate). */
.contact-hero {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    min-height: auto;
    background: var(--color-primary-dark) !important;
    color: #fff;
    padding-block: var(--header-height, 78px) clamp(0.75rem, 1.5vw, 1.25rem);
}

.contact-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.contact-hero__title {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
    max-width: 22ch;
    text-shadow: none;
}

.contact-hero__intro {
    max-width: 60rem;
    margin-top: clamp(0.5rem, 1vw, 0.75rem);
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.5;
    text-shadow: none;
}

/* Plugin-rendered <p> inside the hero text wrappers should be visually
   indistinguishable from bare text in the wrapper — match font, color,
   line-height, alignment, and zero out any margin/padding the user-agent
   or Bootstrap reset might add. */
.contact-hero__title p,
.contact-hero__intro p,
.contact-info-card__eyebrow p,
.contact-info-card__title p,
.contact-info-card__text p,
.contact-info-item__label p,
.contact-info-item__value p,
.contact-response-note p,
.contact-location__label p {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    text-align: inherit;
}

.contact-hero__title > p,
.contact-hero__intro > p,
.contact-hero__title .text-plugin > p,
.contact-hero__intro .text-plugin > p {
    display: inline !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: inherit !important;
}

html[dir="rtl"] .contact-hero__title,
html[dir="rtl"] .contact-hero__intro {
    font-family: "Noto Naskh Arabic", Georgia, serif;
}

html[dir="rtl"] .contact-hero__inner {
    direction: rtl;
    text-align: right !important;
    width: 100%;
}

html[dir="rtl"] .contact-hero__title {
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
    text-align: right !important;
}

html[dir="rtl"] .contact-hero__intro {
    text-align: right !important;
}

.contact-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
    padding-bottom: clamp(4rem, 7vw, 6rem);
}

.contact-page__messages {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    max-width: 960px;
    margin: clamp(1.5rem, 3vw, 2.5rem) auto 5rem;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.contact-info-card {
    min-width: 0;
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--color-primary);
    color: #fff;
}

.contact-info-card__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: 0.25rem;
    background: #0596b7;
    color: #8ff7ff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

html[dir="rtl"] .contact-info-card__eyebrow {
    letter-spacing: 0;
}

.contact-info-card__title {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
}

html[dir="rtl"] .contact-info-card__title {
    font-family: "Noto Naskh Arabic", Georgia, serif;
}

.contact-info-card__text {
    margin-top: 1.3rem;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.contact-info-list {
    display: grid;
    gap: 1.55rem;
    margin-top: 3rem;
}

.contact-info-item {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.contact-info-item__icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #10dac7, #27a9e0);
    color: #fff;
}

.contact-info-item__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.contact-info-item__label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
    line-height: 1.35;
}

.contact-info-item__value {
    margin-top: 0.15rem;
    color: #fff;
    font-weight: 800;
    line-height: 1.45;
}

.contact-info-item__value a {
    color: inherit;
    text-decoration: none;
}

.contact-info-item__value a:hover,
.contact-info-item__value a:focus-visible {
    color: #8ff7ff;
}

.contact-info-item__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-form-card {
    min-width: 0;
    padding: clamp(2rem, 4vw, 3rem);
    background: #eaf6ff;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem 1.55rem;
}

.contact-field {
    min-width: 0;
}

.contact-field--full {
    grid-column: 1 / -1;
}

.contact-field label {
    display: block;
    margin-bottom: 0.55rem;
    color: #172554;
    font-size: 0.88rem;
    font-weight: 800;
}

.contact-input {
    width: 100%;
    min-height: 3.15rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d5dde8;
    border-radius: 0.5rem;
    background: #fff;
    color: #111827;
    box-shadow: none;
}

.contact-input:focus {
    border-color: #27a9e0;
    box-shadow: 0 0 0 0.2rem rgba(39, 169, 224, 0.18);
}

.contact-textarea {
    min-height: 10.5rem;
    resize: vertical;
}

.contact-field .errorlist {
    margin: 0.45rem 0 0;
    padding: 0;
    color: #b42318;
    font-size: 0.84rem;
    list-style: none;
}

.contact-submit {
    display: flex;
    width: 100%;
    min-height: 3.7rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.55rem;
    border: 0;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #12d6bd, #27a9e0);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 16px 30px rgba(39, 169, 224, 0.24);
}

.contact-submit p {
    margin: 0;
}

.contact-submit:hover,
.contact-submit:focus-visible {
    background: linear-gradient(135deg, #0fc5ae, #1f98cc);
}

/* Loading state — JS adds aria-busy="true" + spinner span on submit. */
.contact-submit[aria-busy="true"] {
    cursor: progress;
    opacity: 0.85;
}

.contact-submit[aria-busy="true"]:hover,
.contact-submit[aria-busy="true"]:focus-visible {
    background: linear-gradient(135deg, #12d6bd, #27a9e0);
}

.contact-submit__spinner {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    margin-inline-end: 0.55rem;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -0.2em;
    animation: contact-submit-spin 0.7s linear infinite;
}

.contact-submit__label {
    display: inline-block;
}

@keyframes contact-submit-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .contact-submit__spinner { animation: none; }
}

.contact-response-note {
    margin-top: 1.35rem;
    color: #64748b;
    font-size: 0.88rem;
    font-style: italic;
    text-align: center;
}

.contact-location {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0.65rem;
    background: #e5e7eb;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.contact-location__media {
    min-height: clamp(260px, 36vw, 420px);
    background: #d1d5db;
}

.contact-location__media img,
.contact-location__media picture,
.contact-location__media video {
    display: block;
    width: 100%;
    height: clamp(260px, 36vw, 420px);
    object-fit: cover;
    filter: grayscale(1);
}

.contact-location__placeholder {
    min-height: clamp(260px, 36vw, 420px);
    background:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        linear-gradient(135deg, #9ca3af, #e5e7eb 45%, #6b7280);
}

.contact-location__label {
    position: absolute;
    inset-inline-start: 1.5rem;
    inset-block-end: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    max-width: calc(100% - 3rem);
    padding: 0.85rem 1.05rem;
    border-radius: 0.4rem;
    background: #fff;
    color: #111827;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.contact-location__label span[aria-hidden="true"] {
    display: inline-flex;
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #71717a;
}

@media (max-width: 991.98px) {
    .contact-panel {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
}

@media (max-width: 767.98px) {
    .contact-hero {
        padding-block: calc(var(--header-height, 78px) + 0.75rem) clamp(2rem, 6vw, 3rem);
    }

    .contact-hero__inner {
        text-align: center;
    }

    .contact-hero__title {
        margin-inline: auto;
        font-size: clamp(1.9rem, 7vw, 2.75rem);
        max-width: 18ch;
    }

    html[dir="rtl"] .contact-hero__inner {
        direction: rtl;
        text-align: right !important;
        width: 100%;
    }

    html[dir="rtl"] .contact-hero__title {
        margin-inline-start: 0 !important;
        margin-inline-end: auto !important;
        text-align: right !important;
    }

    html[dir="rtl"] .contact-hero__intro {
        text-align: right !important;
    }

    .contact-panel {
        margin-top: 2rem;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-item {
        grid-template-columns: 2.75rem minmax(0, 1fr);
    }

    .contact-location__label {
        inset-inline: 1rem;
        inset-block-end: 1rem;
    }
}
