/*
 * 모바일 청첩장 스타일
 * 러블리한 분위기의 웨딩 초대장
 */

/* =====================================================
   CSS Variables - 색상 팔레트
   ===================================================== */
:root {
    /* 메인 색상 - 흰검 톤 */
    --color-primary: #333333;
    --color-primary-light: #666666;
    --color-primary-dark: #111111;

    /* 배경 색상 - 흰색 */
    --color-bg-cream: #ffffff;
    --color-bg-ivory: #ffffff;
    --color-bg-soft: #f8f8f8;

    /* 텍스트 색상 */
    --color-text-dark: #222222;
    --color-text-medium: #555555;
    --color-text-light: #888888;

    /* 포인트 색상 */
    --color-gold: #999999;
    --color-gold-light: #cccccc;
    --color-heart: #333333;

    /* 폰트 */
    --font-serif: 'Gowun Batang', 'Nanum Myeongjo', serif;
    --font-english: 'Cormorant Garamond', serif;

    /* 간격 */
    --section-padding: 48px 0;
}

/* =====================================================
   Reset & Base
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    background-color: var(--color-bg-cream);
    color: var(--color-text-dark);
    line-height: 1.8;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   공통 컴포넌트
   ===================================================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 0.1em;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: #ddd;
    margin: 12px auto 0;
}

/* 스크롤 애니메이션 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   커버 섹션
   ===================================================== */
