/* ===== TEMPLATE 8: WEDFIX (Netflix-inspired) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #141414; color: #fff; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --red: #e50914;
  --red-dark: #b20710;
  --dark: #141414;
  --dark2: #1a1a1a;
  --dark3: #2a2a2a;
  --white: #ffffff;
  --gray: #b3b3b3;
  --yellow: #f5a623;
  --gold: #e50914;
  --gold-dark: #b20710;
  --gold-light: #ff3d47;
  --radius: 8px;
  --transition: all 0.3s ease;
  --font-heading: 'Bebas Neue', sans-serif;
}

/* ===== SPLIT LAYOUT ===== */
.split-layout { display: flex; height: 100vh; }

/* LEFT PANEL */
.left-panel {
  width: 55%; height: 100vh; position: relative; flex-shrink: 0; overflow: hidden;
}
.collage-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
  width: 100%; height: 100%; gap: 3px;
}
.collage-grid img { width: 100%; height: 100%; object-fit: cover; }
.left-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); z-index: 2; }
.left-content {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
}
.lp-label { font-size: 0.7rem; letter-spacing: 0.5em; color: var(--gray); }
.lp-icon { font-size: 3rem; margin: 1rem 0; }
.lp-names {
  font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--red); letter-spacing: 0.05em;
}
.lp-guest { margin-top: 2rem; }
.lp-guest p { font-size: 0.8rem; color: var(--gray); }
.lp-guest-name { font-weight: 700; color: white; font-size: 1rem; margin-top: 0.2rem; }
.lp-guest-city { font-size: 0.72rem; color: var(--gray); }
.music-btn {
  position: absolute; top: 1rem; left: 1rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.1); color: white; font-size: 0.8rem; cursor: pointer;
}

/* RIGHT PANEL */
.right-panel { width: 45%; height: 100vh; overflow-y: auto; background: var(--dark); }
.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--dark3); border-radius: 4px; }

/* ===== SECTIONS ===== */
.wf-section { padding: 2.5rem 1.5rem; }
.wf-tag { font-size: 0.65rem; letter-spacing: 0.4em; color: var(--gray); }
.wf-series-tag { font-size: 0.7rem; color: var(--red); margin-bottom: 0.3rem; }
.wf-series-tag em { font-style: italic; }

/* HEADER */
.wf-header { padding: 0; }
.wf-header-bg { position: relative; height: 220px; overflow: hidden; }
.wf-header-bg img { width: 100%; height: 100%; object-fit: cover; }
.wf-header-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--dark) 100%); }
.wf-header-content { position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 2; }
.wf-header-names { font-family: var(--font-heading); font-size: 2.5rem; color: var(--red); }
.wf-header-date { font-size: 0.82rem; color: var(--gray); margin-top: 0.3rem; }

/* QUOTE */
.wf-quote { background: var(--dark2); }
.wf-arabic { font-size: 0.88rem; line-height: 2; text-align: right; direction: rtl; color: var(--gray); margin-bottom: 1rem; }
.wf-translation { font-size: 0.82rem; color: var(--gray); line-height: 1.7; }
.wf-source { font-size: 0.82rem; color: white; font-weight: 700; margin-top: 0.8rem; }

/* COUPLE */
.wf-couple { background: var(--dark); padding: 0; }
.wf-person { position: relative; margin-bottom: 0; }
.wf-person-photo { width: 100%; height: 280px; object-fit: cover; }
.wf-person-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }
.wf-person-tag { font-size: 0.6rem; letter-spacing: 0.4em; color: var(--gray); }
.wf-person-info h3 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--red); margin-top: 0.2rem; }
.wf-person-parents { font-size: 0.78rem; color: var(--gray); margin-top: 0.2rem; }

/* GALLERY */
.wf-gallery { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.wf-gallery-title { font-family: var(--font-heading); font-size: 1.8rem; color: white; margin-bottom: 0.3rem; font-style: italic; }
.wf-gallery-sub { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-item { overflow: hidden; border-radius: 10px; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform 0.3s; }
.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(0,0,0,0.7); border: none; color: white; font-size: 0.6rem; cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.gallery-overlay { display: none; }

/* COUNTDOWN */
.wf-countdown { background: var(--red); text-align: center; }
.wf-cd-label { font-size: 0.7rem; letter-spacing: 0.4em; color: white; margin-bottom: 1.2rem; }
.countdown-timer { display: flex; justify-content: center; gap: 0.8rem; }
.cd-item { background: white; border-radius: var(--radius); padding: 0.8rem 1rem; min-width: 60px; text-align: center; }
.cd-item span { font-family: var(--font-heading); font-size: 1.8rem; color: var(--dark); display: block; }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--gray); text-transform: capitalize; }

