/* ROOT VARIABLES */
:root {
  --primary-color: #c89d67;
  --primary-hover: #b38853;
  --secondary-color: #8c6d46;
  --bg-light: #faf7f2;
  --bg-card: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --border-color: #e2d7c7;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --font-heading: 'Great Vibes', cursive;
  --font-body: 'Montserrat', sans-serif;
  --font-accent: 'Cinzel', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* TYPOGRAPHY & BUTTONS */
h1, h2, h3 { color: var(--secondary-color); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-family: var(--font-accent); font-size: 2.2rem; letter-spacing: 2px; text-transform: uppercase; }
.section-title p { font-size: 1rem; color: var(--primary-color); font-style: italic; margin-top: 5px; }

.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 30px; font-weight: 500; cursor: pointer;
  transition: all 0.3s ease; text-decoration: none; font-size: 0.95rem; border: none;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: #fff; box-shadow: 0 4px 15px rgba(200, 157, 103, 0.4); }
.btn-primary:hover { opacity: 0.95; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary-color); color: var(--secondary-color); }
.btn-outline:hover { background: var(--primary-color); color: #fff; }

/* MUSIC PLAYER */
.music-player { position: fixed; bottom: 25px; right: 25px; z-index: 999; }
.music-btn {
  width: 50px; height: 50px; border-radius: 50%; background: var(--primary-color);
  color: white; border: none; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.music-btn.playing { animation: rotateMusic 4s linear infinite; }
@keyframes rotateMusic { 100% { transform: rotate(360deg); } }

/* HERO */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 40px 20px;
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before {
  inset: -8px;
  background: url('../images/gallery/album-1.JPG') center/cover no-repeat;
  filter: blur(5px);
}
.hero::after { background: rgba(39, 31, 27, 0.48); }
.hero-content {
  max-width: 800px; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(8px);
  padding: 50px 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.3);
}
.hero-sub { font-family: var(--font-accent); letter-spacing: 4px; font-size: 1.1rem; text-transform: uppercase; }
.hero-title { display: flex; align-items: center; justify-content: center; gap: 0.2em; font-family: var(--font-heading); font-size: 4.5rem; margin: 15px 0; color: #ffffff; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-ampersand { flex: 0 0 auto; font-size: 0.78em; }
.hero-date { font-size: 1.2rem; letter-spacing: 2px; margin-bottom: 25px; }

/* COUNTDOWN */
.countdown { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }
.time-box { background: rgba(255,255,255,0.9); color: var(--secondary-color); padding: 12px 18px; border-radius: 12px; min-width: 70px; }
.time-box span { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.time-box label { font-size: 0.75rem; text-transform: uppercase; margin-top: 4px; display: block; }

/* COUPLE */
.couple-section { padding: 80px 0; background: #fff; }
.couple-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.couple-card { text-align: center; padding: 30px; border-radius: 16px; background: var(--bg-light); border: 1px solid var(--border-color); }
.couple-avatar { display: block; width: 180px; height: 180px; object-fit: cover; object-position: center 25%; border-radius: 50%; background: #fff; border: 5px solid #fff; box-shadow: var(--shadow); margin: 0 auto 20px; }
.couple-role { font-family: var(--font-accent); color: var(--primary-color); font-size: 0.9rem; letter-spacing: 2px; }
.couple-name { font-family: var(--font-heading); font-size: 2.8rem; margin: 5px 0 15px; }
.parents-info { font-size: 0.95rem; color: var(--text-muted); border-top: 1px dashed var(--border-color); padding-top: 15px; }

/* STORY */
.story-section { padding: 80px 0; }
.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline-item { display: flex; align-items: center; gap: 28px; width: 90%; margin: 0 auto 36px 0; padding: 16px; background: #fff; border: 1px solid var(--border-color); border-radius: 18px; box-shadow: var(--shadow); }
.timeline-item:nth-child(even) { flex-direction: row-reverse; margin: 0 0 36px auto; }
.timeline-img { display: block; width: 44%; height: 340px; flex: 0 0 44%; object-fit: contain; background: var(--bg-light); border-radius: 12px; }
.timeline-content { flex: 1; padding: 24px; }
.timeline-year { display: inline-block; background: var(--primary-color); color: white; padding: 2px 12px; border-radius: 12px; font-size: 0.85rem; margin-bottom: 10px; }

/* SCHEDULE */
.schedule-section { padding: 80px 0; background: #fff; }
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.schedule-card { border: 1px solid var(--border-color); padding: 35px 25px; border-radius: 16px; text-align: center; background: var(--bg-light); }
.schedule-title { font-family: var(--font-accent); font-size: 1.2rem; color: var(--secondary-color); margin-bottom: 15px; }
.schedule-date-solar { font-size: 1.4rem; font-weight: 700; color: var(--primary-color); }
.schedule-date-lunar { font-style: italic; color: var(--text-muted); margin-bottom: 15px; font-size: 0.9rem; }

/* GALLERY */
.gallery-section { padding: 80px 0; }
.gallery-filter { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border-color); background: white; cursor: pointer; transition: all 0.3s ease; }
.filter-btn.active, .filter-btn:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; height: 260px; cursor: pointer; box-shadow: var(--shadow); background: #fff; }
.gallery-item img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.02); }
.gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white; padding: 15px; opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* RSVP */
.rsvp-section { padding: 80px 0; background: #fff; }
.rsvp-box { max-width: 600px; margin: 0 auto; background: var(--bg-light); padding: 40px; border-radius: 16px; border: 1px solid var(--border-color); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-control { width: 100%; padding: 12px 15px; border-radius: 8px; border: 1px solid #ccc; font-family: inherit; font-size: 0.95rem; }

/* GIFT */
.gift-section { padding: 80px 0; text-align: center; }
.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 700px; margin: 0 auto; }
.gift-card { background: white; padding: 25px; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow); }
.qr-code { width: 180px; height: 180px; margin: 15px 0; border-radius: 8px; object-fit: cover; }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000; display: none; align-items: center; justify-content: center; flex-direction: column; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90%; max-height: 80vh; border-radius: 8px; }
.lightbox-caption { color: white; margin-top: 15px; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; }
.lightbox-close { top: 20px; right: 25px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 768px) {
  .container { padding-right: 16px; padding-left: 16px; }
  .hero { min-height: 100vh; min-height: 100svh; padding: 28px 16px; }
  .hero-content { width: 100%; padding: 38px 22px; }
  .hero-title { font-size: clamp(1.8rem, 7.5vw, 3.6rem); }
  .hero-sub { font-size: 0.9rem; letter-spacing: 3px; }
  .hero-date { font-size: 1rem; }
  .countdown { gap: 10px; }
  .time-box { min-width: 62px; padding: 10px 12px; }
  .time-box span { font-size: 1.3rem; }
  .time-box label { font-size: 0.65rem; }
  .couple-section, .story-section, .schedule-section, .gallery-section,
  .rsvp-section, .gift-section { padding: 60px 0; }
  .couple-grid, .schedule-grid, .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .couple-avatar { width: 160px; height: 160px; }
  .section-title { margin-bottom: 30px; padding: 0 8px; }
  .section-title h2 { font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: 1px; }
  .section-title p { font-size: 0.95rem; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: row; width: 94%; gap: 8px; margin: 0 auto 18px 0; padding: 8px; }
  .timeline-item:nth-child(even) { flex-direction: row-reverse; margin: 0 0 18px auto; }
  .timeline-img { width: 40%; height: auto; max-height: none; aspect-ratio: 3 / 4; flex: 0 0 40%; }
  .timeline-content { width: auto; min-width: 0; padding: 8px 4px; overflow-wrap: anywhere; }
  .timeline-content h3 { font-size: 0.95rem; }
  .timeline-content p { font-size: 0.8rem; line-height: 1.45; }
  .timeline-year { font-size: 0.75rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery-item { height: clamp(180px, 34vw, 260px); }
  .rsvp-box { padding: 28px 20px; }
  .gift-card { padding: 22px 18px; }
  .music-player { right: 16px; bottom: 16px; }
  .music-btn { width: 46px; height: 46px; }
  .lightbox-img { max-width: 92%; max-height: 75vh; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 480px) {
  .hero-content { padding: 32px 16px; }
  .hero-title { flex-direction: row; gap: 0.22em; font-size: clamp(1.3rem, 8vw, 2.4rem); line-height: 1.1; white-space: nowrap; }
  .hero-ampersand { margin: 0; font-size: 0.72em; }
  .countdown { gap: 7px; }
  .time-box { min-width: 0; flex: 1; padding: 9px 5px; }
  .time-box span { font-size: 1.15rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery-item { height: clamp(150px, 48vw, 220px); }
  .filter-btn { padding: 8px 14px; }
  .couple-card { padding: 18px 10px; }
  .couple-avatar { width: min(100%, 150px); height: auto; aspect-ratio: 1; }
  .couple-name { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .parents-info { font-size: clamp(0.48rem, 2.5vw, 0.65rem); letter-spacing: -0.04em; white-space: nowrap; }
  .schedule-card { padding: 22px 12px; overflow-wrap: anywhere; }
  .schedule-title { font-size: 1rem; }
  .gift-card { padding: 18px 10px; overflow-wrap: anywhere; }
  .gift-card h3 { font-size: 0.95rem; }
  .qr-code { width: min(180px, 100%); height: auto; aspect-ratio: 1; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: row; width: 94%; gap: 8px; margin: 0 auto 18px 0; padding: 8px; }
  .timeline-item:nth-child(even) { flex-direction: row-reverse; margin: 0 0 18px auto; }
  .timeline-img { width: 40%; height: auto; max-height: none; aspect-ratio: 3 / 4; flex: 0 0 40%; }
  .timeline-content { width: auto; min-width: 0; padding: 8px 4px; overflow-wrap: anywhere; }
  .timeline-content h3 { font-size: 0.95rem; }
  .timeline-content p { font-size: 0.8rem; line-height: 1.45; }
  .timeline-year { font-size: 0.75rem; }
  .lightbox-prev, .lightbox-next { font-size: 1.6rem; }
}
