/* =========================================
   GLOBAL LAYOUT
========================================= */
main {
  background-color: #f4f6fa;
  padding: 60px 0;
  color: #333;
  font-family: "Segoe UI", sans-serif;
}

.container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 35px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

/* =========================================
   SIDEBAR
========================================= */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 110px;
  height: fit-content;
  border: 1px solid #e4e9f2;
}

.sidebar h3 {
  color: #013c74;
  font-weight: 700;
  text-align: center;
  font-size: 1.15em;
  margin-bottom: 18px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  background: #f6f8fc;
  color: #013c74;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.sidebar ul li:hover {
  background: #0254a2;
  color: #fff;
}

.sidebar ul li.active {
  background: #013c74;
  color: #ffd700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* =========================================
   MAIN CONTENT
========================================= */
.main {
  background: #fff;
  border-radius: 12px;
  padding: 35px;
  border: 1px solid #e4e9f2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-height: 500px;
  overflow-x: hidden; /* ✅ prevents any overflow */
}

.main section {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.main section.active {
  display: block;
}

.main h2 {
  color: #013c74;
  font-size: 1.7em;
  font-weight: 700;
  margin-bottom: 18px;
}

.main h3 {
  color: #0254a2;
  font-size: 1.2em;
  margin-top: 25px;
  margin-bottom: 10px;
  font-weight: 600;
}

.main p {
  color: #444;
  margin-bottom: 15px;
  line-height: 1.75;
  font-size: 1rem;
}

/* =========================================
   CLEAN MEMBER CARD FIX — NO OVERLAY + AUTO HEIGHT
========================================= */
.member-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  justify-items: center;
  align-items: stretch;
  margin-top: 25px;
  width: 100%;
  max-width: 100%;
}

/* --- CARD BASE --- */
.card {
  background: #ffffff; /* ✅ remove gray overlay */
  border: 1px solid #cfe1f0;
  border-radius: 14px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(1, 60, 116, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: auto;          /* ✅ auto adjusts to content */
  width: 100%;
  max-width: 340px;
  position: relative;
  overflow: visible;     /* ✅ fixes cropped Read More */
}

/* --- IMAGE --- */
.card img {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #013c74;
  margin-bottom: 12px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.card:hover img {
  transform: scale(1.08);
  border-color: #ffd700;
}

/* --- TEXT --- */
.card h4 {
  color: #012a56;
  font-size: 1.05em;
  margin-bottom: 4px;
  font-weight: 700;
}

.card p {
  color: #34526f;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

/* --- READ MORE BUTTON --- */
.read-more {
  margin-top: 8px;
  background: #ffd700;
  color: #013c74;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.read-more:hover {
  background: #013c74;
  color: #fff;
}

/* --- READ MORE EXPANDED CONTENT --- */
.card .extra-content {
  display: none;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #34526f;
  line-height: 1.4;
}

.card.expanded .extra-content {
  display: block;
}

.card.expanded {
  height: auto; /* ✅ card grows just enough */
  padding-bottom: 20px; /* ✅ no huge gap */
}

/* --- HOVER --- */
.card:hover {
  transform: translateY(-5px);
  border-color: #0254a2;
  box-shadow: 0 6px 14px rgba(219, 226, 231, 0.15);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .member-cards {
    grid-template-columns: 1fr;
  }
  .card {
    max-width: 90%;
  }
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    margin-bottom: 25px;
  }

  .main {
    padding: 25px;
  }

  .member-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .member-cards {
    grid-template-columns: 1fr; /* ✅ stack on small screens */
  }

  .card {
    padding: 22px;
    min-height: 260px;
  }

  .card img {
    width: 85px;
    height: 85px;
  }

  .card h4 {
    font-size: 1em;
  }

  .card p {
    font-size: 0.88rem;
  }
}

/* =========================================
   ANIMATION
========================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
