/* ===== TEMPLATE 10: SPARK (Warm Elegant) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #f5ede4; color: #3d3530; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --terra: #a0674b;
  --terra-light: #c4956e;
  --cream: #f5ede4;
  --pink-light: #fce8e0;
  --white: #ffffff;
  --text: #3d3530;
  --text-light: #7a6e65;
  --gold: #a0674b;
  --gold-dark: #7a4a32;
  --gold-light: #c4956e;
  --radius: 16px;
  --transition: all 0.35s ease;
  --font-serif: 'Playfair Display', serif;
}

/* ===== SPLIT LAYOUT ===== */
.split-layout { display: flex; height: 100vh; }

/* LEFT PANEL */
.left-panel { width: 55%; height: 100vh; position: relative; flex-shrink: 0; overflow: hidden; }
.left-bg { width: 100%; height: 100%; object-fit: cover; }
.left-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,0.6) 100%); z-index: 2; }
.left-floral { position: absolute; width: 100px; height: 100px; opacity: 0.15; z-index: 3; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20 80 Q40 50 30 20 Q50 40 70 20 Q60 50 80 80 Q50 60 20 80Z' stroke='%23fff' fill='none' stroke-width='1'/%3E%3Ccircle cx='50' cy='50' r='5' stroke='%23fff' fill='none'/%3E%3C/svg%3E") no-repeat center/contain; }
.left-floral-tl { top: 1rem; left: 1rem; }
.left-floral-br { bottom: 8rem; right: 1rem; }
.left-content { position: absolute; bottom: 3rem; left: 0; right: 0; z-index: 4; text-align: center; }
.lp-tag { font-size: 0.65rem; letter-spacing: 0.5em; color: rgba(255,255,255,0.8); }
.lp-names { font-family: var(--font-serif); font-style: italic; font-size: clamp(2rem, 4vw, 3rem); color: white; margin-top: 0.3rem; }
.lp-guest { margin-top: 1.5rem; }
.lp-guest p { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.lp-guest-name { font-weight: 700; color: white; font-size: 1rem; margin-top: 0.2rem; }
.lp-guest-city { font-size: 0.72rem; color: rgba(255,255,255,0.6); }
.music-btn { position: absolute; top: 1rem; left: 1rem; z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.4); color: white; font-size: 0.8rem; cursor: pointer; }

/* RIGHT PANEL */
.right-panel { width: 45%; height: 100vh; overflow-y: auto; background: var(--cream); }
.right-panel::-webkit-scrollbar { width: 3px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--terra-light); border-radius: 3px; }

/* ===== SECTIONS ===== */
.sp-section { padding: 2.5rem 2rem; text-align: center; }
.sp-label { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--text-light); }
.sp-title { font-family: var(--font-serif); font-style: italic; font-size: 2rem; color: var(--text); margin-top: 0.3rem; }
.sp-hashtag { font-size: 0.8rem; color: var(--terra); margin-top: 0.3rem; }

/* Arch frame */
.sp-arch-frame { width: 70%; max-width: 280px; margin: 1.5rem auto 0; border-radius: 50% 50% 0 0 / 40% 40% 0 0; overflow: hidden; border: 3px solid var(--terra-light); }
.sp-arch-frame img { width: 100%; height: 250px; object-fit: cover; }

/* QUOTE */
.sp-quote { background: var(--cream); }
.sp-arabic { font-size: 0.88rem; line-height: 2; text-align: center; color: var(--text); margin-bottom: 1rem; direction: rtl; }
.sp-translation { font-size: 0.82rem; color: var(--text-light); line-height: 1.7; }
.sp-source { font-size: 0.82rem; color: var(--terra); font-weight: 700; margin-top: 0.8rem; }

