/* ===== TEMPLATE 2: CLASSIC FLORAL (mer.id style) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #ffffff; color: #2d2d2d; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --green: #2d4a3e;
  --green-light: #3d6b5a;
  --green-pale: #e8f0ec;
  --cream: #f9f7f4;
  --white: #ffffff;
  --gray: #f2f0ed;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --border: rgba(45,74,62,0.12);
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 16px;
  --transition: all 0.3s ease;
  --font-serif: 'Cormorant Garamond', serif;
  --font-script: 'Pinyon Script', cursive;
}

/* ===== COVER ===== */
.cover-section {
  min-height: 100vh; display: flex; flex-direction: column;
  position: relative; background: var(--white);
}
.cover-photo {
  width: 100%; height: 55vh; position: relative; overflow: hidden;
}
.cover-photo img {
  width: 100%; height: 100%; object-fit: cover;
}
.cover-countdown {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; background: rgba(255,255,255,0.95);
  padding: 0.6rem 1.2rem; border-radius: 10px; box-shadow: var(--shadow);
}
.cover-cd-item { text-align: center; padding: 0.3rem 0.7rem; }
.cover-cd-item span { font-size: 1.5rem; font-weight: 700; color: var(--green); display: block; }
.cover-cd-item small { font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); }
.cover-cd-sep { align-self: center; color: var(--border); font-size: 1.5rem; }
.cover-content {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2.5rem 2rem; text-align: center;
  position: relative;
}
/* Floral ornaments */
.cover-floral {
  position: absolute; width: 120px; height: auto; opacity: 0.15;
  pointer-events: none;
}
.cover-floral.left { left: 0; bottom: 0; }
.cover-floral.right { right: 0; top: 0; transform: scaleX(-1); }
.cover-subtitle {
  font-size: 0.72rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 0.8rem;
}
.cover-names {
  font-family: var(--font-serif); font-size: clamp(2.2rem, 7vw, 3.5rem);
  color: var(--text); font-weight: 400; line-height: 1.2; margin-bottom: 1.5rem;
}
.cover-guest p { font-size: 0.82rem; color: var(--text-light); }
.guest-name { font-weight: 700; color: var(--text); margin-top: 0.2rem; font-size: 0.95rem; }
.cover-label { display: none; } /* hide bismillah on cover for this template */
.cover-date { display: none; } /* date shown in countdown instead */
.btn-open {
  margin-top: 1.5rem; background: var(--green); color: white; border: none;
  padding: 0.85rem 2.5rem; border-radius: 8px; font-size: 0.88rem;
  cursor: pointer; transition: var(--transition); letter-spacing: 0.1em;
}
.btn-open:hover { background: var(--green-light); }

/* ===== MUSIC ===== */
.music-player { position: fixed; top: 1rem; left: 1rem; z-index: 1000; }
.music-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.9); color: var(--green); font-size: 0.9rem;
  cursor: pointer; box-shadow: var(--shadow); transition: var(--transition);
}
.music-btn:hover { background: var(--green); color: white; }

/* ===== SECTIONS ===== */
.section { padding: 3.5rem 1.5rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-tag {
  font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 0.5rem; display: block;
}
.section-title {
  font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--text); font-weight: 400;
}

/* ===== QUOTE ===== */
.quote-section {
  background: var(--gray); margin: 0 1rem; border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
}
.quote-box { max-width: 600px; margin: 0 auto; text-align: center; }
.quote-box::before {
  content: ''; display: block; width: 60%; height: 1px;
  background: var(--border); margin: 0 auto 1.5rem;
}
.quote-text {
  font-size: 0.92rem; color: var(--text); line-height: 1.9;
  font-style: italic;
}
.quote-source { color: var(--green); font-size: 0.82rem; margin-top: 1rem; }

/* ===== COUPLE ===== */
.couple-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.couple-card { text-align: center; width: 100%; max-width: 320px; }
.couple-img-wrap {
  width: 200px; height: 250px; margin: 0 auto 1.2rem;
  border-radius: 12px; overflow: hidden; border: 4px solid var(--green-pale);
  box-shadow: var(--shadow);
}
.couple-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.couple-card h3 {
  font-family: var(--font-serif); font-size: 1.4rem;
  color: var(--text); font-weight: 600; margin-bottom: 0.3rem;
}
.couple-role { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); margin-bottom: 0.4rem; }
.couple-parents { font-size: 0.85rem; color: var(--text-light); }
.couple-divider { display: none; }

