:root {
    --gold: #c5a47e;
    /* 좀 더 차분하고 고급스러운 샴페인 골드 */
    --gold-light: #e8ded2;
    --bg-cream: #fdfcfb;
    --white: #ffffff;
    --text-dark: #2c2c2c;
    /* 약간 더 깊은 다크 그레이 */
    --text-gray: #757575;
    --text-light: #a8a8a8;
}

html {
    /* 레이아웃 변화 시 브라우저 스크롤 보정(앵커)으로 화면이 튀는 현상 완화 */
    overflow-anchor: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-cream);
    /* 종이 질감 효과를 위한 미세한 노이즈 패턴 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: var(--text-dark);
    line-height: 1.8;
    text-align: center;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* 모바일 자동 링크 스타일 제거 */
a[href^="tel"],
a[href^="mailto"],
a[href^="sms"] {
    color: inherit !important;
    text-decoration: none !important;
}


section:not(.intro) {
    padding: 120px 20px;
}

.serif {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.3em;
    /* 자간을 더 넓게 */
    margin-bottom: 30px;
    color: var(--gold);
    text-transform: uppercase;
}




/* [메인 인트로] */
.intro {
    position: relative;
    width: 100%;
    /* 100vh만 쓰면 모바일에서 주소창 표시/숨김에 따라 높이가 바뀌며 메인 사진이 커졌다 작아졌다 함 */
    min-height: 100svh;
    height: 100svh;
    height: 100lvh;
    padding: 0;
    overflow: hidden;
}

.main-photo,
.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.main-photo img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.intro-content {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    color: var(--white);
    z-index: 10;
}

/* [SVG 진짜 손글씨 그리기 효과] */
.wedding-svg {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    overflow: visible;
}

.svg-text {
    font-family: 'Parisienne', cursive;
    font-size: 4.2rem;
    font-weight: 400;
    fill: transparent;
    stroke: var(--gold);
    stroke-width: 0.6px;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawStroke 4s ease-in-out forwards, fillColor 1.5s ease-in-out 2s forwards;
}

@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillColor {
    0% {
        fill: transparent;
    }

    100% {
        fill: var(--gold);
        text-shadow: 0 0 10px rgba(176, 146, 106, 0.3);
    }
}

.intro-details.fade-in-delayed {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 1.5s ease-out forwards;
    animation-delay: 2s;
}

