/* 🔹 전체 섹션 스타일 */
.section-result {
  padding: 120px 5vw 140px;
  text-align: left;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.section-result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  pointer-events: none;
}

.section-result h2 {
  font-size: 5.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #000, #333);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}

.section-result h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: #0033cc;
}

.section-result p {
  font-size: 1.2rem;
  color: #5a6781;
  margin-left: 0;
  margin-bottom: 60px;
  max-width: 800px;
}

.divider-line {
  width: 100%;
  max-width: 1600px;
  height: 1px;
  background: linear-gradient(to right, rgba(0,0,0,0.1), rgba(0,0,0,0.05), rgba(0,0,0,0.1));
  margin: 40px auto 60px;
}

/* 🔹 로고 그리드 스타일 */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* 🔹 로고 아이템 (카드) 스타일 */
.logo-item {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  min-height: 180px;
  max-height: 220px;
  perspective: 1000px;
  cursor: pointer;
  border-radius: 16px;
  justify-self: center;
  position: relative;
  transition: transform 0.3s ease;
}

/* 🔹 로고 아이템 호버 시 카드 뒤집기 - 호버 시 즉시 뒤집힘 */
.logo-item:hover .card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.14);
}

/* 로고 아이템 호버 시 약간 위로 떠오름 효과 */
.logo-item:hover {
  transform: translateY(-5px);
}

/* 🔹 카드 내부 컨테이너 스타일 */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* 🔹 카드 클릭 시 회전 및 확대 스타일 */
.card-inner.flipped {
  transform: rotateY(180deg) scale(1.05);
  z-index: 3;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.16);
}

/* 🔹 카드 앞면 스타일 */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-front {
  background-color: #fff;
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px;
}

.card-front:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 🔹 카드 뒷면 스타일 - 카카오톡 이미지 꽉 채우기 */
.card-back {
  background-color: #fff;
  transform: rotateY(180deg);
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0;
}

.card-back:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 🔹 카드 이미지 스타일 */
.card-front img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-front:hover img {
  transform: scale(1.05);
}

/* 🔹 팝업 모달 스타일 */
.card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
}

/* 🔹 팝업 모달 보이기 스타일 */
.card-modal.show {
  opacity: 1;
  pointer-events: all;
}

/* 🔹 팝업 모달 콘텐츠 스타일 */
.card-modal-content {
  position: relative;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  max-width: 90vw;
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-modal.show .card-modal-content {
  transform: scale(1);
}

/* 🔹 팝업 모달 이미지 스타일 */
.card-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 0;
  object-fit: contain;
}

/* 🔹 팝업 모달 닫기 버튼 스타일 */
.card-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.card-modal-close:hover {
  transform: rotate(90deg);
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
}

/* 반응형 조정 */
@media (max-width: 1400px) {
  .logo-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1200px) {
  .logo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .section-result {
    padding: 80px 5vw 100px;
  }
  
  .section-result h2 {
    font-size: 3.2rem;
  }
  
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .logo-item {
    min-height: 160px;
    max-height: 200px;
  }
}