/* ================= ORGANIZATION CHART ================= */

.org-section{
  padding: 80px 20px;
  background: F2F2F2;
  font-family: 'Segoe UI', sans-serif;
  position: relative;
  min-height: 100vh;
}

/* optional dark overlay for readability */
.org-section::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  z-index:0;
}

/* ensure content above overlay */
.org-section > *{
  position: relative;
  z-index: 1;
}

/* ================= TITLE ================= */

.section-title{
  text-align:center;
  margin-bottom:50px;
  margin-top:-70px;
}

.section-title h2{
  font-size: 36px;
  font-weight: 700;
  color: #144c28;
}

.section-title p{
  color:#D10000;
}

/* ================= TREE WRAPPER ================= */

.org-tree{
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* ================= UNIFORM NODE STYLE ================= */

.org-node{
  background: #144c28;
  border: 1px solid #D10000;
  padding: 14px 24px;
  border-radius: 14px;
  text-align:center;
  min-width: 220px;
  transition: all 0.35s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  color: #fff;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

/* text inside node */
.org-node span{
  display:block;
  font-size: 13px;
  color:#FFC0CB;
  margin-top:5px;
}

/* ================= CLEAN HOVER EFFECT ================= */

.org-node::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:4px;
  background:#D10000;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.org-node:hover{
  transform: translateY(-10px) scale(1.05);
  border-color:#D10000;
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}

/* ================= CLEAN HOVER + JIGGLE ================= */

.org-node{
  transition: all 0.3s ease;
}

.org-node:hover{
  border-color: #D10000;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  animation: jiggle 0.4s ease;
}

@keyframes jiggle {
  0%   { transform: translateY(0) rotate(0deg); }
  20%  { transform: translateY(-3px) rotate(-1deg); }
  40%  { transform: translateY(-3px) rotate(1deg); }
  60%  { transform: translateY(-2px) rotate(-1deg); }
  80%  { transform: translateY(-1px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}




/* ================= CONNECTOR ================= */

.connector-v{
  width:2px;
  height:40px;
  background:#D10000;
  opacity:0.9;
  position:relative;
}

.connector-v::after{
  content:"";
  position:absolute;
  bottom:-4px;
  left:50%;
  transform:translateX(-50%);
  width:6px;
  height:6px;
  background:#D10000;
  border-radius:50%;
}



/* ================= BRANCHES ================= */

.branches{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  width:90%;
  gap:40px;
  margin-top:25px;
  margin-left:auto;
  margin-right:auto;
  position:relative;
}

/* ================= HORIZONTAL LINE ================= */


.branches::before{
  content:"";
  position:absolute;
  top:-18px;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:930px;
  height:2px;
  background:#D10000;
  opacity:0.9;
}


/* ================= NODE WRAPPER ================= */

.branches .org-node{
  position:relative;
  text-align:center;
  min-width:160px;
  margin-top:8px;
  flex:1;
  padding-top:30px; /* space for connector */
}

/* ================= VERTICAL CONNECTORS (MANUAL) ================= */
/* Base style for all connectors */

/* ================= VERTICAL CONNECTORS (FIXED DOWNWARD) ================= */

[class^="branch-connector"]{
  position:absolute;
  top:0;                 /* start at horizontal line */
  margin-top: -20px;
  left:50%;
  transform:translateX(-50%);
  width:2px;
  height:25px;
  background:#D10000;
  opacity:0.9;
}

/* ================= OPTIONAL DOT AT JOINT ================= */

/*[class^="branch-connector"]::after{
  content:"";
  position:absolute;
  top:-4px;
  left:50%;
  transform:translateX(-50%);
  width:6px;
  height:6px;
  background:#D10000;
  border-radius:50%;
} */

/* ================= ALIGN EACH CONNECTOR TO ITS NODE ================= */

/* 1st node */
.branch-connector1{ left:10%; }

/* 2nd node */
.branch-connector2{ left:30%; }

/* 3rd node */
.branch-connector3{ left:50%; }

/* 4th node */
.branch-connector4{ left:70%; }

/* 5th node */
.branch-connector5{ left:90%; }

/* ================= ANIMATION ================= */

.reveal{
  opacity:0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active{
  opacity:1;
  transform: translateY(0);
}

/* ================= RESPONSIVE ================= */

@media(max-width:768px){

  .branches{
    flex-direction:column;
    align-items:center;
    gap:50px;
  }

  /* REMOVE horizontal line completely in mobile */
  .branches::before{
    display:none;
  }

  /* keep connectors optional (you already hide them) */
  [class^="branch-connector"]{
    display:none;
  }

  .section-title h2{
    text-align:center;
    line-height:1.2;
  }

  .section-title p{
    text-align:center;
    padding:0 10px;
  }
  

  
}

@media(max-width:768px){
  .branches::before{
    width:2px;
    height:100%;
    left:50%;
    top:0;
    transform:none;
  }
}


@media(max-width:768px){

  /* tighten spacing between stacked nodes */
  .org-tree{
    gap: 0;
  }

  /* remove extra margins that create the gap illusion */
  .connector-v{
    margin: 0 auto;
  }

  /* make connector visually touch both nodes better */
  .connector-v{
    height: 30px; /* slightly reduced only for mobile */
  }

  /* remove extra breathing space around nodes */
  .org-node{
    margin: 0;
  }
}

@media(max-width:768px){
  .connector-v{
    transform: translateY(1px);
  }
}
