/* ===== TEMPLATE 4: NEWSPAPER ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #f5f3f0; color: #1a1a1a; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --black: #1a1a1a;
  --white: #ffffff;
  --cream: #f5f3f0;
  --gray: #e8e5e0;
  --text: #1a1a1a;
  --text-light: #5a5a5a;
  --accent: #c0392b;
  --gold: #1a1a1a;
  --gold-dark: #000;
  --gold-light: #333;
  --border: #d0ccc5;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 4px;
  --transition: all 0.3s ease;
  --font-serif: 'Playfair Display', serif;
}

/* ===== SPLIT LAYOUT ===== */
.split-layout { display: flex; height: 100vh; }

/* LEFT PANEL */
.left-panel {
  width: 50%; height: 100vh; background: var(--white);
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5rem 2.5rem; overflow: hidden; flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.paper-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}
.paper-col { font-size: 0.6rem; text-align: center; letter-spacing: 0.05em; color: var(--text-light); line-height: 1.3; }
.paper-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.15em; }
.paper-headline {
  font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4rem);
  text-align: center; margin-bottom: 0.3rem; line-height: 1;
}
.paper-headline em { font-style: italic; font-weight: 900; }
.paper-headline strong { font-weight: 900; }
.paper-the { font-style: italic; font-weight: 300; font-size: 0.5em; vertical-align: middle; }
.paper-line { width: 100%; height: 3px; background: var(--black); margin: 0.5rem 0; }
.paper-photo {
  width: 100%; flex: 1; min-height: 0; overflow: hidden; margin: 0.5rem 0;
  background: var(--gray);
}
.paper-photo img { width: 100%; height: 100%; object-fit: cover; }
.paper-names {
  font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center; margin-top: 0.8rem; letter-spacing: 0.05em;
}
.paper-names em { font-style: italic; }
.paper-sub { font-family: var(--font-serif); font-style: italic; font-size: 1rem; text-align: center; color: var(--text-light); margin-bottom: 0.5rem; }
.paper-bottom {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding-top: 0.8rem; border-top: 1px solid var(--border);
}
.paper-guest { font-family: var(--font-serif); font-style: italic; font-size: 0.85rem; }
.paper-city { font-family: var(--font-serif); font-style: italic; font-size: 0.85rem; }
.btn-open {
  padding: 0.5rem 1.5rem; border: 1px solid var(--black);
  background: var(--white); font-size: 0.7rem; letter-spacing: 0.2em;
  cursor: pointer; transition: var(--transition);
}
.btn-open:hover { background: var(--black); color: var(--white); }
.music-btn {
  position: absolute; top: 1rem; left: 1rem; width: 32px; height: 32px;
  border-radius: 50%; border: none; background: rgba(0,0,0,0.7);
  color: white; font-size: 0.7rem; cursor: pointer;
}

/* RIGHT PANEL */
.right-panel {
  width: 50%; height: 100vh; overflow-y: auto; background: var(--white);
  padding: 0;
}
.right-panel::-webkit-scrollbar { width: 3px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--border); }

/* SECTIONS */
.np-section { padding: 2.5rem 2rem; border-bottom: 1px solid var(--border); }
.np-divider { width: 100%; height: 1px; background: var(--border); margin: 1.5rem 0; }

/* INTRO */
.np-header-bar { border-bottom: 2px solid var(--black); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.np-bar-title { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; letter-spacing: 0.15em; }
.np-live { font-size: 0.75rem; color: var(--text-light); margin-bottom: 0.8rem; }
.np-live-dot { background: var(--accent); color: white; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.6rem; font-weight: 700; margin-right: 0.5rem; }
.np-headline { font-family: var(--font-serif); font-size: 1.6rem; line-height: 1.3; font-weight: 700; }

/* COUPLE */
.np-section-title { font-family: var(--font-serif); font-size: 0.8rem; letter-spacing: 0.3em; margin-bottom: 1.5rem; }
.np-profile { margin-bottom: 2rem; }
.np-profile img { width: 100%; max-width: 280px; height: 320px; object-fit: cover; margin-bottom: 0.8rem; }
.np-profile-tag { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--text-light); }
.np-profile-name { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; margin: 0.2rem 0; }
.np-profile-parents { font-size: 0.8rem; color: var(--text-light); }

/* COUNTDOWN */
.np-cd-title { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; text-align: center; margin-bottom: 1rem; }
.countdown-timer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.cd-item { text-align: center; }
.cd-item span { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 400; color: var(--text); }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.15em; color: var(--text-light); text-transform: uppercase; }
.cd-sep { font-size: 1.5rem; color: var(--text-light); }
.np-quote-src { font-family: var(--font-serif); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }
.np-quote-arabic { font-size: 0.85rem; line-height: 2; margin-bottom: 0.8rem; text-align: right; direction: rtl; }
.np-quote-trans { font-size: 0.8rem; color: var(--text-light); line-height: 1.7; }

