/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
    color: #4b4b4d;
    background: #dceadb;
    width: 100%;
    overflow-x: hidden;
}

/* Common Section Styles */
section {
    width: 100%;
    max-width: 480px;  /* ✅ 전체 최대 폭 480px */
    margin: 0 auto;
}

.section-title {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    color: #acacac;
    margin-bottom: 32px;
}

/* Section 1: Hero */

.section1 { position: relative; margin: 0 auto; padding: 0; }
.section1 .hero-image { display:block; width:100%; height:auto; }

/* styles.css - 타이틀 관련 부분만 교체 */
.title-svg {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.title-svg path {
  fill: #FFF48D;
  stroke: #FFF48D;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* stroke-dasharray/offset 은 JS에서 실제 길이 값으로 세팅 */
  opacity: 0;
  animation: drawFill var(--dur, 1.6s) ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes drawFill {
  0%   { stroke-dashoffset: var(--len, 1000); opacity: 0; }
  60%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}



/* 2단계: 애니메이션 끝나면 채우기를 켜고 선을 끈다 */
.title-svg.filled path {
  fill: #FFF48D;
  stroke: none;
  transition: fill .6s ease;
}


/* Section 2: Invitation */
.section2 {
    background: #efefef;
    padding: 40px 0;
}

.invitation-content {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
}

.invitation-quote {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.invitation-quote > p {
    font-family: 'GangwonEduAll_OTF', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #4b4b4d;
}

.quote-source {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 15px;
}

.quote-source p {
    font-family: 'GangwonEduAll_OTF', sans-serif;
    font-weight: 300;
    color: #4b4b4d;
}

.quote-source .chinese {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
}

.invitation-message {
    text-align: center;
    padding-top: 20px;
}

.invitation-message p {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
}

.divider {
    width: calc(100% - 48px);
    height: 1px;
    margin: 32px 0;
    background: repeating-linear-gradient(
        to right,
        #cccccc 0,
        #cccccc 2px,
        transparent 2px,
        transparent 4px
    );
}

.family-info {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
    padding: 0 24px;
}

.family-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
}

.family-row .parents {
    display: flex;
    gap: 6px;
}

.family-row .relation {
    font-weight: 300;
    font-size: 13px;
}

.family-row .name {
    font-weight: 500;
}

/* Section 3: Wedding Day */

.section3 {
  background: white;
  padding: 40px 0;
}

.wedding-date {
  font-family: 'SUITE', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #4b4b4d;
  text-align: center;
  margin-bottom: 32px;
}

.calendar {
  max-width: 80%;
  /* width가 부모보다 작아졌을 때 가운데 배치 */
  margin: 0 auto;          /* ✅ 가로 중앙 정렬 */
  padding: 0;              /* ✅ 좌우 패딩 제거(밀림 방지) */
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-header,
.calendar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header span,
.calendar-row span {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
    text-align: center;
    width: 24px;
}

.calendar-header .sunday,
.calendar-row .sunday {
    color: #d44762;
}

.calendar-row .transparent {
    color: transparent;
}

.calendar-row .wedding-day {
    background: #e95a42;
    color: white;
    border-radius: 100px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}


.d-day-text {
  font-family: 'SUITE', sans-serif;
  font-size: 17px;
  color: #4b4b4d;
  text-align: center;
  margin-top: 16px;
}



/* 일정 저장하기 버튼 (계좌 버튼과 통일 스타일) */
.calendar-btn {
  background: #3d3d3d;
  margin-top: 24px;
  color: white;
  border: none;
  border-radius: 100px;
  padding: 12px 20px;
  width: 240px;
  font-family: 'SUITE', sans-serif;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

/* hover / active 효과 */
.calendar-btn:hover {
  opacity: 0.9;
}

.calendar-btn:active {
  opacity: 0.8;
  transform: scale(0.98);
}



/* Section 4: Our Story */
.section4 {
    background: #fffff6;
    padding: 40px 20px;
}

.story-list {
    display: grid;
  align-items: center;         /* ✅ 세로 중앙 정렬 */
  grid-template-columns: 1fr 1fr; /* 항상 2단 */
  gap: 40px 16px; /* 세로 간격 40px, 가로 간격 20px */
}

.story-item {
     display: contents; /* 그리드 아이템 자체가 아니라 내부 요소가 그리드에 직접 배치됨 */
}

.story-item.reverse {
    flex-direction: row-reverse;
}

.story-image {
    flex: 0 0 152px;
    height: 152px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
}

.story-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-text h3 {
    font-family: 'GangwonEduAll_OTF', sans-serif;
    font-weight: bold;
    font-size: 17px;
    color: #829981;
}

.story-text p {
    font-family: 'GangwonEduAll_OTF', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #4b4b4d;
}


/* Section 5: Gallery */
.section5 {
  background: #f1f1f1;
  padding: 40px 0;
}

/* Gallery Grid (항상 3단, 정사각형) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}
.gallery-item {
  aspect-ratio: 1 / 1;
  width: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 0px;
  cursor: pointer;
  transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.03); }

/* ================= Modal ================= */


.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease; /* 페이드 */
}
.modal.show { display: flex; opacity: 1; }
.modal.hide { opacity: 0; }

/* Modal Image (원본 비율 + 줌인 등장) */
.modal-content {
  width: 100%;            /* ✅ 가로 100% */
  height: auto;           /* ✅ 세로는 비율 유지 */
  max-width: none;        /* ✅ 여백 없애기 위해 제한 해제 */
  max-height: 100vh;      /* ✅ 화면 높이에 맞춤 */
  border-radius: 0;       /* 원하시면 둥근 모서리 제거 */
  object-fit: contain;    /* ✅ 원본 비율 유지 */

  position: relative;
  z-index: 1;

  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;

  touch-action: none;
  cursor: grab;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
}

.modal.show .modal-content { transform: scale(1); opacity: 1; }
.modal-content.swiping { cursor: grabbing; transition: transform 0s; }

/* 상단 닫기 버튼 */
.modal-close{
  position:absolute;
  top:16px; right:16px;
  z-index: 1002;
  width:40px; height:40px;
  border:0; border-radius:999px;
  background:rgba(255,255,255,.18);
  color:#fff; font-size:28px; line-height:40px;
  cursor:pointer;
  backdrop-filter: blur(2px);
  
}

.modal-close:hover{ background:rgba(255,255,255,.28); }

/* 하단 컨트롤바: 좌/우 버튼 + 인디케이터 */
.modal-controls {
  position: absolute;
  z-index: 1001;
  left: 0; right: 0; bottom: 0;       /* 하단 전체 덮음 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
  padding: 40px  0 20px 0;                     /* 버튼/도트 위아래 여백 */

  /* ✅ 그라데이션 배경 */
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.5) 0%,   /* 완전 검정 */
    rgba(0,0,0,0.0) 60%   /* 투명 */
  );
}

/* 좌/우 버튼 (컨트롤바 내부용) */
.modal-controls .modal-nav{
  position: static;          /* absolute 제거 */
  transform: none;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 20px; line-height: 36px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-controls .modal-nav:hover { background: rgba(255,255,255,.28); }

/* 인디케이터(도트) */
.modal-controls .modal-dots{
  position: static;          /* absolute 제거 */
  display: flex;
  gap: 8px;
}
.modal-controls .modal-dots button{
  width: 6px; height: 6px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.35);
  cursor: pointer;
}
.modal-controls .modal-dots button[aria-current="true"]{ background:#fff; }



/* Section 6: Location */
.section6 {
    background: white;
    padding: 40px 0;
}

.location-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
}

.venue-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.venue-name {
    font-family: 'SUITE', sans-serif;
    font-size: 17px;
    color: #4b4b4d;
}

.venue-address {
    font-family: 'SUITE', sans-serif;
    font-size: 13px;
    color: #4b4b4d;
}

.map-container {
    margin-bottom: 48px;
}

.map-placeholder {
    width: 100%;
}


.map-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ecf0ff;
    padding: 12px 24px;
    
}

