/* ==========================================================================
   Mobile Wedding Invitation - 도준희 ♥ 박혜미
   Pure Minimalist Chic / Perfect Seamless White Theme
   - 배경과 청첩장 내용의 배경색(White #FFFFFF) 완벽 일치 (테두리/구분선 없음)
   - 느리고 우아한 페이드인 + 플로팅 효과 (1회 한정)
   - 이모지/AI 아이콘 제거, 영상 레퍼런스 스타일 100% 매칭
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-color: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-subtle: #AAAAAA;
  --accent-red: #D83C3C;
  --heart-pink: #ED5E68;
  --button-gray: #77797E;
  --kakao-yellow: #FEE500;
  --kakao-text: #191919;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-color); /* 배경색 일치 */
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Mobile Container (배경과 동일, 테두리나 그림자 없이 매끄럽게 연결)
   -------------------------------------------------------------------------- */
.mobile-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background-color: var(--bg-color);
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* --------------------------------------------------------------------------
   우아한 플로팅 페이드인 효과 (3초 지속)
   - 최상단 히어로는 페이지 진입 즉시 0% opacity에서 부드럽게 3초간 서서히 밝아지며 등장
   - 스크롤 영역은 스크롤 시 부드럽게 3초간 페이드인
   -------------------------------------------------------------------------- */
@keyframes heroEntranceFade {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: brightness(0.7) blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1) blur(0);
  }
}

