/* IHPBA — accessibility & UX enhancements */

:root {
  --ihpba-focus: #28a680;
  --ihpba-navy: #121c52;
  --ihpba-blue: #283d97;
}

/*
  SEO heading-level demotion safeguard.
  Typography is class-driven (.section-header, .title, .otp_title, .title-2).
  These rules neutralize Webflow element defaults (h1/h2/h3) so tag changes
  for hierarchy do not alter visual size/spacing.
*/
h1.section-header,
h2.section-header {
  margin-top: 0;
  font-weight: inherit;
  line-height: inherit;
}

h2.title,
h3.title,
h2.title-2,
h2.otp_title {
  /* Class rules already set font-size/weight/margins; keep element defaults from winning */
  line-height: inherit;
}

/* Modal / auth titles — comfortable vertical breathing room */
.popup_login .title.auth_title,
.popup_login .title-2.auth_title,
.site_modal .title.auth_title,
.site_modal .title-2.auth_title,
.otp_popup .otp_title,
.otp_title,
.forgot_pass_popup .fp_form_title,
.fp_form_title {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.popup_login .heading_title,
.site_modal .heading_title {
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
}

/* Focus-visible for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.w-button:focus-visible,
.w-nav-link:focus-visible,
.w-dropdown-toggle:focus-visible,
.w-dropdown-link:focus-visible,
.nav-link:focus-visible,
.foot_link_item:focus-visible,
.popup_close:focus-visible,
.close_login:focus-visible,
.menu-button:focus-visible,
.w-nav-button:focus-visible,
.anchor_scroll:focus-visible,
.form_control:focus-visible,
.otp_input:focus-visible,
.fp_input_field:focus-visible,
.text_field-2:focus-visible,
.search-input-2:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--ihpba-focus) !important;
  outline-offset: 2px;
}

.form_control:focus,
.otp_input:focus,
.fp_input_field:focus,
.w-input:focus {
  outline: 2px solid var(--ihpba-focus);
  outline-offset: 2px;
}

/* Back-to-top FAB */
.anchor_scroll {
  box-sizing: border-box;
  position: fixed;
  z-index: 90;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  display: none !important;
  align-items: center;
  justify-content: center;
  background-color: var(--ihpba-navy);
  color: #fff;
  border-radius: 100%;
  bottom: max(5.5rem, calc(env(safe-area-inset-bottom, 0px) + 5rem));
  right: max(1rem, env(safe-area-inset-right, 0px));
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(18, 28, 82, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.anchor_scroll.is-visible {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.anchor_scroll:hover,
.anchor_scroll:focus-visible {
  transform: translateY(-2px);
  background-color: var(--ihpba-blue);
  color: #fff;
}

.anchor_scroll:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.anchor_scroll .anchor-arrow-wrap,
.anchor_scroll svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  pointer-events: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--ihpba-navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0.5rem;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
  color: #fff;
}

/* Overflow / media safety */
html {
  overflow-x: clip;
}

/* Do NOT set height:auto on iframes — it collapses Google Maps / embeds
   (iframe height="100%" becomes auto and the map shrinks to a thin strip,
   leaving the 400px wrapper as empty white space). */
img,
video {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
}

/*
 * Profile login dropdown: Webflow’s .w-icon-dropdown-toggle is position:absolute
 * (top/right/bottom:0). When the panel opens, that caret can paint over the
 * name/email row and the PUA glyph can look like a user silhouette if the
 * webflow-icons font isn’t applied. Keep the caret in normal flow and draw a
 * CSS chevron instead.
 */
.login_dropdown .login_dt_toggle {
  position: relative;
  display: block;
}

.login_dropdown .user_details_div-2 {
  position: relative;
  z-index: 1;
}

.login_dropdown .user-dropdown-icon.w-icon-dropdown-toggle {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 0.35rem 0 0 !important;
  padding: 0 !important;
  width: 0.55rem !important;
  height: 0.55rem !important;
  flex: 0 0 auto;
  border-right: 2px solid #4c5462;
  border-bottom: 2px solid #4c5462;
  transform: rotate(45deg);
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  pointer-events: none;
}

.login_dropdown .user-dropdown-icon.w-icon-dropdown-toggle::before,
.login_dropdown .user-dropdown-icon.w-icon-dropdown-toggle::after {
  content: none !important;
  display: none !important;
}

.login_dropdown .login_drop_down_list {
  isolation: isolate;
  background-color: #fff;
}

.login_dropdown .user_dt_img,
.login_dropdown .user_thumbnail_img {
  flex-shrink: 0;
  max-width: none;
  object-fit: cover;
  overflow: hidden;
}

.login_dropdown .user_thumbnail_img {
  width: 2.8rem;
  height: 2.8rem;
}

.login_dropdown .user_dt_img {
  width: 3.4rem;
  height: 3.4rem;
}

.login_dropdown .user_name_email_block,
.login_dropdown .user_full_name-2,
.login_dropdown .user-full-name {
  position: relative;
  z-index: 1;
}

.login_dropdown .user_full_name-2::before,
.login_dropdown .user_full_name-2::after,
.login_dropdown .user-full-name::before,
.login_dropdown .user-full-name::after {
  content: none !important;
  display: none !important;
}

.table-responsive,
.table_wrapper,
.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.search-empty-state,
.api-empty-state {
  text-align: center;
  color: var(--ih_sub_text, #768197);
  padding: 2rem 1rem;
  line-height: 1.6;
}

.search_container .search-empty-state {
  margin-top: 1.5rem;
}

/* Micro-interactions ≤300ms */
a,
button,
.w-button,
.w-nav-link,
.nav-link,
.outline_btn,
.foot_link_item,
.popup_close,
.close_login,
.menu-button,
.form_control,
.otp_input,
.text_field-2,
.fp_input_field {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Async skeleton placeholders (reserve space → less CLS) */
.ihpba-skeleton {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem 0;
  min-height: 5.5rem;
  width: 100%;
  box-sizing: border-box;
}

.ihpba-skeleton__line {
  height: 0.85rem;
  border-radius: 0.35rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28) 25%,
    rgba(255, 255, 255, 0.48) 50%,
    rgba(255, 255, 255, 0.28) 75%
  );
  background-size: 200% 100%;
  animation: ihpba-skeleton-shimmer 1.2s ease-in-out infinite;
}

.ihpba-skeleton__line--title {
  width: 88%;
  height: 1rem;
}

.ihpba-skeleton__line--meta {
  width: 42%;
  height: 0.7rem;
}

.ihpba-skeleton__line--body {
  width: 70%;
}

.ihpba-skeleton__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ihpba-skeleton__icon {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.35);
  animation: ihpba-skeleton-shimmer 1.2s ease-in-out infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28) 25%,
    rgba(255, 255, 255, 0.48) 50%,
    rgba(255, 255, 255, 0.28) 75%
  );
}

