/* Guard migrated card and timeline components from global semantic-list styles. */
ol.content-grid,
ul.content-grid,
ol.process-timeline,
ul.process-timeline {
  list-style: none;
  padding-left: 0;
}

ol.content-grid > li,
ul.content-grid > li,
ol.process-timeline > li,
ul.process-timeline > li {
  margin-top: 0;
  margin-bottom: 0;
}

/* Public content must remain readable even when animation JavaScript is
   delayed, blocked, or restored from the browser back-forward cache. */
.reveal,
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Bring the first content heading into view directly beneath sticky on-page
   navigation instead of presenting an apparently empty body area. */
.subnav-wrap + .section {
  padding-top: 2rem;
}

.subnav-wrap + .section .section-intro:first-child {
  margin-top: 0;
}

/* .directory-grid was a fixed repeat(2/4, minmax(0,1fr)) grid, so any region
   or country with only 1-2 entries (e.g. Europe currently only has Ireland)
   left a card sitting alone with large empty column tracks beside it, reading
   as a broken/incomplete grid rather than a deliberately short list. auto-fit
   with a capped track width sizes the grid to however many items actually
   exist instead of always reserving 4 columns. */
.directory-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px)) !important;
  justify-content: flex-start;
}

.directory-notice {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--orix-border-soft, #d9dced);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #6b6f8c;
  background: var(--orix-surface-tint, #f5f4ff);
}

/* Region / quick-navigation popup (dismissable). Hand-authored rather than
   Tailwind utility classes: this site's public pages load only the static
   pre-built assets/css/*.css bundle (no @vite / live Tailwind here), so any
   utility class not already present in that compiled CSS silently renders
   unstyled — see the same gap in the existing #gdpr-preferences-modal, which
   references bg-neutral-900/rounded-2xl/scale-95/etc. that were never
   actually compiled into assets/css/app.css. */
.region-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 23, 100, 0.45);
  backdrop-filter: blur(4px);
}

.region-modal-overlay.is-open {
  display: flex;
}

.region-modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(17, 23, 100, 0.28);
  transform: scale(0.97);
  opacity: 0;
  transition: transform 0.25s var(--orix-ease, ease), opacity 0.25s var(--orix-ease, ease);
}

.region-modal-overlay.is-open .region-modal-card {
  transform: scale(1);
  opacity: 1;
}

.region-modal-banner {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 1.25rem 1.25rem 0 0;
}

.region-modal-banner + .region-modal-head {
  border-radius: 0;
}

.region-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background: linear-gradient(135deg, var(--orix-gradient-deep, #111764), var(--orix-gradient-mid, #30266f));
  color: #fff;
}

.region-modal-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.region-modal-head p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.region-modal-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}

.region-modal-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.region-modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.region-modal-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6f8c;
}

/* flex-wrap, not a fixed-column grid: with grid-template-columns: repeat(3,...),
   any item count not divisible by 3 (5 regions, 8 main pages) leaves the last
   row with a dangling empty cell instead of the items just sitting flush left. */
.region-modal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
}

.region-chip,
.page-chip {
  flex: 1 1 calc(50% - 0.3rem);
}

@media (min-width: 480px) {
  .region-chip,
  .page-chip {
    flex: 1 1 calc(33.333% - 0.4rem);
  }
}

.region-chip,
.page-chip {
  display: block;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--orix-border-soft, #d9dced);
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--orix-gradient-deep, #111764);
  background: #fff;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.region-chip:hover,
.page-chip:hover {
  border-color: var(--orix-gradient-mid, #30266f);
  box-shadow: 0 8px 20px rgba(17, 23, 100, 0.1);
  transform: translateY(-1px);
}

.page-chip {
  font-weight: 500;
  color: #374151;
}

.region-modal-foot {
  display: flex;
  justify-content: flex-end;
}

.region-modal-dismiss {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b6f8c;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.region-modal-dismiss:hover {
  color: var(--orix-gradient-deep, #111764);
}
