/* --- THE NETWORK PORTAL LAYOUT --- */

.network-portal {
  display: grid;
  grid-template-columns: 350px 1fr; /* Fixed Left sidebar, Flexible Right stage */
  min-height: calc(100vh - 80px);
}

/* --- PORTAL SIDEBAR: NAVY THEME --- */

.portal-sidebar {
  background-color: var(--aeh-navy); /* Dark Navy Background */
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 105px;
  height: calc(100vh - 105px);
  align-self: start;
  padding: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 60px 40px 20px 40px;
}

.portal-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* --- THE FACTOR-STYLE LINK --- */
.portal-link {
  display: flex;
  gap: 25px;
  padding: 40px; /* Horizontal padding inside the button keeps text safe */
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  position: relative;
}

.portal-link:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover and Active State Logic */
.portal-link:hover,
.portal-link.active {
  padding-left: 55px; /* Subtle nudge right */
  background-color: rgba(255, 255, 255, 0.03); /* Subtle brightness */
  border-bottom-color: var(--aeh-green); /* Green line reveal */
}

/* Factor Number Styling */
.portal-link .factor-num {
  font-family: "EB Garamond", serif;
  font-size: 1.6rem;
  color: var(--aeh-green);
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.portal-link.active .factor-num,
.portal-link:hover .factor-num {
  opacity: 1;
}

/* Content Styling */
.factor-content h4 {
  font-family: "EB Garamond", serif;
  font-size: 1.4rem;
  color: var(--aeh-white);
  margin-bottom: 5px;
  text-transform: none !important;
}

.factor-content p {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase !important;
  letter-spacing: 1.5px;
  color: #94a3b8; /* Muted slate */
}

/* Ensure the green border appears clearly on active state */
.portal-link.active {
  border-bottom: 2px solid var(--aeh-green);
}

/* Custom Scrollbar for the Navy Sidebar */
.portal-sidebar::-webkit-scrollbar {
  width: 4px;
}
.portal-sidebar::-webkit-scrollbar-track {
  background: var(--aeh-navy);
}
.portal-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .portal-sidebar {
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
  }
  .portal-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .portal-link {
    min-width: 300px;
    padding: 30px;
  }
}

/* --- STAGE (RIGHT) --- */
.portal-stage {
  background-color: var(--aeh-white);
}

.asset-view {
  display: none; /* Hidden by default */
  animation: portalFade 0.6s ease forwards;
}

.asset-view.active {
  display: block;
}

@keyframes portalFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.asset-header {
  padding: 0 5%;
}
.asset-display-title {
  font-size: 4.5rem;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 60px;
}

/* Glance Grid 50/50 */
.glance-50-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.portal-map {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.5);
}

.glance-facts h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.glance-line {
  width: 60px;
  height: 3px;
  background: var(--aeh-green);
  margin-bottom: 30px;
}

/* MAP SVG STYLES */
/* --- PORTAL MAP SVG STYLING --- */

.portal-map-svg {
  width: 100%;
  height: auto;
  max-height: 550px;
  display: block;
  /* Premium drop shadow */
  filter: drop-shadow(0 15px 30px rgba(13, 44, 79, 0.08));
  margin: 0 auto;
}

/* Default state for all countries */
.country {
  fill: #f2f2f2 !important; /* Standard Light Gray */
  stroke: #000000 !important;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: all 0.3s ease;
}

/* THE HUBS (AEH Green) */
.country.hub {
  fill: var(--aeh-green) !important;
  stroke: var(--aeh-navy) !important;
  stroke-width: 2;
  opacity: 1;
}

/* THE ORIGINS (AEH Navy) */
.country.origin {
  fill: var(--aeh-navy) !important;
  opacity: 0.85;
}

/* Hover Interactivity */
.country:hover {
  fill: var(--aeh-blue) !important;
  cursor: pointer;
  opacity: 1;
}

/* Reset any specific inline styles that might interfere */
path {
  vector-effect: non-scaling-stroke;
}
/* --- PORTAL FACULTIES AREA --- */

.portal-faculties-area {
  padding: 40px 5%;
  border-top: 1px solid var(--border);
  background: var(--aeh-light-back);
}

.faculties-header h3 {
  font-size: 2.8rem;
  margin-bottom: 40px;
}

.faculties-interactive-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr; /* Fixed tab width, flexible content */
  gap: 60px;
  align-items: flex-start;
}

/* Tabs Styling */
.faculty-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faculty-tab {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  border-left: 4px solid #e5e7eb;
  background-color: transparent;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.faculty-tab:hover {
  color: var(--aeh-navy);
  border-left-color: var(--aeh-green);
}

.faculty-tab.active {
  background-color: white;
  color: var(--aeh-blue);
  border-color: #e5e7eb;
  border-left: 4px solid var(--aeh-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

/* Content Panel Styling */
.faculty-display-panel {
  background: white;
  padding: 50px;
  border: 1px solid var(--border);
  min-height: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.02);
}

.faculty-programs {
  display: none;
  animation: portalFade 0.5s ease forwards;
}

.faculty-programs.active {
  display: block;
}

.faculty-programs h4 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--aeh-navy);
}

