/* ═══════════════════════════════════════
   모바일 돌잔치 초대장 CSS
   ═══════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #fdf6f0;
    color: #4a3f35;
    -webkit-font-smoothing: antialiased;
}

/* ── Invitation Wrapper ── */
.invitation-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
}

/* ── Hero Section ── */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-default {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 30%, #e8a0bf 60%, #ce93d8 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.0) 40%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 0 24px;
}

.hero-subtitle {
    font-family: 'Noto Serif KR', serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 20px;
    opacity: 0.9;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 56px;
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-date {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 3px;
    opacity: 0.9;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(10px); }
    60% { transform: rotate(45deg) translateY(5px); }
}

/* ── Sections ── */
.section {
    padding: 64px 0;
}

.section-inner {
    padding: 0 28px;
}

.section-divider {
    text-align: center;
    font-size: 16px;
    color: #e8a0bf;
    margin-bottom: 24px;
    letter-spacing: 8px;
}

.section-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 32px;
    color: #3d3027;
}

/* ── Greeting ── */
.greeting-section {
    background: #fff;
}

.greeting-message {
    font-family: 'Noto Serif KR', serif;
    font-size: 15px;
    line-height: 2.2;
    text-align: center;
    color: #5a5047;
    font-weight: 300;
    margin-bottom: 40px;
    word-break: keep-all;
}

.parents-info {
    text-align: center;
    font-size: 15px;
    color: #6b6054;
    line-height: 2;
}

.parents-info .dot {
    margin: 0 6px;
    color: #e8a0bf;
}

.parents-info .label {
    color: #999;
    font-size: 14px;
    margin-left: 4px;
}

.parents-info .baby-highlight {
    display: block;
    font-family: 'Noto Serif KR', serif;
    font-size: 22px;
    font-weight: 500;
    color: #e8a0bf;
    margin-top: 8px;
}

/* ── Gallery ── */
.gallery-section {
    background: #fdf6f0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    color: #fff;
    font-size: 12px;
    padding: 16px 8px 8px;
}

.empty-text {
    text-align: center;
    color: #bbb;
    font-size: 14px;
    padding: 40px 0;
}

/* ── Info ── */
.info-section {
    background: #fff;
}

.info-card {
    background: #fdf6f0;
    border-radius: 16px;
    padding: 28px 24px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
}

.info-row + .info-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.info-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.info-row strong {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.info-row p {
    font-size: 13px;
    color: #888;
}

/* ── Location ── */
.location-section {
    background: #fdf6f0;
}

.location-info {
    text-align: center;
    margin-bottom: 24px;
}

.venue-name {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 8px;
}

.venue-address {
    font-size: 14px;
    color: #888;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
    display: block;
}

/* ── Custom Section ── */
.custom-section {
    background: #fff;
}

.custom-content {
    font-size: 15px;
    line-height: 1.8;
    color: #5a5047;
}

/* ── Guestbook ── */
.guestbook-section {
    background: #fff;
}

.guestbook-form {
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0d8d0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fdf6f0;
    color: #4a3f35;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #e8a0bf;
    background: #fff;
}

.form-input::placeholder {
    color: #bbb;
}

textarea.form-input {
    resize: none;
    margin-bottom: 8px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #e8a0bf;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #d4899e;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.guestbook-list {
    max-height: 500px;
    overflow-y: auto;
}

.guestbook-entry {
    padding: 16px 0;
    border-bottom: 1px solid #f0ebe5;
    position: relative;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.entry-header strong {
    font-size: 14px;
    color: #3d3027;
}

.entry-date {
    font-size: 12px;
    color: #bbb;
}

.entry-message {
    font-size: 14px;
    line-height: 1.6;
    color: #6b6054;
    word-break: break-word;
    white-space: pre-wrap;
}

.btn-delete {
    position: absolute;
    top: 16px;
    right: 0;
    background: none;
    border: none;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-delete:hover {
    color: #e74c3c;
}

/* ── Footer ── */
.invitation-footer {
    padding: 40px 28px;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #fdf6f0);
}

.invitation-footer p {
    font-family: 'Noto Serif KR', serif;
    font-size: 13px;
    color: #bbb;
    letter-spacing: 1px;
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
}

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

.lightbox-content p {
    color: #fff;
    font-size: 14px;
    margin-top: 12px;
}

/* ── Fade-in Animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Hero always visible */
.hero-section.fade-in {
    opacity: 1;
    transform: none;
}

/* ── Toast Notification ── */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}
