.faculty-section {
  padding: 40px 16px;
  text-align: center;
}

.faculty-slider-wrapper {
  position: relative;
  overflow: hidden;
}

.faculty-container {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease;
}

.faculty-card {
  flex: 0 0 100%;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  min-height: 380px;
  text-align: center;
}

.faculty-card img {
  width: 150px;
  height: 180px;
  object-fit: cover;
  margin-bottom: 14px;
}

.faculty-card h3 { 
  margin-bottom: 8px; 
  font-size: 1.5rem; 
}

.faculty-card p {
  max-height: 5.2em;
  overflow: hidden;
  margin-bottom: 12px;
  text-align: justify;
  line-height: 1.3em;
}

.read-more {
  padding: 6px 14px;
  border: none;
  background: #0d6efd;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}
.left-btn { left: 10px; }
.right-btn { right: 10px; }

/* Modal styles */
.modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  justify-content: center; 
  align-items: center; 
  overflow: hidden; 
  z-index: 1000;
}
.modal-content { 
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 80vh; 
}
.modal-photo-wrapper img {
  width: 150px; 
  height: 180px; 
  object-fit: cover;
}
.modal-text {
  text-align: justify; 
  line-height: 1.5;
  overflow-y: auto; 
  max-height: calc(80vh - 200px);
}
body.modal-open { overflow: hidden; height: 100vh;}
.modal-close { position: absolute; 
  top: 10px; 
  right: 12px; 
  background:none; 
  border:none; 
  font-size:22px; 
  cursor:pointer; 
}

/* Tablet view: 2 cards visible */
@media (min-width: 601px) and (max-width: 1000px) {
  .faculty-card { flex: 0 0 48%; max-width: 48%; }
  
}

/* Desktop: single row for all cards */
@media (min-width: 1001px) {
  .faculty-container {
    display: flex; /* horizontal row */
    flex-wrap: nowrap; /* no wrapping */
    justify-content: space-between; /* space between cards */
    gap: 16px; /* spacing between cards */
  }

  .faculty-card {
    flex: 0 0 calc(20% - 12.8px); /* 5 cards: 100% / 5 minus gap */
    max-width: calc(20% - 12.8px);
    min-height: 400px;
  }

  .nav-btn {
    display: none;
  }
  .faculty-card h3 { 
    margin-bottom: 8px; 
    font-size: 22px; 
  }
}


/* @media (min-width: 901px) and (max-width: 1000px){
  .faculty-card h3 { 
    margin-bottom: 8px; 
    font-size: 10px; 
  }
  .faculty-card { min-height: 150px; }
  .faculty-container{
    display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(130px,1fr));
  }
} */