.cover {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.cover-content {
    text-align: center;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

.flower-top {
    width: 180px;
    margin: 0 auto 24px;
    animation: floatFlower 3s ease-in-out infinite;
}

@keyframes floatFlower {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.cover-date {
    font-family: var(--font-english);
    font-size: 0.875rem;
    color: var(--color-text-light);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

.cover-names {
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.heart {
    color: var(--color-heart);
    font-size: 1.5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cover-venue {
    font-size: 0.9375rem;
    color: var(--color-text-medium);
    margin-bottom: 40px;
}

.couple-image {
    width: 280px;
    height: 380px;
    margin: 0 auto 40px;
    border-radius: 200px 200px 20px 20px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.couple-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.couple-image .image-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15%;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.scroll-indicator {
    display: block;
    margin-top: 24px;
    animation: fadeInUp 1s ease-out 1s both;
}

.scroll-indicator span {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    margin: 12px auto 0;
    border-right: 1px solid var(--color-primary);
    border-bottom: 1px solid var(--color-primary);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =====================================================
   인사말 섹션
   ===================================================== */
.greeting {
    padding: var(--section-padding);
    background-color: var(--color-bg-cream);
}

.greeting-icon {
    width: 60px;
    margin: 0 auto 24px;
}

.greeting-icon img {
    width: 100%;
    opacity: 0.7;
}

.greeting-text {
    text-align: center;
}

.greeting-text p {
    font-size: 0.9375rem;
    color: var(--color-text-medium);
    line-height: 2;
    margin-bottom: 24px;
}

.greeting-text p:last-child {
    margin-bottom: 0;
}

.greeting-text .quote {
    font-style: italic;
    color: var(--color-text-dark);
    font-size: 1rem;
    line-height: 2.2;
}

.greeting-text .quote-source {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

/* =====================================================
   신랑 신부 소개 섹션
   ===================================================== */
.couple-intro {
    padding: var(--section-padding);
    background-color: var(--color-bg-soft);
}

.couple-info {
    text-align: center;
}

.person {
    padding: 20px 0;
}

.person .parents {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.person .name {
    font-size: 1.25rem;
    color: var(--color-text-dark);
    font-weight: 400;
}

.divider {
    width: 40px;
    margin: 16px auto;
    opacity: 0.5;
}

.divider img {
    width: 100%;
}

/* =====================================================
   갤러리 섹션
   ===================================================== */
.gallery {
    padding: var(--section-padding);
    background-color: var(--color-bg-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =====================================================
   예식 정보 섹션
   ===================================================== */
.ceremony {
    padding: var(--section-padding);
    background-color: var(--color-bg-soft);
}

.ceremony-info {
    text-align: center;
}

.ceremony-date {
    margin-bottom: 24px;
}

.ceremony-date .date-main {
    font-family: var(--font-english);
    font-size: 1.5rem;
    color: var(--color-text-dark);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.ceremony-date .date-day {
    font-size: 1rem;
    color: var(--color-text-medium);
    margin-top: 4px;
}

.ceremony-venue {
    margin-bottom: 32px;
}

.ceremony-venue .venue-name {
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 4px;
}

.ceremony-venue .venue-hall {
    font-size: 0.9375rem;
    color: var(--color-text-light);
}

/* 캘린더 위젯 */
.calendar-widget {
    margin-top: 32px;
}

.calendar {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.calendar-header {
    font-family: var(--font-english);
    font-size: 1rem;
    color: var(--color-text-dark);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-days span {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-align: center;
    padding: 8px 0;
}

.calendar-days span.sunday {
    color: #e74c3c;
}

.calendar-days span.saturday {
    color: #3498db;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-dates span {
    font-size: 0.875rem;
    color: var(--color-text-medium);
    text-align: center;
    padding: 8px 0;
    border-radius: 50%;
}

.calendar-dates span.sunday {
    color: #e74c3c;
}

.calendar-dates span.saturday {
    color: #3498db;
}

.calendar-dates span.other-month {
    color: var(--color-text-light);
    opacity: 0.4;
}

.calendar-dates span.wedding-day {
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
    position: relative;
}

.calendar-dates span.wedding-day::after {
    content: '♥';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: var(--color-heart);
}

/* =====================================================
   오시는 길 섹션
   ===================================================== */
.location {
    padding: var(--section-padding);
    background-color: var(--color-bg-cream);
}

.location-info {
    text-align: center;
}

.map-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    background-color: #f5f5f5;
}

.map-image img {
    width: 100%;
}

.address-info {
    margin-bottom: 24px;
}

.address-info .venue-name {
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.address-info .address {
    font-size: 0.9375rem;
    color: var(--color-text-medium);
    margin-bottom: 4px;
}

.address-info .tel {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.copy-address-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--color-primary-light);
    color: var(--color-text-medium);
    font-family: var(--font-serif);
    font-size: 0.8125rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.copy-address-btn:hover {
    background-color: var(--color-primary-light);
    color: var(--color-text-dark);
}

.copy-address-btn:active {
    transform: scale(0.98);
}

.map-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.map-btn.naver {
    background-color: #03c75a;
}

.map-btn.naver:hover {
    background-color: #02b350;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(3, 199, 90, 0.3);
}

.map-btn.google {
    background-color: #4285f4;
}

.map-btn.google:hover {
    background-color: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

/* 교통 정보 */
.transport-info {
    text-align: left;
    background-color: var(--color-bg-soft);
    border-radius: 16px;
    padding: 24px;
}

.transport-section {
    margin-bottom: 20px;
}

.transport-section:last-child {
    margin-bottom: 0;
}

.transport-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.transport-desc {
    font-size: 0.875rem;
    color: var(--color-text-medium);
    line-height: 1.6;
}

.transport-desc strong {
    color: var(--color-text-dark);
    font-weight: 600;
}

/* 지하철 */
.subway-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.subway-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.subway-badge.line1 {
    background-color: #5eb54b;
}

.station-name {
    font-size: 0.8125rem;
    color: var(--color-text-medium);
    margin-right: 12px;
}

/* 정류장 */
.bus-stop-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.stop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #999;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
}

.stop-name {
    font-size: 0.8125rem;
    color: var(--color-text-medium);
    margin-right: 10px;
}

/* 버스 */
.bus-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bus-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bus-type {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
}

.bus-type.type-normal {
    background-color: #5eb54b;
}

.bus-type.type-seat {
    background-color: #4a90d9;
}

.bus-type.type-express {
    background-color: #e85a5a;
}

.bus-type.type-outer {
    background-color: #5eb54b;
}

.bus-numbers {
    font-size: 0.8125rem;
    color: var(--color-text-medium);
    line-height: 1.6;
}

/* =====================================================
   마음 전하기 (계좌 정보) 섹션
   ===================================================== */
.account {
    padding: var(--section-padding);
    background-color: var(--color-bg-soft);
}

.account-desc {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-text-medium);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* 계좌 리스트 (수직 레이아웃) */
.account-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-section {
    display: block;
}

.account-label {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.account-card {
    background-color: white;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.account-card .bank-name {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.account-card .account-number {
    font-family: var(--font-english);
    font-size: 1.25rem;
    color: var(--color-text-dark);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.account-card .account-holder {
    font-size: 1rem;
    color: var(--color-text-medium);
    margin-bottom: 20px;
}

.copy-btn {
    padding: 12px 24px;
    background-color: var(--color-bg-soft);
    border: 1px solid var(--color-primary-light);
    color: var(--color-text-dark);
    font-family: var(--font-serif);
    font-size: 0.875rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: var(--color-primary-light);
}

.copy-btn:active {
    transform: scale(0.98);
}

/* =====================================================
   푸터
   ===================================================== */
.footer {
    padding: 40px 24px;
    background: #f8f8f8;
    text-align: center;
}

.footer-names {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.footer-date {
    font-family: var(--font-english);
    font-size: 0.875rem;
    color: var(--color-text-light);
    letter-spacing: 0.2em;
}

/* =====================================================
   토스트 알림
   ===================================================== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--color-text-dark);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 0.875rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    white-space: nowrap;
}

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

/* =====================================================
   반응형 (작은 화면)
   ===================================================== */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .cover-names {
        font-size: 1.875rem;
        gap: 12px;
    }

    .couple-image {
        width: 240px;
        height: 320px;
    }

    .container {
        padding: 0 20px;
    }
}

/* =====================================================
   placeholder 이미지 스타일
   ===================================================== */
.couple-image img[src*="placeholder"],
.gallery-item img[src*="placeholder"],
.flower-top img[src*="placeholder"],
.greeting-icon img[src*="placeholder"],
.divider img[src*="placeholder"] {
    background: #f5f5f5;
}

/* =====================================================
   라이트박스 (이미지 확대)
   ===================================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 20px;
}

.lightbox.active {
    display: flex;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox img {
    transition: opacity 0.15s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}
