/* Al-Ammary leadership org chart — adapted from Jarrah layout */

:root {
  --al-org-navy: #272870;
  --al-org-navy-dark: #1a1b5e;
  --al-org-accent: #4a4cb8;
  --al-org-gold: #c9a227;
  --al-org-cream: #f4f4f8;
  --al-org-muted: #61656f;
  --al-org-text: #303539;
  --al-org-border: #e3e8ef;
}

.al-org-section {
  padding-top: 0;
  padding-bottom: 80px;
}

.al-org-section > .base-container {
  align-items: stretch;
}

.al-org-section .button-holder {
  width: 100%;
  text-align: center;
}

.leadership-org-compact {
  padding-bottom: 72px;
}

.org-chart-intro {
  max-width: 860px;
  margin: 0 auto 28px;
  text-align: center;
}

.org-chart-intro h2 {
  margin: 0 0 10px;
  color: var(--al-org-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
}

.al-org-intro-text {
  max-width: 760px;
  margin: 0 auto;
  color: var(--al-org-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.division-structure {
  width: 100%;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.division-structure.al-scroll-reveal {
  opacity: 1 !important;
  transform: none !important;
}

.division-highchart {
  width: 100%;
  min-height: 1650px;
  margin-top: 0;
}

.mobile-org-chart {
  display: none;
}

.orgchart-updated-note {
  margin: 10px 0 0;
  color: var(--al-org-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.division-highchart .highcharts-container,
.division-highchart .highcharts-root {
  width: 100% !important;
  overflow: visible !important;
}

.hc-full-org-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 112px;
  padding: 11px 10px;
  text-align: center;
  white-space: normal;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hc-full-org-node img {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  object-fit: cover;
}

.hc-full-org-node img[src=""],
.hc-full-org-node img:not([src]) {
  display: none;
}

.hc-full-org-node span {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  opacity: 0.9;
  text-transform: uppercase;
}

.hc-full-org-node span,
.hc-full-org-node strong,
.hc-full-org-node.hc-operations-root span,
.hc-full-org-node.hc-operations-root strong {
  color: #ffffff !important;
}

.hc-full-org-node strong {
  display: block;
  font-size: 11px;
  line-height: 1.22;
}

.hc-full-org-node.hc-operations-root.is-gold strong {
  font-size: 10px;
}

.division-highchart .highcharts-point,
.division-highchart .highcharts-data-label {
  cursor: pointer;
  transition: opacity 0.2s ease;
  overflow: visible !important;
}

.division-highchart .highcharts-data-label > span {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible !important;
}

.division-highchart.al-org-focused .al-org-inactive {
  opacity: 0.16 !important;
}

.division-highchart.al-org-focused .al-org-active {
  opacity: 1 !important;
}

.division-highchart .highcharts-tracker {
  pointer-events: auto;
}

.division-highchart .highcharts-data-label:hover .hc-full-org-node,
.division-highchart .highcharts-data-label:hover .hc-ops-node {
  transform: translateY(-2px);
}

.hc-ops-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 96px;
  padding: 9px 10px;
  text-align: center;
  white-space: normal;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hc-ops-node.is-clickable {
  cursor: pointer;
}

.hc-ops-node span {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.9;
  text-transform: uppercase;
}

.hc-ops-node strong {
  display: block;
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
}

.hc-ops-node small {
  display: block;
  margin-top: 5px;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.88;
  text-transform: uppercase;
}

.hc-ops-division,
.hc-ops-division span,
.hc-ops-division strong,
.hc-ops-division small {
  color: #ffffff !important;
}

.hc-ops-division strong {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.92;
}

.hc-node-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 7px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.hc-ops-staff {
  align-items: stretch;
  justify-content: flex-start;
  min-height: 168px;
  padding: 7px 8px;
  text-align: left;
}

.hc-ops-staff > span,
.hc-ops-staff > strong {
  text-align: center;
}

.hc-ops-staff > strong {
  margin-bottom: 5px;
  color: var(--al-org-navy);
  font-size: 10px;
  line-height: 1.15;
}

.hc-ops-staff small {
  margin: 0 0 5px;
  color: var(--al-org-muted);
  font-size: 9px;
  text-align: center;
}

.hc-ops-staff ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hc-ops-staff li {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 1px 0;
  border-top: 1px solid var(--al-org-border);
  color: var(--al-org-text);
  font-size: 8px;
  line-height: 1.1;
}

.hc-ops-staff li span {
  margin: 0;
  color: var(--al-org-text);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  opacity: 1;
  text-align: left;
  text-transform: none;
}

.hc-ops-staff li em {
  flex: 0 0 auto;
  color: var(--al-org-muted);
  font-style: normal;
  font-weight: 800;
}

.division-fallback-chart {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--al-org-border);
  border-radius: 6px;
  background: var(--al-org-cream);
}

@media (max-width: 767px) {
  .division-structure {
    padding: 0;
  }

  .division-highchart {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  .division-highchart .highcharts-container,
  .division-highchart .highcharts-root,
  .division-highchart svg {
    display: none !important;
  }

  .mobile-org-chart {
    display: block;
  }

  .mobile-org-section {
    margin: 0 0 22px;
  }

  .mobile-org-section h3 {
    margin: 0 0 12px;
    color: var(--al-org-navy);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0 !important;
    text-transform: uppercase;
  }

  .mobile-org-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mobile-org-grid-managers {
    position: relative;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
  }

  .mobile-org-tree-down {
    width: 2px;
    height: 18px;
    margin: 0 auto;
    background: #c5c9d8;
  }

  .mobile-org-tree-down--short {
    height: 14px;
  }

  .mobile-org-grid-managers + .mobile-org-tree-down {
    height: 20px;
    margin-bottom: 4px;
  }

  .mobile-org-card-center {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
  }

  @media (min-width: 560px) and (max-width: 767px) {
    .mobile-org-grid-managers {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      padding-top: 14px;
    }

    .mobile-org-grid-managers::before {
      content: "";
      position: absolute;
      top: 0;
      left: 10%;
      right: 10%;
      height: 2px;
      background: #c5c9d8;
    }

    .mobile-org-grid-managers .mobile-org-card {
      position: relative;
    }

    .mobile-org-grid-managers .mobile-org-card::before {
      content: "";
      position: absolute;
      top: -14px;
      left: 50%;
      width: 2px;
      height: 14px;
      background: #c5c9d8;
      transform: translateX(-50%);
    }
  }

  .mobile-org-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 84px;
    padding: 12px;
    border-radius: 6px;
    background: var(--al-org-navy);
    color: #fff;
  }

  .mobile-org-card-primary {
    margin-bottom: 10px;
  }

  .mobile-org-card .mobile-org-avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-org-card span {
    display: block;
    margin-bottom: 3px;
    color: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .mobile-org-card strong {
    display: block;
    color: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
  }

  .mobile-org-division-list {
    display: grid;
    gap: 10px;
  }

  .mobile-org-division-list details {
    border: 0;
    border-radius: 6px;
    background: var(--al-org-cream);
  }

  .mobile-org-division-list summary {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--al-org-navy);
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    list-style: none;
  }

  .mobile-org-division-list summary::-webkit-details-marker {
    display: none;
  }

  .mobile-org-division-list summary img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }

  .mobile-org-division-list summary span {
    font-size: 14px;
  }

  .mobile-org-division-list summary strong {
    color: var(--al-org-muted);
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-org-division-list ul {
    list-style: none;
    margin: 0;
    padding: 0 12px 12px;
  }

  .mobile-org-division-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--al-org-border);
    color: var(--al-org-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
  }

  .mobile-org-division-list li em {
    flex: 0 0 auto;
    color: var(--al-org-muted);
    font-style: normal;
    font-weight: 800;
  }
}

@media (max-width: 767px) {
  .mobile-org-section h3 {
    font-size: 16px;
  }
}
