/* About page styles */
/*
  Future usage:
  1) Add class="about-page" to <body> in pages/about.html.
  2) Keep page-specific rules scoped with .about-page.
*/

.about-page {
  --map-ink: var(--theme-text);
  --map-ink-soft: var(--theme-text-muted);
  --map-gold: var(--theme-accent);
  --map-gold-glow: var(--theme-glow);
  --map-gold-soft: var(--theme-accent-soft);
  --map-burgundy: #1f1f1f;
  --map-surface: var(--theme-surface);
  --map-surface-strong: var(--theme-surface-strong);
  --map-border: var(--theme-border);
  --about-card-border: rgba(255, 255, 255, 0.22);
  --about-card-glow: rgba(255, 255, 255, 0.14);
  --about-card-shadow: rgba(0, 0, 0, 0.35);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  max-width: 100%;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.92), rgba(18, 18, 18, 0.82));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.about-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.14), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.1), transparent 20%),
    radial-gradient(circle at 68% 84%, rgba(255, 255, 255, 0.08), transparent 26%);
  opacity: 1;
  z-index: 0;
}

.about-page main {
  flex: 1;
  /* Absorbs all empty screen space, acting as a shock absorber for the accordion */
}

/* ── Stacking context for all page content ── */
.about-page .navbar {
  z-index: 60;
}

.about-page .container,
.about-page .site-footer {
  position: relative;
  z-index: 1;
}

.about-page .container {
  width: 100%;
  max-width: 1400px;
  /* Stops it from stretching too wide on giant desktop monitors */
  margin: 0 auto;
  /* Automatically centers the container and adjusts the side margins */
  padding: 20px 24px;
  /* Adds a safe 24px breathing room on the sides for mobile */
  box-sizing: border-box;
  /* Ensures the padding doesn't break the 100% width */
}

.about-page .about-intro {
  max-width: none;
  color: var(--map-ink-soft);
  line-height: 1.6;
  font-size: 18px;
}

.about-page .about-accordion {
  margin: 2.5rem 0 2rem;
  width: 100%;
}

.about-page .about-accordion h3 {
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.about-page .accordion {
  display: grid;
  gap: 12px;
}

.about-page .accordion-item {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.5), rgba(15, 15, 15, 0.8));
  box-shadow:
    0 18px 40px var(--about-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.about-page .accordion-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.about-page .accordion-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.about-page .accordion-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--map-ink);
  letter-spacing: 0.01em;
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.5), rgba(15, 15, 15, 0.8));
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.about-page .accordion-item summary::-webkit-details-marker {
  display: none;
}

.about-page .accordion-item summary::after {
  content: "";
  /* Remove the "+" symbol */
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);

  /* Use background-color for the circle, and background-image for the chevron */
  background-color: rgba(255, 255, 255, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
  /* Sizes the chevron to fit nicely inside the 30px circle */

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  /* Added the same bouncy cubic-bezier transition used on your team cards */
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.about-page .accordion-item[open] summary {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 -1px 0 var(--map-border);
  color: var(--theme-accent-strong);
}

.about-page .accordion-item[open] summary::after {
  /* Rotate 180 degrees so the arrow flips up when opened */
  transform: rotate(180deg);
  background-color: rgba(255, 255, 255, 0.18);
  /* Make sure this is background-color, not just background */
  border-color: rgba(255, 255, 255, 0.35);
}

.about-page .accordion-item summary:focus-visible {
  outline: 3px solid var(--theme-focus);
  outline-offset: 2px;
}

.about-page .accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  border-top: 1px solid transparent;
  transition:
    grid-template-rows 0.40s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.40s ease;
}

.about-page .accordion-panel-inner {
  overflow: hidden;
  padding: 0 22px;
  color: var(--map-ink-soft);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    padding 0.40s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    transform 0.3s ease;
}

.about-page .accordion-panel-inner p {
  margin: 12px;
}

.about-page .accordion-panel-inner p:last-child {
  margin-bottom: 0;
}

.about-page .accordion-item[open] .accordion-panel {
  grid-template-rows: 1fr;
  border-top-color: var(--map-border);
}

.about-page .accordion-item[open] .accordion-panel-inner {
  padding: 0 22px 18px;
  opacity: 1;
  transform: translateY(0);
}

.about-page .team {
  margin: 2.5rem 0 3rem;
  padding-bottom: 100px;
}

.about-page .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
}

.about-page .team-loading {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--map-ink-soft);
  font-size: 0.95rem;
}

/* ── Card shell ── */
.about-page .team-card {
  position: relative;
  border-radius: 20px;
  /* Soft white border for the glass edge */
  border: 1px solid rgba(255, 255, 255, 0.12);
  /* Semi-transparent dark background */
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.5), rgba(15, 15, 15, 0.8));
  /* The frosted glass blur */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
  animation: tc-appear 0.45s ease both;
}