/* TIMELINE */
.np-story-title { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 2rem; line-height: 1.1; }
.np-story-title em { font-style: italic; font-weight: 400; }
.timeline { position: relative; padding-left: 1.2rem; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1.8rem; padding-left: 1rem; }
.timeline-item.left, .timeline-item.right { display: block; flex-direction: unset; }
.timeline-dot { position: absolute; left: -1.2rem; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.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.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text); display: block; margin-bottom: 0.2rem; }
.timeline-content h4 { font-family: var(--font-serif); font-style: italic; font-size: 1rem; 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: #333; color: white; }
.tl-del-btn { background: var(--accent); color: white; }

/* GALLERY */
.np-gallery { background: var(--white); }
.np-gallery-title { font-family: var(--font-serif); font-size: 2.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-item { aspect-ratio: 1/1; overflow: hidden; border-radius: 6px; 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.04); }
.gallery-del-btn { display: none; position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: none; color: white; font-size: 0.55rem; 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: 4px; }
.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%); }

/* EVENT */
.np-event-card { padding: 1rem 0; }
.np-event-top { display: flex; justify-content: space-between; gap: 1rem; }
.np-event-top h4 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 0.3rem; }
.np-event-top p { font-size: 0.78rem; color: var(--text-light); line-height: 1.4; }
.np-event-date { font-size: 0.75rem; color: var(--text-light); margin-top: 0.3rem; }
.np-event-right { text-align: right; flex-shrink: 0; }
.np-event-live { font-size: 0.6rem; color: var(--accent); display: block; margin-bottom: 0.3rem; }
.np-event-right a { color: var(--accent); font-size: 1.2rem; }
.np-event-time { font-size: 0.8rem; display: block; margin-top: 0.3rem; }
.map-embed-wrap { display: none; margin-top: 0.8rem; border-radius: 8px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 160px; border: none; }

/* RSVP */
.np-rsvp-title { font-family: var(--font-serif); font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.np-rsvp-sub { font-size: 0.82rem; text-align: center; color: var(--text-light); margin-bottom: 1.5rem; }
.np-rsvp-btns { display: flex; gap: 1rem; justify-content: center; }
.np-rsvp-choice input { display: none; }
.np-rsvp-choice span { display: block; padding: 0.7rem 1.8rem; border: 1px solid var(--black); border-radius: 4px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.np-rsvp-choice input:checked + span { background: var(--black); color: white; }
.rsvp-success { text-align: center; padding: 1.5rem; }
.rsvp-success i { font-size: 2.5rem; color: var(--accent); }

/* GIFT */
.np-gift-title { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 0.8rem; }
.np-gift-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; margin-bottom: 1.5rem; }
.np-gift-card { border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; text-align: center; margin-bottom: 1rem; }
.np-gift-card h4 { font-size: 0.75rem; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.gift-account { font-size: 1.3rem; font-weight: 700; }
.gift-holder { font-size: 0.78rem; color: var(--text-light); }
.gift-qris { margin: 0.5rem 0; }
.qris-img { max-width: 100px; margin: 0 auto; border-radius: 6px; }

/* WISHES */
.np-wishes-title { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1rem; }
#wishForm textarea { width: 100%; padding: 0.8rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.88rem; font-family: inherit; outline: none; margin-bottom: 0.8rem; resize: vertical; }
#wishForm textarea:focus { border-color: var(--black); }
.np-btn-send { width: 100%; padding: 0.8rem; background: #5a7a8a; color: white; border: none; border-radius: 6px; font-size: 0.88rem; cursor: pointer; transition: var(--transition); }
.np-btn-send:hover { background: #4a6a7a; }
.wishes-list { margin-top: 1.5rem; }
.wish-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.wish-item:last-child { border-bottom: none; }
.wish-header { margin-bottom: 0.3rem; }
.wish-avatar { display: none; }
.wish-name { font-family: var(--font-serif); font-weight: 700; font-size: 0.9rem; }
.wish-time { display: none; }
.wish-text { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; }

/* CLOSING */
.np-closing { text-align: center; }
.np-closing-label { font-family: var(--font-serif); font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 1rem; }
.np-closing-photo { width: 80%; max-width: 350px; margin: 0 auto 1rem; border-radius: 8px; }
.np-closing-names { font-family: var(--font-serif); font-size: 1.5rem; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.np-closing-date { font-size: 0.85rem; color: var(--text-light); }

/* TOAST */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--black); color: white; padding: 0.7rem 1.4rem; border-radius: 6px; 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); }

/* FLOATING NAV hidden */
.floating-nav { display: none !important; }

/* EDITOR FIX */
body.editor-active .right-panel { width: calc(50% - 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: auto; min-height: 100vh; border-right: none; border-bottom: 1px solid var(--border); }
  .right-panel { width: 100%; height: auto; overflow: visible; }
  body.editor-active .right-panel { width: 100%; }
}
