/* ===== TEMPLATE 5: EVERGREEN LOVE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #fff; color: #2d2d2d; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --green: #3d5a3d;
  --green-light: #5a7a5a;
  --sage: #8fa88f;
  --cream: #f8faf8;
  --gray: #f0ede8;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-light: #666;
  --gold: #3d5a3d;
  --gold-dark: #2a3f2a;
  --gold-light: #5a7a5a;
  --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: 50%; height: 100vh; position: relative; flex-shrink: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Leaves */
.leaves { position: absolute; bottom: 0; width: 180px; height: auto; z-index: 2; animation: sway 4s ease-in-out infinite; }
.leaves-bl { left: 0; transform-origin: bottom left; }
.leaves-br { right: 0; transform-origin: bottom right; animation-delay: -2s; }
.leaves svg { width: 100%; height: auto; }

/* Particles */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particles span {
  position: absolute; width: 6px; height: 6px; background: var(--sage);
  border-radius: 50%; opacity: 0.4; animation: particleFloat 6s ease-in-out infinite;
}
.particles span:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.particles span:nth-child(2) { top: 25%; left: 70%; animation-delay: 1s; }
.particles span:nth-child(3) { top: 45%; left: 35%; animation-delay: 2s; }
.particles span:nth-child(4) { top: 65%; left: 75%; animation-delay: 0.5s; }
.particles span:nth-child(5) { top: 80%; left: 15%; animation-delay: 3s; }
.particles span:nth-child(6) { top: 35%; left: 55%; animation-delay: 1.5s; }

/* Cover card */
.cover-card {
  background: var(--white); border: 1.5px solid var(--sage);
  border-radius: 20px; padding: 2.5rem 3rem; text-align: center;
  z-index: 5; position: relative;
  animation: floating 3s ease-in-out infinite;
  box-shadow: 0 10px 40px rgba(61,90,61,0.08);
}
.cc-label { font-size: 0.6rem; letter-spacing: 0.4em; color: var(--green-light); margin-bottom: 0.5rem; }
.cc-ornament { width: 100px; margin: 0.5rem auto; }
.cc-ornament svg { width: 100%; }
.cc-names { font-family: var(--font-serif); font-size: 2.5rem; color: var(--green); font-weight: 700; line-height: 1.2; }
.cc-deco { color: var(--sage); font-size: 0.7rem; letter-spacing: 0.5em; margin: 0.5rem 0; }

/* Guest */
.left-guest { position: absolute; bottom: 3rem; text-align: center; z-index: 5; }
.left-guest p { font-size: 0.8rem; color: var(--text-light); }
.guest-name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--green); font-weight: 600; margin-top: 0.2rem; }
.guest-city { font-size: 0.72rem; color: var(--sage); }

/* Music */
.music-btn {
  position: absolute; bottom: 1.5rem; right: 1.5rem; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--green); color: white; font-size: 0.9rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(61,90,61,0.3);
}

/* RIGHT PANEL */
.right-panel { width: 50%; height: 100vh; overflow-y: auto; }
.right-panel::-webkit-scrollbar { width: 3px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 3px; }

/* ===== SECTIONS ===== */
.eg-section { padding: 3rem 2rem; }
.eg-label { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--sage); text-align: center; }
.eg-title { font-family: var(--font-serif); font-size: 2rem; color: var(--green); text-align: center; margin-top: 0.3rem; }
.eg-date { font-size: 0.85rem; color: var(--text-light); text-align: center; margin-top: 0.3rem; }

/* QUOTE */
.eg-quote { padding: 0; }
.eg-quote-top { position: relative; height: 150px; overflow: hidden; }
.eg-quote-top img { width: 100%; height: 100%; object-fit: cover; }
.eg-quote-body { padding: 2rem; background: var(--cream); }
.eg-arabic { font-size: 0.88rem; line-height: 2; text-align: center; margin-bottom: 1rem; direction: rtl; }
.eg-translation { font-size: 0.82rem; color: var(--text-light); line-height: 1.7; text-align: center; }
.eg-source { font-size: 0.8rem; color: var(--green); text-align: center; margin-top: 0.8rem; font-weight: 700; }

