.about-content {
  padding: 80px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.about-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1e293b;
  text-align: center;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #64748b;
  margin-bottom: 2rem;
  text-align: justify;
}

.team {
  padding: 80px 0;
  background: #f8fafc;
}

.team h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #1e293b;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.team-member {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-member h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.team-member p {
  color: #2563eb;
  font-weight: 500;
}

/* Modal Styles - Improved for Scrolling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto; /* Allow modal itself to scroll if needed */
}

.modal-content {
  background: white;
  margin: 20px auto;
  padding: 0;
  width: 90%;
  max-width: 600px;
  max-height: 80vh; /* Limit height to 80% of viewport */
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Modal Header - Fixed at top */
.modal-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 2rem;
  text-align: center;
  flex-shrink: 0; /* Prevent header from shrinking */
}

.modal-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.modal-role {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.9;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(80vh - 140px);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.modal-body p {
  line-height: 1.7;
  color: #475569;
  font-size: 1rem;
  text-align: justify;
  margin: 0;
  word-wrap: break-word;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

@media (max-width: 768px) {
  .modal {
    padding-top: 20px;
  }

  .modal-content {
    width: 95%;
    max-height: 85vh;
    margin: 10px auto;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h3 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
    max-height: calc(85vh - 120px);
  }

  .close {
    top: 0.5rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: calc(90vh - 100px);
  }
}

.modal-body {
  scroll-behavior: smooth;
}

.modal-content:focus {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