/* COUPLE */
.sp-couple { background: var(--white); }
.sp-couple-tag { font-size: 0.65rem; letter-spacing: 0.4em; color: var(--text-light); margin-bottom: 1.5rem; }
.sp-person { margin-bottom: 1.5rem; }
.sp-arch-photo { width: 140px; height: 170px; margin: 0 auto 1rem; border-radius: 50% 50% 0 0 / 40% 40% 0 0; overflow: hidden; border: 3px solid #b8d8e8; }
.sp-arch-photo img { width: 100%; height: 100%; object-fit: cover; }
.sp-person h3 { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--text); }
.sp-parents { font-size: 0.8rem; color: var(--text-light); margin-top: 0.3rem; }
.sp-separator { font-size: 1.2rem; color: var(--terra-light); margin: 0.5rem 0; }

/* COUNTDOWN */
.sp-countdown { background: var(--cream); }
.sp-cd-label { font-size: 0.7rem; letter-spacing: 0.4em; color: var(--text-light); margin-bottom: 1.2rem; }
.countdown-timer { display: flex; justify-content: center; gap: 0.6rem; }
.cd-item { border: 1.5px solid var(--terra-light); border-radius: 10px; padding: 0.8rem 1rem; min-width: 60px; background: var(--white); }
.cd-item span { font-family: var(--font-serif); font-size: 1.8rem; color: var(--text); display: block; font-weight: 700; }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-light); text-transform: capitalize; margin-top: 0.2rem; }