/* INTRO */
.eg-intro { background: var(--white); text-align: center; }

/* COUNTDOWN */
.eg-countdown { background: var(--gray); text-align: center; }
.eg-cd-label { font-size: 0.7rem; letter-spacing: 0.4em; margin-bottom: 1.5rem; }
.countdown-timer { display: flex; justify-content: center; gap: 0.8rem; }
.cd-item { background: var(--white); border: 1.5px solid var(--sage); border-radius: 12px; padding: 1rem 1.2rem; min-width: 70px; text-align: center; }
.cd-item span { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; color: var(--green); display: block; animation: pulse 2s ease-in-out infinite; }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.15em; color: var(--sage); text-transform: uppercase; margin-top: 0.2rem; }

/* COUPLE */
.eg-couple { background: var(--white); text-align: center; }
.eg-couple-tag { font-size: 0.65rem; letter-spacing: 0.4em; color: var(--sage); margin-bottom: 1.5rem; }
.eg-person { margin-bottom: 2rem; }
.eg-photo { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 1rem; overflow: hidden; border: 3px solid var(--sage); }
.eg-photo img { width: 100%; height: 100%; object-fit: cover; }
.eg-person h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--green); margin-bottom: 0.3rem; }
.eg-parents { font-size: 0.8rem; color: var(--text-light); }

/* EVENT */
.eg-event { background: var(--green); color: white; padding: 3rem 1.5rem; }
.eg-event-card { border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.2rem; text-align: center; }
.eg-event-card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 0.8rem; }
.eg-event-card p { font-size: 0.82rem; margin-bottom: 0.4rem; opacity: 0.9; }
.eg-event-card p i { margin-right: 0.4rem; }
.eg-btn { display: inline-block; margin-top: 0.8rem; padding: 0.6rem 1.5rem; border: 1px solid rgba(255,255,255,0.5); border-radius: 50px; color: white; font-size: 0.8rem; transition: var(--transition); }
.eg-btn:hover { background: rgba(255,255,255,0.15); }
.map-embed-wrap { display: none; margin-top: 0.8rem; border-radius: 10px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 180px; border: none; }

