.members-page {
  padding-top: 20px;
  min-height: calc(100vh - 300px);
}

/* Structure */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.section {
  padding: 60px 0;
  display: flex;
  align-items: center;
}

.section-title,
.section .section-title,
.section h1.section-title,
.section h2.section-title {
  font-size: 44px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
  color: #315ca9;
}

.section-description {
  text-align: center;
  color: #555;
  font-size: 1.1rem;
  margin: 0 0 40px;
}

.section-button {
  background-color: #036;
  color: #f9f9f9;
  cursor: pointer;
  padding-left: 70px;
  padding-right: 70px;
  height: 60px;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  border-radius: 50px/70%;
  border-color: transparent;
}

.section-button:hover {
  background-color: #caddf0;
  color: #036;
}

.section-button:focus,
.section-button.active {
  background-color: #b1c9e0;
  color: #036;
}

.section-buttons {
  width: min(100%, 1000px);
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
}

.members-content {
  display: block;
  width: 100%;
  padding-bottom: 60px;
}

/* Runner */
.runner {
  background: #fffdf9;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
  border-bottom: 4px dotted #036;
}

.runner::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 120px;
  background: #00523d; /* Darker green */
  clip-path: path('M 0,60 Q 150,20 300,60 T 600,60 T 900,60 T 1200,60 T 1500,60 T 1800,60 L 1800,120 L 0,120 Z');
  opacity: 0.1;
  z-index: 0;
}

.runner::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100px;
  background: #064; /* Medium green */
  clip-path: path('M 0,50 Q 200,10 400,50 T 800,50 T 1200,50 T 1600,50 T 2000,50 L 2000,100 L 0,100 Z');
  opacity: 0.12;
  z-index: 1;
}

.runner h1 {
  position: relative;
  z-index: 10;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 15px;
  color: #036;
}

.eboard-section {
  background: #fffdf9;
}

.gboard-section {
  background: #f9f9f9;
}

.members-section {
  background: #fffdf9;
}

.alumni-section {
  background: #f9f9f9;
}

.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 60px;
}

.slider {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease-in-out;
}

.profile-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  text-align: center;
  padding: 30px 20px;
  width: 100%;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 12%);
}

.profile-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #064 0%, #036 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  font-size: 4rem;
  color: white;
  font-weight: bold;
}

.profile-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #1a1a1a;
}

.profile-info .position {
  font-size: 1rem;
  font-weight: 600;
  color: #064;
  margin-bottom: 8px;
}

.profile-info .member-year {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}

.profile-info .member-major {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 12px;
  min-height: 40px;
}

.profile-info .year-major {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}

.profile-info .contact-info {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.profile-info .contact-info a {
  color: #064;
  text-decoration: none;
}

.profile-info .contact-info a:hover {
  text-decoration: underline;
}

.profile-info .office-hours {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 15px;
  font-style: italic;
}

.linkedin-btn,
.profile-info .member-linkedin {
  display: inline-block;
  padding: 8px 20px;
  background: #0077b5;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease;
}

.linkedin-btn:hover,
.profile-info .member-linkedin:hover {
  background: #005885;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(0 0 0 / 70%);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10;
}

.slider-btn:hover {
  background: rgb(0 0 0 / 90%);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.member-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
  overflow: hidden;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgb(0 0 0 / 10%);
}

.member-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #064 0%, #036 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-image .placeholder-image {
  font-size: 3rem;
  color: white;
  font-weight: bold;
}

.member-info {
  padding: 20px 15px;
}

.member-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #1a1a1a;
}

.member-info p {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}

.member-info .member-year {
  font-weight: 600;
  color: #444;
}

.member-info .member-major {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 12px;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-info a.member-linkedin {
  display: inline-block;
  padding: 6px 16px;
  background: #0077b5;
  color: white;
  text-decoration: none;
  border-radius: 15px;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}

.member-info a.member-linkedin:hover {
  background: #005885;
}

.alumni-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.alumni-item {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 5%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.alumni-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
}

.alumni-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.alumni-link.no-link {
  cursor: default;
}

.alumni-link.no-link:hover {
  transform: none;
}

.alumni-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
}

.alumni-details {
  font-size: 0.9rem;
  color: #666;
}

.alumni-link:not(.no-link):hover .alumni-name {
  color: #0077b5;
}

.loading,
.error,
.no-data {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: #666;
}

.error {
  color: #d32f2f;
}

.loading::after {
  content: "...";
  animation: loading 1.5s infinite;
}

h2 {
  text-align: center;
  justify-content: center;
  font-weight: 650;
  color: #036;
  font-size: 40px;
  padding-top: 50px;
}

@keyframes loading {
  0%,
  20% {
    content: ".";
  }

  40% {
    content: "..";
  }

  60%,
  100% {
    content: "...";
  }
}

@media (width <= 900px) {
  .section-title,
  .section .section-title,
  .section h1.section-title,
  .section h2.section-title {
    font-size: 28px;
  }

  .section-description {
    font-size: 1rem;
  }

  .slider-container {
    padding: 20px 50px;
  }

  .profile-card {
    min-width: 240px;
    max-width: 100%;
    padding: 20px 15px;
  }

  .profile-image {
    width: 160px;
    height: 160px;
  }

  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }

  .alumni-list {
    grid-template-columns: 1fr;
  }
}

@media (width <= 480px) {
  .members-page {
    padding-top: 60px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title,
  .section .section-title,
  .section h1.section-title,
  .section h2.section-title {
    font-size: 28px;
  }

  .slider-container {
    padding: 20px 40px;
  }

  .slider-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .section-button,
  .section-button:hover,
  .section-button:focus {
    width: 100%;
    padding-right: 24px;
    padding-left: 24px;
  }
}
