/* ================================================================
   MANAGEMENT PAGE CSS – Full File
   Compatible with existing site design system (var-based tokens)
================================================================ */

/* ================================================================
   PAGE HERO (Management)
================================================================ */

.mgmt-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}

.mgmt-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 320px;
  background: linear-gradient(to top, #0a0202 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.mgmt-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mgmt-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: mgmtZoom 12s linear forwards;
}

@keyframes mgmtZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.mgmt-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.30) 50%,
    rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

.mgmt-hero-content {
  position: absolute;
  bottom: 12%;
  left: 5%;
  width: 90%;
  max-width: 820px;
  z-index: 10;
  color: #fff;
}

.mgmt-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  background: rgba(139,26,26,0.45);
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mgmt-hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-muted, #c0392b);
}

.mgmt-hero-content h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  letter-spacing: -0.03em;
}

.mgmt-hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  max-width: 560px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}

/* ================================================================
   SCROLL REVEAL ANIMATIONS
================================================================ */

.mgmt-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.23,1,0.32,1),
              transform 0.75s cubic-bezier(0.23,1,0.32,1);
}

.mgmt-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.mgmt-delay-1 { transition-delay: 0.10s; }
.mgmt-delay-2 { transition-delay: 0.22s; }
.mgmt-delay-3 { transition-delay: 0.34s; }
.mgmt-delay-4 { transition-delay: 0.46s; }

/* ================================================================
   SECTION LABEL
================================================================ */

.mgmt-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent, #8b1a1a);
  margin-bottom: 14px;
  position: relative;
  padding-left: 22px;
}

.mgmt-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 2px;
  background: var(--accent, #8b1a1a);
}

/* ================================================================
   STAFF SECTION
================================================================ */

.staff-section {
  padding: 110px 0 100px;
  background: var(--bg, #fff);
  position: relative;
  overflow: hidden;
}

.staff-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow, rgba(139,26,26,0.06)) 0%, transparent 70%);
  pointer-events: none;
}

.staff-header {
  margin-bottom: 64px;
  max-width: 680px;
}

.staff-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent, #8b1a1a);
  margin-bottom: 14px;
  font-weight: 700;
  position: relative;
  padding-left: 22px;
}

.staff-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 2px;
  background: var(--accent, #8b1a1a);
}

.staff-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text, #111);
  letter-spacing: -0.025em;
}

.staff-header p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text-light, #666);
  margin-top: 14px;
  max-width: 560px;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Staff Card */
.staff-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  height: 440px;
  background: var(--bg-light, #f5f5f5);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s ease;
  border: 1px solid var(--border, #e0e0e0);
}

.staff-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.staff-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-premium, 0 30px 60px rgba(0,0,0,0.18));
  border-color: transparent;
}

.staff-card:hover img {
  transform: scale(1.08);
}

.staff-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(10,2,2,0.92) 0%,
    rgba(10,2,2,0.40) 45%,
    transparent 100%);
}

.staff-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px;
  color: #fff;
  z-index: 2;
}

.staff-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.staff-content span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-muted, #e07070);
  letter-spacing: 0.5px;
  display: block;
}

.staff-content p {
  font-size: 0.83rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.staff-card:hover .staff-content p {
  opacity: 1;
  transform: translateY(0);
}

.staff-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  z-index: 3;
  transition: all 0.3s ease;
}

.staff-card:hover .staff-badge {
  background: var(--accent, #8b1a1a);
  border-color: var(--accent, #8b1a1a);
}

/* ================================================================
   ORGANIZATIONAL STRUCTURE SECTION
================================================================ */

.org-section {
  padding: 110px 0 100px;
  background: var(--bg-light, #f8f8f8);
  position: relative;
  overflow: hidden;
}

.org-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-strong, #ccc), transparent);
}

.org-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow, rgba(139,26,26,0.06)) 0%, transparent 70%);
  pointer-events: none;
}

/* Section header */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text, #111);
  margin-bottom: 14px;
  margin-top: 10px;
  letter-spacing: -0.025em;
}