@keyframes tc-appear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top shimmer stripe */
.about-page .team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 0 0 4px 4px;
}

.about-page .team-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(145deg, rgba(40, 40, 40, 0.6), rgba(20, 20, 20, 0.9));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 26px 44px rgba(0, 0, 0, 0.6);
}

/* ── Summary (always visible) ── */
.about-page .team-card summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.22s ease;
}

.about-page .team-card summary::-webkit-details-marker {
  display: none;
}

.about-page .team-card[open] summary {
  background: rgba(255, 255, 255, 0.04);
  /* Subtle highlight when open */
}

.about-page .team-card summary:focus-visible {
  outline: 3px solid var(--theme-focus, #555);
  outline-offset: 3px;
  border-radius: 20px;
}

/* ── Avatar wrapper (holds ring pseudo-element) ── */
.about-page .team-photo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

/* Ring that fills in on open */
.about-page .team-photo-wrap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.35s ease;
}

.about-page .team-card[open] .team-photo-wrap::after {
  border-color: rgba(0, 0, 0, 0.30);
}

.about-page .team-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.30s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.30s ease;
}

.about-page .team-card:hover .team-photo {
  transform: scale(1.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20);
}

.about-page .team-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 85px;
  gap: 4px;
  font-family: "Bebas Neue", "Impact", sans-serif;
  letter-spacing: 0.04em;
}

.about-page .team-role {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  /* Light grey */
  line-height: 1;
}

.about-page .team-name {
  font-size: 1.30rem;
  letter-spacing: 0.03em;
  color: #ffffff;
  /* Bright white */
  line-height: 1.1;
}

.about-page .team-matric {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Chevron toggle badge ── */
.about-page .team-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  /* Very subtle glass button */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-page .team-chevron svg {
  width: 15px;
  height: 15px;
  stroke: #ffffff;
  /* White icon */
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.22s ease;
}

.about-page .team-card[open] .team-chevron {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.about-page .team-card[open] .team-chevron svg {
  stroke: #ffffff;
}

/* ─────────────────────────────────────────────
   PANEL  –  grid-template-rows animation
   This is the key fix: instead of max-height (which
   interpolates to an arbitrary ceiling and feels
   mechanical), we animate from 0fr → 1fr so the
   easing perfectly follows the actual content height.
   The outer .team-panel clips; .team-panel-inner
   provides the natural height.
───────────────────────────────────────────── */
.about-page .team-panel {
  display: grid;
  grid-template-rows: 0fr;
  /* collapsed  */
  border-top: 1px solid transparent;
  transition:
    grid-template-rows 0.40s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.40s ease;
}

.about-page .team-card[open] .team-panel {
  grid-template-rows: 1fr;
  /* expanded   */
  border-top-color: rgba(0, 0, 0, 0.10);
}

/* Required: overflow:hidden lets the grid clip the content */
.about-page .team-panel-inner {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  /* Creates a darker inset look for the dropdown */
  padding: 0 16px;
  transition: padding 0.40s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-page .team-card[open] .team-panel-inner {
  padding: 14px 16px 16px;
}

/* ── Detail rows ── */
.about-page .team-detail {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* Faint white line */
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.about-page .team-card[open] .team-detail {
  opacity: 1;
  transform: translateY(0);
}

.about-page .team-card[open] .team-detail:nth-child(1) {
  transition-delay: 0.10s;
}

.about-page .team-card[open] .team-detail:nth-child(2) {
  transition-delay: 0.16s;
}

.about-page .team-card[open] .team-detail:nth-child(3) {
  transition-delay: 0.22s;
}

.about-page .team-card[open] .team-detail:nth-child(4) {
  transition-delay: 0.28s;
}

.about-page .team-detail:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-page .team-detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  min-width: 46px;
  flex-shrink: 0;
}

.about-page .team-detail-value {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  word-break: break-word;
}

.about-page .team-detail-link {
  color: #4a9eff;
  /* Light blue for links */
  text-decoration: none;
  transition: color 0.2s ease;
}

.about-page .team-detail-link:hover {
  color: #6bb3ff;
  /* Slightly lighter on hover */
}

.about-page .team-panel-fallback {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  padding: 4px 0 2px;
}

/* Smooth Closing Overrides */
.about-page .team-card[open].is-closing .team-panel {
  grid-template-rows: 0fr;
  border-top-color: transparent;
}

.about-page .team-card[open].is-closing .team-panel-inner {
  padding: 0 16px;
}

.about-page .team-card[open].is-closing .team-chevron svg {
  stroke: #444444;
}

.about-page .team-card[open].is-closing .team-photo-wrap::after {
  border-color: transparent;
}

.about-page .team-card[open].is-closing .team-detail {
  opacity: 0;
  transform: translateY(5px);
  transition: none;
  /* Hide details instantly to prevent awkward overlap as it rolls up */
}

.about-page .team-card[open].is-closing .team-chevron {
  transform: rotate(0deg);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.about-page .accordion-item[open].is-closing summary::after {
  transform: rotate(0deg);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ─────────────────────────────────────────────
   RESPONSIVE QUERIES
───────────────────────────────────────────── */

/* Tablet & Smaller Laptops */
@media (max-width: 900px) {
  .about-page .team-grid {
    grid-template-columns: repeat(2, 1fr);
    /* Forces exactly 2 equal columns */
  }
}

/* Mobile Devices */
@media (max-width: 640px) {

  /* ── FAQ Accordion Adjustments ── */
  .about-page .accordion-item summary {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .about-page .accordion-panel-inner {
    padding: 0 16px;
  }

  .about-page .accordion-item[open] .accordion-panel-inner {
    padding: 0 16px 14px;
  }

  .accordion-item[open].is-closing .accordion-panel-inner {
    padding: 0 16px;
  }

  /* ── Team Grid & Card Adjustments ── */
  .about-page .team-grid {
    grid-template-columns: 1fr;
    /* Forces exactly 1 column */
    gap: 12px;
  }

  .about-page .team-card summary {
    padding: 16px 12px 14px;
    gap: 10px;
  }

  /* Shrink the team member photos slightly to save vertical space */
  .about-page .team-photo-wrap,
  .about-page .team-photo {
    width: 76px;
    height: 76px;
  }

  /* Adjust typography to fit smaller cards */
  .about-page .team-name {
    font-size: 1.15rem;
  }

  .about-page .team-meta {
    min-height: 75px;
    /* Slightly smaller uniform height for mobile */
  }

  .about-page .team-detail-label {
    min-width: 40px;
    font-size: 0.62rem;
  }

  .about-page .team-detail-value,
  .about-page .team-panel-fallback {
    font-size: 0.78rem;
  }

  .about-page .team-card[open] .team-panel-inner {
    padding: 12px 12px 14px;
  }
}


.accordion-item[open].is-closing .accordion-panel {
  grid-template-rows: 0fr;
  border-top-color: transparent;
}

.accordion-item[open].is-closing .accordion-panel-inner {
  padding: 0 22px;
  opacity: 0;
  transform: translateY(-6px);
}

/* ─── Light Mode Overrides ─────────────────────────────────────────────── */
[data-theme="light"] .about-page {
  background: linear-gradient(180deg, rgba(244, 240, 234, 0.92), rgba(237, 232, 225, 0.82));
}

[data-theme="light"] .about-page::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 0, 0, 0.05), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(0, 0, 0, 0.03), transparent 20%),
    radial-gradient(circle at 68% 84%, rgba(0, 0, 0, 0.025), transparent 26%);
  opacity: 1;
}

[data-theme="light"] .about-page .accordion-item {
  border-color: rgba(0, 0, 0, 0.10);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.65));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.70);
}

