/* ===== IMPACT MT summer FACULTY FIRST COMPONENT ===== */
/* Uses ICA Slider Section shortcode - minimal custom styling only */

/* Faculty First Section Container */
.faculty-first {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: var(--ica-bg);
  padding: 0;
  margin: 0;
  position: relative;
}

/* Hard containment: ensure all children remain within parent */
.faculty-first > * {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Safety: prevent images from overflowing parent */
.faculty-first img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Faculty First CTA Container */
.faculty-first__cta-container {
  width: 100%;
  padding: 2rem 2rem;
  background: var(--ica-bg, #ffffff);
  text-align: center;
  margin: 0 auto;
  display: block;
}

/* Force button centering and styling */
.faculty-first__cta-container .btn-ica-white,
.faculty-first__cta-container a.btn-ica-white {
  margin: 0 auto !important;
  display: inline-block !important;
  text-align: center;
  font-size: 15px !important;
  font-weight: 500 !important;
  border-width: 1px 1px 1px 1px !important;
  border-color: #1E312F !important;
  border-style: solid !important;
  box-shadow: -6px 6px 0px 1px rgba(29.99999999999996, 48.99999999999993, 46.999999999999936, 0.45) !important;
}


/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .faculty-first * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== FACULTY POPUP ===== */

.faculty-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.faculty-popup.active {
  display: flex;
  opacity: 1;
}

.faculty-popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 49, 47, 0.8);
  cursor: pointer;
}

.faculty-popup__content {
  position: relative;
  background: #ffffff;
  margin: 0;
  max-width: 535px;
  width: 95%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(30, 49, 47, 0.3);
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(30, 49, 47, 0.1);
}

.faculty-popup.active .faculty-popup__content {
  transform: scale(1) translateY(0);
}

.faculty-popup__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(30, 49, 47, 0.1);
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ica-green-deep, #1E312F);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-weight: 500;
  outline: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  z-index: 1000;
}

.faculty-popup__close:hover {
  background: var(--ica-green-deep, #1E312F);
  color: white;
  transform: scale(1.1);
}

.faculty-popup__body {
  padding: 3rem 2.5rem 2.5rem;
  overflow-y: auto;
  max-height: 85vh;
  scrollbar-width: thin;
  scrollbar-color: var(--ica-green-deep, #1E312F) transparent;
}

.faculty-popup__body::-webkit-scrollbar {
  width: 6px;
}

.faculty-popup__body::-webkit-scrollbar-track {
  background: transparent;
}

.faculty-popup__body::-webkit-scrollbar-thumb {
  background: var(--ica-green-deep, #1E312F);
  border-radius: 3px;
}

.faculty-popup__title {
  font-family: var(--font-heading, sans-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ica-green-deep, #1E312F);
  margin: 0 0 2rem 0;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.faculty-popup__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--ica-lavender, #CFADD1);
  border-radius: 2px;
}

.faculty-popup__text {
  font-family: var(--font-body, sans-serif);
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  text-align: left;
}

.faculty-member {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: #fafafa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.faculty-member:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 49, 47, 0.1);
}

.faculty-member:last-child {
  margin-bottom: 0;
}

.faculty-member__name {
  font-family: var(--font-ui, "Termina", sans-serif) !important;
  font-size: 22px;
  font-weight: 700;
  color: var(--ica-green-deep, #1E312F);
  margin: 0 0 1.5rem 0;
  text-align: left;
  position: relative;
  padding-bottom: 0.75rem;
}

.faculty-member__name::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--ica-lavender, #CFADD1);
  border-radius: 1px;
}

.faculty-member p {
  margin-bottom: 1.25rem;
  text-align: left;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

.faculty-member p:last-child {
  margin-bottom: 0;
}

.faculty-member ul {
  margin: 1.25rem 0;
  padding-left: 0;
  list-style: none;
}

.faculty-member li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

.faculty-member li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--ica-lavender, #CFADD1);
  font-weight: bold;
  font-size: 16px;
}

/* Prevent body scroll when popup is open */
body.popup-open {
  overflow: hidden;
}

/* ===== RESPONSIVE POPUP ===== */

@media (max-width: 768px) {
  .faculty-popup__content {
    width: 95%;
    max-height: 90vh;
  }
  
  .faculty-popup__body {
    padding: 2rem 1.5rem;
  }
  
  .faculty-popup__title {
    font-size: 24px;
    margin-bottom: 1.5rem;
  }
  
  .faculty-popup__text {
    font-size: 15px;
  }
  
  .faculty-member {
    margin-bottom: 2rem;
    padding: 1.5rem;
  }
  
  .faculty-member__name {
    font-size: 18px;
    margin-bottom: 1.25rem;
  }
  
  .faculty-member p {
    font-size: 14px;
    margin-bottom: 1rem;
  }
  
  .faculty-member li {
    font-size: 14px;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .faculty-popup__content {
    width: 98%;
    max-height: 95vh;
    border-radius: 8px;
  }
  
  .faculty-popup__body {
    padding: 1.5rem 1rem;
  }
  
  .faculty-popup__title {
    font-size: 20px;
    margin-bottom: 1.25rem;
  }
  
  .faculty-popup__close {
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  .faculty-member {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
  }
  
  .faculty-member__name {
    font-size: 16px;
    margin-bottom: 1rem;
  }
  
  .faculty-member p {
    font-size: 13px;
    margin-bottom: 0.875rem;
  }
  
  .faculty-member li {
    font-size: 13px;
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
  }
  
  .faculty-member li::before {
    font-size: 14px;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Screen reader support */
.faculty-first[aria-hidden="true"] {
  display: none;
}

.faculty-popup[aria-hidden="true"] {
  display: none !important;
}
