/*
 * TechEffective Technology Assessment Grants page.
 *
 * Page-specific presentation for page-technology-assessment-grants-for-nonprofits.php.
 * Uses shared buttons, cards, inset panels, feature lists/columns,
 * accordion, and theme spacing/color tokens from components.css.
 * The Contact Form 7 application is rendered on a different WP Page.
 * A Sender signup form can be embedded at the bottom once configured.
 *
 * All main section containers use te-container--wide, matching the
 * centered alignment of the site's header and footer. Text inside
 * those sections remains left-aligned at comfortable reading widths.
 */

.site-main {
    padding-block: 0;
}

/* Hero: consistent with the Services and Why TechEffective pages. */
.te-grants-hero {
    padding-block: clamp(3.5rem, 6vw, 5rem);
    color: #FFFFFF;
    background: linear-gradient(115deg,
            var(--te-color-primary-dark) 0%,
            var(--te-color-primary) 70%,
            var(--te-color-primary-mid) 100%);
}

.te-grants-hero__content {
    max-width: 1050px;
}

.te-grants-hero__eyebrow,
.te-grants-eyebrow {
    margin-bottom: var(--te-space-3);
    color: var(--te-color-accent);
    font-size: var(--te-font-size-sm);
    font-weight: var(--te-font-weight-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.te-grants-hero__eyebrow {
    color: var(--te-color-accent-light);
}

.te-grants-hero__title {
    margin-bottom: var(--te-space-5);
    color: #FFFFFF;
    font-size: clamp(2.5rem, 2rem + 1.6vw, 3.35rem);
    line-height: 1.08;
}

.te-grants-hero__lead {
    max-width: 900px;
    margin-bottom: var(--te-space-4);
    color: #FFFFFF;
    font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.4rem);
    font-weight: var(--te-font-weight-semibold);
    line-height: var(--te-line-height-tight);
}

.te-grants-hero__text {
    max-width: 860px;
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
}

/* Space consecutive hero paragraphs without affecting the CTA layout. */
.te-grants-hero__text+.te-grants-hero__text {
    margin-top: var(--te-space-4);
}

.te-grants-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--te-space-5);
    align-items: center;
    margin-top: var(--te-space-6);
}


/* Consistent orange grant application CTAs. */
.te-grants-hero .te-button--primary,
.te-grants-return .te-button--primary {
    color: #FFFFFF;
    background: var(--te-color-accent);
    border-color: var(--te-color-accent);
}

.te-grants-hero .te-button--primary:hover,
.te-grants-return .te-button--primary:hover {
    color: #FFFFFF;
    background: var(--te-color-accent-dark);
    border-color: var(--te-color-accent-dark);
}


.te-grants-hero__link {
    color: #FFFFFF;
    font-weight: var(--te-font-weight-semibold);
    text-underline-offset: 0.2em;
}

.te-grants-hero__link:hover {
    color: #FFFFFF;
}

/* Full-width section backgrounds; consistently centered inner containers. */
.te-grants-section {
    padding-block: var(--te-section-space-small);
}

.te-grants-section--soft {
    background: var(--te-color-background-soft);
}

.te-grants-section-intro {
    max-width: 900px;
    margin-bottom: var(--te-space-5);
}

.te-grants-section-intro h2,
.te-grants-apply h2 {
    margin-bottom: var(--te-space-3);
    color: var(--te-color-primary-dark);
}

.te-grants-section-intro> :last-child {
    margin-bottom: 0;
}

/* Application status and separate application link are near the top. */
.te-grants-apply {
    max-width: 900px;
}

.te-grants-apply__status {
    margin-bottom: var(--te-space-3);
    color: var(--te-color-primary-dark);
    font-size: var(--te-font-size-lg);
    font-weight: var(--te-font-weight-bold);
}

.te-grants-apply> :last-child {
    margin-bottom: 0;
}

/* Keep the benefit list short and easy to scan. */
.te-grants-benefits {
    max-width: 850px;
}


/*
 * Comprehensive TEA assessment card.
 *
 * Uses the same shared te-card and te-card--accent styling
 * as the four focused assessments. Spans the full width of
 * the two-column assessment grid.
 *
 * Keep its text readable without centering it independently
 * from the other card content.
 */
