/* 외과 페이지 전용 스타일 */

/* 외과 소개 텍스트 */
.surgery-intro {
  margin-bottom: 50px;
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 5px solid #3b5d3b;
}

.surgery-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #495057;
  margin: 0;
  word-break: keep-all;
}

.surgery-process {
  margin-bottom: 60px;
}

/* 모바일용 세로 레이아웃 */
.process-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0; 
}

.process-desktop {
  display: none;
}

.process-step {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 25px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 2px solid #dee2e6;
  text-align: center;
  height: 150px; /* 고정 높이 */
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 0 auto;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(59, 93, 59, 0.15);
  border-color: #3b5d3b;
  background: linear-gradient(135deg, #f1f3f4 0%, #e2e6ea 100%);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b5d3b 0%, #4a7c59 100%);
  border-radius: 50%;
  color: white;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(59, 93, 59, 0.2);
  flex-shrink: 0; /* 크기 고정 */
}

.process-step h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
  word-break: keep-all;
  flex: 1; /* 남은 공간 차지 */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5px;
}

.process-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  margin: -25px 0;
}

.process-arrow img {
  width: 55px;
  height: auto;
  opacity: 0.9;
  transition: all 0.3s ease;
  transform: rotate(90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.process-arrow:hover img {
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.desktop-arrow {
  display: none;
}

/* 온새동물의료센터만의 특징 섹션 */
.surgery-features {
  margin-bottom: 60px;
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 12px;
}

.surgery-features h3 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.surgery-features h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #3b5d3b;
  border-radius: 2px;
}

/* 특징 섹션 개별 스타일 */
.feature-section {
  background-color: white;
  border-radius: 15px;
  padding: 30px 20px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #3b5d3b 0%, #4a7c59 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-section:hover::before {
  transform: scaleX(1);
}

.feature-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(59, 93, 59, 0.12);
  border-color: #3b5d3b;
}

/* 특징 헤더 */
.feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
}

.feature-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b5d3b 0%, #4a7c59 100%);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(59, 93, 59, 0.2);
  flex-shrink: 0;
}

.feature-header h4 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