/* Latest Announcement card: title + date row */
.ihpba-skeleton--announcement {
  gap: 0.85rem;
  min-height: 4.75rem;
  padding-right: 1.5rem;
}

.ihpba-skeleton--announcement .ihpba-skeleton__line--title {
  width: 92%;
  height: 1.05rem;
}

.ihpba-skeleton--announcement .ihpba-skeleton__line--meta {
  width: 7.5rem;
}

/* Upcoming Events card: date badge + title/meta column */
.ihpba-skeleton--event {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 6.5rem;
  padding-right: 1.5rem;
}

.ihpba-skeleton__date-badge {
  flex: 0 0 auto;
  width: 3.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
}

.ihpba-skeleton__date-badge .ihpba-skeleton__line--day {
  width: 100%;
  height: 2.4rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.75);
}

.ihpba-skeleton__date-badge .ihpba-skeleton__line--month {
  width: 100%;
  height: 1.15rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.95);
}

.ihpba-skeleton__event-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  padding-top: 0.15rem;
}

.ihpba-skeleton__event-body .ihpba-skeleton__line--title {
  width: 78%;
  height: 0.95rem;
}

.ihpba-skeleton__event-body .ihpba-skeleton__meta .ihpba-skeleton__line--meta {
  width: 9rem;
}

.ihpba-skeleton__event-body .ihpba-skeleton__meta:nth-child(3) .ihpba-skeleton__line--meta {
  width: 11rem;
}

.ihpba-skeleton__event-body .ihpba-skeleton__meta:nth-child(4) .ihpba-skeleton__line--meta {
  width: 8rem;
}

/* Neutral skeleton (list pages / non-gradient cards) */
.ihpba-skeleton--neutral .ihpba-skeleton__line,
.ihpba-skeleton--neutral .ihpba-skeleton__icon {
  background-image: linear-gradient(90deg, #e8ecf4 25%, #f5f7fb 50%, #e8ecf4 75%);
}

@keyframes ihpba-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Form success / error differentiation (icon + text + color) */
.w-form-done,
.support-form-success-wrapper,
.form-msg--success {
  border-left: 4px solid #2e7d32;
}

.w-form-fail,
.form-msg--error,
.form_error,
.form_error_2,
.login_error {
  border-left: 4px solid #c62828;
}

.form_error,
.form_error_2,
.login_error {
  color: #b71c1c;
}

.form_label .contact_must_checked,
.field-label-8 .contact_must_checked,
.form_label span:not([class]) {
  color: #c62828;
  font-weight: 700;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Event date badge: keep day number clear of overlapping month pill */
.date_month_wrapper,
.date_event {
  overflow: visible;
}

.event_date_big {
  display: block;
  margin: 0.4rem 0 0;
  padding: 0 0 1rem;
  line-height: 1;
  font-size: 2.125rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 1;
}

.date_wrap {
  position: relative;
  z-index: 2;
}

@media (max-width: 991px) {
  .header-top-flex,
  .footer_bottom_flex,
  .title_button_wrapper,
  .error-page-actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .anchor_scroll,
  .anchor_scroll:hover,
  .anchor_scroll:focus-visible {
    transition: none;
    transform: none;
  }

  .ihpba-skeleton__line {
    animation: none;
    background: #e8ecf4;
  }
}
