/* 수술항목 상세보기 모달 */
.surgery-detail-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

/* 로딩 스타일 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 40px 20px;
}

.loading-content {
  text-align: center;
  max-width: 300px;
}

.loading-spinner-container {
  margin-bottom: 25px;
}

.loading-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid #FFB9B7;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: #FF8A80;
  animation-delay: -0.4s;
}

.spinner-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: #FF6B6B;
  animation-delay: -0.8s;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 20px;
}

.loading-message {
  color: #666;
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: #FFB9B7;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite both;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.surgery-detail-modal-content {
  background-color: #fff;
  margin: 3% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 1920px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.surgery-detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.surgery-detail-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.surgery-detail-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
}

.surgery-detail-modal-close:hover {
  background-color: #f5f5f5;
  color: #222;
}

.surgery-detail-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.surgery-detail-info {
  margin-bottom: 120px;
}

.surgery-detail-description {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.surgery-detail-description h1,
.surgery-detail-description h2,
.surgery-detail-description h3,
.surgery-detail-description h4,
.surgery-detail-description h5,
.surgery-detail-description h6 {
  color: #222;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.surgery-detail-description ul,
.surgery-detail-description ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

.surgery-detail-description li {
  margin-bottom: 5px;
}

.surgery-detail-description strong,
.surgery-detail-description b {
  font-weight: 600;
  color: #222;
}

.surgery-detail-description em,
.surgery-detail-description i {
  font-style: italic;
}

.surgery-detail-description a {
  color: #007bff;
  text-decoration: none;
}

.surgery-detail-description a:hover {
  text-decoration: underline;
}

.surgery-detail-description img {
  height: auto;
  display: block;
}

/* 섹션 제목 */
.section-title {
  font-size: 48px;
  font-weight: 400;
  text-align: center;
  color: #222;
  margin-bottom: 66px;
}

/* Before & After 섹션 */
.before-after-detail-section {
  margin: 0 auto;
  position: relative;
}

.before-after-slider {
  position: relative;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
}

.before-after-main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
}

