/* Staff Page Styles */
.staff-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Section Navigation */
.section-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-btn {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  background-color: #f0f0f0;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.section-btn.active {
  background-color: #0066cc;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.2);
}

.section-btn:hover:not(.active) {
  background-color: #e0e0e0;
}

/* Staff Sections */
.staff-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.staff-section.active {
  display: block;
}

.staff-header {
  text-align: center;
  margin-bottom: 3rem;
}

.staff-header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.staff-header p {
  font-size: 1.1rem;
  color: #666;
}

/* Faculty Grid */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
}

/* Staff Grid */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

/* Faculty Container with Sidebar Layout */
.faculty-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap:6rem;
  align-items: start;
}

.faculty-content {
  min-height: 500px;
}

/* Faculty Info Sidebar */
.faculty-info-sidebar {
  position: sticky;
  top: 2rem;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.faculty-title {
  color: #333;
  font-size: 2.5rem;
  font-weight: 300;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 1px;
}

.faculty-subtitle {
  color: #0066cc;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0.5rem 0;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.info-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h2 {
  color: #0066cc;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  border-bottom: 2px solid #0066cc;
  padding-bottom: 0.5rem;
}

.info-content h3 {
  color: #333;
  font-size: 1rem;
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
}

.info-content p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.highlight-text {
  color: #0066cc !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-align: center;
  margin: 0.8rem 0 !important;
  text-shadow: 0 1px 2px rgba(0, 102, 204, 0.1);
  letter-spacing: 0.5px;
}

/* Faculty Member Styles */
.faculty-member, .staff-member {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.faculty-member:hover, .staff-member:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faculty-image, .staff-image {
  position: relative;
  aspect-ratio: 3/3.5;
  overflow: hidden;
}

.faculty-image img, .staff-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.faculty-member:hover .faculty-image img,
.staff-member:hover .staff-image img {
  transform: scale(1.1);
}

.faculty-overlay, .staff-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.faculty-member:hover .faculty-overlay,
.staff-member:hover .staff-overlay {
  transform: translateY(0);
}

.faculty-overlay h3, .staff-overlay h3 {
  margin: 0;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.faculty-overlay span, .staff-overlay span {
  font-size: 0.8rem;
  opacity: 0.9;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.staff-nav {
  background-color: var(--m3-surface-container);
  border-radius: var(--m3-shape-small);
  padding: 1rem;
  margin-bottom: 2rem;
}

.staff-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  justify-content: center;
}

.staff-nav li {
  margin: 0.25rem;
  background-color: var(--m3-primary);
  border-radius: var(--m3-shape-small);
}

.view-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--m3-primary);
  color: var(--m3-on-primary);
  border-radius: var(--m3-shape-small);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.view-btn:hover,
.view-btn.active {
  background-color: var(--m3-primary-container);
  color: var(--m3-on-primary-container);
  transform: translateY(-2px);
}

.tab-container {
  margin-top: 1rem;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.staff-section {
  margin-bottom: 3rem;
  animation: fadeIn 0.5s;
  display: none;
}

.staff-section.active {
  display: block;
}

.staff-section h2 {
  color: var(--m3-primary);
  border-bottom: 2px solid var(--m3-outline-variant);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.staff-section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--m3-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: var(--m3-shadow-2);
  overflow: hidden;
  border-radius: var(--m3-shape-small);
  margin-bottom: 2rem;
}

.data-table thead {
  background-color: var(--m3-primary);
  color: var(--m3-on-primary);
}

.data-table th, 
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table tr:nth-child(even) {
  background-color: var(--m3-surface-container-low);
}

.data-table tr:hover {
  background-color: var(--m3-surface-variant);
}

.search-container {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 95%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--m3-outline-variant);
  border-radius: var(--m3-shape-small);
  font-size: 1rem;
  transition: border-color 0.3s;
  background-color: var(--m3-surface-container-low);
}

.search-input:focus {
  outline: none;
  border-color: var(--m3-primary);
  background-color: var(--m3-surface-container);
}

.staff-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.staff-card {
  background-color: var(--m3-surface-container);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faculty-section {
  padding: 2rem 0;
}

.faculty-section .faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.1rem;
}

.faculty-section .faculty-member {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faculty-section .faculty-image {
  position: relative;
  aspect-ratio: 3/3.5;
  overflow: hidden;
}

.faculty-section .faculty-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.faculty-section .faculty-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.faculty-section .faculty-member:hover .faculty-overlay {
  transform: translateY(0);
}

.faculty-section .faculty-member:hover .faculty-image img {
  transform: scale(1.05);
}

.faculty-section .faculty-overlay h3 {
  margin: 0;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.faculty-section .faculty-overlay span {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Faculty Modal Styles */
.faculty-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  background: white;
  margin: 2rem auto;
  max-width: 1000px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  z-index: 1;
}

.faculty-detail-container {
  padding: 2rem;
}

.faculty-profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

.faculty-image-large {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.faculty-info-main {
  flex: 1;
}

.faculty-header h2 {
  margin: 0;
  font-size: 2rem;
  color: #333;
}

.faculty-header p {
  margin: 0.5rem 0;
  color: #666;
  font-size: 1.1rem;
}

.faculty-basic-info {
  margin: 1.5rem 0;
}

.faculty-basic-info h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: #444;
}

.contact-info a {
  color: #0066cc;
  text-decoration: none;
}

/* Tabs Styles */
.faculty-tabs {
  margin-top: 2rem;
}

.tabs-header {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid #eee;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: #666;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #0066cc;
}

.tab-btn.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

.tabs-content {
  padding: 1rem 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tab Content Styles */
.tab-content p {
  line-height: 1.6;
  color: #444;
}

.tab-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tab-content li {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.4;
}

.tab-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #0066cc;
}

/* Staff Table Styles */
.staff-table-container {
  margin: 2rem auto;
  max-width: 800px;
  padding: 0 1rem;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.staff-table thead {
  background-color: #0066cc;
  color: white;
}

.staff-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.staff-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.staff-table tbody tr:hover {
  background-color: #f8f9fa;
}

.staff-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive Table */
@media (max-width: 600px) {
  .staff-table-container {
    padding: 0;
  }
  
  .staff-table {
    font-size: 0.9rem;
  }
  
  .staff-table th,
  .staff-table td {
    padding: 0.75rem;
  }
}

/* Responsive styles */
@media (max-width: 1024px) {
  .faculty-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .faculty-section .faculty-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .section-nav {
    flex-direction: column;
    padding: 0 1rem;
  }

  .section-btn {
    width: 100%;
  }

  .staff-header h1 {
    font-size: 1.8rem;
  }

  /* Stack faculty container vertically on mobile */
  .faculty-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .faculty-info-sidebar {
    position: static;
    order: -1;
    text-align: center;
    padding: 1rem 0;
  }

  .faculty-title {
    font-size: 1.8rem;
  }

  .faculty-subtitle {
    font-size: 1.3rem;
  }

  .info-card {
    padding: 1rem;
  }

  .info-card h2 {
    font-size: 1.2rem;
  }

  .info-content h3 {
    font-size: 0.9rem;
  }

  .info-content p {
    font-size: 0.8rem;
  }

  .faculty-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  /* Modal Responsive Styles */
  .modal-content {
    margin: 0.5rem;
    max-height: 95vh;
    overflow-y: auto;
  }

  .faculty-detail-container {
    padding: 1rem;
  }

  .faculty-profile {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .faculty-image-large {
    max-width: 100%;
    height: 300px;
    margin: 0 auto;
  }

  .faculty-header h2 {
    font-size: 1.5rem;
  }

  .faculty-header p {
    font-size: 1rem;
  }

  .tabs-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
    min-width: calc(50% - 0.5rem);
  }

  .faculty-basic-info {
    margin: 1rem 0;
  }

  .faculty-basic-info h3 {
    font-size: 1rem;
  }

  .tab-content {
    font-size: 0.95rem;
  }

  .close-modal {
    right: 0.5rem;
    top: 0.5rem;
    font-size: 1.5rem;
  }
}

/* ============================================
   Simple Image Modal for Staff Details
============================================ */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.image-modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.close-image-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-image-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Mobile responsive image modal */
@media (max-width: 768px) {
  .image-modal-content {
    width: 95%;
    padding: 20px;
  }
  
  .image-modal-content img {
    max-height: 80vh;
  }
  
  .close-image-modal {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
}