.te-grants-tea {
    width: 100%;
    height: auto;
    margin-top: var(--te-space-5);
}

.te-grants-tea .te-card__text {
    max-width: 900px;
    margin-bottom: var(--te-space-4);
}

.te-grants-tea__distinction {
    max-width: 900px;
    margin-bottom: var(--te-space-4);
    line-height: var(--te-line-height-normal);
}


/*
 * Expandable details in focused assessment cards and the TEA panel.
 * Native details/summary keep the interaction keyboard-accessible
 * without JavaScript. All rules are scoped to this grant page.
 */
.te-grants-assessment-value {
    margin-top: var(--te-space-4);
    color: var(--te-color-primary-dark);
}

.te-grants-assessment-details {
    margin-top: var(--te-space-4);
    padding-top: var(--te-space-4);
    border-top: 1px solid var(--te-color-border);
}


/* Preserve card expander styling while sharing accordion tracking. */
.te-grants-assessment-details.te-accordion__item {
    border-bottom: 0;
}


.te-grants-assessment-details>summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--te-space-3);
    color: var(--te-color-primary);
    font-weight: var(--te-font-weight-semibold);
    cursor: pointer;
    list-style: none;
    text-underline-offset: 0.2em;
}

.te-grants-assessment-details>summary::-webkit-details-marker {
    display: none;
}

.te-grants-assessment-details>summary::marker {
    content: "";
}

.te-grants-assessment-details>summary::after {
    content: "+";
    font-size: 1.25rem;
    line-height: 1;
}

.te-grants-assessment-details[open]>summary::after {
    content: "−";
}

.te-grants-assessment-details>summary:hover {
    text-decoration: underline;
}

.te-grants-assessment-details>summary:focus-visible {
    outline: 3px solid var(--te-color-accent-light);
    outline-offset: 4px;
}

.te-grants-assessment-details__content {
    padding-top: var(--te-space-4);
}

.te-grants-assessment-details__content h4 {
    margin: var(--te-space-4) 0 var(--te-space-2);
    color: var(--te-color-primary-dark);
    font-size: var(--te-font-size-base);
}

.te-grants-assessment-details__content h4:first-child {
    margin-top: 0;
}

.te-grants-assessment-details__content ul {
    margin: 0 0 var(--te-space-4);
    padding-left: 1.4em;
}

.te-grants-assessment-details__content li+li {
    margin-top: var(--te-space-2);
}

.te-grants-assessment-note {
    color: var(--te-color-text-muted);
    font-style: italic;
}

/* Give process steps a light organizing rule, not another set of boxes. */
.te-grants-section .te-feature {
    padding-top: var(--te-space-4);
    border-top: 2px solid var(--te-color-border);
}

/* FAQ remains left-aligned within the wide outer section. */
.te-grants-faq {
    max-width: 940px;
}

.te-grants-return {
    margin: var(--te-space-5) 0 0;
}

/* Grant updates signup: distinct from the application process. */
.te-grants-updates {
    background: var(--te-color-background);
}

.te-grants-updates__content {
    max-width: 940px;
    text-align: left;
}

.te-grants-updates__content h2 {
    margin-bottom: var(--te-space-3);
    color: var(--te-color-primary-dark);
}

.te-grants-updates__content> :last-child {
    margin-bottom: 0;
}

.te-grants-updates__notice {
    max-width: 940px;
    margin-top: var(--te-space-4);
    margin-bottom: var(--te-space-5);
    padding: var(--te-space-4) var(--te-space-5);
    border-left: 3px solid var(--te-color-primary);
    background: var(--te-color-background-soft);
}

.te-grants-updates__form {
    max-width: 420px;
    margin-top: 0;
}

.te-grants-updates__form .sender-form-field {
    width: 100%;
    max-width: 420px;
}

.te-grants-updates__form iframe {
    width: 100% !important;
    max-width: 420px !important;
}

.te-grants-updates__pending {
    margin-top: var(--te-space-5);
    color: var(--te-color-text-muted);
    font-size: var(--te-font-size-sm);
}

@media (max-width: 640px) {
    .te-grants-updates__notice {
        padding: var(--te-space-4);
    }

    .te-grants-updates__form,
    .te-grants-updates__form .sender-form-field,
    .te-grants-updates__form iframe {
        max-width: 100% !important;
    }
}