[data-theme="light"] .about-page .accordion-item::before {
  border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .about-page .accordion-item:hover {
  border-color: rgba(0, 0, 0, 0.20);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .about-page .accordion-item summary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.65));
  color: var(--theme-text);
}

[data-theme="light"] .about-page .accordion-panel {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .accordion-panel-inner {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .about-page .team-card {
  border-color: rgba(0, 0, 0, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.70));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.70), 0 18px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .team-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

[data-theme="light"] .about-page .team-card:hover {
  border-color: rgba(0, 0, 0, 0.20);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.75));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72), 0 26px 44px rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .about-page .team-card[open] summary {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .about-page .team-card summary:focus-visible {
  outline-color: var(--theme-text);
}

[data-theme="light"] .about-page .team-photo-wrap::after {
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .about-page .team-card[open] .team-photo-wrap::after {
  border-color: rgba(0, 0, 0, 0.20);
}

[data-theme="light"] .about-page .team-photo {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .team-card:hover .team-photo {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .about-page .team-role {
  color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .about-page .team-name {
  color: #1a1410;
}

[data-theme="light"] .about-page .team-matric {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .about-page .team-chevron {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .team-chevron svg {
  stroke: #1a1410;
}

[data-theme="light"] .about-page .team-card[open] .team-chevron {
  background: rgba(0, 0, 0, 0.10);
  border-color: rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .about-page .team-panel {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .team-card[open] .team-panel {
  border-top-color: rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .about-page .team-panel-inner {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .about-page .team-detail {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .about-page .team-detail-label {
  color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .about-page .team-detail-value {
  color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .about-page .team-detail-link {
  color: #2563eb;
}

[data-theme="light"] .about-page .team-detail-link:hover {
  color: #1d4ed8;
}

[data-theme="light"] .about-page .team-panel-fallback {
  color: rgba(0, 0, 0, 0.50);
}