/* (주)일신아이디 통합 프리미엄 스타일 시트 */

:root {
  --primary-navy: #0b192c;
  --secondary-navy: #1e3e62;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-emerald: #059669;
  --bg-slate: #f8fafc;
  --card-border: #e2e8f0;
}

/* 부드러운 스크롤 */
html {
  scroll-behavior: smooth;
}

/* 폰트 렌더링 최적화 */
body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* 상단 고정 헤더 블러 효과 */
.glass-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.glass-header.scrolled {
  box-shadow: 0 4px 20px -2px rgba(11, 25, 44, 0.1);
}

/* 네비게이션 링크 간격 보정 */
#main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem !important;
}

#main-nav a {
  position: relative;
  padding: 0.5rem 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #334155;
  transition: color 0.2s ease;
}

#main-nav a:hover {
  color: #d97706;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f59e0b;
  transition: width 0.25s ease;
}

#main-nav a:hover::after {
  width: 100%;
}

#main-nav a.nav-active {
  color: #d97706;
}

#main-nav a.nav-active::after {
  width: 100%;
}

/* 기업 정보 테이블 행/라벨 전용 */
.info-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-label {
  width: 140px;
  min-width: 140px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #64748b;
}

.info-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

/* 히어로 섹션 - 첫 화면 100vh 완벽 피팅 */
.hero-wrapper {
  position: relative;
  min-height: calc(100vh - 118px);
  min-height: calc(100dvh - 118px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .hero-wrapper {
    height: calc(100vh - 118px);
    height: calc(100dvh - 118px);
    max-height: calc(100vh - 118px);
  }
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 25, 44, 0.92) 0%, rgba(14, 38, 70, 0.86) 60%, rgba(20, 52, 95, 0.78) 100%);
}

.hero-container {
  box-sizing: border-box;
}

/* 파노라마 타이틀 애니메이션 스타일 */
.panorama-wrapper {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  vertical-align: bottom;
  min-height: 1.2em;
}

.panorama-prefix {
  color: #f59e0b;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
}

.panorama-text {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 35%, #fef08a 50%, #fbbf24 65%, #f59e0b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  letter-spacing: -0.02em;
  min-width: 0.5ch;
  transition: filter 0.4s ease;
}

/* 전체가 다 나오는 순간(완성 상태): 파노라마 골든 라이트 스윕 & 아우라 */
.panorama-wrapper.complete .panorama-text {
  animation: panoramaGoldSweep 2.2s linear infinite;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.75));
}

.panorama-wrapper.complete .panorama-prefix {
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

@keyframes panoramaGoldSweep {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* 커서 깜빡임 애니메이션 */
.panorama-cursor {
  display: inline-block;
  color: #f59e0b;
  font-weight: 300;
  animation: cursorBlink 0.75s ease-in-out infinite;
  margin-left: 2px;
  transform: translateY(-2px);
  transition: opacity 0.2s ease;
}

.panorama-cursor.hide {
  opacity: 0;
  animation: none;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 탭 버튼 스타일 */
.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.tab-btn.active {
  background-color: var(--primary-navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 25, 44, 0.2);
}

.tab-btn:not(.active) {
  background-color: #f1f5f9;
  color: #475569;
}

.tab-btn:not(.active):hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* 조직도 트리 디자인 */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  padding: 1rem 0;
}

.org-ceo {
  background: linear-gradient(135deg, #0b192c 0%, #1e3e62 100%);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.125rem;
  box-shadow: 0 10px 25px -5px rgba(11, 25, 44, 0.3);
  border: 2px solid #f59e0b;
  position: relative;
}

.org-ceo::after {
  content: '';
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.5rem;
  background-color: #cbd5e1;
}

.org-branches-line {
  width: 80%;
  max-width: 720px;
  height: 2px;
  background-color: #cbd5e1;
  position: relative;
}

.org-departments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 800px;
}

@media (min-width: 640px) {
  .org-departments {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .org-departments {
    grid-template-columns: repeat(6, 1fr);
  }
}

.org-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.org-card:hover {
  border-color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.12);
}

/* 포트폴리오 카드 호버 효과 */
.portfolio-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(11, 25, 44, 0.15);
  border-color: #f59e0b;
}

.portfolio-card img {
  transition: transform 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.06);
}

/* 인증서 카드 */
.cert-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: #f59e0b;
  box-shadow: 0 12px 24px -6px rgba(245, 158, 11, 0.2);
}

.cert-thumbnail-wrapper {
  height: 260px;
  background: #f8fafc;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f1f5f9;
  position: relative;
}

.cert-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

.cert-card:hover .cert-thumbnail-wrapper img {
  transform: scale(1.05);
}

.cert-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 25, 44, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.5rem;
}

.cert-card:hover .cert-zoom-overlay {
  opacity: 1;
}

/* 실적 현황 테이블/리스트 */
.record-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

#track-record-list {
  grid-template-columns: minmax(0, 1fr);
}

.record-item > div:first-child {
  min-width: 0;
  flex: 1;
}

.record-item > div:first-child > span:last-child {
  overflow-wrap: anywhere;
}

.record-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(4px);
}

.company-history-timeline {
  position: relative;
  display: grid;
  gap: 2rem;
}

.company-history-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.6rem;
  width: 2px;
  background: #fbbf24;
}

.company-history-item {
  position: relative;
  min-width: 0;
  padding-left: 2.5rem;
}

.company-history-marker {
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 1.25rem;
  height: 1.25rem;
  border: 4px solid #f59e0b;
  border-radius: 50%;
  background: #fff;
}

.company-history-date {
  display: block;
  margin-bottom: 0.25rem;
  color: #b7791f;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.5;
}

@media (min-width: 1280px) {
  #track-record-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.record-photo-modal {
  max-width: 1100px;
}

.record-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.record-photo {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8e4dc;
  border-radius: 0.85rem;
  background: #fffefa;
  box-shadow: 0 8px 24px rgba(48, 39, 27, 0.08);
}

.record-photo img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f8f7f3;
  filter: brightness(1.045) contrast(1.055) saturate(1.04) sepia(0.018);
  transition: filter 0.25s ease, transform 0.35s ease;
}

.record-photo:hover img {
  filter: brightness(1.065) contrast(1.07) saturate(1.06) sepia(0.01);
  transform: scale(1.015);
}

.record-photo figcaption {
  padding: 0.65rem 0.8rem;
  color: #5b554b;
  font-size: 0.75rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #fffefa, #f8f6f1);
}

/* 모달 레이아웃 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border-radius: 1.5rem;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .modal-content {
  transform: scale(1);
}

/* 라이트박스 전용 */
.lightbox-content {
  max-width: 850px;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-height: 80vh;
  max-width: 95vw;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: #ffffff;
}

/* 플로팅 퀵 버튼 */
.floating-kakao {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background-color: #fee500;
  color: #191919;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  font-weight: 800;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.floating-kakao:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px -3px rgba(254, 229, 0, 0.4);
  background-color: #fada0a;
}

.floating-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0b192c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.floating-top.show {
  opacity: 1;
  pointer-events: auto;
}

.floating-top:hover {
  background: #0b192c;
  color: #ffffff;
  transform: translateY(-2px);
}

/* 인쇄용 최적화 */
@media print {
  .glass-header, .floating-kakao, .floating-top, #contact-form {
    display: none !important;
  }
}
