/* =======================================================
   💎 [Aiedge CSS 분할] 3. components.css (재사용 UI 블록 & 검증된 파란 선 시그니처 핏)
   ======================================================= */
.grid {
  display: grid;
  gap: 24px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 버튼 글로벌 컴포넌트 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--royal), #0077ff);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 700;
  letter-spacing: -.02em;
  box-shadow: 0 14px 30px rgba(1, 35, 180, .28);
  transition: .2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 119, 255, .32);
}

.btn.secondary {
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
  border-color: rgba(255, 255, 255, .18);
  color: #e8f1ff;
}

.btn.small {
  padding: 10px 15px;
  font-size: 14px;
}

.btn.block {
  width: 100%;
}

/* -------------------------------------------------------
   📋 [정품 인프라 구축] 카드, 특허, 상세블록 레이아웃 마스터 정렬
   ------------------------------------------------------- */
.card, 
.patent-card,
.detail-block {
  position: relative !important; /* 부모 기준점 완벽 강제 주입 */
  overflow: hidden !important;  /* 자식 선 탈출 버그 전면 박멸 */
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* 일반 작은 카드 기본 세팅 */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.card > * { position: relative; }

.card h3 {
  font-size: 23px;
  line-height: 1.28;
  margin: 0 0 12px;
  letter-spacing: -.03em;
}

.card p {
  color: #aebcd0;
  margin: 0 0 22px;
}

.card .tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 200, 255, .1);
  border: 1px solid rgba(0, 200, 255, .25);
  color: #8de7ff;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aeeaff;
  font-weight: 800;
}

.card-link:after {
  content: '→';
  transition: .2s;
}

.card-link:hover:after { transform: translateX(4px); }

.icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 200, 255, .16), rgba(28, 103, 255, .15));
  border: 1px solid rgba(0, 200, 255, .26);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: inset 0 0 22px rgba(0, 200, 255, .12);
}

.priority-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.priority-card .num {
  font-family: AudiowideLocal, monospace;
  color: #1fe4ff;
  font-size: 13px;
  letter-spacing: .12em;
}

.priority-card.primary {
  grid-column: span 2;
  background: linear-gradient(90deg, rgba(1, 35, 180, .48), rgba(0, 200, 255, .08)), url('../images/hero-ship.webp');
  background-size: cover;
  background-position: center right;
}

.priority-card.primary:before {
  background: linear-gradient(90deg, rgba(3, 10, 26, .95), rgba(3, 10, 26, .25));
}

.priority-card.primary p { max-width: 520px; }
.priority-card .mt-auto { margin-top: auto; }

/* 특허 카드 기본 세팅 */
.patent-card {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow);
}

.patent-doc {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 200, 255, .1);
  border: 1px solid rgba(0, 200, 255, .28);
  color: #8de7ff;
  font-family: AudiowideLocal, monospace;
  font-size: 12px;
  letter-spacing: .04em;
}

.patent-card h3 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.patent-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

/* 대형 본문 상세 블록 기본 세팅 */
.detail-block {
  padding: 42px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)) !important;
  border: 1px solid rgba(255, 255, 255, .11) !important;
  isolation: isolate !important; /* 플렉스 공간 왜곡 차단하는 특수 인프라 */
}

.detail-block h2 {
  font-size: 34px;
  letter-spacing: -.04em;
  line-height: 1.28;
  margin: 0 0 16px;
}

.detail-block p { color: #b9c8de; }

/* 스펙 및 데이터 테이블 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
}

.spec-table th, 
.spec-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: left;
}

.spec-table th {
  width: 220px;
  color: #8de7ff;
  font-size: 14px;
}

.spec-table td { color: #d5e0ef; }
.spec-table tr:last-child th, 
.spec-table tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------
   ✨ [시그니처 바 핵심 탑재] 카드 성격별 맞춤형 파란 선 일제 정렬
   ------------------------------------------------------- */

/* 1. 일반 및 특허 카드 전용 파란 선 (곡률 28px 완전 매칭) */
.card::before,
.patent-card::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 4px !important;
  background: linear-gradient(180deg, var(--cyan), var(--royal)) !important;
  z-index: 5 !important;
  border-top-left-radius: 28px !important;
  border-bottom-left-radius: 28px !important;
}

/* 2. 대형 상세 블록 전용 파란 선 (곡률 34px 완벽 밀착 및 강제 출력) */
.detail-block::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 4px !important;
  background: linear-gradient(180deg, var(--cyan), var(--royal)) !important;
  z-index: 10 !important;
  border-top-left-radius: 34px !important;
  border-bottom-left-radius: 34px !important;
}

/* 🌟 [특허 카드 구조 정밀 복구] 한 줄 아래 깨짐 제압용 인프라 */
.patent-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* 무조건 1:1 좌우 정렬 고정 */
  gap: 22px !important;
  width: 100% !important;
}

.patent-card dl div {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important; /* 표 형태 완벽 보존 */
  gap: 14px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
}

.patent-card dt {
  color: #8de7ff;
  font-weight: 800;
  font-size: 13px;
}

.patent-card dd {
  margin: 0;
  color: #dce7fb;
}

