/* ===== 이벤트 상세보기 모달 (메인 페이지 공통) ===== */

/* 모달 컨테이너 */
.event-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.event-detail-modal.show {
  display: flex;
}

/* 오버레이 */
.event-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-detail-modal.show .event-detail-overlay {
  opacity: 1;
}

/* 모달 콘텐츠 */
.event-detail-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 900px;
  width: 92%;
  max-height: 100vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.event-detail-modal.show .event-detail-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 닫기 버튼 */
.event-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.event-detail-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* 헤더: 제목 + 메타 */
.event-detail-header {
  padding: 32px 36px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.event-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 12px;
  line-height: 1.4;
  padding-right: 40px;
}

.event-detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: #888;
}

.event-detail-date::before {
  content: '\1F4C5';
  margin-right: 6px;
}

.event-detail-views::before {
  content: '\1F441';
  margin-right: 6px;
}

/* 바디: Quill HTML 콘텐츠 */
.event-detail-body {
  padding: 24px 36px 36px;
  overflow-y: auto;
  flex: 1;
  color: #444;
  font-size: 15px;
  line-height: 1.8;
}

/* Quill 에디터 콘텐츠 스타일 */
.event-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

.event-detail-body h1,
.event-detail-body h2,
.event-detail-body h3 {
  color: #2d3748;
  margin: 20px 0 12px;
  font-weight: 700;
}

.event-detail-body p {
  margin: 8px 0;
}

.event-detail-body ul,
.event-detail-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.event-detail-body li {
  margin: 6px 0;
}

.event-detail-body blockquote {
  border-left: 4px solid #5a7d9a;
  padding: 12px 16px;
  margin: 12px 0;
  background: #f8f9fa;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.event-detail-body a {
  color: #5a7d9a;
  text-decoration: underline;
}

/* 스크롤바 */
.event-detail-body::-webkit-scrollbar {
  width: 6px;
}

.event-detail-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.event-detail-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.event-detail-body::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* body 스크롤 잠금 */
body.event-modal-open {
  overflow: hidden;
}

/* ===== 모바일 반응형 (768px 이하) ===== */
@media (max-width: 768px) {
  .event-detail-content {
    margin: 10% auto;
    width: 95%;
    max-height: 85vh;
    max-width: 100%;
    border-radius: 12px;
    transform: translateY(30px) scale(0.95);
  }

  .event-detail-modal.show .event-detail-content {
    transform: translateY(0);
  }

  .event-detail-header {
    padding: 24px 20px 16px;
  }

  .event-detail-title {
    font-size: 20px;
    padding-right: 36px;
  }

  .event-detail-meta {
    flex-direction: column;
    gap: 6px;
  }

  .event-detail-body {
    padding: 20px 20px 40px;
    font-size: 14px;
  }

  .event-detail-close {
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}