.after-image {
  width: 650px;
  max-height: 500px;
  height: auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.after-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.after-text {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* 커스텀 슬라이더 버튼 */
.custom-slider-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
  width: 56px !important;
  height: 56px !important;
  background: #FFB9B7 !important;
  color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
  cursor: pointer !important;
  font-size: 36px !important;
  transition: background 0.2s, color 0.2s !important;
  border: none !important;
}

.before-after-slider-button-prev.custom-slider-btn {
  left: 10% !important;
}

.before-after-slider-button-next.custom-slider-btn {
  right: 10% !important;
}

.custom-slider-btn:hover {
  background: #ff69b4 !important;
  color: #fff !important;
}

.custom-slider-btn .material-symbols-outlined {
  font-size: 40px !important;
  color: inherit !important;
}

/* 썸네일 */
.before-after-thumbnails {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.thumbnail-item {
  width: 340px;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s, transform 0.2s;
}

.thumbnail-item.active {
  border: 2px solid #ff69b4;
  transform: scale(1.05);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 수술 후기 섹션 */
.review-detail-section {
  margin: 120px auto;
  max-width: 1200px;
  position: relative;
}

.review-detail-section .review-slider {
  position: relative;
  width: 87%;
}

.review-detail-section .review-item {
  text-align: center;
}

.review-detail-section .review-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-bottom: 10px;
}

.review-detail-section .review-category {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* 수술 후기 슬라이더 버튼 */
.review-slider-button-next,
.review-slider-button-prev {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  top: 50% !important;
  transform: translateY(30px) !important;
  z-index: 10 !important;
  width: 40px !important;
  height: 40px !important;
  background: transparent !important;
  color: #000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-size: 24px !important;
  transition: opacity 0.2s !important;
  border: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.review-slider-button-prev {
  left: 0px !important;
}

.review-slider-button-next {
  right: 0px !important;
}

.review-slider-button-next:hover,
.review-slider-button-prev:hover {
  opacity: 0.7 !important;
}

.review-slider-button-next:after,
.review-slider-button-prev:after {
  content: "" !important;
  width: 100%;
  height: 100%;
  mask: url("/images/icon/icon-arrow-right-4a4688d3e0ea619abfc1b28b92491087.svg") no-repeat center / cover;
  -webkit-mask: url("/images/icon/icon-arrow-right-4a4688d3e0ea619abfc1b28b92491087.svg") no-repeat center / cover;
  background-color: #888;
}
.review-slider-button-prev:after {
  transform: rotate(180deg);
}

/* 상담 및 예약 섹션 */
.consultation-section {
  background: linear-gradient(135deg, #ffe6f0, #fff0f5);
  padding: 40px;
  border-radius: 20px;
  margin: 40px 0;
}

.consultation-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.consultation-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consultation-cards {
  display: flex;
  gap: 20px;
  flex: 2;
}

.consultation-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  flex: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  max-width: 280px;
  height: 238px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.consultation-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.card-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(39%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.4) contrast(1);
  transition: filter 0.3s ease;
}

.consultation-card p {
  font-size: 14px;
  color: #333;
  margin: 0;
  font-weight: 400;
  transition: font-weight 0.3s ease;
}

.consultation-card:hover .card-icon img {
  filter: brightness(0) saturate(100%) invert(85%) sepia(15%) saturate(1000%) hue-rotate(320deg) brightness(1.1) contrast(1);
}

.consultation-card:hover p {
  font-weight: 700;
}

/* 반응형 */
@media (max-width: 1024px) {
  .section-title {
    font-size: 32px;
    margin-bottom: 30px;
  }

  .after-image {
    width: 100%;
    height: auto;
  }

  .custom-slider-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 22px !important;
  }

  .before-after-slider {
    padding: 0 50px;
  }

  .before-after-thumbnails {
    gap: 10px;
  }

  .thumbnail-item {
    width: 160px;
    height: 100px;
  }

  /* 수술 후기 슬라이더 반응형 */
  .review-slider-button-next,
  .review-slider-button-prev {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
  }

  .review-slider-button-prev {
    left: -20px !important;
  }

  .review-slider-button-next {
    right: -20px !important;
  }

  .review-slider-button-next:after,
  .review-slider-button-prev:after {
    font-size: 18px !important;
  }
}

@media (max-width: 768px) {

  /* 수술항목 상세보기 모달 */
  .surgery-detail-modal-content {
    margin: 10% auto;
    width: 95%;
    max-height: 85vh;
  }

  .surgery-detail-modal-header {
    padding: 12px 20px;
  }

  .surgery-detail-modal-header h3 {
    font-size: 18px;
  }

  .surgery-detail-modal-body {
    padding: 20px;
  }

  .surgery-detail-description {
    font-size: 15px;
  }

  /* 섹션 제목 */
  .section-title {
    font-size: 22px;
    margin: 30px 0 20px 0;
  }

  /* Before & After 섹션 */
  .before-after-main {
    flex-direction: column;
    height: auto;
    gap: 10px;
  }

  .before-overlay .material-symbols-outlined {
    font-size: 32px;
  }

  .before-after-slider-button-next,
  .before-after-slider-button-prev {
    width: 30px;
    height: 30px;
  }

  .before-after-slider-button-next:after,
  .before-after-slider-button-prev:after {
    font-size: 14px;
  }

  .before-after-thumbnails {
    flex-wrap: wrap;
    gap: 10px;
  }

  .thumbnail-item {
    width: 100px;
    height: 70px;
  }

  .thumbnail-before,
  .thumbnail-after {
    height: 60px;
  }

  /* 수술 후기 섹션 */
  .review-slider-button-next,
  .review-slider-button-prev {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }

  .review-slider-button-prev {
    left: 0 !important;
  }

  .review-slider-button-next {
    right: 0 !important;
  }

  .review-slider-button-next:after,
  .review-slider-button-prev:after {
    font-size: 16px !important;
  }

  /* 상담 및 예약 섹션 */
  .consultation-section {
    padding: 20px;
  }

  .consultation-content {
    flex-direction: column;
    gap: 20px;
  }

  .consultation-cards {
    flex-direction: column;
  }

  .consultation-card {
    padding: 15px;
  }

  .logo-icon img {
    width: 36px;
    height: 36px;
  }

  .consultation-logo h3 {
    font-size: 20px;
  }

  .card-icon img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 600px) {
  .custom-slider-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }

  .before-after-slider {
    padding: 0 30px;
  }

  .before-after-thumbnails {
    gap: 6px;
  }

  .thumbnail-item {
    width: 70px;
    height: 50px;
  }

  /* 수술 후기 슬라이더 모바일 */
  .review-slider-button-prev {
    left: -15px !important;
  }

  .review-slider-button-next {
    right: -15px !important;
  }

  .review-slider-button-next:after,
  .review-slider-button-prev:after {
    font-size: 14px !important;
  }
}