/* 이미지 섹션 */
.feature-images {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-images.single-image {
  justify-content: center;
}

.feature-image {
  flex: 1;
  min-width: 0;
  max-width: 180px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.single-image .feature-image {
  max-width: 250px;
}

.feature-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  user-select: none;
}

.feature-image:hover img {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(59, 93, 59, 0.15);
}

/* 이미지 확대 상태 */
.feature-image.expanded {
  flex: none !important;
  max-width: none !important;
  width: 100% !important;
  z-index: 100;
  position: relative;
  order: 999; /* 확대된 이미지를 맨 아래로 */
}

.feature-image.expanded img {
  width: 100% !important;
  max-width: 600px !important;
  height: auto !important;
  margin: 20px auto !important;
  display: block !important;
  transform: scale(1) !important;
  box-shadow: 0 15px 50px rgba(59, 93, 59, 0.25) !important;
  border-radius: 15px !important;
  transition: all 0.4s ease !important;
}

/* 확대 시 다른 이미지들 숨기기 */
.feature-images:has(.feature-image.expanded) .feature-image:not(.expanded) {
  display: none;
}

/* 확대된 이미지가 있을 때 컨테이너 조정 */
.feature-images:has(.feature-image.expanded) {
  flex-direction: column;
  align-items: center;
}

/* 확대 버튼 힌트 */
.feature-image::after {
  /* content: '🔍'; */
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(59, 93, 59, 0.8);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-image:hover::after {
  opacity: 1;
}

.feature-image.expanded::after {
  content: '✕';
  opacity: 1;
}

/* 설명 텍스트 */
.feature-description {
  text-align: center;
}

.feature-description p {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  margin: 0;
  word-break: keep-all;
}

/* 태블릿 스타일 (768px 이상) */
@media (min-width: 768px) {
  .surgery-intro {
    padding: 40px 30px;
    margin-bottom: 70px;
  }

  .surgery-intro p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
  }

  /* 태블릿부터 가로 레이아웃 */
  .process-mobile {
    display: none;
  }

  .process-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
  }

  .process-step {
    flex: 1;
    max-width: 200px;
    z-index: 1;
    height: 160px; /* 태블릿 고정 높이 */
  }

  .process-step h3 {
    font-size: 13px;
  }

  .step-number {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .desktop-arrow {
    display: flex;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin: 0 -20px;
  }

  .desktop-arrow img {
    width: 40px;
    transform: rotate(0deg);
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
  }

  .desktop-arrow:hover img {
    opacity: 1;
    transform: scale(1.1);
  }

  .mobile-arrow {
    display: none;
  }

  .surgery-features {
    padding: 50px 30px;
    margin-bottom: 80px;
  }

  .surgery-features h3 {
    font-size: 28px;
    margin-bottom: 60px;
  }

  .feature-section {
    padding: 40px 30px;
    margin-bottom: 50px;
  }

  .feature-header h4 {
    font-size: 22px;
  }

  .feature-number {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  .feature-images {
    gap: 20px;
    margin-bottom: 30px;
  }

  .feature-image {
    max-width: 200px;
  }

  .single-image .feature-image {
    max-width: 300px;
  }

  .feature-description p {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
  }
}

/* PC 스타일 (1024px 이상) */
@media (min-width: 1024px) {
  .surgery-intro {
    padding: 50px 40px;
    margin-bottom: 80px;
  }

  .surgery-intro p {
    font-size: 20px;
  }

  .process-desktop {
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
  }

  .process-step {
    max-width: 220px;
    height: 180px; /* PC 고정 높이 */
    padding: 30px 25px;
  }

  .process-step h3 {
    font-size: 14px;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .desktop-arrow {
    margin: 0 -25px;
  }

  .desktop-arrow img {
    width: 50px;
  }

  .surgery-features {
    padding: 60px 40px;
    margin-bottom: 100px;
  }

  .surgery-features h3 {
    font-size: 32px;
    margin-bottom: 70px;
  }

  .feature-section {
    padding: 50px 40px;
    margin-bottom: 60px;
  }

  .feature-header {
    margin-bottom: 35px;
    gap: 20px;
  }

  .feature-header h4 {
    font-size: 24px;
  }

  .feature-number {
    width: 70px;
    height: 70px;
    font-size: 22px;
  }

  .feature-images {
    gap: 25px;
    margin-bottom: 35px;
  }

  .feature-image {
    max-width: 220px;
  }

  .single-image .feature-image {
    max-width: 350px;
  }

  .feature-description p {
    font-size: 17px;
    max-width: 800px;
  }
}

/* 대형 PC 스타일 (1440px 이상) */
@media (min-width: 1440px) {
  .surgery-intro {
    padding: 60px 50px;
  }

  .surgery-intro p {
    font-size: 22px;
  }

  .surgery-features {
    padding: 80px 50px;
  }

  .process-desktop {
    max-width: 1400px;
  }

  .process-step {
    max-width: 250px;
    height: 200px; /* 대형 PC 고정 높이 */
    padding: 35px 30px;
  }

  .process-step h3 {
    font-size: 15px;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }

  .desktop-arrow {
    margin: 0 -30px;
  }

  .desktop-arrow img {
    width: 55px;
  }

  .feature-section {
    padding: 60px 50px;
    margin-bottom: 70px;
  }

  .feature-header h4 {
    font-size: 26px;
  }

  .feature-number {
    width: 80px;
    height: 80px;
    font-size: 24px;
  }

  .feature-images {
    gap: 30px;
    margin-bottom: 40px;
  }

  .feature-image {
    max-width: 250px;
  }

  .single-image .feature-image {
    max-width: 400px;
  }

  .feature-description p {
    font-size: 18px;
    max-width: 900px;
  }
}

/* 애니메이션 효과 */
.process-step {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(5) { animation-delay: 0.5s; }
.process-step:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 호버 효과 개선 */
.feature-section:hover .feature-number {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59, 93, 59, 0.3);
}

.feature-section:hover .feature-header h4 {
  color: #3b5d3b;
}

/* 접근성 개선 */
.feature-section:focus-within {
  outline: 2px solid #3b5d3b;
  outline-offset: 2px;
}

/* 성능 최적화 */
.feature-section,
.feature-image,
.feature-number {
  will-change: transform;
}

.feature-image:hover img {
  transform: translateY(-3px) scale(1.02) translateZ(0);
}