/* Keep the document as the only page scroller so section links work. */
html,
body {
  height: auto;
  min-height: 100%;
  overflow-x: clip !important;
}

html {
  scroll-padding-top: 0;
}

#main > section {
  scroll-margin-top: 100px;
}

/* Adjust main content for fixed navbar */

main {
  padding-top: 90px !important;
}

@media (max-width: 768px) {
  main {
    padding-top: 80px !important;
  }
  #team-header {
    padding: 50px 15px !important;
  }
  #team-header h1 {
    font-size: 40px !important;
  }
  #team-header p {
    font-size: 16px !important;
    padding: 0 10px;
  }
  #faculty-advisor {
    padding: 60px 0 !important;
  }
  #team-content {
    padding: 60px 0 !important;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 75px !important;
  }
  #team-header {
    padding: 40px 10px !important;
  }
  #team-header h1 {
    font-size: 32px !important;
    line-height: 1.2;
  }
  #team-header p {
    font-size: 15px !important;
    padding: 0 5px;
  }
  #team-header .container > div:first-child {
    padding: 6px 18px !important;
    font-size: 12px !important;
  }
  #faculty-advisor {
    padding: 50px 0 !important;
  }
  #faculty-advisor h2,
  #team-content h2 {
    font-size: 32px !important;
    padding: 0 10px;
  }
  #faculty-advisor p,
  #team-content p {
    padding: 0 15px;
  }
  #team-content {
    padding: 50px 0 !important;
  }
}

/* ========== LEAD CARDS STYLES ========== */

.lead-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 120, 215, 0.1);
  height: 100%;
}

.lead-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(0, 120, 215, 0.25);
  border-color: rgba(0, 120, 215, 0.3);
}

.lead-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* Photo Section */

.lead-photo-section {
  position: relative;
  overflow: hidden;
}

.lead-photo-wrapper {
  width: 280px;
  height: 320px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin: 30px auto;
  box-shadow: 0 15px 40px rgba(0, 120, 215, 0.3);
  transition: all 0.4s ease;
}

.lead-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
  display: block;
}

.lead-card:hover .lead-photo {
  transform: scale(1.08);
}

.lead-card:hover .lead-photo-wrapper {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 120, 215, 0.4);
}

.lead-photo-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 120, 215, 0.2) 100%);
  z-index: 1;
}

.lead-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 120, 215, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lead-card:hover .lead-overlay {
  opacity: 1;
}

.lead-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
  animation: pulse-badge 2s ease-in-out infinite;
  animation: pulse-star 2s ease-in-out infinite;
}

.lead-badge i {
  color: #0078d7;
  font-size: 28px;
}

@keyframes pulse-star {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0, 120, 215, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 120, 215, 0.5);
  }
}
/* Info Section */

.lead-info-section {
  padding: 30px 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lead-name {
  font-size: 26px;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.2;
  background: linear-gradient(135deg, #2c3e50, #0078d7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead-designation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  align-self: flex-start;
  box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
}

.lead-designation i {
  font-size: 14px;
}

.lead-details {
  margin-bottom: 25px;
  flex: 1;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  color: #495057;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f7ff, #e6f2ff);
  border-radius: 8px;
  color: #0078d7;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.lead-card:hover .detail-item i {
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  color: white;
  transform: scale(1.1);
}

.lead-social {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f7ff, #e6f2ff);
  border: 2px solid #e9ecef;
  border-radius: 10px;
  color: #0078d7;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  border-color: #0078d7;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 120, 215, 0.3);
}
/* Responsive Design for Lead Cards */

@media (max-width: 992px) {
  .lead-photo-wrapper {
    height: 320px;
  }
  .lead-name {
    font-size: 24px;
  }
  .lead-info-section {
    padding: 25px 20px;
  }
}

@media (max-width: 768px) {
  .lead-photo-wrapper {
    height: 350px;
  }
  .lead-name {
    font-size: 22px;
  }
  .lead-designation {
    font-size: 12px;
    padding: 7px 16px;
  }
  .detail-item {
    font-size: 13px;
  }
  .detail-item i {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .lead-photo-wrapper {
    height: 320px;
  }
  .lead-info-section {
    padding: 20px 18px;
  }
  .lead-name {
    font-size: 20px;
  }
  .lead-designation {
    font-size: 11px;
    padding: 6px 14px;
  }
  .detail-item {
    font-size: 12px;
    padding: 10px 0;
  }
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}
/* ========== FACULTY ADVISOR CARD STYLES ========== */

.faculty-advisor-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 25px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 120, 215, 0.1);
}

.faculty-advisor-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 120, 215, 0.25);
  border-color: rgba(0, 120, 215, 0.3);
}
/* Decorative Elements */