/* LOVE STORY */
.eg-story { background: var(--cream); }
.eg-story-title { font-family: var(--font-serif); font-size: 1.4rem; color: var(--green); text-align: center; margin-bottom: 2rem; }
.timeline { position: relative; max-width: 500px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--sage); transform: translateX(-50%); }
.timeline-item { position: relative; margin-bottom: 2rem; width: 50%; }
.timeline-item.left { padding-right: 1.5rem; text-align: right; }
.timeline-item.right { margin-left: 50%; padding-left: 1.5rem; text-align: left; }
.timeline-dot { position: absolute; top: 5px; width: 12px; height: 12px; background: var(--green); border-radius: 50%; border: 2px solid var(--sage); }
.timeline-item.left .timeline-dot { right: -6px; }
.timeline-item.right .timeline-dot { left: -6px; }
.timeline-dot i { 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.65rem; letter-spacing: 0.1em; color: var(--sage); display: block; margin-bottom: 0.2rem; }
.timeline-content h4 { font-family: var(--font-serif); font-size: 1rem; color: var(--green); margin-bottom: 0.3rem; }
.timeline-content p { font-size: 0.8rem; color: var(--text-light); line-height: 1.6; }
.tl-btns { position: absolute; top: 0; right: 0; 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(--green); color: white; }
.tl-del-btn { background: #e74c3c; color: white; }

/* GALLERY */
.eg-gallery { background: var(--green); padding: 3rem 1.5rem; text-align: center; }
.eg-gallery-title { font-family: var(--font-serif); font-size: 1.4rem; color: white; margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-item { aspect-ratio: 1/1; overflow: hidden; border-radius: 8px; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.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: #e74c3c; border: none; color: white; font-size: 0.55rem; cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.gallery-overlay { display: none; }

/* RSVP */
.eg-rsvp { background: var(--white); }
.eg-rsvp h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--green); text-align: center; margin-bottom: 1.5rem; }
.eg-rsvp form { max-width: 350px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.8rem; }
.eg-rsvp input, .eg-rsvp select { padding: 0.75rem; border: 1.5px solid #ddd; border-radius: 10px; font-size: 0.88rem; outline: none; font-family: inherit; }
.eg-rsvp input:focus, .eg-rsvp select:focus { border-color: var(--sage); }
.eg-rsvp-btns { display: flex; gap: 0.6rem; }
.eg-rsvp-btns label { flex: 1; }
.eg-rsvp-btns input { display: none; }
.eg-rsvp-btns span { display: block; text-align: center; padding: 0.6rem; border: 1.5px solid var(--sage); border-radius: 8px; font-size: 0.82rem; cursor: pointer; transition: var(--transition); }
.eg-rsvp-btns input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.eg-btn-full { width: 100%; padding: 0.85rem; background: var(--green); color: white; border: none; border-radius: 50px; font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.eg-btn-full:hover { background: var(--green-light); }

/* WISHES */
.eg-wishes { background: #e8f0e8; }
.eg-wishes h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--green); text-align: center; margin-bottom: 1.5rem; }
.eg-wishes form { max-width: 400px; margin: 0 auto 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.eg-wishes input, .eg-wishes textarea { padding: 0.75rem; border: 1.5px solid #ccc; border-radius: 10px; font-size: 0.88rem; outline: none; font-family: inherit; background: white; }
.eg-wishes input:focus, .eg-wishes textarea:focus { border-color: var(--sage); }
.wishes-list { max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }
.wish-item { background: white; border-radius: 10px; padding: 1rem; display: flex; gap: 0.8rem; align-items: flex-start; }
.wish-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.wish-header { margin-bottom: 0.2rem; }
.wish-name { font-weight: 700; font-size: 0.85rem; color: var(--green); }
.wish-time { font-size: 0.65rem; color: var(--text-light); }
.wish-text { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }

/* GIFT */
.eg-gift { background: var(--white); }
.eg-gift h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--green); text-align: center; margin-bottom: 0.8rem; }
.eg-gift-desc { font-size: 0.82rem; color: var(--text-light); text-align: center; line-height: 1.6; margin-bottom: 1.5rem; }
.eg-gift-card { border: 1px solid #ddd; border-radius: var(--radius); padding: 1.2rem; text-align: center; margin-bottom: 0.8rem; }
.eg-gift-card h4 { font-size: 0.75rem; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.gift-account { font-size: 1.2rem; font-weight: 700; color: var(--green); }
.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; }

/* CLOSING */
.eg-closing { background: var(--gray); text-align: center; padding: 4rem 2rem; }
.eg-closing-label { font-size: 0.65rem; letter-spacing: 0.3em; color: var(--sage); }
.eg-closing-names { font-family: var(--font-serif); font-size: 2rem; color: var(--green); margin-top: 0.3rem; }
.eg-closing-date { font-size: 0.85rem; color: var(--text-light); margin-top: 0.3rem; }

/* 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: 40px; height: 40px; 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(--green); color: white; padding: 0.7rem 1.4rem; border-radius: 8px; 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(50% - 320px); }
#editorPanel { z-index: 10001; }

/* ANIMATIONS */
@keyframes floating { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes particleFloat { 0%,100% { transform: translateY(0) translateX(0); opacity: 0.4; } 50% { transform: translateY(-20px) translateX(10px); opacity: 0.7; } }
@keyframes sway { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(2deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* 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%; }
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding-left: 2rem; padding-right: 0; text-align: left; }
  .timeline-item.left { padding-right: 0; padding-left: 2rem; text-align: left; }
  .timeline-item.right { margin-left: 0; padding-left: 2rem; }
  .timeline-item.left .timeline-dot, .timeline-item.right .timeline-dot { left: 14px; right: auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
