/* ========================================================================== 
   UNIVERSITY STAFF DIRECTORY - PREMIUM UI/UX SPECIFICATION
   ========================================================================== */

/* --- Wrapper Container --- */
.umu-team-front-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px; /* Side margin so cards never sit flush against the page edge */
  box-sizing: border-box;
  font-family: inherit;
}

/* --- Section Headings --- */
.umu-team-section { 
  margin-bottom: 64px; 
}

.umu-team-section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin: 0 auto 24px;
  padding: 0;
  text-align: center;
}

.umu-team-subsection-title {
  font-size: 1rem;
  font-weight: 700;
  color: #FF0000; /* UMU Red */
  margin: 32px auto 16px;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- CSS Grid System (Compact, Partnership-card sized) --- */
.umu-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  justify-content: center;
  gap: 20px;
  padding: 0; /* Wrapper already provides the side margin */
  box-sizing: border-box;
  width: 100%;
}

/* --- Compact Profile Cards (sized like the Partners cards) --- */
.umu-team-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  display: flex; 
  flex-direction: column;
  height: 100%;
  text-align: left; /* All content left-aligned */
}

/* --- Card Interactive / Focus States --- */
.umu-team-card:hover {
  transform: translateY(-2px);
  border-color: #FF0000; /* UMU Red */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.umu-team-card:focus-visible {
  outline: 2px solid #FF0000;
  outline-offset: 2px;
}

/* --- Profile Image (Compact 1:1 Aspect Ratio) --- */
.umu-team-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F3F4F6;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.umu-team-card-photo img,
.umu-team-card-photo .umu-team-card-initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.umu-team-card-photo img {
  object-fit: cover;
  object-position: center top;
}

.umu-team-card-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem; 
  font-weight: 700;
  color: #FF0000;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFCD00 100%);
}

/* --- Card Content Body --- */
.umu-team-card-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* --- Typography Hierarchy (Compact Sizing) --- */
.umu-team-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0 0 4px 0;
  word-wrap: break-word;
  word-break: break-word;
}

/* Strip any dynamic heading tag styling to guarantee unified rendering */
.umu-team-card-name h1, .umu-team-card-name h2, .umu-team-card-name h3,
.umu-team-card-name h4, .umu-team-card-name h5, .umu-team-card-name h6,
.umu-team-card-name p {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.umu-team-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4B5563;
  line-height: 1.35;
  margin: 0;
}

.umu-team-card-department {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.35;
  margin: 4px 0 0 0;
}

.umu-team-card-email {
  font-size: 0.72rem;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.35;
  margin: 8px 0 0 0;
  word-break: break-all; /* Allows long institutional emails to safely wrap */
}

/* --- Primary Institutional Button --- */
.umu-team-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FF0000; /* UMU Red */
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 600;
  height: 42px;
  padding: 0 24px;
  border-radius: 10px;
  border: none;
  text-decoration: none !important;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 150ms ease;
}

.umu-team-card-button:hover {
  background-color: #D60000; /* Premium Darker Red */
}

.umu-team-card-button:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* --- Premium Accessible Modal Window --- */
.umu-team-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}

.umu-team-modal-overlay.is-open {
  display: flex;
}

.umu-team-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.umu-team-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  z-index: 10;
  transition: background-color 150ms ease, color 150ms ease;
}

.umu-team-modal-close:hover { 
  background: #F3F4F6; 
  color: #111827;
}

.umu-team-modal-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 3; /* Shorter landscape header for modal presentation */
  background: #F3F4F6;
  overflow: hidden;
  flex-shrink: 0;
}

.umu-team-modal-photo {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
}

.umu-team-modal-photo.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  color: #FF0000;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFCD00 100%);
}

.umu-team-modal-body {
  padding: 32px;
  text-align: left;
}

.umu-team-modal-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.umu-team-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #4B5563;
  margin: 0 0 4px 0;
}

.umu-team-modal-faculty {
  font-size: 0.95rem;
  font-weight: 400;
  color: #6B7280;
  margin: 0 0 24px 0;
}

.umu-team-modal-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 32px 0;
}

/* --- Modal Link Options --- */
.umu-team-modal-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.umu-team-modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: opacity 150ms ease;
}

.umu-team-modal-links a:hover {
  opacity: 0.9;
}

.umu-team-modal-links a.email-link {
  background: #F3F4F6;
  color: #111827 !important;
  border: 1px solid #E5E7EB;
}

.umu-team-modal-links a.li-link {
  background: #111827;
  color: #ffffff !important;
}

/* ========================================================================== 
   RESPONSIVE BREAKPOINTS (SPECIFIED DESIGN RULES)
   ========================================================================== */

@media (max-width: 1024px) {
  .umu-team-front-wrap { padding: 32px 24px; }
}

@media (max-width: 768px) {
  .umu-team-front-wrap { padding: 32px 16px; }
  .umu-team-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .umu-team-modal-body { padding: 24px; }
}

@media (max-width: 480px) {
  .umu-team-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 compact cards per row on mobile */
    gap: 12px;
  }
  .umu-team-card {
    max-width: 100%;
  }
}
