/* ================================================= */
/* 1. VARIABLES & GLOBAL STYLES                     */
/* ================================================= */

:root {
  /* Font Variables */
  --font-heading: "Luxurious Script", cursive;
  --font-body: "Quicksand", sans-serif;
  
  /* Color Palette (Max 4 Warna Utama) */
  --color-bg: #f9f6f2; /* Creamy White */
  --color-text: #4a3f35; /* Dark Chocolate */
  --color-primary: #d4af37; /* Gold */
  --color-dark: #694b3a; /* Deep Brown/Coffee */
  
  /* Utility */
  --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 15px;
  --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Container & Section Styles */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 2rem 0;
  text-align: center;
}

/* ================================================= */
/* 2. TYPOGRAPHY                                   */
/* ================================================= */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
}

h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--color-dark);
}

h2 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  color: var(--color-dark);
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 2px;
  background-color: var(--color-primary);
}

h3 {
  font-size: 2.5rem;
  color: var(--color-dark);
}

p {
  font-size: 1rem;
}

.text {
  max-width: 700px;
  margin: 1.5rem auto;
  font-style: italic;
  text-align: center;
}

/* ================================================= */
/* 3. COVER SECTION                                 */
/* ================================================= */

.cover-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

.cover-container.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none; /* Menambahkan ini untuk memastikan elemen tidak bisa diinteraksi */
}

#cover-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.cover-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  animation: ken-burns 20s infinite;
}

.cover-slide.active {
  opacity: 1;
}

.cover-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: 40px;
  max-width: 600px;
}

.cover-content p {
  color: #ffffff;
  font-size: 1.1rem;
}