.card-decoration {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.card-decoration-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  top: -150px;
  right: -100px;
  animation: float-decoration 8s ease-in-out infinite;
}

.card-decoration-2 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #2b2a95, #1e3a8a);
  bottom: -80px;
  left: -50px;
  animation: float-decoration 10s ease-in-out infinite reverse;
}

.card-decoration-3 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #00bcf2, #0078d7);
  top: 50%;
  right: -75px;
  animation: float-decoration 12s ease-in-out infinite;
}

@keyframes float-decoration {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.1);
  }
}

.faculty-content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 50px;
  position: relative;
  z-index: 1;
}
/* Photo Section */

.faculty-photo-container {
  flex-shrink: 0;
}

.photo-frame {
  position: relative;
  width: 280px;
  height: 320px;
}

.photo-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  box-shadow: 0 15px 40px rgba(0, 120, 215, 0.3);
  position: relative;
  transition: all 0.4s ease;
}

.faculty-advisor-card:hover .photo-wrapper {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 120, 215, 0.4);
}

.photo-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 120, 215, 0.2) 100%);
  z-index: 1;
}

.faculty-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.verified-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
  animation: pulse-badge 2s ease-in-out infinite;
}

.verified-badge i {
  color: #0078d7;
  font-size: 28px;
}

@keyframes pulse-badge {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0, 120, 215, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 120, 215, 0.5);
  }
}
/* Info Section */

.faculty-info {
  flex: 1;
  min-width: 0;
}

.faculty-header {
  margin-bottom: 25px;
}

.faculty-name {
  font-size: 38px;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.2;
  background: linear-gradient(135deg, #2c3e50, #0078d7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faculty-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  color: white;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
}

.faculty-title i {
  font-size: 16px;
}

.faculty-designation {
  margin-bottom: 25px;
  padding: 20px 0;
  border-top: 2px solid #e9ecef;
  border-bottom: 2px solid #e9ecef;
}

.designation-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  color: #495057;
  font-size: 16px;
  font-weight: 500;
}

.designation-item i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f7ff, #e6f2ff);
  border-radius: 10px;
  color: #0078d7;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.designation-item:hover i {
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.faculty-description {
  margin-bottom: 30px;
}

.faculty-description p {
  font-size: 16px;
  line-height: 1.8;
  color: #6c757d;
  margin: 0;
}

.faculty-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.profile-btn:hover::before {
  width: 300px;
  height: 300px;
}

.primary-btn {
  background: linear-gradient(135deg, #0078d7, #00bcf2);
  color: white;
  border: 2px solid transparent;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 120, 215, 0.4);
  color: white;
}

.primary-btn .arrow-icon {
  transition: transform 0.3s ease;
}

.primary-btn:hover .arrow-icon {
  transform: translateX(5px);
}

.secondary-btn {
  background: white;
  color: #0078d7;
  border: 2px solid #0078d7;
}

.secondary-btn:hover {
  background: #0078d7;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 120, 215, 0.3);
}

.profile-btn i {
  font-size: 18px;
  position: relative;
  z-index: 1;
}

.profile-btn span {
  position: relative;
  z-index: 1;
}
/* Responsive Design */

