/* ============================
   ORGANISATION PAGE STYLES
============================ */
/* TOP MANAGEMENT */
.top-management {
  padding: 20px 20px;
  background: #e6f0eb;
  text-align: center;
}

.top-management h1 {
  color: #0b6b3a;
  margin-bottom: 40px;
  font-size: 32px;
  position: relative;
}

.top-management h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #0b6b3a;
  margin: 10px auto 0;
  border-radius: 2px;
}

.management-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.management-member {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.management-member img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 3px solid #0b6b3a;
}

.management-member h3 {
  color: #0b6b3a;
  font-size: 18px;
  margin-bottom: 5px;
}

.management-member p {
  font-size: 14px;
  color: #555;
  margin: 2px 0;
}

.management-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* MESSAGE FROM CHAIRMAN */
.chairman-message {
  padding: 60px 20px;
  background: #f3f6f7;
}

.chairman-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.chairman-img img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0b6b3a;
}

.chairman-text {
  max-width: 850px;
  text-align: justify;
}

.chairman-text h1 {
  color: #0b6b3a;
  font-size: 32px;
  margin-bottom: 20px;
  position: relative;
}

.chairman-text h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #0b6b3a;
  margin: 5px 0 20px 0;
  border-radius: 2px;
}

.chairman-text p {
  font-size: 16px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 15px;
}

.chairman-text h3 {
  color: #0b6b3a;
  margin-top: 10px;
}

/* BOARD OF DIRECTORS */
.board-of-directors {
  padding: 40px 20px;
  background: #e6f0eb;
  text-align: center;
}

.board-of-directors h1 {
  color: #0b6b3a;
  margin-bottom: 30px;
  font-size: 32px;
  position: relative;
}

.board-of-directors h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #0b6b3a;
  margin: 10px auto 0 auto;
  border-radius: 2px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: start;
}

.board-member {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  cursor: pointer;
  text-align: center;
}

.board-member img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 3px solid #0b6b3a;
}

.board-member h3 {
  font-size: 18px;
  color: #0b6b3a;
  margin-bottom: 5px;
}

.board-member p {
  font-size: 14px;
  color: #555;
  margin: 2px 0;
}

.board-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Board Member Zoom & Details */
.board-member.active {
  transform: scale(1.08);
  z-index: 20;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.board-details {
  display: none;
  margin-top: 10px;
  text-align: center;
}

.board-member.active .board-details {
  display: block;
}

.board-details p {
  font-size: 14px;
  color: #333;
  margin: 5px 0;
}

.close-btn {
  margin-top: 10px;
  padding: 5px 12px;
  background: #0b6b3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.close-btn:hover {
  background: #07512a;
}
.more-info-btn{
	margin-top: 10px;
  padding: 5px 12px;
  background: #0b6b3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
/* Background Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #ffffff;
  width: 550px;
  max-width: 95%;
  padding: 30px;
  border-radius: 14px;
  position: relative;
  transform: translateY(-30px) scale(0.95);
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-content {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Header with image */
.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-header img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 4px solid #2e7d32; /* HIMFED green feel */
}

.modal-content h2 {
  margin: 0;
  color: #2c3e50;
}

.modal-info p {
  margin: 8px 0;
  font-size: 15px;
}


/* ======================
   ORG CHART
====================== */

/* ======================
   ORG CHART – FIXED SPACING
====================== */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: auto;
  margin-top: 20px;
  padding-bottom: 40px;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 16px 0; /* only vertical spacing */
}

.box, .sub-box {
  position: relative;
  z-index: 2;
  color: #fff;
  min-width: 150px;
  padding: 12px 20px;
  border-radius: 6px;
  text-align: center;
  background: #0b6b3a;
}

/* Children row: use gap instead of node margin */
.children-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  margin-top: 18px;
  gap: 24px; /* even spacing between nodes */
}

.children-row::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #555;
  z-index: 0;
}

/* Section children (vertical) */
.section-children {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
}

.section-children .sub-box {
  margin-top: 14px;
  position: relative;
}

/* Vertical connectors */
.box::after,
.sub-box::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: #555;
  bottom: -18px;
  z-index: 1;
}

/* Top connector for children */
.children-row .box::after,
.section-children .sub-box::after {
  height: 16px;
  top: -16px;
}

/* Node colors */
.chairman { background:#0b6b3a; }
.md { background:#14a05a; }
.accounts { background:#1f9a60; }
.it { background:#0077c2; }
.fertilizer { background:#f28c28; }
.establishment { background:#6a1b9a; }

/* GM / Manager refinement */
.box.md {
  font-weight: 600;
}

.org-chart .sub-box {
  font-size: 13px;
  padding: 10px 16px;
}

/* MOBILE */
@media(max-width:768px){
  .children-row {
    flex-direction: column;
    margin-top: 14px;
    gap: 12px;
  }
  .children-row::before { display: none; }
  .box::after,
  .sub-box::after { height: 14px; bottom: -14px; }
}