.cover-content h1 {
  color: #ffffff;
  font-size: 4em;
  font-weight: 500;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

@keyframes ken-burns {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.sapaan-pembuka {
  font-size: 1.1em;
  margin-top: 40px;
}

.guest-container {
  margin: 20px 0;
}

.guest-name {
  font-size: 1.5em;
  margin: 10px 0 30px;
  font-weight: 600;
}

.btn-open {
  display: inline-block;
  padding: 14px 35px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.btn-open:hover {
  background-color: var(--color-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ================================================= */
/* 4. MAIN CONTENT                                  */
/* ================================================= */

.main-content {
  padding-top: 0;
}

/* Header Section */
header {
  text-align: center;
  padding: 0;
}

.separator-slideshow-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.separator-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.separator-slide.active {
  opacity: 1;
}

/* ================================================= */
/* 5. PARENT NAMES                                  */
/* ================================================= */

.parent-names {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}
.person-details {
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
}
.person-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background-color: #e0e0e0;
  background-size: cover;
  background-position: center;
  border: 6px solid #ffffff;
  box-shadow: var(--shadow-medium);
}

.ampersand {
  font-size: 4rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
}

/* ================================================= */
/* 6. EVENT DETAILS                                 */
/* ================================================= */

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.event h3 {
  color: var(--color-dark);
  margin-bottom: 2rem;
  position: relative;
}

.event h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: #e9c766;
}

/* ================================================= */
/* 7. COUNTDOWN                                     */
/* ================================================= */

.countdown-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 600px;
  margin: 2rem auto 0;
}

.timer-box {
  background-color: var(--color-dark);
  color: #ffffff;
  padding: 1.5rem 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.timer-box span {
  font-size: 3em;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.timer-box p {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ================================================= */
/* 8. LOCATION                                      */
/* ================================================= */

.location {
  margin: 60px 0;
  text-align: center;
}

.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  margin: 30px 0;
  padding: 30px;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

.btn-maps {
  display: inline-block;
  padding: 15px 40px;
  background: #e9c766;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-maps:hover {
  background: #693d2c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* ================================================= */
/* 9. LOVE STORY                                    */
/* ================================================= */

.love-story {
  margin: 60px 0;
  text-align: center;
}

.timeline-content {
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 40px;
  max-width: 600px;
  margin: 2rem auto;
}

.timeline-content h3 {
  font-family: 'Quicksand';
  line-height: 1;
  margin: 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.timeline-date {
  color: #e9c766;
}

.timeline-content p {
  font-size: 1rem;
  font-style: italic;
  color: #666;
}

/* ================================================= */
/* 10. GALLERY                                       */
/* ================================================= */

.gallery {
  text-align: center;
  margin: 60px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ================================================= */
/* 11. GIFTS                                         */
/* ================================================= */

.gifts {
  background: #ffffff;
  padding: 60px 40px;
  border-radius: var(--border-radius);
  margin: 60px 0;
  box-shadow: var(--shadow-medium);
  text-align: center;
}

.gifts-container {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  padding: 1rem;
  gap: 1rem;
}

.gift-item {
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 10px;
}

button.btn-copy {
  padding: 10px 20px;
  border: none;
  margin: 1rem;
  background: #e9c766;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  transition: var(--transition);
}

button.btn-copy:hover {
  background: #693d2c;
}

/* ================================================= */
/* 12. RSVP FORM                                    */
/* ================================================= */

.rsvp {
  background-color: var(--color-dark);
  color: #ffffff;
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
}

.rsvp h2, .rsvp h2::after {
  color: #ffffff;
  border-color: var(--color-primary);
}

#rsvp-form {
  max-width: 600px;
  margin: 2rem auto 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 1em;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px var(--color-primary);
}

option {
  background: #e9c766;
  color: #693d2c;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 15px;
  background: #e9c766;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 20px;
}

.btn-submit:hover {
  background: #693d2c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.form-status-message {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition);
}

.form-status-message.show {
  opacity: 1;
  transform: translateY(0);
}

.form-status-message.success {
  background: #d4edda;
  color: #155724;
}

.form-status-message.error {
  background: #f8d7da;
  color: #721c24;
}

/* ================================================= */
/* 13. WISHES                                        */
/* ================================================= */

.wishes-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 15px;
}

.wish-item {
  position: relative;
  background: #f8f5f2;
  border-radius: 10px;
  padding: 60px 40px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.wish-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.wish-item:last-child {
  margin-bottom: 0;
}

.wish-item strong {
  font-weight: bold;
  color: #2c3e50;
  display: block;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.wish-item p {
  margin: 0;
  font-size: 1em;
  color: #4a4a4a;
  line-height: 1.5;
  white-space: pre-wrap;
}

.btn-delete-rsvp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e9c766;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  z-index: 10;
}

.btn-delete-rsvp:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ================================================= */
/* 14. ANIMATIONS                                    */
/* ================================================= */
/* CSS untuk animasi fade-in */
.fade-in-section {
    /* Awalnya elemen terlihat */
    opacity: 1;
    transform: translateY(0);
    /* Tidak perlu transisi di sini */
}

/* State awal animasi (akan ditambahkan via JS) */
.fade-in-section.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* State akhir animasi (akan ditambahkan via JS) */
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================= */
/* 15. LIGHTBOX                                      */
/* ================================================= */

.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.custom-lightbox.show {
  opacity: 1;
  visibility: visible;
}

.custom-lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2em;
  cursor: pointer;
  transition: var(--transition);
  font-family: cursive;
}

.lightbox-close {
  top: 15px;
  right: 25px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 15px;
}

.lightbox-next {
  right: 15px;
}

/* ================================================= */
/* 16. MUSIC CONTROL                                 */
/* ================================================= */

.music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  border-radius: 50%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.music-control.playing {
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================================================= */
/* 17. RESPONSIVE DESIGN                            */
/* ================================================= */

@media (max-width: 768px) {
  .parent-names {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .ampersand {
    margin:0;
    text-align: center;
  }
  
  .countdown-timer {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .timer-box span {
    font-size: 2em;
  }
  
  .timeline-content {
    padding: 25px;
  }
  
  .wish-item {
    padding: 40px 25px;
  }
}