/* ============================================
   TEACHER PAGES - PROFESORI DIRIGINTI
   ============================================ */

/* Variables */
:root {
  --teacher-primary: #3b82f6;
  --teacher-secondary: #8b5cf6;
  --teacher-gradient: linear-gradient(135deg, var(--teacher-primary), var(--teacher-secondary));
}

/* Hero Section */
.teacher-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.teacher-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.teacher-hero__pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.teacher-hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  filter: blur(40px);
}

.teacher-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.teacher-hero__photo-wrapper {
  position: relative;
  flex-shrink: 0;
}

.teacher-hero__photo,
.teacher-hero__photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.teacher-hero__photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teacher-gradient);
  color: #fff;
}

.teacher-hero__photo-placeholder .material-icons {
  font-size: 5rem;
  opacity: 0.8;
}

.teacher-hero__photo-ring {
  position: absolute;
  inset: -10px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--teacher-gradient) border-box;
  -webkit-mask: 
    linear-gradient(#fff 0 0) padding-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringRotate 8s linear infinite;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.teacher-hero__info {
  flex: 1;
}

.teacher-hero__name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.teacher-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.teacher-hero__subject,
.teacher-hero__class {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--grey-li);
}

.teacher-hero__subject .material-icons,
.teacher-hero__class .material-icons {
  font-size: 1.25rem;
  color: var(--teacher-primary);
}

.teacher-hero__motto {
  margin: 0;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 1rem;
  border-left: 4px solid var(--teacher-primary);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--black);
  line-height: 1.6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
}

.teacher-hero__motto .material-icons {
  position: absolute;
  top: -10px;
  left: 1rem;
  font-size: 2rem;
  color: var(--teacher-primary);
  opacity: 0.3;
}

/* Q&A Content */
.teacher-content {
  padding: 4rem 0;
}

.teacher-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.teacher-qa-card {
  background: var(--white);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.teacher-qa-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.teacher-qa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.teacher-qa-card--wide {
  grid-column: span 2;
}

.teacher-qa-card--small {
  grid-column: span 1;
}

.teacher-qa-card--highlight {
  background: var(--teacher-gradient);
  color: #fff;
}

.teacher-qa-card--highlight .teacher-qa-card__icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.teacher-qa-card--highlight .teacher-qa-card__question {
  color: #fff;
}

.teacher-qa-card--highlight .teacher-qa-card__answer {
  color: rgba(255, 255, 255, 0.95);
}

.teacher-qa-card--legacy {
  border: 2px solid var(--teacher-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(139, 92, 246, 0.03));
}

.teacher-qa-card__icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teacher-gradient);
  border-radius: 0.75rem;
  color: #fff;
  margin-bottom: 1rem;
}

.teacher-qa-card__question {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.teacher-qa-card__answer {
  font-size: 0.95rem;
  color: var(--grey-li);
  line-height: 1.7;
  margin: 0;
}

.teacher-qa-card__answer p {
  margin: 0 0 0.75rem;
}

.teacher-qa-card__answer p:last-child {
  margin-bottom: 0;
}

/* QR Section */
.teacher-qr-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(139, 92, 246, 0.03));
}

.teacher-qr-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}

.teacher-qr-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.5rem;
}

.teacher-qr-info p {
  font-size: 0.9rem;
  color: var(--grey-li);
  margin: 0;
}

.teacher-qr-code {
  background: #fff;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.teacher-qr-code img {
  display: block;
  width: 120px;
  height: 120px;
}

/* Back Link */
.teacher-back {
  padding: 2rem 0 4rem;
}

.teacher-back__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--teacher-primary);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.teacher-back__link:hover {
  gap: 0.75rem;
}

/* ============================================
   TEACHER LIST PAGE
   ============================================ */

.teacher-list-page {
  padding: 6rem 0 4rem;
}

.teacher-list__header {
  text-align: center;
  margin-bottom: 3rem;
}

.teacher-list__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 0.75rem;
}

.teacher-list__title .material-icons {
  font-size: 2.5rem;
  color: var(--teacher-primary);
}

.teacher-list__subtitle {
  font-size: 1.1rem;
  color: var(--grey-li);
  margin: 0;
}

.teacher-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.teacher-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-primary, #3b82f6), var(--card-secondary, #8b5cf6));
  opacity: 0;
  transition: opacity 0.3s;
}

.teacher-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.teacher-card:hover::before {
  opacity: 1;
}

.teacher-card__photo-wrapper {
  flex-shrink: 0;
}

.teacher-card__photo,
.teacher-card__photo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.teacher-card__photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-primary, #3b82f6), var(--card-secondary, #8b5cf6));
  color: #fff;
}

.teacher-card__photo-placeholder .material-icons {
  font-size: 2.5rem;
}

.teacher-card__content {
  flex: 1;
  min-width: 0;
}

.teacher-card__name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.teacher-card__subject {
  display: block;
  font-size: 0.9rem;
  color: var(--card-primary, var(--teacher-primary));
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.teacher-card__class {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--grey-li);
}

.teacher-card__class .material-icons {
  font-size: 0.9rem;
}

.teacher-card__motto {
  font-size: 0.85rem;
  color: var(--grey-li);
  font-style: italic;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.teacher-card__arrow {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-primary, #3b82f6), var(--card-secondary, #8b5cf6));
  border-radius: 50%;
  color: #fff;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.teacher-card:hover .teacher-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.teacher-list__empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--grey-li);
}

.teacher-list__empty .material-icons {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .teacher-hero {
    padding: 4rem 0 3rem;
    min-height: auto;
  }
  
  .teacher-hero__content {
    flex-direction: column;
    text-align: center;
  }
  
  .teacher-hero__photo,
  .teacher-hero__photo-placeholder {
    width: 150px;
    height: 150px;
  }
  
  .teacher-hero__name {
    font-size: 1.75rem;
  }
  
  .teacher-hero__meta {
    justify-content: center;
  }
  
  .teacher-hero__motto {
    text-align: left;
  }
  
  .teacher-qa-grid {
    grid-template-columns: 1fr;
  }
  
  .teacher-qa-card--wide {
    grid-column: span 1;
  }
  
  .teacher-qr-content {
    flex-direction: column;
  }
  
  .teacher-list__title {
    font-size: 1.75rem;
  }
  
  .teacher-list__title .material-icons {
    font-size: 1.75rem;
  }
  
  .teacher-list__grid {
    grid-template-columns: 1fr;
  }
  
  .teacher-card__arrow {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .teacher-hero__photo,
  .teacher-hero__photo-placeholder {
    width: 120px;
    height: 120px;
  }
  
  .teacher-hero__name {
    font-size: 1.5rem;
  }
  
  .teacher-qa-card {
    padding: 1.5rem;
  }
  
  .teacher-card {
    padding: 1rem;
  }
  
  .teacher-card__photo,
  .teacher-card__photo-placeholder {
    width: 60px;
    height: 60px;
  }
}