/* ===== EVENT ===== */
.event-wrap { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.event-card {
  width: 100%; max-width: 400px; padding: 2rem 1.5rem;
  background: var(--gray); border-radius: var(--radius); text-align: center;
}
.event-icon { display: none; }
.event-card h3 {
  font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1.2rem;
  color: var(--text); font-weight: 600;
}
/* Date display like mer.id: HARI | angka/tahun | BULAN */
.event-card p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0.4rem; }
.event-card p i { color: var(--green); margin-right: 0.3rem; }
.btn-map {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem;
  padding: 0.6rem 1.4rem; border-radius: 8px;
  background: var(--green); color: white; font-size: 0.82rem;
  transition: var(--transition);
}
.btn-map:hover { background: var(--green-light); }
.map-embed-wrap { display: none; margin-top: 1rem; border-radius: 12px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 200px; border: none; }

/* ===== COUNTDOWN ===== */
.countdown-section {
  text-align: center; background: var(--green); color: white;
  margin: 0 1rem; border-radius: var(--radius); padding: 2.5rem 1.5rem;
}
.countdown-section .section-tag { color: rgba(255,255,255,0.7); }
.countdown-section .section-title { color: white; }
.countdown-timer { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
.cd-item {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px; padding: 1rem 1.3rem; min-width: 70px;
}
.cd-item span {
  display: block; font-size: 2rem; font-weight: 700; color: white; line-height: 1;
}
.cd-item p { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-top: 0.3rem; }

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; max-width: 600px; margin: 0 auto;
}
.gallery-item {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  border-radius: 8px; cursor: pointer; background: var(--gray);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute; inset: 0; background: rgba(45,74,62,0.3);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem; opacity: 0; transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-del-btn {
  display: none; position: absolute; top: 5px; right: 5px;
  width: 26px; height: 26px; border-radius: 50%; background: rgba(231,76,60,0.9);
  border: none; color: white; font-size: 0.65rem; cursor: pointer;
  align-items: center; justify-content: center; z-index: 10;
}

/* 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: 1.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%); }

/* ===== TIMELINE ===== */
.timeline { position: relative; max-width: 600px; margin: 0 auto; padding: 1rem 0; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--green-pale);
}
.timeline-item { display: flex; flex-direction: row; margin-bottom: 2rem; position: relative; }
.timeline-item.left { flex-direction: row; }
.timeline-dot {
  position: absolute; left: 20px; top: 0; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; z-index: 2;
}
.timeline-content {
  width: calc(100% - 55px); margin-left: 55px;
  padding: 1.2rem; background: var(--gray);
  border-radius: 12px;
}
.timeline-item.left .timeline-content { margin-right: 0; margin-left: 55px; }
.timeline-item.right .timeline-content { margin-left: 55px; }
.timeline-date { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.timeline-content h4 { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text); margin: 0.3rem 0 0.4rem; }
.timeline-content p { font-size: 0.84rem; color: var(--text-light); line-height: 1.6; }
.tl-btns { position: absolute; top: 4px; right: 4px; display: none; gap: 3px; z-index: 10; }
.tl-edit-btn, .tl-del-btn {
  width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 0.6rem; display: flex; align-items: center; justify-content: center;
}
.tl-edit-btn { background: var(--green); color: white; }
.tl-del-btn { background: #e74c3c; color: white; }

/* ===== GIFT ===== */
.gift-desc { text-align: center; color: var(--text-light); margin-bottom: 2rem; font-size: 0.88rem; }
.gift-wrap { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.gift-card {
  width: 100%; max-width: 340px; padding: 1.8rem; text-align: center;
  background: var(--gray); border-radius: var(--radius);
}
.gift-card h4 { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.gift-account { font-size: 1.2rem; font-weight: 700; color: var(--green); letter-spacing: 0.05em; }
.gift-holder { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.8rem; }
.gift-qris { margin: 0.8rem 0; }
.qris-img { max-width: 130px; margin: 0 auto; border-radius: 8px; }
.btn-copy {
  padding: 0.5rem 1.2rem; border-radius: 8px; border: 1px solid var(--green);
  background: white; color: var(--green); font-size: 0.8rem; cursor: pointer;
  transition: var(--transition);
}
.btn-copy:hover { background: var(--green); color: white; }

/* ===== RSVP ===== */
.rsvp-box {
  max-width: 400px; margin: 0 auto; padding: 2rem;
  background: var(--gray); border-radius: var(--radius);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.form-group label i { color: var(--green); margin-right: 0.3rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border);
  border-radius: 10px; font-size: 0.88rem; outline: none; font-family: inherit;
  background: white; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green); }
.radio-group { display: flex; gap: 0.5rem; }
.radio-label { flex: 1; }
.radio-label input { display: none; }
.radio-label span {
  display: block; text-align: center; padding: 0.6rem 0.4rem; border-radius: 8px;
  border: 1px solid var(--border); font-size: 0.8rem; cursor: pointer; transition: var(--transition);
}
.radio-label input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.btn-primary {
  width: 100%; padding: 0.85rem; border-radius: 8px; border: none;
  background: var(--green); color: white; font-size: 0.9rem; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.btn-primary:hover { background: var(--green-light); }
.rsvp-success { text-align: center; padding: 2rem; }
.rsvp-success i { font-size: 3rem; color: var(--green); margin-bottom: 0.8rem; }
.rsvp-success h3 { font-family: var(--font-serif); color: var(--text); }

/* ===== WISHES ===== */
.wishes-wrap { max-width: 500px; margin: 0 auto; }
.wishes-wrap form { background: var(--gray); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.wishes-list { display: flex; flex-direction: column; gap: 0.8rem; }
.wish-item { background: var(--gray); border-radius: 12px; padding: 1.2rem; border-left: 3px solid var(--green); }
.wish-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.wish-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
.wish-name { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.wish-time { font-size: 0.68rem; color: var(--text-light); }
.wish-text { font-size: 0.84rem; color: var(--text-light); line-height: 1.5; }

/* ===== TURUT MENGUNDANG ===== */
.turut-section { text-align: center; }
.turut-wrap { max-width: 400px; margin: 0 auto; }
.turut-name {
  font-family: var(--font-serif); font-size: 1.05rem;
  color: var(--text); padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.turut-name:last-child { border-bottom: none; }

/* ===== CLOSING ===== */
.closing-section { text-align: center; padding: 4rem 2rem; background: var(--cream); }
.closing-arabic { font-size: 1rem; color: var(--green); margin-bottom: 1.2rem; }
.closing-content h2 { font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 3rem); color: var(--text); margin-bottom: 0.4rem; font-weight: 400; }
.closing-date { letter-spacing: 0.3em; color: var(--green); font-size: 0.82rem; margin-bottom: 1.5rem; }
.closing-msg { color: var(--text-light); line-height: 1.8; max-width: 400px; margin: 0 auto 1rem; font-size: 0.88rem; }
.closing-thanks { font-family: var(--font-serif); font-style: italic; color: var(--green); font-size: 1rem; }

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 1.5rem; color: var(--text-light); font-size: 0.75rem; }

/* ===== FLOATING NAV (Tab bar like mer.id) ===== */
.floating-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  z-index: 999; display: flex; gap: 0; background: var(--green);
  padding: 0.6rem 0; border-radius: 16px 16px 0 0; width: 100%; max-width: 420px;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.floating-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  color: rgba(255,255,255,0.7); font-size: 1rem; transition: var(--transition);
  padding: 0.3rem 0.8rem; border-radius: 8px;
}
.floating-nav a:hover { color: white; background: rgba(255,255,255,0.1); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green); color: white; padding: 0.8rem 1.5rem;
  border-radius: 10px; font-size: 0.82rem; z-index: 9999;
  opacity: 0; transition: all 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== AOS ===== */
[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
[data-aos="fade-right"] { transform: translateX(-20px); }
[data-aos="fade-left"] { transform: translateX(20px); }
[data-aos].aos-animate { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-item { padding: 0.8rem 1rem; min-width: 60px; }
  .cd-item span { font-size: 1.6rem; }
  .section { padding: 3rem 1.2rem; }
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); max-width: 500px; }
  .couple-wrap { flex-direction: row; justify-content: center; gap: 3rem; }
  .couple-divider { display: block; }
  .event-wrap { flex-direction: row; justify-content: center; }
}