@media (max-width: 992px) {
  .faculty-content {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
    align-items: center;
  }
  .photo-frame {
    width: 240px;
    height: 280px;
    margin: 0 auto;
  }
  .faculty-info {
    width: 100%;
  }
  .faculty-name {
    font-size: 32px;
    text-align: center;
  }
  .faculty-header {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .designation-item {
    justify-content: center;
    text-align: center;
  }
  .faculty-description {
    text-align: center;
  }
  .faculty-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .faculty-advisor-card {
    margin: 0 15px;
  }
  .faculty-content {
    padding: 35px 25px;
    gap: 30px;
  }
  .photo-frame {
    width: 220px;
    height: 260px;
  }
  .faculty-name {
    font-size: 28px;
    word-wrap: break-word;
  }
  .faculty-title {
    font-size: 12px;
    padding: 6px 16px;
  }
  .faculty-designation {
    margin-bottom: 20px;
    padding: 15px 0;
  }
  .designation-item {
    font-size: 14px;
    padding: 8px 0;
    text-align: center;
  }
  .designation-item span {
    text-align: center;
    display: block;
  }
  .designation-item i {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  .faculty-description {
    text-align: center;
    padding: 0 10px;
  }
  .faculty-description p {
    font-size: 14px;
    line-height: 1.7;
  }
  .profile-btn {
    padding: 14px 28px;
    font-size: 14px;
  }
  .card-decoration {
    display: none;
  }
}

@media (max-width: 576px) {
  .faculty-advisor-card {
    margin: 0 10px;
    border-radius: 20px;
  }
  .faculty-content {
    padding: 30px 20px;
    gap: 25px;
  }
  .photo-frame {
    width: 200px;
    height: 240px;
  }
  .faculty-name {
    font-size: 24px;
    line-height: 1.3;
  }
  .faculty-title {
    font-size: 11px;
    padding: 6px 14px;
  }
  .faculty-designation {
    padding: 12px 0;
    margin-bottom: 18px;
  }
  .designation-item {
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    padding: 10px 5px;
  }
  .designation-item span {
    text-align: center;
    line-height: 1.5;
  }
  .faculty-description {
    padding: 0 5px;
  }
  .faculty-description p {
    font-size: 13px;
    text-align: justify;
    line-height: 1.7;
  }
  .faculty-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .profile-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .faculty-advisor-card {
    margin: 0 5px;
  }
  .faculty-content {
    padding: 25px 15px;
  }
  .photo-frame {
    width: 180px;
    height: 220px;
  }
  .faculty-name {
    font-size: 22px;
  }
  .designation-item {
    font-size: 12px;
  }
  .faculty-description p {
    font-size: 12px;
  }
  .profile-btn {
    padding: 12px 18px;
    font-size: 12px;
  }
}
/* Second-tenure hierarchy and shared member cards. */
.team-history {
  margin-top: 22px !important;
  font-size: 14px !important;
}

.team-jump-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.team-jump-links a {
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.team-jump-links a:hover,
.team-jump-links a:focus-visible {
  background: white;
  color: #005a9e;
}

.roster-section {
  padding: 80px 0;
  scroll-margin-top: 100px;
  background: #f8f9fa;
}

#counsellors-section {
  background: linear-gradient(180deg, #f8f9fa, #fff);
}

#x-members {
  border-top: 1px solid #e3eaf2;
  background: #f0f5fb;
}

.roster-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-kicker {
  display: inline-block;
  padding: 6px 20px;
  background: linear-gradient(135deg, #0078d7, #005a9e);
  color: white;
  border-radius: 50px;
  margin-bottom: 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cabinet-kicker {
  background: linear-gradient(135deg, #2b2a95, #1e3a8a);
}

.roster-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 800;
}

.roster-heading p {
  color: #666;
  font-size: 18px;
  margin-bottom: 18px;
}

.tenure-label {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 30px;
  background: #e4eefb;
  color: #17578f;
  font-size: 14px;
  font-weight: 600;
}

.roster-heading .roster-note {
  margin: 16px auto 0;
  font-size: 14px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
}

.team-grid .lead-card {
  min-width: 0;
}

.team-grid .lead-photo-wrapper {
  width: calc(100% - 48px);
  max-width: 280px;
  height: 270px;
  margin: 24px auto 16px;
}

.team-grid .lead-info-section {
  padding: 20px 24px 26px;
}

.team-grid .lead-name {
  font-size: 23px;
  overflow-wrap: anywhere;
}

.team-grid .lead-designation {
  font-size: 11px;
  padding: 8px 14px;
  max-width: 100%;
}

.position-number {
  display: block;
  color: #49657e;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.member-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: linear-gradient(145deg, #e7f3ff, #cbdff7);
  color: #326599;
}

.member-photo-placeholder i {
  font-size: 72px;
  opacity: 0.6;
}

.member-photo-placeholder span {
  font-size: 12px;
  font-weight: 600;
}

.member-details {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.member-details > div {
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.member-details > div:last-child {
  border-bottom: 0;
}

.member-details dt {
  color: #40576c;
  font-weight: 600;
  margin-bottom: 3px;
}

.member-details dt i {
  width: 22px;
  color: #0078d7;
}

.member-details dd {
  margin: 0;
  color: #626d78;
  overflow-wrap: anywhere;
}

.roster-search {
  max-width: 600px;
  margin: 0 auto 30px;
}

.roster-search label {
  display: block;
  color: #40576c;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.search-field {
  position: relative;
}

.search-field input {
  width: 100%;
  padding: 16px 48px 16px 22px;
  border: 2px solid #dce5ef;
  border-radius: 50px;
  font: inherit;
  font-size: 15px;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-field > i {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #0078d7;
  pointer-events: none;
}

.search-field input:focus-visible,
.team-jump-links a:focus-visible {
  outline: 3px solid #0078d7;
  outline-offset: 4px;
}

.search-results {
  min-height: 21px;
  margin: 12px 0 0;
  color: #49657e;
  font-size: 13px;
}

.former-members-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

/* Cabinet row — exactly 5 columns */
#formerCabinetGrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 40px;
}

.former-sub-heading {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e9f5;
}

.former-member-card {
  min-width: 0;
  background: white;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(25, 58, 91, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.former-member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(25, 58, 91, 0.12);
}

.former-member-photo {
  width: 72px;
  height: 72px;
  margin: 14px auto 0;
  border-radius: 50%;
  overflow: hidden;
  background: #e4eefb;
  border: 3px solid #e4eefb;
}

.former-member-photo .member-photo-placeholder i {
  font-size: 32px;
}

.former-member-photo .member-photo-placeholder span {
  display: none;
}

.former-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.former-member-info {
  padding: 12px;
  text-align: center;
}

.former-role {
  display: inline-block;
  color: #005a9e;
  background: #eaf3ff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.former-member-info h3 {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.compact-details {
  font-size: 12px;
  text-align: left;
}

.former-member-card .compact-details {
  font-size: 11px;
  line-height: 1.4;
}

.former-member-card .compact-details > div {
  padding: 3px 0;
}

.former-member-card .compact-details dt {
  margin-bottom: 0;
  font-size: 10px;
}

.former-member-card .compact-details dt i {
  display: none;
}

.compact-details > div {
  padding: 5px 0;
}

.compact-details dt i {
  width: 18px;
}

@media (max-width: 991px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .former-members-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #formerCabinetGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .former-members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #formerCabinetGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  #main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #main > section > .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #faculty-advisor .row > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .roster-section {
    padding: 40px 0;
  }

  .former-members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #formerCabinetGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
  }

  .former-member-info {
    padding: 10px;
  }

  .former-member-info h3 {
    font-size: 13px;
  }

  .team-jump-links a {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  .former-members-grid,
  #formerCabinetGrid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  #main *,
  #main *::before,
  #main *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Four compact counsellor cards per desktop row. */
#counsellorsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.counsellor-card {
  min-width: 0;
  background: white;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(25, 58, 91, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.counsellor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(25, 58, 91, 0.12);
}

.counsellor-portrait {
  height: 150px;
  background: #e4eefb;
  overflow: hidden;
}

.counsellor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.counsellor-portrait .member-photo-placeholder {
  gap: 12px;
}

.counsellor-portrait .member-photo-placeholder i {
  font-size: 44px;
}

.counsellor-info-section {
  padding: 16px;
}

.counsellor-info-section .position-number {
  text-align: left;
  font-size: 10px;
  margin-bottom: 8px;
}

.counsellor-name {
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.4;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

#main article[hidden] {
  display: none !important;
}

@media (max-width: 991px) {
  #counsellorsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #counsellorsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 575px) {
  .counsellor-info-section {
    padding: 12px;
  }

  .counsellor-name {
    font-size: 15px;
  }
}

@media (max-width: 359px) {
  #counsellorsGrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
