/* Integration refinements for secondary pages and forms. */

/* Secondary-page headings sometimes use direct children rather than the home layout. */
.section-heading:has(> h2) { display: block; }
.section-heading > .eyebrow { max-width: none; color: var(--blue); }
.section-heading > h2 + .lead { max-width: 760px; margin-top: 22px; }
.page-head .wrap > .text-link:first-child { margin-bottom: 26px; }
.about-layout .prose > .eyebrow + h2 { margin-top: 0; }
.about-layout .button-stack,
.event-detail-main > .button-stack,
.venue-card > .button-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.venue-card > .button-stack { margin-top: 26px; }
.section-actions { margin-top: 35px; }
.section h2 + :is(.schedule-grid, .custom-schedule) { margin-top: 30px; }
.schedule-note { color: var(--muted); font-size: .875rem; line-height: 1.65; margin-top: 20px; }

/* Event detail: the image is inside a figure and the schedule uses a semantic list. */
.event-detail > * { min-width: 0; }
.event-detail:not(:has(.event-detail-photo)) { grid-template-columns: minmax(0, 1fr); max-width: 960px; }
.event-detail-main > .lead { margin-bottom: 30px; }
.event-detail-main > .event-info { position: static; margin-top: 22px; }
.event-info > span { display: block; color: var(--muted); font-size: .875rem; margin-bottom: 7px; }
.event-info > strong { display: block; font-weight: 600; font-size: 1.125rem; line-height: 1.65; }
.event-info > p:not(.schedule-note) { white-space: pre-line; }
.event-sessions { list-style: none; margin: 0; padding: 0; }
.event-sessions > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 22px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.event-sessions > li > span { color: var(--muted); font-size: .9375rem; }
.event-sessions time { color: var(--ink); font-size: 1rem; font-weight: 600; white-space: nowrap; }
.event-info .schedule-note { font-size: .875rem; color: var(--muted); margin-top: 19px; }
.event-detail-photo { margin: 0; width: 100%; max-height: none; border-radius: 0; overflow: visible; }
.event-detail-photo img { width: 100%; aspect-ratio: 4 / 5; max-height: 590px; object-fit: cover; object-position: center 25%; border-radius: 14px; }
.event-detail-photo figcaption { margin-top: 14px; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.event-venue { display: flex; gap: 16px; align-items: flex-start; }
.event-venue > span { color: var(--blue); margin-top: 4px; flex: 0 0 auto; }
.event-venue > div { min-width: 0; }
.event-venue h2 { font-size: 1.4rem; line-height: 1.4; margin-bottom: 10px; }
.event-venue p { color: var(--muted); margin-bottom: 14px; }
.event-date-label { font-size: .875rem; line-height: 1.65; }
.event-date-block > span { font-size: .875rem; }
.past-gatherings { max-width: 960px; margin-top: 35px; border-top: 1px solid var(--line); }
.past-gatherings > summary { cursor: pointer; padding: 22px 0; font-weight: 600; font-size: 1rem; }
.past-gatherings > summary > span { color: var(--muted); font-weight: 400; margin-left: 12px; }

/* The two message-art spans have different jobs: a small wordmark and a play button. */
.message-art > .message-art-word { position: absolute; bottom: 18px; left: 22px; display: block; width: auto; height: auto; border: 0; border-radius: 0; color: #b6cae4; font-size: .875rem; letter-spacing: .17em; background: none; }
.message-art:hover > .message-art-word { transform: none; background: none; }
.message-art > .play-ring { width: 60px; height: 60px; }
.message-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.message-meta > span, .message-meta > time { display: block; }
.message-body > p { font-size: 1rem; line-height: 1.75; }
button.text-link { border: 0; background: none; padding: 0; font-family: inherit; text-align: left; }
.messages-controls { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 22px; }
.messages-controls .button-stack { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.message-search-label { display: grid; gap: 9px; font-size: .9375rem; min-width: 0; width: min(100%, 420px); }
.message-search-label input { width: 100%; min-height: 50px; padding: 12px 15px; border: 1px solid #bdcad9; border-radius: 7px; background: white; color: var(--ink); }
.message-grid > .quiet-state { grid-column: 1 / -1; }

/* Contact cards: keep each name above its numbers, with comfortable tap targets. */
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 35px; }
.contact-person { display: flex; align-items: flex-start; gap: 18px; min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 14px; }
.contact-person > .contact-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; background: #edf3fd; border-radius: 10px; color: var(--blue); flex: 0 0 auto; }
.contact-person .contact-icon .icon { width: 22px; height: 22px; }
.contact-person > div { display: block; min-width: 0; }
.contact-person h3 { margin-bottom: 8px; font-size: 1.15rem; line-height: 1.5; }
.contact-numbers { display: flex; flex-wrap: wrap; gap: 0 24px; }
.contact-person a { display: inline-flex; min-height: 40px; align-items: center; font-size: 1rem; overflow-wrap: anywhere; }
.visit-faq h2 { margin-bottom: 28px; }
.visit-faq details .text-link { margin-top: 14px; }

/* Reset browser figure margins and provide spacing for published gallery/testimony content. */
.gallery-grid > figure { margin: 0; min-width: 0; }
.gallery-grid > .quiet-state { grid-column: 1 / -1; }
.gallery-grid img { width: 100%; }
.gallery-grid figcaption > strong { display: block; font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; line-height: 1.5; }
.gallery-grid figcaption p { color: var(--muted); line-height: 1.75; }
.content-entry > time { display: block; color: var(--muted); font-size: .875rem; margin-bottom: 14px; }
.testimony-entry blockquote { font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.8; white-space: pre-line; }
.testimony-entry .testimony-name { font-size: .9375rem; color: var(--muted); margin-top: 20px; }

/* Public form controls must not inherit text-input dimensions on their checkboxes. */
.public-form .form-field > label { font-weight: 550; }
.public-form .form-field .check-label { font-weight: 400; }
.public-form .form-field .check-label > input[type="checkbox"] { appearance: auto; width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: 5px 0 0; padding: 0; border-radius: 4px; flex: 0 0 20px; accent-color: var(--blue); }
.public-form > .preview-disclosure { margin: 0; color: #4d668d; font-size: .875rem; line-height: 1.75; }
.public-form .form-note { font-size: .875rem; line-height: 1.7; }
.public-form .field-error { font-size: .875rem; font-weight: 400; line-height: 1.65; }
.public-form .form-counter { display: block; font-size: .75rem; margin-top: 4px; }
.public-form .form-event { margin-bottom: 6px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.public-form .form-event h2 { font-size: 1.65rem; line-height: 1.45; margin-bottom: 12px; }
.public-form .form-event p:not(.eyebrow) { color: var(--muted); }
.form-success > .form-emblem { width: 70px; height: 70px; background: #e4f1e9; border-color: #cfe2d7; }
.form-success > .form-emblem > .icon { color: #367354; }
.form-loader { flex: 0 0 18px; }

/* The public language setting must not restyle English office headings. */
.office-root[lang="en"] { font-family: Inter, "Noto Tamil", "Noto Hindi", system-ui, sans-serif; }
.office-root[lang="en"] :is(h1, h2, h3) { font-family: inherit; letter-spacing: -.035em; line-height: 1.3; }
.office-root[lang="en"] .office-auth-intro h1 { line-height: 1.1; letter-spacing: -.055em; }
.office-root[lang="en"] .office-page-head h1 { line-height: 1.2; }
.office-root[lang="en"] .office-nav-group h2 { letter-spacing: .04em; }
.office-root[lang="en"] .office-card-heading h2 { line-height: 1.4; }
.office-root[lang="en"] .office-auth-heading h2 { line-height: 1.35; }
.office-root[lang="en"] :is(input, textarea)[lang="ta"] { font-family: "Noto Tamil", Inter, sans-serif; line-height: 1.85; }
.office-root[lang="en"] :is(input, textarea)[lang="hi"] { font-family: "Noto Hindi", Inter, sans-serif; line-height: 1.85; }

@media (max-width: 1050px) {
  .contact-list { gap: 18px; }
  .contact-person { padding: 23px; gap: 14px; }
}
@media (max-width: 760px) {
  .section h2 + :is(.schedule-grid, .custom-schedule) { margin-top: 25px; }
  .event-row > .text-link { grid-column: 2; justify-self: start; }
  .event-detail-photo { width: min(100%, 480px); }
  .event-detail-photo img { max-height: 520px; }
  .event-detail-main > .event-info { padding: 25px; }
  .event-sessions > li { gap: 10px 16px; }
  .event-sessions > li > span { font-size: .875rem; }
  .event-sessions time { font-size: .9375rem; }
  .contact-list { grid-template-columns: 1fr; gap: 18px; }
  .contact-person { padding: 23px; }
  .form-layout { gap: 30px; }
  .form-aside > .form-emblem { width: 60px; height: 60px; margin-bottom: 20px; }
  .form-aside h2 { font-size: 1.7rem; }
  .message-search-label { width: 100%; }
}
@media (max-width: 430px) {
  .event-sessions > li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 13px; }
  .event-detail-main > .event-info { padding: 22px; }
  .event-detail-photo { width: 100%; }
  .contact-person { padding: 20px; gap: 12px; }
  .contact-person > .contact-icon { width: 38px; height: 38px; }
  .contact-person h3 { font-size: 1.0625rem; }
  .public-form .form-event h2 { font-size: 1.4rem; }
  .public-form .button-row > .button { width: 100%; }
}