/* RSVP */
.sp-rsvp { background: var(--cream); }
.sp-rsvp-card { background: var(--pink-light); border-radius: var(--radius); padding: 2rem 1.5rem; }
.sp-rsvp-icon { font-size: 1.5rem; color: var(--terra); margin-bottom: 0.5rem; }
.sp-rsvp-card h3 { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--text); margin-bottom: 0.5rem; }
.sp-rsvp-card > p { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1.2rem; }
.sp-rsvp-btns { display: flex; flex-direction: column; gap: 0.6rem; }
.sp-rsvp-choice input { display: none; }
.sp-rsvp-choice span { display: block; padding: 0.8rem; border-radius: 8px; text-align: center; font-size: 0.88rem; cursor: pointer; transition: var(--transition); }
.sp-rsvp-choice.hadir span { background: #2d6b4f; color: white; }
.sp-rsvp-choice.tidak span { background: #8b2020; color: white; }
.sp-rsvp-choice input:checked + span { opacity: 0.7; transform: scale(0.98); }

/* EVENT */
.sp-event { background: var(--white); }
.sp-event-card { border: 1px solid rgba(160,103,75,0.2); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.sp-event-badge { display: inline-block; border: 1px solid var(--terra-light); padding: 0.25rem 0.8rem; border-radius: 50px; font-size: 0.6rem; color: var(--terra); margin-bottom: 0.8rem; }
.sp-event-card h3 { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--terra); margin-bottom: 0.5rem; }
.sp-event-date { color: var(--terra); font-size: 0.82rem; }
.sp-event-card p { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.3rem; }
.sp-event-btns { margin-top: 1rem; }
.sp-btn { display: inline-block; padding: 0.5rem 1.2rem; border: 1px solid var(--terra); border-radius: 50px; color: var(--terra); font-size: 0.75rem; transition: var(--transition); }
.sp-btn:hover { background: var(--terra); color: white; }
.map-embed-wrap { display: none; margin-top: 0.8rem; border-radius: 10px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 160px; border: none; }

/* GALLERY */
.sp-gallery { background: var(--cream); }
.sp-gallery-title { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--terra); margin-bottom: 0.3rem; }
.sp-gallery-sub { font-size: 0.8rem; color: var(--text-light); margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-item { overflow: hidden; border-radius: 10px; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-del-btn { display: none; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(192,57,43,0.9); border: none; color: white; font-size: 0.55rem; cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.gallery-overlay { display: none; }

/* LOVE STORY */
.sp-story { background: var(--white); }
.sp-story-title { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--terra); margin-bottom: 0.3rem; }
.sp-story-sub { font-size: 0.8rem; color: var(--text-light); margin-bottom: 2rem; }
.timeline { position: relative; max-width: 400px; margin: 0 auto; }
.timeline::before { display: none; }
.timeline-item { position: relative; margin-bottom: 1.5rem; border: 1px solid rgba(160,103,75,0.2); border-radius: var(--radius); padding: 1.5rem; text-align: left; }
.timeline-item.left, .timeline-item.right { display: block; width: 100%; }
.timeline-dot { display: none; }
.timeline-content { width: 100%; margin: 0; padding: 0; background: none; border: none; box-shadow: none; border-radius: 0; }
.timeline-date { font-size: 0.7rem; color: var(--terra); font-weight: 700; display: block; margin-bottom: 0.3rem; }
.timeline-content h4 { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--text); margin-bottom: 0.4rem; }
.timeline-content p { font-size: 0.8rem; color: var(--text-light); line-height: 1.6; }
.tl-btns { position: absolute; top: 8px; right: 8px; display: none; gap: 3px; }
.tl-edit-btn, .tl-del-btn { width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer; font-size: 0.55rem; display: flex; align-items: center; justify-content: center; }
.tl-edit-btn { background: var(--terra); color: white; }
.tl-del-btn { background: #c0392b; color: white; }

/* GIFT */
.sp-gift { background: var(--cream); }
.sp-gift-icon { font-size: 1.5rem; color: var(--terra); margin-bottom: 0.5rem; }
.sp-gift-title { font-family: var(--font-serif); font-style: italic; font-size: 1.4rem; color: var(--text); margin-bottom: 0.8rem; }
.sp-gift-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; margin-bottom: 1.5rem; }
.sp-gift-card { border: 1px solid rgba(160,103,75,0.2); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 0.8rem; }
.sp-gift-card h4 { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-light); margin-bottom: 0.3rem; }
.gift-account { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.gift-holder { font-size: 0.75rem; color: var(--text-light); }
.gift-qris { margin: 0.5rem 0; }
.qris-img { max-width: 100px; margin: 0 auto; border-radius: 6px; }

/* WISHES */
.sp-wishes { background: var(--white); }
.sp-wishes-icon { font-size: 1.3rem; color: var(--terra); margin-bottom: 0.5rem; }
.sp-wishes-title { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--text); margin-bottom: 1rem; }
#wishForm textarea { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.88rem; font-family: inherit; outline: none; resize: vertical; margin-bottom: 0.8rem; background: var(--cream); }
#wishForm textarea:focus { border-color: var(--terra); }
.sp-btn-full { width: 100%; padding: 0.8rem; background: var(--terra); color: white; border: none; border-radius: 50px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.sp-btn-full:hover { background: var(--gold-dark); }
.wishes-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; text-align: left; }
.wish-item { border-bottom: 1px solid #eee; padding: 1rem 0; }
.wish-item:last-child { border-bottom: none; }
.wish-header { margin-bottom: 0.2rem; }
.wish-avatar { display: none; }
.wish-name { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.wish-time { display: none; }
.wish-text { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }

/* CLOSING */
.sp-closing { background: var(--cream); }
.sp-closing-frame { width: 80%; max-width: 320px; margin: 0 auto 1.5rem; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.sp-closing-frame img { width: 100%; height: 200px; object-fit: cover; }
.sp-closing-label { font-size: 0.65rem; letter-spacing: 0.3em; color: var(--text-light); }
.sp-closing-names { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--terra); margin-top: 0.3rem; }
.sp-closing-date { font-size: 0.82rem; color: var(--text-light); margin-top: 0.2rem; }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.1); border: none; color: white; font-size: 1rem; cursor: pointer; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* TOAST */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--terra); color: white; padding: 0.7rem 1.4rem; border-radius: 50px; font-size: 0.8rem; z-index: 99999; opacity: 0; transition: all 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* NAV hidden */
.floating-nav { display: none !important; }

/* EDITOR FIX */
body.editor-active .right-panel { width: calc(45% - 320px); }
#editorPanel { z-index: 10001; }

/* RESPONSIVE */
@media (max-width: 900px) {
  body { overflow: auto; }
  .split-layout { flex-direction: column; height: auto; }
  .left-panel { width: 100%; height: 100vh; flex-shrink: 0; }
  .right-panel { width: 100%; height: auto; overflow: visible; }
  body.editor-active .right-panel { width: 100%; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
