/* --------------------------------
  Global Styles
-------------------------------- */
html, body {
  font-family: 'Gowun Batang', serif;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #333;
  transform: none !important;
  zoom: 1 !important;
}

/* --------------------------------
  Heading Styles
-------------------------------- */
h1, h2, h3, .gallery-wrapper::before {
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.03em;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 3rem;
  color: #846b56;
}

/* --------------------------------
  Section Styles
-------------------------------- */
section {
  padding: 2rem 1rem;
}

.cover-image {
  background-color: #ffffff;
}
.cover-image img {
  width: 100%;
 max-width: 700px; /* ✨ 추가!! */
  height: auto;
  display: block;
  margin: 0 auto;
}

.main-text, .main-text2 {
  background-color: #ffffff;
  font-size: 1.3rem;
  line-height: 2;
  white-space: pre-line;
  padding: 1rem;
}
.main-text {
  margin: 9rem 0;
}
.main-text2 {
  margin: 9rem 0;
}

/* Date Section */

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.date-section {
  background: linear-gradient(270deg, #c5e4e7, #f9f4ef, #d7b8a2);
  background-size: 600% 600%;
  animation: gradientFlow 10s ease infinite;
  padding: 20rem 1rem;
  margin: 3rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}



.date-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  font-size: 3.1rem;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  font-family: 'Playfair Display', serif;
}
.date-line {
  display: flex;
  gap: 0.4rem;
}
.date-char {
  opacity: 0;
  transform: translateY(20px);
}
.date-reveal.reveal .date-char {
  animation: fadeUp 1.6s forwards;
}

/* In Jeju Text */
.in-jeju {
  opacity: 0;
  transform: translateY(20px);
  font-size: 1.8rem;
  color: #fff;
  font-family: 'Playfair Display', serif;
}
.date-reveal.reveal .in-jeju {
  animation: fadeUp 1.5s ease-out forwards;
}

/* Headline Section */
.headline-section {
  margin: 9rem 0 20rem 0;
}

/* --------------------------------
  Gallery Styles
-------------------------------- */
.gallery-wrapper {
  position: relative;
  background-color: #e0d3ca;
  padding: 6rem 0;
  min-height: 450px; /* ✨ 추가: 최소 높이 설정 */
}
.gallery {
  position: relative;
  width: 100%;
  max-width: 90vw;
  margin: 0 auto;
  height: auto;
  aspect-ratio: 4/3; /* ✨ 자동으로 높이 계산! */
}
.gallery img {
  width: 100%;
  max-width: 700px; /* ✨ 추가!! */
  border-radius: 8px;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 50%; /* ✨ 부모의 중앙으로 이동 */
  transform: translateX(-50%); /* ✨ 자기 너비의 절반만큼 왼쪽으로 이동 */
  transition: opacity 0.8s ease-in-out;
}
.gallery img.active {
  opacity: 1;
}

.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}
.indicator {
  width: 7px;
  height: 7px;
  background-color: #ccc;
  border-radius: 50%; /* 동그랗게!! */
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s;
}

.indicator.active {
  background-color: #7f6953; /* 활성화된 점은 진한 색! */
}

/* Popup Gallery */
.popup-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}
.popup-gallery img {
  width: 100%;
  max-width: 700px; /* ✨ PC에서도 너무 커지지 않게! */
  height: auto;
  border-radius: 6px;
}
.popup-gallery img:hover {
  transform: scale(1.02);
}
/* --------------------------------
  어바웃섹션
-------------------------------- */
.about-section {
  padding: 6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-section img {
  width: 100%;
  max-width: 500px; /* ✨ 최대 크기 제한 */
  height: auto;
  border-radius: 10px; /* ✨ 살짝 둥글게 부드럽게 */
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  background-color: #998675;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
  background-color: #7f6953;
  transform: translateY(-2px);
}

/* --------------------------------
  Popup and Overlay Styles
-------------------------------- */
.popup, .message-form {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}


.popup-main-title {
  font-family: 'Gowun Batang', serif;
  font-size: 2rem;
  font-weight: bold;
  color: #846b56;
  margin-bottom: 1.5rem;
}

.question {
  font-size: 1.3rem;
  font-weight: bold;
  color: #998675;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.answer {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.profile-section {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-block img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.profile-caption {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}


.popup.active, .message-form.active {
  display: block;
}
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5;
}
.overlay.active {
  display: block;
}

/* Popup Scrollbar */
.popup::-webkit-scrollbar {
  width: 6px;
}
.popup::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 4px;
}
.popup::-webkit-scrollbar-thumb {
  background: #7f6953;
  border-radius: 4px;
}
.popup::-webkit-scrollbar-thumb:hover {
  background: #a58b6a;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
}

/* --------------------------------
  Message Section
-------------------------------- */
.message-section {
  padding: 8rem 1rem;
  background-color: #e0d3ca;
}
.message-section h3 {
  font-size: 2rem;
  color: #998675;
}
.message-board {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem;
  scroll-snap-type: x mandatory;
  max-width: 100vw;
  scrollbar-width: thin;
  scrollbar-color: #7f6953;
}
.message-board::-webkit-scrollbar {
  height: 6px;
}
.message-board::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}
.message-board::-webkit-scrollbar-thumb {
  background: #7f6953;
  border-radius: 4px;
}
.message-board::-webkit-scrollbar-thumb:hover {
  background: #999;
}
.message-card {
  background: linear-gradient(to bottom, #ffffff, #f4f4f4);
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  width: 150px;
  scroll-snap-align: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.message-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.message-card strong {
  display: block;
  margin-bottom: 0.5rem;
}

/* --------------------------------
  Lightbox
-------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 400;
}
.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

/* --------------------------------
  YouTube Wrapper
-------------------------------- */
.youtube-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-top: 1.5rem;
}
.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* --------------------------------
  Footer
-------------------------------- */
footer {
  font-size: 1rem;
  color: #777;
  padding-bottom: 2rem;
}

/* --------------------------------
  Responsive
-------------------------------- */
@media screen and (max-width: 480px) {
  .main-text {
    font-size: 1.2rem;
    padding: 1rem 0.5rem;
  }
  .button {
    width: 80%;
  }
  .message-form {
    width: 90%; /* 기존보다 살짝 여백 주기 */
    max-width: 320px; /* 모바일에서는 최대 320px까지만 */
  }
}

/* --------------------------------
  Animation
-------------------------------- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
/* --------------------------------
  취소버튼-------------------------------- */

.cancel-btn {
  background-color: #ccc;
  color: #333;
  margin-left: 0.5rem;
}

.cancel-btn:hover {
  background-color: #999;
}
