/* ===== TEMPLATE 3: SERNADE (Split-screen cinematic) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #1a1a1a; color: #2d2d2d; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --dark: #1a1a1a;
  --dark2: #2a2a2a;
  --white: #ffffff;
  --cream: #f8f6f3;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --accent: #c9a84c;
  --gold: #c9a84c;
  --gold-dark: #9a7a2e;
  --gold-light: #ffd700;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 16px;
  --transition: all 0.35s ease;
  --font-serif: 'Playfair Display', serif;
}

/* ===== SPLIT LAYOUT ===== */
.split-layout { display: flex; height: 100vh; overflow: hidden; }

/* LEFT PANEL — fixed photo */
.left-panel {
  width: 60%; height: 100vh; position: relative; flex-shrink: 0;
}
.left-photo { width: 100%; height: 100%; object-fit: cover; }
.left-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
}
.left-bottom {
  position: absolute; bottom: 2.5rem; left: 2.5rem; z-index: 2;
}
.left-label {
  font-size: 0.65rem; letter-spacing: 0.5em; color: rgba(255,255,255,0.7);
  margin-bottom: 0.4rem;
}
.left-names {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem); color: white; font-weight: 400;
}
.left-info {
  position: absolute; bottom: 2.5rem; right: 2.5rem; z-index: 2; text-align: right;
}
.left-info-label { font-size: 0.6rem; letter-spacing: 0.4em; color: rgba(255,255,255,0.6); }
.left-info-name { font-size: 0.95rem; color: white; font-weight: 600; margin-top: 0.2rem; }
.left-info-city { font-size: 0.6rem; letter-spacing: 0.3em; color: rgba(255,255,255,0.5); margin-top: 0.1rem; }

/* Music button */
.music-btn {
  position: absolute; top: 1.2rem; left: 1.2rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(139,115,85,0.8); color: white; font-size: 0.8rem;
  cursor: pointer; transition: var(--transition);
}
.music-btn:hover { background: var(--gold); }

/* RIGHT PANEL — scrollable */
.right-panel {
  width: 40%; height: 100vh; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y proximity;
}
.right-panel::-webkit-scrollbar { width: 3px; }
.right-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* ===== SLIDES ===== */
.slide { min-height: 100vh; padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; }

/* COVER SLIDE */
.cover-slide { position: relative; padding: 0; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.slide-content { position: relative; z-index: 2; text-align: center; padding: 3rem 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }
.cover-tag { font-size: 0.65rem; letter-spacing: 0.6em; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }
.cover-name { font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 5rem); color: white; font-weight: 400; line-height: 1.1; }
.cover-name span { font-size: 0.5em; font-style: italic; display: block; margin: 0.3rem 0; color: var(--gold-light); }
.cover-date { font-size: 1.2rem; letter-spacing: 0.3em; color: var(--gold-light); margin-top: 2rem; }
.cover-arrow { position: absolute; bottom: 2rem; color: var(--gold-light); animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* QUOTE SLIDE */
.quote-slide { background: var(--white); padding: 0; }
.quote-photo { width: 100%; height: 180px; object-fit: cover; }
.quote-content { padding: 2.5rem 2rem; }
.quote-arabic { font-size: 0.95rem; color: var(--text); line-height: 2; margin-bottom: 1.5rem; text-align: center; }
.quote-translation { font-size: 0.85rem; color: var(--text-light); line-height: 1.8; margin-bottom: 1rem; }
.quote-source { font-family: var(--font-serif); font-style: italic; font-size: 1rem; color: var(--gold-dark); }

/* PROFILE SLIDES (Bride/Groom) */
.bride-slide, .groom-slide { background: var(--white); padding: 0; }
.profile-photo { width: 100%; height: 55%; object-fit: cover; }
.profile-content { padding: 2rem 2.5rem; }
.profile-tag { font-size: 0.65rem; letter-spacing: 0.5em; color: var(--gold); margin-bottom: 0.5rem; font-weight: 600; }
.profile-name { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--text); font-weight: 400; margin-bottom: 1rem; }
.profile-line { width: 50px; height: 2px; background: var(--gold); margin-bottom: 1rem; }
.profile-label { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.profile-parents { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; }

/* SAVE THE DATE */
.savedate-slide { background: var(--dark); color: white; padding: 0; }
.savedate-photo { width: 100%; height: 150px; object-fit: cover; opacity: 0.7; }
.savedate-content { padding: 2.5rem 2rem; text-align: center; }
.savedate-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--gold-light); margin-bottom: 1.2rem; }
.savedate-desc { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 2rem; }
.countdown-timer { display: flex; justify-content: center; gap: 1.5rem; }
.cd-item { text-align: center; }
.cd-item span { font-family: var(--font-serif); font-size: 2.2rem; color: var(--gold-light); display: block; font-weight: 300; }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.2em; color: rgba(255,255,255,0.6); margin-top: 0.3rem; }

