/* =========================================================
   ORGANIZATION TAB PAGE
   ========================================================= */
html {
  scrollbar-gutter: stable;
}

.org-section {
  padding-top: 42px;
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 147, 205, .12), transparent 320px),
    radial-gradient(circle at 92% 12%, rgba(0, 37, 202, .12), transparent 360px),
    linear-gradient(180deg, #f3f8ff 0%, #fff 280px);
}

.org-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.org-tabs {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 12px 28px rgba(10, 47, 122, .10);
}

.org-tab {
  min-height: 62px;
  display: grid;
  align-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #12325f;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion), transform var(--motion-fast);
}

.org-tab:hover {
  border-color: transparent;
  color: #082d69;
  background: linear-gradient(135deg, #fff, #e5f4ff);
  transform: translateY(-2px);
}

.org-tab.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #0025CA 0%, #0093CD 100%);
  box-shadow: 0 10px 22px rgba(0, 37, 202, .22);
}

.org-content {
  min-width: 0;
  min-height: 680px;
  position: relative;
  transition: min-height var(--motion-slow);
}

.org-panel {
  display: none;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,1)),
    linear-gradient(135deg, rgba(0,37,202,.08), rgba(0,147,205,.08));
  box-shadow: 0 14px 30px rgba(10, 47, 122, .12);
}

.org-panel.active {
  display: block;
  animation: orgPanelIn var(--motion-slow);
}

.org-panel-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e4ecf7;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.org-panel-head h2 {
  margin: 0;
  color: #071947;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.25;
  font-weight: 800;
}

.org-panel-head span {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.org-role-list {
  display: grid;
  gap: 30px;
}

.org-role {
  display: grid;
  gap: 18px;
}

.org-role h3 {
  width: fit-content;
  margin: 0;
  padding: 8px 18px;
  border-radius: 6px;
  color: #0a2f7a;
  background: #eef6ff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.org-member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.org-panel-program .org-role-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.org-panel-program .org-member-grid {
  grid-template-columns: 1fr;
}

.org-panel-program .org-role-wide {
  grid-column: 1 / -1;
}

.org-panel-program .org-role-wide .org-member-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.org-member-card {
  min-height: 286px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
  padding: 28px 22px 24px;
  border-radius: 8px;
  background: #fff;
}

.org-member-card img,
.org-member-avatar-placeholder {
  width: 132px;
  height: 132px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
  box-shadow: none;
  transition: border-color var(--motion-fast), box-shadow var(--motion), transform var(--motion);
}

.org-member-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0025CA 0%, #0093CD 100%);
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
}

.org-member-card:hover img,
.org-member-card:hover .org-member-avatar-placeholder {
  box-shadow:
    0 0 0 4px rgba(0, 37, 202, .10),
    0 0 0 8px rgba(0, 147, 205, .12);
}

.org-member-info {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 86px;
  text-align: center;
}

.org-member-card strong {
  display: block;
  margin-bottom: 8px;
  color: #071947;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
}

.org-member-card p {
  margin: 0 0 4px;
  color: #60718b;
  font-size: 16px;
  line-height: 1.45;
}

.org-member-card p:last-child {
  margin-bottom: 0;
}

.org-member-role-line {
  white-space: nowrap;
}

.org-member-unit-line {
  white-space: nowrap;
}

.org-sort-note {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e4ecf7;
  color: #60718b;
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

@keyframes orgPanelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 981px) {
  .org-panel-program .org-role-wide .org-member-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .org-panel-program .org-role-wide .org-member-card {
    grid-column: span 2;
  }

  .org-panel-program .org-role-wide .org-member-card:nth-child(13) {
    grid-column: 2 / span 2;
    grid-row: 4;
  }

  .org-panel-program .org-role-wide .org-member-card:nth-child(14) {
    grid-column: 4 / span 2;
    grid-row: 4;
  }

  .org-panel-program .org-role-wide .org-member-card:nth-child(15) {
    grid-column: 6 / span 2;
    grid-row: 4;
  }

  .org-panel-program .org-role-wide .org-member-card:nth-child(16) {
    grid-column: 3 / span 2;
    grid-row: 5;
  }

  .org-panel-program .org-role-wide .org-member-card:nth-child(17) {
    grid-column: 5 / span 2;
    grid-row: 5;
  }
}

@media (max-width: 980px) {
  .org-shell {
    grid-template-columns: 1fr;
  }

  .org-tabs {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: unset;
    overflow-x: visible;
    padding: 8px;
  }

  .org-tab {
    min-height: 52px;
    text-align: center;
  }

  .org-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-panel-program .org-role-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-panel-program .org-role-wide .org-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .org-section {
    padding-top: 30px;
  }

  .org-shell {
    width: min(100% - 24px, var(--wrap));
    gap: 16px;
  }

  .org-tab {
    min-width: 0;
    padding: 0 3px;
    font-size: 15px;
  }

  .org-panel {
    padding: 22px 16px;
  }

  .org-panel-head {
    margin-bottom: 18px;
    flex-direction: column;
    gap: 8px;
  }

  .org-panel-head span {
    margin-top: 0;
    white-space: normal;
  }

  .org-role-list {
    gap: 24px;
  }

  .org-panel-program .org-role-list {
    grid-template-columns: 1fr;
  }

  .org-panel-program .org-role-wide .org-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-member-card {
    min-height: 0;
    gap: 8px;
    padding: 14px 4px 12px;
  }

  .org-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .org-member-grid > .org-member-card:last-child:nth-child(odd) {
    width: min(100%, calc((100% - 12px) / 2));
    grid-column: 1 / -1;
    justify-self: center;
  }

  .org-member-card img,
  .org-member-avatar-placeholder {
    width: 86px;
    height: 86px;
  }

  .org-member-card strong {
    margin-bottom: 4px;
    font-size: 18px;
  }

  .org-member-card p {
    font-size: 14px;
    line-height: 1.35;
  }

  .org-member-card .org-member-role-line {
    font-size: 13px;
  }

  .org-member-info {
    min-height: 0;
  }

  .org-sort-note {
    margin-top: 20px;
    text-align: left;
  }
}

@media (max-width: 360px) {
  .org-member-grid {
    gap: 6px;
  }

  .org-member-card {
    padding: 14px 0 12px;
  }

  .org-member-card p {
    font-size: 12px;
  }

  .org-member-card .org-member-role-line {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .org-panel.active {
    animation: none;
  }

  .org-tab,
  .org-member-card {
    transition: none;
  }
}

@media (hover: none) {
  .org-tab:hover,
  .org-member-card:hover {
    transform: none;
  }
}

