/* Header Fix - 상단 고정 */
#header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
}

#header nav {
  position: fixed !important;
  top: 1rem !important;
  left: 1rem !important;
  margin: 0 !important;
  z-index: 1001 !important;
}

/* Contact 전용 중앙 정렬 래퍼 */
.contact-center {
  min-height: 100vh;
  display: grid;
  place-items: center;              /* 가로+세로 완전 중앙 */
  margin: 0;
  padding: 0;                       /* 남아있는 padding/마진 제거 */
}

/* 카드 자체에 남아있을 수 있는 좌측 정렬 요소 제거 */
.contact-center .contact-card {
  margin: 0 !important;
  float: none !important;
  position: relative !important;    /* left/top 등 절대값 제거 */
  left: auto !important;
  right: auto !important;
  transform: none !important;       /* 이전에 translate가 있으면 초기화 */
  max-width: 760px;
  width: min(92vw, 760px);
}

/* 헤더/내비가 fixed여서 카드가 가려지면 위쪽만 살짝 띄움 */
@media (min-width: 681px) {
  .contact-center {
    padding-top: 6vh;
    padding-bottom: 6vh;
  }
}

/* 모바일에서도 중앙 유지 */
@media (max-width: 680px) {
  .contact-center .contact-card {
    width: 92vw;
  }
}

/* Contact Card Styles */
.contact-card {
  padding: 32px;
  background: rgba(15, 26, 47, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #eef2ff;
  font-size: 16px;
  line-height: 1.6;
}

/* vCard Download Icon */
.vcard-download {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
}

.vcard-download:hover {
  color: #7cc6ff;
  border-color: rgba(124, 198, 255, 0.4);
  background: rgba(124, 198, 255, 0.1);
  transform: translateY(-1px);
}

/* Contact Header */
.contact-header {
  text-align: center;
  margin-bottom: 32px;
  padding-right: 60px; /* vCard icon space */
}

.contact-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.contact-subtitle {
  font-size: 1.1rem;
  color: rgba(238, 242, 255, 0.8);
  margin: 0;
}

/* Contact List */
.contact-list {
  list-style: none;
  margin: 0 0 32px 0;
  padding: 0;
}

.contact-item {
  display: grid;
  grid-template-columns: 24px 1fr 32px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.9;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(238, 242, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 1rem;
  color: #eef2ff;
  font-weight: 400;
}

/* Copy Button */
.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #7cc6ff;
  transform: translateY(-1px);
}

.copy-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 198, 255, 0.3);
}

.copy-btn:active {
  transform: translateY(0);
}

/* Action Buttons */
.contact-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  flex: 1;
  justify-content: center;
}

.btn-primary {
  background: #173255;
  color: #ffffff;
  border: 1px solid rgba(124, 198, 255, 0.3);
}

.btn-primary:hover {
  background: #1c3a66;
  border-color: rgba(124, 198, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 50, 85, 0.4);
}

.btn-ghost {
  background: transparent;
  color: #eef2ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 198, 255, 0.3);
}

/* QR Code Placeholder */
.qr-code-placeholder {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(15, 26, 47, 0.95);
  border: 1px solid rgba(124, 198, 255, 0.3);
  border-radius: 12px;
  color: #7cc6ff;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.fade-out {
  animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Responsive Design */
@media (max-width: 680px) {
  .contact-card {
    padding: 24px 20px;
    font-size: 15px;
  }

  .contact-header h1 {
    font-size: 2rem;
  }

  .contact-subtitle {
    font-size: 1rem;
  }

  .contact-item {
    gap: 12px;
    padding: 12px 0;
  }

  .contact-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
    padding: 16px 20px;
  }

  .vcard-download {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
  }

  .qr-code-placeholder {
    bottom: 20px;
    right: 20px;
    width: 72px;
    height: 72px;
  }

  .toast {
    top: 16px;
    right: 16px;
    left: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .contact-card {
    padding: 20px 16px;
  }

  .contact-header {
    padding-right: 50px;
  }

  .contact-header h1 {
    font-size: 1.75rem;
  }

  .contact-item {
    grid-template-columns: 20px 1fr 28px;
    gap: 10px;
  }

  .copy-btn {
    width: 28px;
    height: 28px;
  }
}

/* Focus styles for accessibility */
.contact-item:focus-within {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 16px 8px;
  margin: 0 -8px;
}

.contact-item:focus-within .contact-value {
  color: #7cc6ff;
}

/* Hover effects for contact items */
.contact-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 16px 8px;
  margin: 0 -8px;
}

.contact-item:hover .contact-value {
  color: #7cc6ff;
}