/* EVENT */
.wf-event { background: var(--dark2); }
.wf-event-card { background: var(--dark); border: 1px solid var(--dark3); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; text-align: center; }
.wf-event-badge { display: inline-block; border: 1px solid var(--gray); padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.65rem; color: var(--gray); margin-bottom: 0.8rem; }
.wf-event-card h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--red); margin-bottom: 0.6rem; font-style: italic; }
.wf-event-card p { font-size: 0.82rem; color: var(--gray); margin-bottom: 0.3rem; }
.wf-event-btns { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1rem; }
.wf-btn-red { padding: 0.6rem 1.2rem; background: var(--red); color: white; border-radius: 4px; font-size: 0.78rem; font-weight: 600; transition: var(--transition); }
.wf-btn-red:hover { background: var(--red-dark); }
.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 */
.wf-rsvp { background: var(--red); }
.wf-rsvp-card { background: white; border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; color: var(--dark); }
.wf-rsvp-icon { font-size: 1.5rem; color: var(--red); margin-bottom: 0.5rem; }
.wf-rsvp-card h3 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--dark); margin-bottom: 0.5rem; }
.wf-rsvp-card > p { font-size: 0.82rem; color: #555; margin-bottom: 1.2rem; }
.wf-rsvp-btns { display: flex; flex-direction: column; gap: 0.6rem; }
.wf-rsvp-choice input { display: none; }
.wf-rsvp-choice span { display: block; padding: 0.8rem; border-radius: 4px; text-align: center; border: 2px solid #ddd; font-size: 0.88rem; cursor: pointer; transition: var(--transition); }
.wf-rsvp-choice.hadir span { background: var(--red); color: white; border-color: var(--red); }
.wf-rsvp-choice input:checked + span { background: var(--dark); color: white; border-color: var(--dark); }

/* LOVE STORY */
.wf-story { background: var(--dark2); }
.wf-story-title { font-family: var(--font-heading); font-size: 2rem; color: white; margin-bottom: 1.5rem; }
.timeline { position: relative; padding-left: 1rem; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--dark3); }
.timeline-item { position: relative; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.timeline-item.left, .timeline-item.right { display: block; flex-direction: unset; }
.timeline-dot { display: none; }
.timeline-content { width: 100%; margin: 0; padding: 1.2rem; background: var(--dark3); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); box-shadow: none; }
.timeline-date { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--gray); display: block; margin-bottom: 0.3rem; }
.timeline-content h4 { font-family: var(--font-heading); font-size: 1.1rem; color: white; margin-bottom: 0.3rem; letter-spacing: 0.05em; }
.timeline-content p { font-size: 0.8rem; color: var(--gray); line-height: 1.6; }
.tl-btns { position: absolute; top: 4px; right: 4px; 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(--red); color: white; }
.tl-del-btn { background: #333; color: white; }

/* GIFT */
.wf-gift { background: linear-gradient(135deg, var(--red), var(--red-dark)); text-align: center; color: white; }
.wf-gift-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.wf-gift h3 { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 0.8rem; }
.wf-gift-desc { font-size: 0.82rem; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 1.5rem; }
.wf-gift-card { background: white; border-radius: var(--radius); padding: 1.2rem; text-align: center; margin-bottom: 0.8rem; color: var(--dark); }
.wf-gift-card h4 { font-size: 0.7rem; letter-spacing: 0.1em; color: #555; margin-bottom: 0.3rem; }
.gift-account { font-family: var(--font-heading); font-size: 1.5rem; color: var(--dark); }
.gift-holder { font-size: 0.75rem; color: #888; }
.gift-qris { margin: 0.5rem 0; }
.qris-img { max-width: 100px; margin: 0 auto; border-radius: 6px; }

/* WISHES */
.wf-wishes { background: var(--dark2); text-align: center; }
.wf-wishes-icon { font-size: 1.5rem; color: var(--gray); margin-bottom: 0.5rem; }
.wf-wishes h3 { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 1rem; }
#wishForm textarea { width: 100%; padding: 0.8rem; border: 1px solid var(--dark3); border-radius: var(--radius); background: var(--dark); color: white; font-size: 0.88rem; font-family: inherit; outline: none; resize: vertical; margin-bottom: 0.8rem; }
#wishForm textarea:focus { border-color: var(--red); }
.wf-btn-red-full { width: 100%; padding: 0.8rem; background: var(--red); color: white; border: none; border-radius: 4px; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.wf-btn-red-full:hover { background: var(--red-dark); }
.wishes-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; text-align: left; }
.wish-item { background: var(--dark); border: 1px solid var(--dark3); border-radius: var(--radius); padding: 1rem; }
.wish-header { margin-bottom: 0.3rem; }
.wish-avatar { display: none; }
.wish-name { font-family: var(--font-heading); font-size: 0.95rem; color: white; letter-spacing: 0.05em; }
.wish-time { display: none; }
.wish-text { font-size: 0.8rem; color: var(--gray); line-height: 1.5; }

/* CLOSING */
.wf-closing { padding: 0; }
.wf-closing-bg { position: relative; height: 280px; overflow: hidden; }
.wf-closing-bg img { width: 100%; height: 100%; object-fit: cover; }
.wf-closing-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.wf-closing-content { position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 2; }
.wf-closing-content p { font-size: 0.65rem; letter-spacing: 0.3em; color: var(--gray); }
.wf-closing-content h2 { font-family: var(--font-heading); font-size: 2.5rem; color: var(--red); }
.wf-closing-date { font-size: 0.82rem; color: var(--yellow); margin-top: 0.2rem; }

/* 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%); }

/* TOAST */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--red); color: white; padding: 0.7rem 1.4rem; border-radius: 4px; 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%; }
  .collage-grid { grid-template-columns: repeat(3, 1fr); }
}
