/* ============================================================
   강의 자료실 + 교육 후기 + 갤러리 추가 스타일
   css/style.css 하단에 append
   ============================================================ */

/* ── 강의 자료실 (Materials) ── */
.mat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition);
  animation: cardAppear 0.3s ease forwards;
}

.mat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
  transform: translateX(3px);
}

.mat-card__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.mat-card__icon--online { background: #EFF6FF; }
.mat-card__icon--offline { background: #F0FDF4; }

.mat-card__body { flex: 1; min-width: 0; }

.mat-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.mat-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.mat-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.mat-tag--online { background: #DBEAFE; color: #1E40AF; }
.mat-tag--offline { background: #D1FAE5; color: #065F46; }

.mat-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mat-card__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.mat-btn--view {
  background: var(--primary-light);
  color: var(--primary);
}
.mat-btn--view:hover {
  background: var(--primary);
  color: white;
}

.mat-btn--download {
  background: #D1FAE5;
  color: #065F46;
}
.mat-btn--download:hover {
  background: #059669;
  color: white;
}

.share-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.share-badge--public { background: #DBEAFE; color: #1E40AF; }
.share-badge--private { background: var(--gray-100); color: var(--text-muted); }

/* ── 갤러리 ── */
.gallery-section-header,
.reviews-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
}

.gallery-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all var(--transition);
  cursor: pointer;
  animation: cardAppear 0.3s ease forwards;
  position: relative;
}

.gallery-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.gallery-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
}

.gallery-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 86, 219, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-card:hover .gallery-card__overlay { opacity: 1; }

.gallery-overlay-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  transition: background var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.gallery-overlay-btn:hover { background: rgba(255,255,255,0.35); }

.gallery-card__info {
  padding: 12px 14px;
}

.gallery-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card__sub {
  font-size: 12px;
  color: var(--text-muted);
}

.gallery-card__delete {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  background: rgba(239, 68, 68, 0.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 12px;
  opacity: 0;
  transition: opacity var(--transition);
  border: none;
  cursor: pointer;
}

.gallery-card:hover .gallery-card__delete { opacity: 1; }

/* ── 후기 카드 ── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  animation: cardAppear 0.3s ease forwards;
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.review-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-card__author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.review-card__author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.review-card__date {
  font-size: 12px;
  color: var(--text-muted);
}

.review-card__actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.review-card:hover .review-card__actions { opacity: 1; }

.review-card__course {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 10px;
}

.review-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
}

.star-filled { color: #F59E0B; font-size: 15px; }
.star-empty { color: var(--gray-300); font-size: 15px; }

.review-card__content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.review-card__img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 140px;
  border: 1px solid var(--border);
}

/* ── 별점 인터페이스 ── */
.star-rating {
  display: flex;
  gap: 6px;
}

.star-btn {
  font-size: 28px;
  color: var(--gray-300);
  transition: color var(--transition), transform var(--transition);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
}

.star-btn:hover,
.star-btn.active { color: #F59E0B; transform: scale(1.2); }

/* ── 이미지 라이트박스 ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 20px;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}

.lightbox__close:hover { background: rgba(255,255,255,0.3); }

.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}


/* ── You쌤 자격 및 이력사항 섹션 ── */
.credentials {
  padding: 96px 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
}

.credential-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 28px;
}

.credential-summary__item {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
}

.credential-summary__item strong {
  font-family: 'Inter', sans-serif;
  font-size: 34px;
  line-height: 1;
  color: var(--primary);
}

.credential-summary__item span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.credential-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 20px;
  align-items: stretch;
}

.credential-panel {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.credential-panel--accent {
  background: #f8fbff;
  border-color: #bfdbfe;
}

.credential-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.credential-panel__head h3 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
}

.credential-panel__eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential-list {
  display: grid;
  gap: 10px;
}

.credential-list--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credential-list span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.credential-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.credential-timeline li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dbeafe;
}

.credential-timeline li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.credential-timeline strong {
  font-size: 12px;
  color: var(--primary);
  white-space: nowrap;
}

.credential-timeline span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
}

.credential-note {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: #075985;
}

.credential-note strong {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 900;
}

.credential-note span {
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .credential-summary,
  .credential-layout {
    grid-template-columns: 1fr;
  }

  .credential-list--two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .credentials {
    padding: 72px 0;
  }

  .credential-panel {
    padding: 20px;
  }

  .credential-panel__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .credential-timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .credential-note {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ── You쌤 대시보드 요약 패널 ── */
.dashboard-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 18px;
  margin: 24px 0 22px;
  padding: 24px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: var(--shadow-md);
}

.dashboard-profile__main {
  min-width: 0;
}

.dashboard-profile__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.dashboard-profile__main h3 {
  font-size: 23px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dashboard-profile__main p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 720px;
}

.dashboard-profile__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-profile__facts span {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard .stats-bar__label {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .dashboard-profile {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dashboard-profile {
    padding: 18px;
  }

  .dashboard-profile__facts {
    grid-template-columns: 1fr;
  }

  .dashboard-profile__main h3 {
    font-size: 20px;
  }
}