/* 호버 이펙트 연동 마스터 단락 */
.card:hover,
.patent-card:hover,
.detail-block:hover {
  transform: translateY(-8px) !important;
  border-color: var(--cyan) !important;
  background: linear-gradient(180deg, rgba(1, 35, 180, 0.12), rgba(255, 255, 255, 0.03)) !important;
  box-shadow: 0 20px 40px rgba(0, 200, 255, 0.22) !important;
}

.card:hover::before,
.patent-card:hover::before,
.detail-block:hover::before {
  width: 6px !important;
}

.card:hover h3,
.patent-card:hover h3,
.detail-block:hover h2 {
  color: var(--cyan) !important;
  transition: color 0.3s ease;
}

.patent-card dl div { transition: background 0.3s ease; }
.patent-card:hover dl div { background: rgba(255, 255, 255, 0.02); }

/* 체크리스트 컴포넌트 */
.check-list {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.check-list li {
  list-style: none;
  display: flex;
  gap: 12px;
  color: #d5e0ef;
}

.check-list li:before {
  content: '✓';
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 200, 255, .16);
  color: #68e9ff;
  font-weight: 900;
}

/* 연락처 카드 컴포넌트 */
.contact-card {
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
  box-shadow: var(--shadow);
}

.contact-list { display: grid; gap: 16px; }
.contact-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-bottom: 14px;
}
.contact-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-list dt { color: #8de7ff; font-weight: 800; }
.contact-list dd { margin: 0; color: #dce7fb; }

.map-placeholder {
  min-height: 360px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: radial-gradient(circle at 70% 40%, rgba(0, 200, 255, .22), transparent 30%), linear-gradient(135deg, #07142b, #030a1a);
  display: grid;
  place-items: center;
  color: #aebcd0;
  text-align: center;
  padding: 30px;
}

/* 🛡️ 내용물이 비어있는 유령 박스 안전장치 */
.reveal:empty::before {
  display: none !important;
  content: none !important;
  width: 0 !important;
}

/* -------------------------------------------------------
   ✉️ [Contact 팝업] 4분할 레이아웃 & 개인정보 체크박스
   ------------------------------------------------------- */
.contact-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important; /* 간격을 살짝 넓혀 가독성을 높였습니다 */
  margin-top: 10px !important;
}

/* 4개 인풋을 무조건 한 줄로 배치 */
/* ✨ 4개 인풋을 세로로 한 줄씩(1열 종대) 시원하게 배치 */
.contact-form .form-group {
  display: grid !important;
  grid-template-columns: 1fr !important; /* 👈 요기를 1fr(1칸 꽉 차게)로 바꿨습니다! */
  gap: 10px !important;
  width: 100% !important;
}

.contact-form input, 
.contact-form textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
}

.contact-form textarea {
  resize: vertical !important;
  min-height: 140px !important;
}

.contact-form input:focus, 
.contact-form textarea:focus {
  outline: none !important;
  border-color: var(--cyan) !important;
  background: rgba(0, 200, 255, 0.04) !important;
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.15) !important;
}

/* 🔒 개인정보 수집 동의 영역 스타일 */
.privacy-agreement {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 2px !important;
  font-size: 13px !important;
  color: #aebcd0 !important;
  cursor: pointer;
}

.privacy-agreement input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  accent-color: #00c8ff; /* 에이아이엣지 시그니처 하늘색 체크 */
  cursor: pointer;
}

.privacy-link {
  color: #00c8ff !important;
  text-decoration: underline !important;
}

/* 모바일 화면(태블릿 이하)에서는 4줄로 쪼개져서 가독성 유지 */
@media (max-width: 768px) {
  .contact-form .form-group { 
    grid-template-columns: 1fr !important; 
    gap: 12px !important;
  }
}

/* -------------------------------------------------------
   🪟 [Contact 팝업] 모달 오버레이 & 콘텐츠 디자인
   ------------------------------------------------------- */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(3, 10, 26, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-content {
  background: linear-gradient(180deg, #07142b, #030a1a) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 28px !important;
  padding: 42px !important;
  width: 90% !important;
  max-width: 560px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5) !important;
  position: relative !important;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) !important;
}

.modal-close {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  background: none !important;
  border: none !important;
  color: #aebcd0 !important;
  font-size: 28px !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #fff !important;
}

/* 폼 마진 리셋 (팝업용) */
.modal-content .contact-form {
  margin-top: 10px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* 🔒 문의하기 팝업: 비활성화된(잠긴) 버튼 스타일 */
#submitBtn:disabled {
  background-color: #334155 !important; /* 칙칙한 회색 */
  color: #94a3b8 !important; /* 흐릿한 글자색 */
  cursor: not-allowed !important; /* 마우스 올렸을 때 금지(🚫) 아이콘 */
  opacity: 0.7;
}

/* ==========================================
   🚨 커스텀 알림(Alert) 모달 스타일
   ========================================== */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px); /* 배경 흐림 효과 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-alert-box {
  background: #0f172a;
  border: 1px solid rgba(0, 200, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  padding: 32px 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-alert-overlay.active .custom-alert-box {
  transform: translateY(0) scale(1);
}

.custom-alert-box p {
  color: #fff;
  font-size: 15px;
  margin: 0 0 24px 0;
  line-height: 1.5;
  word-break: keep-all;
}

.custom-alert-box button {
  background-color: #00c8ff;
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.custom-alert-box button:hover {
  background-color: #0099cc;
  transform: translateY(-2px);
}