.map-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none; /* 밑줄 제거 */
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'SUITE', sans-serif;
    font-size: 13px;
    color: #4b4b4d;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease; /* hover 애니메이션 */
}

/* hover 시 색 + 배경 강조 효과 */
.map-btn:hover {
    background-color: #e9edff;
    color: #1a4fff;
}

/* 클릭 시 살짝 눌리는 느낌 */
.map-btn:active {
    transform: scale(0.98);
}

/* 아이콘 크기 고정 */
.map-btn img {
    width: 24px;
    height: 24px;
    border-radius: 8px;
}

.map-divider {
    width: 1px;
    height: 20px;
    background: #dee3f2;
}


.transportation-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
    padding: 0 24px;
}

.transport-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.transport-title {
    display: flex;
    gap: 4px;
    align-items: center;
    font-family: 'SUITE', sans-serif;
    font-weight: bold;
    font-size: 17px;
    color: #4b4b4d;
}

.transport-desc {
    font-family: 'SUITE', sans-serif;
    font-size: 17px;
    color: #4b4b4d;
}

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

.bus-stop {
    font-family: 'SUITE', sans-serif;
    font-size: 17px;
    color: #4b4b4d;
}

.bus-numbers {
    font-family: 'SUITE', sans-serif;
    font-weight: 300;
    font-size: 17px;
    color: #87878a;
}

