/* stylelint-disable declaration-block-single-line-max-declarations, no-descending-specificity */

/**
 * oroup.css — Lightweight replacement for Bootstrap 5
 *
 * Implements only the ~105 Bootstrap utility classes actually used
 * across the oroup.com site, plus a minimal base reset/typography.
 * Replaces ~227 KB of bootstrap.min.css with ~10 KB.
 */

/* ===== Base Reset & Typography ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 500; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-top: 0; margin-bottom: 1rem; }
ol, ul { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
a { color: #0d6efd; text-decoration: underline; }
a:hover { color: #0a58ca; }
img, svg { vertical-align: middle; }
table { caption-side: bottom; border-collapse: collapse; }
th { text-align: inherit; }
label { display: inline-block; }
button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }
hr { margin: 1rem 0; color: inherit; border: 0; border-top: 1px solid; opacity: 0.25; }

/* ===== Containers ===== */
.container, .container-fluid { width: 100%; padding-right: 0.75rem; padding-left: 0.75rem; margin-right: auto; margin-left: auto; }
.container { max-width: 1320px; }

@media (width <= 575.98px) { .container { max-width: 100%; } }

@media (width >= 576px) { .container { max-width: 540px; } }

@media (width >= 768px) { .container { max-width: 720px; } }

@media (width >= 992px) { .container { max-width: 960px; } }

@media (width >= 1200px) { .container { max-width: 1140px; } }

@media (width >= 1400px) { .container { max-width: 1320px; } }

/* ===== Grid ===== */
.row { display: flex; flex-wrap: wrap; margin-right: -0.75rem; margin-left: -0.75rem; }
.row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: 0.75rem; padding-left: 0.75rem; }
.row.g-3 { --gutter-x: 1rem; --gutter-y: 1rem; margin-right: calc(var(--gutter-x) * -0.5); margin-left: calc(var(--gutter-x) * -0.5); }
.row.g-3 > * { padding-right: calc(var(--gutter-x) * 0.5); padding-left: calc(var(--gutter-x) * 0.5); margin-top: var(--gutter-y); }

.col { flex: 1 0 0%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-5 { flex: 0 0 auto; width: 41.6667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (width >= 576px) {
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
}

@media (width >= 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.3333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.6667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.3333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.6667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.3333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.6667%; }
}

@media (width >= 992px) {
  .col-lg-2 { flex: 0 0 auto; width: 16.6667%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.3333%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.6667%; }
  .offset-lg-2 { margin-left: 16.6667%; }
}

/* ===== Navbar ===== */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.5rem 0;
}

.navbar > .container-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  padding-top: 0.3125rem;
  padding-bottom: 0.3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  color: #000;
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.navbar-nav .nav-link {
  display: block;
  padding: 0.5rem 0;
  color: rgb(0 0 0 / 65%);
  text-decoration: none;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: rgb(0 0 0 / 80%);
}

.navbar-nav .nav-link.active {
  color: #000;
}

.navbar-text {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: rgb(0 0 0 / 65%);
}
.navbar-light { background-color: #f8f9fa; }
.bg-light { background-color: #f8f9fa; }

/* Toggler (hamburger) */
.navbar-toggler {
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  font-family: inherit;
  line-height: 1;
  color: rgb(0 0 0 / 65%);
  background-color: transparent;
  border: 1px solid rgb(0 0 0 / 15%);
  border-radius: 0.375rem;
  cursor: pointer;
}
.navbar-toggler:focus { box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%); outline: 0; }

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* Collapse: hidden by default on small screens, shown on lg+ */
.navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}
.collapse:not(.show) { display: none; }

@media (width >= 992px) {
  .navbar-expand-lg { flex-wrap: nowrap; }
  .navbar-expand-lg > .container-fluid { flex-wrap: nowrap; }
  .navbar-expand-lg .navbar-nav { flex-direction: row; }
  .navbar-expand-lg .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; }
  .navbar-expand-lg .navbar-toggler { display: none; }

  .navbar-expand-lg .navbar-collapse,
  .navbar-expand-lg .collapse:not(.show) { display: flex !important; flex-basis: auto; }
}