.program-list {
  list-style: none;
  margin-bottom: 40px;
}

.program-list li {
  padding: 12px 0;
  border-bottom: 1px dotted var(--border);
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 15px;
}

.program-list li::before {
  content: "\f105"; /* Font Awesome angle-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--aeh-green);
  font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .faculties-interactive-wrapper {
    grid-template-columns: 1fr;
  }
  .faculty-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 15px;
  }
  .faculty-tab {
    min-width: 200px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid var(--border);
  }
  .faculty-tab.active {
    border-bottom-color: var(--aeh-blue);
  }
}

/* Helper for long lists (like PG Uganda) */
.scrollable-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 15px;
}

.scrollable-list::-webkit-scrollbar {
  width: 4px;
}
.scrollable-list::-webkit-scrollbar-thumb {
  background: var(--aeh-blue);
}

/* Ensure text doesn't capitalize program names like 'MBA' */
.program-list li {
  text-transform: none !important;
}

/* FACULTIES END */
/* ---PORTAL FACTS LIST WITH ICONS --- */

.portal-facts-list {
  list-style: none;
  padding: 0;
}

.portal-facts-list li {
  padding: 15px 0 15px 35px; /* Added 35px padding to the left for the icon */
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  position: relative; /* Required for the absolute positioning of the icon */
  text-transform: none !important; /* Ensure it stays institutional/readable */
}

.portal-facts-list li::before {
  content: "\f058"; /* Font Awesome circle-check unicode */
  font-family: "Font Awesome 6 Free";
  font-weight: 900; /* Required for the "solid" style */
  color: var(--aeh-green); /* AEH Green color variable */
  position: absolute;
  left: 0;
  top: 50%; /* Center vertically */
  transform: translateY(-50%); /* Offset for perfect vertical centering */
  font-size: 1.2rem;
}

/* High Contrast Section */
.high-contrast-context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: white;
}

.context-card {
  padding: 60px;
}
.context-card h4 {
  color: white;
  font-size: 2rem;
  margin-bottom: 15px;
}
.bg-blue {
  background-color: var(--aeh-blue);
}
.bg-green {
  background-color: var(--aeh-green);
}

/* --- INSTITUTIONAL LEADERSHIP AREA --- */

.institutional-leadership-area {
  padding: 50px 5%;
  border-top: 1px solid var(--border);
}

.lead-header {
  margin-bottom: 50px;
}

.section-main-title {
  font-size: 3rem;
  color: var(--aeh-navy);
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* --- THE PREMIUM TEAM CARD --- */
.team-card {
  background-color: var(--aeh-white);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  height: 100%;
}

.team-card:hover {
  border-color: var(--aeh-blue);
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(13, 44, 79, 0.05);
}

/* Portrait Section */
.team-card-visual {
  position: relative;
  height: 320px; /* Editorial tall ratio */
  overflow: hidden;
  background-color: var(--aeh-light-back);
}

.team-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
  transition: 0.6s ease;
}

.team-card:hover .team-card-visual img {
  transform: scale(1.05);
}

/* Info Section */
.team-card-info {
  padding: 35px 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.team-member-title {
  font-family: "Inter", sans-serif;
  color: var(--aeh-green);
  font-weight: 800;
  text-transform: uppercase !important;
  font-size: 0.65rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* --- FIXED: PREVENTS NAME LINE BREAKS --- */
.team-member-name {
  font-family: "EB Garamond", serif;

  /* 1. Fluid Font Size: Scales between 1.4rem and 1.7rem based on screen width */
  font-size: clamp(1.4rem, 2vw, 1.7rem);

  color: var(--aeh-navy);
  line-height: 1.2;
  margin-bottom: 20px;
  text-transform: none !important;

  /* 2. Force to a single line */
  white-space: nowrap;

  /* 3. Letter spacing: A tiny negative value tightens the name for a premium look */
  letter-spacing: -0.02em;

  /* 4. Safety: If the name is STILL too long, it will hide the overflow 
     instead of breaking the card's height */
  overflow: hidden;
  text-overflow: ellipsis; /* Adds '...' if it ever hits the edge */
}

/* Optional: If you want to give the name even more room, 
   reduce the side padding of the info box slightly */
.team-card-info {
  padding: 30px 20px; /* Reduced from 25px or 30px to give text more width */
}

.title-line {
  width: 40px;
  height: 2px;
  background-color: var(--aeh-blue);
  margin-bottom: 20px;
}

.team-member-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-transform: none !important;
}
/* LEADERSHIP END */

/* Standard (Pillar 03) Special Styling */
.bg-navy {
  background-color: var(--aeh-navy);
  padding: 80px;
  color: white;
}
.s-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.s-pillar h5 {
  color: var(--aeh-green);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .network-portal {
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    position: relative;
    top: 0;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .portal-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .portal-link {
    min-width: 250px;
  }
  .asset-display-title {
    font-size: 3rem;
  }
  .glance-50-50,
  .high-contrast-context,
  .s-grid {
    grid-template-columns: 1fr;
  }
}