.transport-divider {
    width: calc(100% - 48px);
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #dbdbdb 0,
        #dbdbdb 2px,
        transparent 2px,
        transparent 4px
    );
}

/* Section 7: Account Info */
.section7 {
    background: #f1f1f1;
    padding: 40px 0;
}

.account-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-message {
    text-align: center;
}

.account-message p {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
}

.account-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
}

.account-btn {
    background: #3d3d3d;
    color: white;
    border: none;
    border-radius: 100px;
    padding: 12px 20px;
    width: 240px;
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
}

/* Section 8: Guest Photo */
.section8 {
    background: white;
    padding: 40px 0;
}

.guest-photo-image{
    display:block; width:100%; height:auto;
}

.guest-photo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.guest-photo-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.guest-photo-message p {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
}

.guest-photo-note {
    font-size: 13px !important;
    color: #948f8f !important;
}

.photo-btn {
    background: #3d3d3d;
    color: white;
    border: none;
    border-radius: 100px;
    margin-top: 24px;
    padding: 12px 20px;
    width: 240px;
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    cursor: pointer;
}

/* Section 9: Share */
.section9 {
    background: #fff4ec;
    padding: 40px 0;
}

.share-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.share-message {
    text-align: center;
}

.share-message p {
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    color: #4b4b4d;
}

.share-btn {
    background: #5e7b4e;
    color: white;
    border: none;
    border-radius: 100px;
    padding: 12px 20px;
    width: 240px;
    margin-top: 24px;
    font-family: 'SUITE', sans-serif;
    font-size: 15px;
    cursor: pointer;
}

/* Section 10: Footer */
.section10 {
    background: #dbdcdd;
    padding: 40px 24px;
}

.footer-content {
    text-align:left;
}

.footer-content p {
    font-family: 'SUITE', sans-serif;
    font-size: 12px;
    color: #948f8f;
}

/* -------------------- Responsive Design -------------------- */
/* <= 480px: 모바일 기준 */
@media (max-width: 480px) {
    .section1 {
        min-height: 420px; /* 필요 시 조정 */
    }

    .calendar {
        padding: 0 20px;
    }

    .story-item {
        flex-direction: column !important;
    }

    .story-image {
        width: 100%;
        padding-top: 100%; /* height = width */
        position: relative;
        }

    .story-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    }

    /* 갤러리: 3열 유지 */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 아주 작은 화면(예: 360px 이하)에서 갤러리 2열로 */
@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* >= 481px: 데스크톱/태블릿도 컨테이너는 480px 고정 가운데 정렬 */
@media (min-width: 481px) {
    section {
        max-width: 480px; /* ✅ 고정 */
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }

/* Button Hover Effects */
button { transition: opacity 0.2s; }
button:hover { opacity: 0.9; }
button:active { opacity: 0.8; }

/* ========== Scroll Fade-in Animation ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px); /* 살짝 더 아래에서 */
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
  will-change: opacity, transform;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* =======================================
   계좌 모달 (최우선 순위)
======================================= */
#brideAccountModal,
#groomAccountModal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.6) !important;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 99999 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#brideAccountModal.active,
#groomAccountModal.active {
  display: flex !important;
}

#brideAccountModal .modal-overlay,
#groomAccountModal .modal-overlay {
  position: absolute !important;
  inset: 0 !important;
  cursor: pointer !important;
}

#brideAccountModal .account-card,
#groomAccountModal .account-card {
  position: relative !important;
  background: white !important;
  border-radius: 16px !important;
  padding: 32px 24px 24px !important;
  width: 90% !important;
  max-width: 400px !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  z-index: 100000 !important;
}

.account-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: none !important;
  border: none !important;
  font-size: 28px !important;
  color: #d5d5d5 !important;
  cursor: pointer !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 28px !important;
  text-align: center !important;
}

.account-close:hover {
  color: #333 !important;
}

.account-card h3 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 18px;
  color: #333;
}

.account-block {
  margin-bottom: 20px;
}

.account-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.account-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f9f9f9;
  /* border: 1px solid #e0e0e0; */
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.bank-name {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.account-number {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.copy-btn {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: #333; 
}

.copy-btn:hover {
  background: #f5f5f5;
}

.account-divider {
  height: 1px;
  background: #e5e5e5;
  margin: 20px 0;
}

/* 🎵 음악 버튼 스타일 */
.music-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999999 !important;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 16px;
  backdrop-filter: none;
  cursor: pointer;
  transition: all 0.3s ease;
   pointer-events: auto !important; /* ✅ 클릭 차단 방지 */
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.music-btn.playing {
  color: #ffef85;
  transform: scale(1.1);
}