.nav-item { list-style: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  color: #212529;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%); }
.btn.disabled, .btn:disabled { pointer-events: none; opacity: 0.65; }
.btn-primary { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-primary:hover { background-color: #0b5ed7; border-color: #0a58ca; }
.btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-secondary:hover { background-color: #5c636a; }
.btn-dark { color: #fff; background-color: #212529; border-color: #212529; }
.btn-dark:hover { background-color: #1c1f23; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; background-color: transparent; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }
.btn-lg { padding: 0.5rem 1rem; font-size: 1.25rem; border-radius: 0.5rem; }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
  color: #fff;
}

/* ===== Alerts ===== */
.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }

/* ===== Cards ===== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgb(0 0 0 / 12.5%);
  border-radius: 0.375rem;
}
.card-header { padding: 0.5rem 1rem; margin-bottom: 0; background-color: rgb(0 0 0 / 3%); border-bottom: 1px solid rgb(0 0 0 / 12.5%); }
.card-header:first-child { border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0; }
.card-body { flex: 1 1 auto; padding: 1rem; }
.card-title { margin-bottom: 0.5rem; font-weight: 500; }

/* ===== List Groups ===== */
.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: 0.375rem;
}

.list-group-item {
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  color: #212529;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid rgb(0 0 0 / 12.5%);
}
.list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.list-group-item:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.list-group-item + .list-group-item { border-top-width: 0; }
.list-group-item-action { width: 100%; color: #495057; }
.list-group-item-action:hover, .list-group-item-action:focus { z-index: 1; color: #495057; background-color: #f8f9fa; }
.list-unstyled { padding-left: 0; list-style: none; }

/* ===== Tables ===== */
.table { width: 100%; margin-bottom: 1rem; color: #212529; vertical-align: top; border-color: #dee2e6; }
.table > :not(caption) > * > * { padding: 0.5rem; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: inherit; }
.table > thead { vertical-align: bottom; }
.table-sm > :not(caption) > * > * { padding: 0.25rem; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgb(0 0 0 / 5%); }
.table-hover > tbody > tr:hover > * { background-color: rgb(0 0 0 / 7.5%); }
.table-dark { color: #fff; background-color: #212529; border-color: #373b3e; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== Forms ===== */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%); }
.form-control-sm { min-height: calc(1.5em + 0.5rem + 2px); padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }

.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  appearance: none;
}
.form-select:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%); }
.form-select-sm { padding-top: 0.25rem; padding-bottom: 0.25rem; padding-left: 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }
.form-label { margin-bottom: 0.5rem; }
.form-check { display: block; min-height: 1.5rem; padding-left: 1.5em; margin-bottom: 0.125rem; }
.form-check-input { flex-shrink: 0; width: 1em; height: 1em; margin-top: 0.25em; vertical-align: top; appearance: none; border: 1px solid rgb(0 0 0 / 25%); border-radius: 0.25em; background-color: #fff; }
.form-check-input:checked { background-color: #0d6efd; border-color: #0d6efd; }
.form-check-input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.form-range { width: 100%; height: 1.5rem; padding: 0; background-color: transparent; appearance: none; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
}
.pagination-sm .page-link { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.page-item:first-child .page-link { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; }
.page-item:last-child .page-link { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; }

.page-link {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  color: #0d6efd;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
}
.page-link:hover { z-index: 2; color: #0a58ca; background-color: #e9ecef; border-color: #dee2e6; }
.page-item.active .page-link { z-index: 3; color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.page-item.disabled .page-link { color: #6c757d; pointer-events: none; background-color: #fff; border-color: #dee2e6; }

/* ===== Background Colors ===== */

/* .bg-light defined above with navbar */
.bg-primary { background-color: #0d6efd; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #198754; }
.bg-danger { background-color: #dc3545; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #0dcaf0; }

/* ===== Text Utilities ===== */
.text-center { text-align: center; }
.text-end { text-align: end; }
.text-muted { color: #6c757d; }
.text-primary { color: #0d6efd; }
.text-success { color: #198754; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #0dcaf0; }
.text-dark { color: #212529; }
.text-nowrap { white-space: nowrap; }
.text-decoration-none { text-decoration: none; }
.small, small { font-size: 0.875em; }
.lead { font-size: 1.25rem; font-weight: 300; }
.font-monospace { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.fw-bold { font-weight: 700; }

@media (width >= 768px) {
  .text-md-end { text-align: end; }
}

/* ===== Display Utilities ===== */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.display-1 { font-size: 5rem; font-weight: 300; line-height: 1.2; }

@media (width >= 992px) {
  .d-lg-block { display: block; }
}

/* ===== Flexbox Utilities ===== */
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-start { justify-content: flex-start; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }

/* ===== Spacing: Margins ===== */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.me-1 { margin-right: 0.25rem; }
.me-3 { margin-right: 1rem; }
.me-auto { margin-right: auto; }
.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.mx-auto { margin-right: auto; margin-left: auto; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

@media (width >= 992px) {
  .mb-lg-0 { margin-bottom: 0; }
}

/* ===== Spacing: Padding ===== */
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.px-3 { padding-right: 1rem; padding-left: 1rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* ===== Images ===== */
.img-fluid { max-width: 100%; height: auto; }

/* ===== Aspect Ratios ===== */
.ratio {
  position: relative;
  width: 100%;
}

.ratio::before {
  display: block;
  padding-top: var(--aspect-ratio);
  content: "";
}

.ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.ratio-16x9 { --aspect-ratio: 56.25%; }

/* ===== Borders & Rounded ===== */
.rounded-3 { border-radius: 0.5rem; }
.rounded { border-radius: 0.375rem; }
.border-warning { border-color: #ffc107; }

/* ===== Sizing ===== */
.w-50 { width: 50%; }

/* ===== Spinner ===== */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: -0.125em;
  border: 0.25em solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border { to { transform: rotate(360deg); } }

/* ===== Accessibility ===== */
.visually-hidden,
.visually-hidden-focusable:not(:focus, :focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ===== Tooltip (CSS-only, replaces Bootstrap JS tooltip) ===== */
[data-tooltip] {
  position: relative;
  cursor: default;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #fff;
  background-color: #000;
  border-radius: 0.25rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 1080;
  margin-bottom: 0.25rem;
}

[data-tooltip]:hover::after {
  opacity: 0.9;
}

/* ===== Accessibility: Nav & Link Styling ===== */

/* Ensure nav auth links meet WCAG AA contrast ratio (4.5:1) against light bg */
.navbar .nav-link a { color: #1a5276; text-decoration: underline; }

.navbar .nav-link a:hover { color: #0d3b66; }

/* Ensure body links are distinguishable without relying solely on color */
#main-content a { text-decoration: underline; }

#main-content a.btn,
#main-content a.nav-link,
#main-content a.navbar-brand,
#main-content a.underline-link,
#main-content a.timeline-link,
#main-content a.lightbox-trigger { text-decoration: none; }
