/* 전후사진 페이지 스타일 */
.before-after-section {
  max-width: 1920px;
  margin: 200px auto 100px;
  padding: 0 40px;
}

.before-after-title {
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.before-after-title > span {
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

/* 카테고리 필터 폼 */
.category-filter {
  display: flex;
  gap: 12px;
  margin: 50px 0 30px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #f8f9fa;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.filter-btn:hover {
  background: #e9ecef;
  border-color: #ced4da;
}

.filter-btn.active {
  background: #8C79B3;
  border-color: #8C79B3;
  color: white;
}

.filter-btn .check-icon {
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-btn.active .check-icon {
  opacity: 1;
}

/* 전후사진 그리드 */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.before-after-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.before-after-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.before-after-card-title {
  padding: 15px 15px 10px;
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  background-color: #f8f9fa;
}

.before-after-card-image-container {
  cursor: pointer;
  position: relative;
}

.before-after-images {
  display: flex;
  justify-content: center;
  height: 200px;
}

.before-after-images img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.before-after-images:hover img {
  transform: scale(1.05);
}

.image-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.before-after-labels {
  padding: 15px;
  display: flex;
  gap: 10px;
}

.before-after-label {
  background-color: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.before-after-label.new {
  background-color: #dc3545;
  color: white;
}

.before-after-content {
  padding: 0 15px 15px;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.before-after-content:hover {
  color: #333;
}

.before-after-actions {
  padding: 0 15px 15px;
  display: flex;
  gap: 10px;
}

.btn-edit,
.btn-delete {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-edit {
  background-color: #28a745;
  color: white;
}

.btn-edit:hover {
  background-color: #218838;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
}

/* 빈 상태 */
.before-after-empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-content {
  max-width: 600px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.empty-content h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.empty-content p {
  color: #666;
  margin-bottom: 20px;
}

.empty-action-btn {
  background: var(--point-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.empty-action-btn:hover {
  background: var(--point-color-hover);
}

/* 검색 영역 */
.before-after-search-area {
  max-width: 1200px;
  width: 100%;
  background: #F5F5F5;
  border-radius: 16px;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.before-after-search-area select,
.before-after-search-area input {
  border: none;
  background: #fff;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
  min-width: 120px;
}

.before-after-search-area button {
  background: var(--point-color);
  border: none;
  color: #fff;
  border-radius: 50%;
  min-width: 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.before-after-search-area button:hover {
  background: var(--point-color-hover);
}

.before-after-search-area button img {
  width: 16px;
  height: 16px;
}

/* 모달 스타일 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.before-after-detail-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 10px;
  max-width: 1000px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #333;
}

.before-after-detail-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.before-after-detail-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.before-after-detail-surgery {
  font-size: 16px;
  color: #007bff;
  margin-bottom: 10px;
}

.before-after-detail-info {
  display: flex;
  gap: 20px;
  color: #666;
  font-size: 14px;
}

.before-after-detail-info #modalDays {
  border-right: 1px solid #e0e0e0;
  padding-right: 20px;
}

.before-after-detail-images {
  margin-bottom: 20px;
  text-align: center;
}

.before-after-detail-images img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.before-after-detail-content {
  padding: 20px 30px 30px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
}

.before-after-detail-content p {
  text-align: center;
}

/* 등록 모달 */
.before-after-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.before-after-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.before-after-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.before-after-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.before-after-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.before-after-modal-close:hover {
  color: #333;
}

.before-after-modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel,
.btn-submit {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background-color: #5a6268;
}

.btn-submit {
  background: var(--point-color);
  color: white;
}

.btn-submit:hover {
  background: var(--point-color-hover);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .before-after-grid {
    grid-template-columns: 1fr;
  }
  
  .category-filter {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .filter-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .before-after-title {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .before-after-search-area {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 8px 12px 8px;
  }

  .before-after-search-area select {
    min-width: 90px;
  }

  .before-after-search-area input {
    min-width: 100px;
  }
  
  .before-after-detail-images {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
} 