.contact-main {
  margin: 0;
  padding: 0;
}

/* 🎥 Hero 섹션 (페이지 스코프 + svh) */
.contact-main .video-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
}
.contact-main .video-hero video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.contact-main .video-hero .overlay {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding-top: min(30svh, 30vh);
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ⌨️ 소개 텍스트 섹션 */
.contact-intro {
  background-color: #ffffff;
  padding: var(--section-padding) 0;
  margin-top: 2rem;
  text-align: center;
}
.contact-intro h2 {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  margin-bottom: var(--gap-sm);
}
.contact-intro p {
  font-size: var(--font-size-md);
  color: var(--color-text);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ⌨️ 타이핑( JS 전용: 가로쓰기 + 줄바꿈 허용 ) */
.typewriter {
  font-size: var(--font-size-md);
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--color-text);
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  overflow: visible;
  width: auto;
  max-width: 700px;
  line-height: 1.8;
  margin: 0 auto;
}

/* 📦 카드 섹션 */
.contact-cards .card-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  justify-content: center;
  max-width: 1200px;
  padding: 40px 20px;
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.contact-cards .card {
  position: relative;
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 380px;
  height: 100%;
  max-height: 450px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff !important;                 /* ✅ 녹색 배경 → 흰색 */
  border: 1px solid var(--color-primary) !important; /* ✅ 녹색 테두리 추가 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  scroll-snap-align: start;
  transition: flex 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* 연락처 카드 제목을 초록으로 */
.contact-section.contact-cards .card-header h2,
.contact-section.contact-cards .card-header h3{
  color: var(--color-primary);
}

.contact-cards .card:hover { flex: 0 0 380px; }

/* 이미지 영역 */
.contact-cards .card-image { width: 100%; height: 100%; transition: opacity 0.3s ease; }
.contact-cards .card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s ease; }

/* 오버레이 텍스트 (고정: absolute) */
.contact-cards .card .card-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #ffffff;
  opacity: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
/* hover 시 이미지 사라지고 오버레이 등장 */
.contact-cards .card:hover .card-image img { opacity: 0; }
.contact-cards .card:hover .card-overlay { opacity: 1; pointer-events: auto; }

/* 오버레이 내부 비주얼/텍스트 */
.contact-cards .card-overlay .overlay-icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}
/* 제목: h3 + h4 모두 지원 (HTML과 일치) */
.contact-cards .card-overlay h3,
.contact-cards .card-overlay h4 {
  font-size: 1.5rem;
  color: #2e7d32;
  margin-bottom: 0.5rem;
}
.contact-cards .card-overlay p { font-size: 0.95rem; color: #4e684e; margin-bottom: 1rem; }

/* 버튼 (HTML의 .cta, .primary도 포함) */
.contact-cards .card-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-cards .card-buttons button,
.contact-cards .card-buttons .cta-button,
.contact-cards .card-buttons .cta,
.contact-cards .card-buttons .cta.primary {
  padding: 8px 16px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.contact-cards .card-buttons button:hover,
.contact-cards .card-buttons .cta-button:hover,
.contact-cards .card-buttons .cta:hover,
.contact-cards .card-buttons .cta.primary:hover {
  background-color: #1b5e20;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .contact-cards .card-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .contact-cards .card {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .contact-cards .card:hover { flex: 1 1 100%; }
  .contact-cards .card-overlay { padding: 1rem; }

  .contact-cards .card-buttons { flex-direction: column; gap: 8px; }
  .contact-cards .card-buttons .cta-button,
  .contact-cards .card-buttons .cta,
  .contact-cards .card-buttons .cta.primary { width: 100%; font-size: 0.95rem; }

  .typewriter { width: 100%; font-size: 1rem; }

  .contact-main .video-hero { min-height: 60svh; }
  .contact-main .video-hero .overlay { padding-top: 10svh; font-size: 0.95rem; }
}

@media screen and (max-width: 480px) {
  .typewriter { white-space: normal; width: 100%; font-size: 0.95rem; }
}

/* ===== FP07-2 Override: contact =====
   전역 .content-section{display:grid...} 영향 제거(이 섹션만 1열) */
section.contact-section.contact-cards{
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

/* 폼 기본 */
.contact-form{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width:768px){ .contact-form{ grid-template-columns: 1fr; } }
.contact-form input, .contact-form select, .contact-form textarea{ min-height: 44px; padding: 10px 12px; }

/* 모바일: 연락처 카드 이미지 오른쪽-하단에 '클릭' 라벨 */
@media (max-width: 768px), (hover: none), (pointer: coarse){
  .contact-section.contact-cards .card .card-image{ position: relative; }
  .contact-section.contact-cards .card .card-image::after{
    content: "클릭";
    position: absolute;
    right: 12px;
    bottom: 10px;
    padding: .35rem .6rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    font-size: .8rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    z-index: 2;
    pointer-events: none; /* 힌트만, 클릭 막지 않음 */
  }
}