/* EVENT */
.event-slide { background: var(--white); padding: 2.5rem 2rem; }
.event-header { text-align: center; margin-bottom: 2rem; }
.event-tag { font-size: 0.65rem; letter-spacing: 0.5em; color: var(--gold); font-weight: 600; }
.event-sub { font-family: var(--font-serif); font-style: italic; font-size: 0.9rem; color: var(--text-light); margin-top: 0.3rem; }
.event-card { background: var(--cream); border-radius: var(--radius); padding: 2rem; text-align: center; margin-bottom: 1.5rem; border: 1px solid rgba(139,115,85,0.1); }
.event-card h3 { font-family: var(--font-serif); font-size: 1.4rem; color: var(--text); margin-bottom: 0.8rem; letter-spacing: 0.1em; }
.event-time { font-size: 0.9rem; color: var(--gold-dark); margin-bottom: 0.8rem; font-weight: 600; }
.event-venue { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; margin-bottom: 1rem; }
.btn-map { display: inline-block; padding: 0.6rem 1.8rem; border: 1px solid var(--gold); border-radius: 6px; font-size: 0.75rem; letter-spacing: 0.2em; transition: var(--transition); color: var(--gold); }
.btn-map:hover { background: var(--gold); color: white; }
.map-embed-wrap { display: none; margin-top: 1rem; border-radius: 12px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 180px; border: none; }

/* LOVE STORY */
.story-slide { background: var(--white); padding: 2.5rem 1.5rem; }
.story-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--text); text-align: center; margin-bottom: 2.5rem; line-height: 1.2; }
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold-light), var(--gold), var(--gold-light)); }
.timeline-item { position: relative; padding-left: 1.5rem; margin-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid white; box-shadow: 0 0 0 2px var(--gold-light); }
.timeline-item.left, .timeline-item.right { flex-direction: row; display: block; }
.timeline-dot { display: none; }
.timeline-content { padding: 0; background: none; border: none; border-radius: 0; box-shadow: none; width: 100%; margin: 0; }
.timeline-date { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--gold); display: block; margin-bottom: 0.2rem; font-weight: 600; }
.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.82rem; color: var(--text-light); line-height: 1.7; }
.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.6rem; display: flex; align-items: center; justify-content: center; }
.tl-edit-btn { background: #333; color: white; }
.tl-del-btn { background: #c0392b; color: white; }

/* GALLERY */
.gallery-slide { background: var(--dark); padding: 2.5rem 1.5rem; color: white; }
.gallery-title { font-family: var(--font-serif); font-style: italic; font-size: 2rem; text-align: center; margin-bottom: 0.5rem; color: var(--gold-light); }
.gallery-sub { font-size: 0.8rem; color: rgba(255,255,255,0.6); text-align: center; font-style: italic; margin-bottom: 2rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-item { aspect-ratio: 1/1; overflow: hidden; border-radius: 10px; 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: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(192,57,43,0.9); border: none; color: white; font-size: 0.6rem; cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.gallery-overlay { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); 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%); }

/* GIFT */
.gift-slide { background: var(--white); }
.gift-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--text); text-align: center; margin-bottom: 1rem; line-height: 1.2; }
.gift-desc { font-size: 0.85rem; color: var(--text-light); text-align: center; line-height: 1.7; margin-bottom: 2rem; }
.gift-card { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-bottom: 1rem; border: 1px solid rgba(139,115,85,0.15); }
.gift-card h4 { font-size: 0.82rem; letter-spacing: 0.1em; color: var(--gold-dark); margin-bottom: 0.5rem; font-weight: 700; }
.gift-account { font-size: 1.3rem; font-weight: 700; color: var(--text); letter-spacing: 0.05em; }
.gift-holder { font-size: 0.78rem; color: var(--text-light); margin-top: 0.3rem; }
.gift-qris { margin: 0.8rem 0; }
.qris-img { max-width: 120px; margin: 0 auto; border-radius: 8px; }