.hero-section {
  padding: 0 0 10px 0;
  text-align: center;
  opacity: 0;
  animation: heroEntranceFade 3.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform, filter;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 3.0s cubic-bezier(0.16, 1, 0.3, 1), transform 3.0s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   1. 최상단 히어로 섹션
   -------------------------------------------------------------------------- */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.35;
  min-height: 520px;
  max-height: 82vh;
  background-color: #FAF8F5;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.hero-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 16px 18px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
  text-align: center;
  color: #FFFFFF;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.hero-date-en {
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hero-names-en {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-and {
  font-family: 'Alex Brush', cursive;
  font-size: 22px;
  margin: 0 4px;
}

.hero-header-text {
  margin-top: 36px;
  text-align: center;
  padding: 0 20px;
}

.cursive-title {
  font-family: 'Alex Brush', cursive;
  font-size: 38px;
  color: #384242;
  font-weight: normal;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.hero-korean-date {
  font-size: 13.5px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   공통 섹션 여백 및 서식 (구분선/배경색 없이 여백으로 단정하게 분리)
   -------------------------------------------------------------------------- */
.content-section {
  padding: 60px 24px 0 24px;
  text-align: center;
}

.section-eng-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 3.5px;
  color: #7D8186;
  font-weight: 500;
  margin-bottom: 22px;
  text-align: center;
}

.script-cursive-title {
  font-family: 'Alex Brush', cursive;
  font-size: 40px;
  color: #55585D;
  margin-bottom: 24px;
  font-weight: normal;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   2. 인삿말 (Greeting)
   -------------------------------------------------------------------------- */
.intro-greeting-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 14.5px;
  line-height: 2.3;
  color: var(--text-secondary);
  word-break: keep-all;
  font-weight: 300;
}

.center-heart {
  color: var(--heart-pink);
  font-size: 15px;
  margin-top: 32px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   3. 달력 & D-Day
   -------------------------------------------------------------------------- */
.calendar-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.calendar-card {
  margin: 0 auto;
  max-width: 320px;
  padding: 0 10px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  padding-bottom: 14px;
  margin-bottom: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
  row-gap: 16px;
  color: var(--text-secondary);
  align-items: center;
}

.day-prev, .day-next {
  color: #D8D8D8;
}

.target-day {
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-day-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-red);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
}

.d-day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 13.5px;
  color: #BD4B4B;
  font-weight: 400;
}

.heart-point {
  color: #BD4B4B;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   4. 신랑 & 신부 정보 및 축하 연락하기 버튼
   -------------------------------------------------------------------------- */
.couple-family-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.couple-line {
  font-size: 14.5px;
  color: var(--text-secondary);
}

.couple-line .relation {
  color: var(--text-muted);
  margin-right: 12px;
  font-size: 13.5px;
}

.couple-line .name {
  font-weight: 500;
  color: var(--text-primary);
}

.btn-gray-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--button-gray);
  color: #FFFFFF;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-gray-pill:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.pill-phone-icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   5. 오시는 길 (지도 & 텍스트)
   -------------------------------------------------------------------------- */
.map-card-wrapper {
  margin: 0 auto;
  max-width: 390px;
  overflow: hidden;
  background-color: #FFFFFF;
  border: 1px solid #EBEBEB;
}

.map-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #F0F0F0;
  font-size: 12px;
  color: #666666;
}

.map-lock-icon {
  display: inline-flex;
  color: #777777;
}

.map-service-name {
  font-weight: 500;
}

.map-graphic-area {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background-color: #FFFFFF;
}

.map-image-uploaded {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.map-instruction-note {
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  background-color: #FFFFFF;
  border-top: 1px solid #F2F2F2;
}

.venue-text-group {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.venue-time-row {
  font-size: 14px;
  color: var(--text-muted);
}

.venue-address-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-copy-link-text {
  background-color: transparent;
  border: none;
  font-size: 12px;
  color: #6B7280;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}

.venue-sub-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-buttons-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  max-width: 390px;
  margin-left: auto;
  margin-right: auto;
}

.btn-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.btn-nav:hover {
  opacity: 0.9;
}

.nav-naver {
  background-color: #03C75A;
  color: #FFFFFF;
}

.nav-kakao {
  background-color: #FEE500;
  color: #191919;
}

.nav-tmap {
  background-color: #1E64FF;
  color: #FFFFFF;
}

.transit-guide {
  margin-top: 36px;
  text-align: left;
  max-width: 390px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.transit-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.transit-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.transit-category {
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
}

.transit-detail {
  font-size: 12.5px;
  color: #6B7280;
  line-height: 1.7;
  word-break: keep-all;
}

/* --------------------------------------------------------------------------
   6. 갤러리 (Carousel)
   -------------------------------------------------------------------------- */
.gallery-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #1A1A1A;
  border-radius: 4px;
}

.carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}

.dot.active {
  background-color: #FFFFFF;
  width: 16px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   7. 공유하기 (카카오톡 & 링크 복사)
   -------------------------------------------------------------------------- */
.share-buttons-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  max-width: 390px;
  margin: 0 auto;
}

.btn-kakao-share {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--kakao-yellow);
  color: var(--kakao-text);
  border: none;
  padding: 13px 0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-kakao-share:active {
  opacity: 0.9;
}

.btn-link-share {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
  padding: 13px 0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-link-share:active {
  background-color: #E5E7EB;
}

.kakao-bubble-icon, .link-clip-icon {
  width: 16px;
  height: 16px;
}

.footer-sign {
  margin-top: 40px;
  font-size: 13px;
  letter-spacing: 1px;
  color: #9CA3AF;
  font-family: 'Noto Serif KR', serif;
}

/* --------------------------------------------------------------------------
   축하 연락하기 모달
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #F0F0F0;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #999999;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.modal-guide-text {
  font-size: 12.5px;
  color: #777777;
  margin-bottom: 16px;
  text-align: center;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  background-color: #F9FAFB;
  border-radius: 8px;
  margin-bottom: 10px;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.groom-tag {
  background-color: #EBF3FC;
  color: #2563EB;
}

.bride-tag {
  background-color: #FDF2F4;
  color: #E11D48;
}

.person-title {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
}

.phone-number-link {
  font-size: 14px;
  font-weight: 500;
  color: #3B82F6;
  text-decoration: none;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.phone-number-link:hover {
  background-color: #EFF6FF;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   전체화면 라이트박스 뷰어
   -------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 36px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   토스트 메시지
   -------------------------------------------------------------------------- */
.toast-message {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(30, 30, 30, 0.88);
  color: #FFFFFF;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 12.5px;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