@keyframes fadeUp {
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.main-date {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.main-location {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

.gold-line {
    width: 25px;
    height: 1px;
    background-color: var(--gold);
    margin: 0 auto 50px;
    opacity: 0.6;
}

.message {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 2.2;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* [달력] */
.calendar-section {
    background-color: var(--bg-cream);
    padding: 80px 20px;
}

.calendar-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.calendar-wrap {
    max-width: 340px;
    margin: 0 auto;
    background: #fff;
    padding: 30px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f2f2f2;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.calendar th {
    font-weight: 500;
    font-size: 0.8rem;
    padding-bottom: 20px;
    color: #b0926a;
}

.calendar td {
    padding: 12px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.calendar .sun {
    color: #e57373;
}

.d-day {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background-color: var(--gold);
    color: #fff !important;
    border-radius: 50%;
    font-weight: 400;
    box-shadow: 0 2px 8px rgba(176, 146, 106, 0.4);
}

.d-day-text {
    margin-top: 40px;
    font-size: 0.95rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.d-day-text .heart {
    color: var(--gold);
    font-size: 0.8rem;
    margin: 0 3px;
}

/* [갤러리 (그리드 방식)] */
.gallery {
    padding: 100px 20px;
}

/* [갤러리 헤더 및 토글 버튼] */
.gallery-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95); /* 배경 투명도 조절 */
    padding: 15px 0;
    backdrop-filter: blur(5px); /* 뒤쪽 살짝 흐리게 */
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.gallery-header h3 {
    margin-bottom: 0 !important;
}

.gallery-toggle-btn {
    background: #fdfdfd;
    border: 1px solid var(--gold-light);
    color: var(--gold-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.gallery-toggle-btn:hover {
    background: var(--gold-light);
    color: #fff;
}

.toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.grid-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px;
    max-height: 10000px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 완전히 접힌 상태 (0장) */
.grid-gallery.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
    opacity: 0;
}

.grid-gallery.expanded {
    max-height: 10000px;
    padding-top: 20px;
    padding-bottom: 50px;
    opacity: 1;
}

/* 펼침 상태는 JS가 section에 gallery-expanded를 붙여 토글 아이콘과 동기화 */
.gallery.gallery-expanded .toggle-icon {
    transform: rotate(180deg);
}

.grid-item {
    border-radius: 2px;
    overflow: hidden;
    /* 과한 그림자 대신 아주 미세한 테두리로 고급스럽게 */
    border: 1px solid rgba(0, 0, 0, 0.03);
    background: #fff;
    transition: transform 0.4s ease;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item.horizontal {
    grid-column: span 2;
    height: auto; /* 가로 사진은 높이를 이미지 비율에 맞춤 */
}

.grid-item.horizontal img {
    object-fit: contain; /* 잘림 방지 */
    background: #fdfdfd;
}

.grid-item.vertical img {
    aspect-ratio: 3 / 4;
}


/* [라이트박스 팝업] */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-swiper {
    width: 100%;
    height: 100%;
}

.lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.lightbox-swiper img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-swiper .swiper-button-next,
.lightbox-swiper .swiper-button-prev {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.lightbox-swiper .swiper-button-next:after,
.lightbox-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

.lightbox-swiper .swiper-button-next:hover,
.lightbox-swiper .swiper-button-prev:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* [오시는 길 및 지도] */
.location {
    padding: 100px 20px;
    background-color: #fff;
}

.venue-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.venue-address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
}

.map-container {
    width: 100%;
    height: 250px;
    background-color: #eee;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* 내비게이션 버튼 (미니멀 스타일) */
.navi-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 50px;
}

.navi-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 12px 0;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--text-gray);
}

.navi-buttons button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.navi-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.btn-naver,
.btn-kakao-navi,
.btn-tmap {
    /* 개별 배경색 제거하고 통일감 부여 */
    background-color: transparent !important;
}

/* 교통 수단 안내 (더 깔끔하게) */
.transport-info {
    text-align: left;
    background-color: transparent;
    padding: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 40px;
}

.info-item {
    margin-bottom: 20px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item h4 {
    font-size: 0.95rem;
    color: var(--gold);
    margin-bottom: 5px;
}

.info-item p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

/* [계좌번호 및 송금] */
.account {
    padding: 100px 20px;
    background-color: var(--bg-cream);
}

#account-section-title {
    scroll-margin-top: 16px;
}

.wreath-notice {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 2.2;
    margin-bottom: 40px;
    font-weight: 300;
}

.account-container {
    max-width: 380px;
    margin: 0 auto;
}

.account-box {
    background: transparent;
    padding: 0;
    margin-top: 20px;
    border: none;
}

.account-title {
    font-size: 0.95rem;
    color: var(--gold);
    margin: 40px 0 20px;
    font-weight: 500;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--gold-light);
    display: inline-block;
    padding-bottom: 5px;
}

.account-list {
    padding: 0;
}

.account-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.account-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.account-item p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

.btn-group {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.account-box button {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.account-box button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-copy {
    /* 기본 스타일 상속 */
}

.btn-kakaopay {
    border-color: #FEE500 !important;
    background: #FEE500 !important;
    color: #191919 !important;
}

.btn-kakaopay:hover {
    background: #FFD200 !important;
}


/* [카카오톡 공유 버튼 - 관리자 숨김 처리] */
.share-section {
    padding: 20px 30px 60px;
    display: none;
}

.btn-kakao-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 15px;
    background-color: #FEE500;
    color: #191919;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

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

.kakao-icon {
    width: 20px;
    height: 20px;
}

/* [푸터 및 애니메이션] */
.footer {
    padding-bottom: 50px;
    font-size: 0.75rem;
    color: #999;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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