.section-desc {
  font-size: 0.97rem;
  color: var(--text-light, #666);
  line-height: 1.75;
}

/* ================================================================
   ORG TREE CORE
================================================================ */

.org-tree {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== LEVEL ===== */
.org-level {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 0;
  position: relative;
  transition: all 0.4s ease;
  flex-wrap: wrap;
}

.org-level.collapsed {
  display: none;
}

/* Connector: vertical line below each top-level */
.org-level:not(#level2)::after {
  content: "";
  position: absolute;
  bottom: -44px;
  left: 50%;
  width: 2px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent, #8b1a1a), transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

/* level2 spacing */
#level2 {
  margin-top: 44px;
}

/* ===== ORG CARD ===== */
.org-card {
  background: var(--card-bg, #fff);
  padding: 32px 26px 26px;
  border-radius: 22px;
  width: 220px;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
  border: 1px solid var(--border, #e0e0e0);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  flex-shrink: 0;
  text-align: center;
}

.org-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-premium, 0 30px 60px rgba(0,0,0,0.18));
  border-color: var(--accent, #8b1a1a);
}

/* CEO / Top Card */
.org-card.ceo {
  border: none;
  box-shadow: var(--shadow-premium, 0 30px 60px rgba(0,0,0,0.18));
  background: linear-gradient(145deg, var(--card-bg, #fff), var(--accent-soft, #fdf5f5));
  width: 240px;
  padding: 36px 28px 30px;
}

.org-card.ceo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 1.5px solid var(--accent, #8b1a1a);
  opacity: 0.3;
  pointer-events: none;
}

/* Avatar */
.org-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
  border: 3px solid var(--border, #e0e0e0);
  transition: border-color 0.3s ease;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.08));
}

.org-card.ceo .org-avatar {
  width: 90px;
  height: 90px;
  border-color: var(--accent, #8b1a1a);
  border-width: 2px;
}

.org-card:hover .org-avatar {
  border-color: var(--accent, #8b1a1a);
}

.org-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text */
.org-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #111);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.org-card span {
  font-size: 0.82rem;
  color: var(--text-light, #666);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Department tag */
.org-dept {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent, #8b1a1a);
  background: var(--accent-light, rgba(139,26,26,0.08));
  border: 1px solid rgba(139,26,26,0.15);
  border-radius: 50px;
  padding: 3px 12px;
  margin-top: 12px;
}

/* Dept color variants */
.org-dept--blue   { color: #1d4ed8; background: rgba(29,78,216,0.08);   border: 1px solid rgba(29,78,216,0.18); }
.org-dept--green  { color: #065f46; background: rgba(6,95,70,0.08);     border: 1px solid rgba(6,95,70,0.18); }
.org-dept--purple { color: #5b21b6; background: rgba(91,33,182,0.08);   border: 1px solid rgba(91,33,182,0.18); }
.org-dept--orange { color: #92400e; background: rgba(146,64,14,0.08);   border: 1px solid rgba(146,64,14,0.18); }
.org-dept--slate  { color: #374151; background: rgba(55,65,81,0.08);    border: 1px solid rgba(55,65,81,0.18); }

/* Director card */
.org-card--director {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e0e0e0);
  width: 200px;
  padding: 20px 16px 18px;
}

.org-card--director:hover {
  border-color: var(--accent, #8b1a1a);
  background: linear-gradient(145deg, var(--card-bg, #fff), var(--accent-soft, #fdf5f5));
}

/* Manager card */
.org-card--manager {
  background: var(--bg-light, #f8f8f8);
  border: 1px solid var(--border, #e0e0e0);
  width: 190px;
  padding: 16px 14px;
}

/* Staff card */
.org-card--staff {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e5e5);
  padding: 11px 12px 10px;
  width: 185px;
  border-radius: 10px;
}

.org-card--staff h4 { font-size: 0.75rem; }
.org-card--staff span { font-size: 0.70rem; color: var(--text-light, #666); }

/* ================================================================
   BRANCH WRAP + SUB
   — each vertical column in the directors row
================================================================ */

.org-branch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 200px;
  /* connector line between card and .org-sub */
  position: relative;
}

.org-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* vertical line above each sub-section */
.org-sub::before {
  content: '';
  display: block;
  width: 2px;
  height: 20px;
  background: var(--border-strong, #ccc);
  flex-shrink: 0;
}

.org-sub--grid {
  flex-direction: column;
  align-items: center;
}

/* ================================================================
   DIRECTORS ROW — always horizontal scroll
================================================================ */

.org-level--directors,
#level2 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  overflow-x: auto;
  gap: 16px;
  padding: 24px 12px 28px;
  width: 100%;
}

@supports (scrollbar-width: thin) {
  .org-level--directors,
  #level2 {
    scrollbar-width: thin;
    scrollbar-color: var(--accent, #8b1a1a) transparent;
  }
}

.org-level--directors::-webkit-scrollbar,
#level2::-webkit-scrollbar { height: 4px; }

.org-level--directors::-webkit-scrollbar-track,
#level2::-webkit-scrollbar-track { background: transparent; }

.org-level--directors::-webkit-scrollbar-thumb,
#level2::-webkit-scrollbar-thumb {
  background: var(--accent, #8b1a1a);
  border-radius: 4px;
}

/* collapsed state */
#level2.collapsed { display: none !important; }

/* ================================================================
   TOGGLE BUTTON
================================================================ */

.org-toggle {
  margin-top: 40px;
  padding: 12px 32px;
  border-radius: 50px;
  background: transparent;
  color: var(--accent, #8b1a1a);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--accent, #8b1a1a);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.org-toggle:hover {
  background: var(--accent, #8b1a1a);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,26,26,0.25);
}

.org-toggle i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* ================================================================
   RESPONSIVE — 1200px
================================================================ */

@media (max-width: 1200px) {
  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   RESPONSIVE — 992px
================================================================ */

@media (max-width: 992px) {
  .mgmt-hero {
    min-height: 480px;
  }

  .staff-section,
  .org-section {
    padding: 80px 0;
  }

  .org-card {
    width: 200px;
    padding: 24px 18px 20px;
  }

  .org-card.ceo {
    width: 210px;
  }
}

/* ================================================================
   RESPONSIVE — 768px (Mobile)
================================================================ */

@media (max-width: 768px) {
  /* Hero */
  .mgmt-hero {
    height: 70vh;
    min-height: 480px;
  }

  .mgmt-hero-content {
    bottom: 10%;
    left: 20px;
    width: calc(100% - 40px);
  }

  .mgmt-hero-content h1 {
    font-size: 2.4rem;
    margin-bottom: 14px;
  }

  .mgmt-hero-content p {
    font-size: 0.97rem;
  }

  /* Sections */
  .staff-section,
  .org-section {
    padding: 64px 0 56px;
  }

  .staff-header {
    margin-bottom: 40px;
  }

  .staff-header h2 {
    font-size: 1.9rem;
  }

  .section-header {
    margin-bottom: 48px;
  }

  /* Staff grid → horizontal scroll snap */
  .staff-grid {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 8px 20px 28px;
    margin: 0 -20px;
  }

  @supports (scrollbar-width: none) {
    .staff-grid {
      scrollbar-width: none;
    }
  }

  .staff-grid::-webkit-scrollbar { display: none; }

  @supports (-ms-overflow-style: none) {
    .staff-grid { -ms-overflow-style: none; }
  }

  .staff-grid::-webkit-scrollbar { display: none; }

  .staff-card {
    flex: 0 0 78vw;
    max-width: 300px;
    min-width: 260px;
    height: 400px;
    scroll-snap-align: start;
    border-radius: 18px;
  }

  /* Description always visible on mobile */
  .staff-content p {
    opacity: 1;
    transform: translateY(0);
  }

  /* Top level org cards */
  .org-card {
    width: 180px;
    padding: 20px 14px 18px;
  }

  .org-card.ceo {
    width: 190px;
    padding: 24px 16px 20px;
  }

  .org-card h4  { font-size: 0.88rem; }

  .org-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
  }

  .org-card.ceo .org-avatar {
    width: 72px;
    height: 72px;
  }

  /* Directors row — bleed to viewport edges */
  .org-level--directors,
  #level2 {
    padding: 20px 20px 24px;
    margin: 0 -20px;
    width: calc(100% + 40px);
    gap: 12px;
  }

  .org-branch-wrap {
    flex: 0 0 190px;
    min-width: 190px;
  }

  .org-card--director { width: 185px; }
  .org-card--manager  { width: 181px; }
  .org-card--staff    { width: 177px; }

  .org-toggle {
    margin-top: 32px;
    padding: 10px 26px;
    font-size: 13px;
  }
}

/* ================================================================
   RESPONSIVE — 600px
================================================================ */

@media (max-width: 600px) {
  .mgmt-hero {
    height: 65vh;
    min-height: 420px;
  }

  .mgmt-hero-content h1 { font-size: 2rem; }
  .mgmt-hero-content p  { font-size: 0.90rem; }

  .staff-section,
  .org-section {
    padding: 52px 0 44px;
  }

  .staff-card {
    flex: 0 0 84vw;
    max-width: 280px;
    height: 370px;
  }

  .org-card {
    width: 164px;
    padding: 16px 12px 14px;
  }

  .org-card.ceo {
    width: 176px;
    padding: 20px 14px 16px;
  }

  .org-card h4   { font-size: 0.82rem; }
  .org-card span { font-size: 0.74rem; }

  .org-avatar {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }

  .org-card.ceo .org-avatar {
    width: 64px;
    height: 64px;
  }

  .org-branch-wrap {
    flex: 0 0 175px;
    min-width: 175px;
  }

  .org-card--director { width: 171px; }
  .org-card--manager  { width: 167px; }
  .org-card--staff    { width: 163px; }

  .section-title  { font-size: 1.7rem; }
  .section-header { margin-bottom: 36px; padding: 0 4px; }
}

/* ================================================================
   RESPONSIVE — 400px (very small phones)
================================================================ */

@media (max-width: 400px) {
  .mgmt-hero-content h1 { font-size: 1.75rem; }

  .mgmt-hero-label {
    font-size: 9px;
    letter-spacing: 2px;
    padding: 5px 14px;
  }

  .staff-card {
    flex: 0 0 90vw;
    height: 340px;
  }

  .org-card {
    width: 150px;
    padding: 14px 10px 12px;
  }

  .org-card.ceo    { width: 160px; }
  .org-card h4     { font-size: 0.77rem; }

  .org-avatar          { width: 48px; height: 48px; }
  .org-card.ceo .org-avatar { width: 56px; height: 56px; }

  .org-branch-wrap    { flex: 0 0 160px; min-width: 160px; }
  .org-card--director { width: 156px; }
  .org-card--manager  { width: 152px; }
  .org-card--staff    { width: 148px; }

  .org-toggle {
    padding: 9px 22px;
    font-size: 12px;
  }
}


/* ================================================================
   SECTION PHOTO BANNERS
   (Staff Section + Org Section)
================================================================ */

/* ── Staff Photo Banner ── */
.staff-section-photo {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  margin-bottom: 72px;
}

.staff-section-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.staff-section:hover .staff-section-photo img {
  transform: scale(1);
}

.staff-section-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,2,2,0.82) 0%,
    rgba(10,2,2,0.45) 55%,
    rgba(10,2,2,0.70) 100%
  );
}

.staff-section-photo-text {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  padding: 0 40px;
  color: #fff;
  max-width: 820px;
}

.staff-section-photo-text .staff-label {
  color: var(--accent-muted, #e07070);
  margin-bottom: 10px;
}

.staff-section-photo-text .staff-label::before {
  background: var(--accent-muted, #e07070);
}

.staff-section-photo-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  text-shadow: 0 3px 16px rgba(0,0,0,0.4);
}

.staff-section-photo-text p {
  font-size: 0.96rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.65;
  max-width: 520px;
  margin: 0;
}

/* Remove the old staff-header spacing since header is now in the banner */
.staff-section .container .staff-header {
  display: none;
}

/* ── Org Section Photo Banner ── */
.org-section-photo {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  margin-bottom: 72px;
}

.org-section-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.org-section:hover .org-section-photo img {
  transform: scale(1);
}

.org-section-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,2,2,0.85) 0%,
    rgba(10,2,2,0.42) 55%,
    rgba(10,2,2,0.72) 100%
  );
}

.org-section-photo-text {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  padding: 0 40px;
  color: #fff;
  max-width: 820px;
}

.org-section-photo-text .mgmt-label {
  color: var(--accent-muted, #e07070);
  margin-bottom: 10px;
}

.org-section-photo-text .mgmt-label::before {
  background: var(--accent-muted, #e07070);
}

.org-section-photo-text .section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  text-shadow: 0 3px 16px rgba(0,0,0,0.4);
}

.org-section-photo-text .section-desc {
  font-size: 0.96rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.65;
  max-width: 520px;
  margin: 0;
}

/* Hide the old section-header inside container when photo banner is present */
.org-section .container .section-header {
  display: none;
}

/* ================================================================
   ORG CONNECTORS — explicit <div> elements
================================================================ */

.org-conn {
  flex-shrink: 0;
  align-self: center;
  background: var(--border-strong, #ccc);
}

/* Vertical connector */
.org-conn--v {
  width: 2px;
  height: 32px;
  margin: 0 auto;
}

/* Accent (darker) vertical */
.org-conn--accent {
  background: linear-gradient(to bottom, var(--accent, #8b1a1a), rgba(139,26,26,0.25));
  height: 40px;
}

/* Small vertical */
.org-conn--sm {
  height: 24px;
}

/* Tiny vertical between staff cards */
.org-conn--xs {
  height: 10px;
  background: rgba(0,0,0,0.12);
}

/* ================================================================
   ORG TOP ROW — centers the top-chain cards
================================================================ */

.org-top-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ================================================================
   ORG TREE — ensure vertical flex
================================================================ */

.org-tree {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative;
  z-index: 2;
  padding-top: 60px;
}

/* ================================================================
   AVATAR SIZE VARIANTS
================================================================ */

.org-avatar--sm {
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 10px !important;
}

/* ================================================================
   BRANCH WRAP — enforce vertical column
================================================================ */

.org-branch-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 0 0 210px;
  min-width: 210px;
}

/* ================================================================
   DIRECTORS ROW — enforce horizontal scroll
================================================================ */

.org-level--directors,
#level2 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  overflow-x: auto;
  gap: 20px;
  padding: 28px 16px 32px;
  width: 100%;
}

@supports (scrollbar-width: thin) {
  .org-level--directors,
  #level2 {
    scrollbar-width: thin;
    scrollbar-color: var(--accent, #8b1a1a) transparent;
  }
}

.org-level--directors::-webkit-scrollbar,
#level2::-webkit-scrollbar { height: 4px; }

.org-level--directors::-webkit-scrollbar-track,
#level2::-webkit-scrollbar-track { background: transparent; }

.org-level--directors::-webkit-scrollbar-thumb,
#level2::-webkit-scrollbar-thumb {
  background: var(--accent, #8b1a1a);
  border-radius: 4px;
}

#level2.collapsed { display: none !important; }

/* ================================================================
   CARD SIZE ADJUSTMENTS
================================================================ */

.org-card--director {
  width: 205px;
  padding: 20px 16px 18px;
}

.org-card--manager {
  width: 200px;
  padding: 16px 14px 14px;
}

.org-card--staff {
  width: 195px;
  padding: 12px 14px 11px;
  border-radius: 10px;
}

.org-card--staff h4  { font-size: 0.75rem; }
.org-card--staff span { font-size: 0.70rem; color: var(--text-light, #666); }

/* ================================================================
   RESPONSIVE — Photo banners mobile
================================================================ */

@media (max-width: 768px) {
  .staff-section-photo,
  .org-section-photo {
    height: 240px;
    margin-bottom: 48px;
  }

  .staff-section-photo-text,
  .org-section-photo-text {
    bottom: 28px;
    padding: 0 20px;
  }

  .staff-section-photo-text h2,
  .org-section-photo-text .section-title {
    font-size: 1.65rem;
  }

  .staff-section-photo-text p,
  .org-section-photo-text .section-desc {
    font-size: 0.85rem;
    display: none; /* hide desc on small screens to avoid clutter */
  }

  .org-branch-wrap {
    flex: 0 0 195px;
    min-width: 195px;
  }

  .org-card--director { width: 190px; }
  .org-card--manager  { width: 185px; }
  .org-card--staff    { width: 180px; }

  .org-level--directors,
  #level2 {
    padding: 20px 20px 24px;
    margin: 0 -20px;
    width: calc(100% + 40px);
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .staff-section-photo,
  .org-section-photo {
    height: 200px;
    margin-bottom: 36px;
  }

  .staff-section-photo-text h2,
  .org-section-photo-text .section-title {
    font-size: 1.4rem;
  }

  .org-branch-wrap {
    flex: 0 0 178px;
    min-width: 178px;
  }

  .org-card--director { width: 173px; }
  .org-card--manager  { width: 168px; }
  .org-card--staff    { width: 163px; }

  .org-conn--v   { height: 24px; }
  .org-conn--sm  { height: 18px; }
  .org-conn--xs  { height: 8px; }
  .org-conn--accent { height: 30px; }
}

@media (max-width: 400px) {
  .staff-section-photo,
  .org-section-photo {
    height: 175px;
  }

  .org-branch-wrap {
    flex: 0 0 160px;
    min-width: 160px;
  }

  .org-card--director { width: 155px; }
  .org-card--manager  { width: 150px; }
  .org-card--staff    { width: 146px; }
}


/* ================================================================
   AVATAR XS — untuk org-card--staff
================================================================ */

.org-avatar--xs {
  width: 38px !important;
  height: 38px !important;
  margin: 0 auto 8px !important;
  border-width: 2px !important;
}

/* Staff card dengan foto — tambah padding atas */
.org-card--staff {
  padding: 14px 14px 12px !important;
}

.org-card--staff h4  { font-size: 0.74rem; margin-bottom: 3px; }
.org-card--staff span { font-size: 0.68rem; }

/* Responsive xs avatar */
@media (max-width: 600px) {
  .org-avatar--xs {
    width: 32px !important;
    height: 32px !important;
    margin-bottom: 6px !important;
  }
}


/* ================================================================
   ORG H-ROW — baris horizontal di dalam branch
   (Senior Management || Plant Manager chain)
================================================================ */

.org-h-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

/* Sub-branch di dalam h-row */
.org-branch-wrap--sub {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 0 0 auto;
  min-width: 0;
}

/* Override ukuran card di dalam sub-branch agar tidak terlalu lebar */
.org-branch-wrap--sub .org-card--manager {
  width: 175px;
}

.org-branch-wrap--sub .org-card--staff {
  width: 172px;
}

/* Connector xs di dalam h-row  */
.org-branch-wrap--sub .org-conn--xs {
  height: 10px;
}

/* ================================================================
   RESPONSIVE h-row
================================================================ */

@media (max-width: 600px) {
  .org-h-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .org-branch-wrap--sub .org-card--manager,
  .org-branch-wrap--sub .org-card--staff {
    width: 160px;
  }
}


/* ================================================================
   ORG-COL — kolom vertikal seragam dalam directors row
================================================================ */

.org-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 210px;
  width: 210px;
  /* semua card dalam satu kolom punya lebar sama */
}

.org-col .org-card {
  width: 100%;
  box-sizing: border-box;
}

/* Connector di dalam kolom */
.org-col .org-conn--v   { height: 28px; }
.org-col .org-conn--sm  { height: 22px; }
.org-col .org-conn--xs  { height: 10px; }

/* Card "tall" — manager tanpa sub, diberi min-height agar sejajar dengan director card */
.org-card--tall {
  min-height: 160px;
  justify-content: center;
}

/* Override directors row agar pakai kolom */
.org-level--directors,
#level2 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  overflow-x: auto;
  padding: 28px 20px 36px !important;
  width: 100%;
}

@supports (scrollbar-width: thin) {
  .org-level--directors,
  #level2 {
    scrollbar-width: thin;
    scrollbar-color: var(--accent, #8b1a1a) transparent;
  }
}

.org-level--directors::-webkit-scrollbar,
#level2::-webkit-scrollbar { height: 4px; }
.org-level--directors::-webkit-scrollbar-thumb,
#level2::-webkit-scrollbar-thumb {
  background: var(--accent, #8b1a1a);
  border-radius: 4px;
}

#level2.collapsed { display: none !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .org-col { flex: 0 0 190px; width: 190px; }
}

@media (max-width: 600px) {
  .org-col { flex: 0 0 172px; width: 172px; }
  .org-col .org-conn--v  { height: 22px; }
  .org-col .org-conn--sm { height: 18px; }
}

@media (max-width: 400px) {
  .org-col { flex: 0 0 155px; width: 155px; }
}