/* RSVP */
.rsvp-slide { background: var(--white); }
.rsvp-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--text); text-align: center; margin-bottom: 1rem; }
.rsvp-desc { font-size: 0.85rem; color: var(--text-light); text-align: center; line-height: 1.7; margin-bottom: 2rem; }
.rsvp-btns { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.rsvp-choice { flex: 1; }
.rsvp-choice input { display: none; }
.rsvp-choice span { display: block; text-align: center; padding: 0.9rem; border: 1px solid var(--gold); border-radius: 8px; font-size: 0.8rem; letter-spacing: 0.15em; cursor: pointer; transition: var(--transition); color: var(--gold); }
.rsvp-choice input:checked + span { background: var(--gold); color: white; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.82rem; color: var(--text); margin-bottom: 0.4rem; font-weight: 600; }
.form-group textarea, .form-group input[type="text"] { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 10px; font-size: 0.88rem; outline: none; font-family: inherit; resize: vertical; transition: var(--transition); }
.form-group textarea:focus, .form-group input[type="text"]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(139,115,85,0.1); }
.btn-submit { width: 100%; padding: 0.9rem; border: none; border-radius: 8px; background: var(--gold); color: white; font-size: 0.85rem; letter-spacing: 0.2em; cursor: pointer; transition: var(--transition); font-weight: 600; }
.btn-submit:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,115,85,0.3); }
.rsvp-success { text-align: center; padding: 2rem; }
.rsvp-success i { font-size: 3rem; color: var(--gold); }
.rsvp-success h3 { color: var(--gold); margin-top: 0.8rem; font-family: var(--font-serif); }

/* WISHES */
.wishes-slide { background: var(--cream); }
.wishes-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--text); text-align: center; margin-bottom: 0.8rem; }
.wishes-desc { font-size: 0.82rem; color: var(--text-light); text-align: center; line-height: 1.7; margin-bottom: 2rem; }
.wishes-list { display: flex; flex-direction: column; gap: 0.8rem; max-height: 400px; overflow-y: auto; padding-right: 0.5rem; }
.wishes-list::-webkit-scrollbar { width: 3px; }
.wishes-list::-webkit-scrollbar-thumb { background: var(--gold-light); border-radius: 3px; }
.wish-item { background: white; border-radius: 12px; padding: 1.2rem; border: 1px solid var(--border); border-left: 3px solid var(--gold); }
.wish-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.wish-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.wish-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.wish-time { font-size: 0.7rem; color: var(--text-light); margin-top: 0.1rem; }
.wish-text { font-size: 0.84rem; color: var(--text-light); line-height: 1.6; }

/* CLOSING */
.closing-slide { background: var(--cream); padding: 0; min-height: auto; }
.closing-photo { width: 100%; height: 250px; object-fit: cover; opacity: 0.8; }
.closing-content { padding: 2.5rem 2rem; text-align: center; }
.closing-title { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; color: var(--gold-dark); margin-bottom: 1rem; }
.closing-msg { font-size: 0.85rem; color: var(--text-light); line-height: 1.8; margin-bottom: 1.5rem; }
.closing-names { font-size: 0.9rem; letter-spacing: 0.3em; color: var(--gold); font-weight: 700; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--dark); color: white; padding: 0.8rem 1.5rem; border-radius: 10px; font-size: 0.82rem; z-index: 99999; opacity: 0; transition: all 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE (Mobile: stack vertically) ===== */
@media (max-width: 900px) {
  body { overflow: auto; }
  .split-layout { flex-direction: column; height: auto; }
  .left-panel { width: 100%; height: 100vh; position: fixed; top: 0; left: 0; z-index: 1; }
  .right-panel { width: 100%; height: auto; position: relative; z-index: 2; margin-top: 100vh; overflow: visible; }
  .slide { min-height: auto; padding: 3rem 1.5rem; }
  .cover-slide { min-height: 100vh; }
  .profile-photo { height: 300px; }
}

/* AOS */
[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
[data-aos].aos-animate { opacity: 1; transform: none; }

/* Floating nav hidden for this template */
.floating-nav { display: none !important; }

/* ===== FIX: Konten tidak tertutupi editor panel ===== */
body.editor-active .right-panel {
  width: calc(40% - 320px);
}
body.editor-active .left-panel {
  width: calc(60% - 0px);
}
#editorPanel {
  z-index: 10001;
}

@media (max-width: 900px) {
  body.editor-active .right-panel {
    width: 100%;
    padding-right: 0;
  }
}
