/* ============================================================
   Named branch page (template) — matches the site's dark theme.
   ============================================================ */
body {
  margin: 0;
  background-color: black;
  color: white;
}

/* ===== Hero banner + outlined branch title ===== */
.branch-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.9);
  user-select: none;
  -webkit-user-drag: none;
  z-index: 0;
}

/* Fallback when no banner image is set */
.branch-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #2a2a2a;
  z-index: -1;
}

.branch-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 4vw;
  text-align: center;
  font-family: "Spectral", serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6.5vw, 6rem);
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* ===== Generic section ===== */
.branch-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 6vw;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4vh;
}

.section-title {
  font-family: "Spectral", serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 4vh 0;
  display: inline-block;
  border-bottom: 4px solid white;
  padding-bottom: 1vh;
}

.section-head .section-title {
  margin-bottom: 0;
}

.branch-description {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.7;
  color: #e6e6e6;
  max-width: 60rem;
}

/* ===== View All toggle ===== */
.view-all {
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Spectral", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: white;
  padding: 0;
  transition: color 0.3s ease;
}

.view-all:hover,
.view-all.active {
  color: #ff7c7c;
}

/* ===== Officers grid ===== */
.officer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.5rem 2rem;
}

.officer-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.officer-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: #d9d9d9; /* placeholder tone when no image */
  display: block;
  border-radius: 8px;
}

.officer-name {
  margin-top: 1rem;
  font-family: "Spectral", serif;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 600;
}

.officer-role {
  color: #b3b3b3;
  font-family: "Almarai", sans-serif;
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

/* About-me panel: hidden until "View All" mode is on, then shown on hover */
.officer-bio {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem;
  background-color: rgba(15, 15, 15, 0.82); /* slightly transparent */
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.officer-bio strong {
  font-family: "Spectral", serif;
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.officer-bio .officer-bio-role {
  color: #ff9191;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.officer-bio p {
  font-family: "Almarai", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #e6e6e6;
  margin: 0;
  overflow-y: auto;
}

/* Reveal the semi-transparent "about me" panel when hovering an officer */
.officer-card:hover .officer-bio {
  opacity: 1;
}

/* "View All" pins every officer's panel open at once */
.officers-expanded .officer-bio {
  opacity: 1;
}

/* ===== Chapters ===== */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 6vh;
}

.chapter-module {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.chapter-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background-color: #d9d9d9;
  border-radius: 10px;
  display: block;
}

.chapter-name {
  font-family: "Spectral", serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0 0 1.2rem 0;
}

.chapter-desc {
  font-family: "Almarai", sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: #d0d0d0;
  margin: 0;
}

.empty-note {
  color: #777;
  font-family: "Almarai", sans-serif;
  font-style: italic;
}

/* ===== Footer ===== */
.bottom-description {
  color: rgb(120, 120, 120);
  text-align: center;
  padding: 6vh 1vw 4vh 1vw;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
}

/* ===== Mobile ===== */
@media (max-width: 800px) {
  .chapter-module {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .branch-hero {
    height: 45vh;
  }
}
