/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:wght@300;400;500&display=swap');

:root {
    /* Font Families */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;

    /* WARNA CERIA UNTUK ANAK-ANAK */
    --gate-color: #FF6B6B; /* Biru Langit */
    --gate-text-color: #ffffff;
    --primary-color: #FF6B6B; /* Coral Kemerahan */
    --secondary-color: #FFD166; /* Kuning Matahari */
    --background-color: #F7F7F7; /* Putih Gading */
    --text-color: #4A4A4A;
    --light-text: #ffffff;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- HALAMAN PEMBUKA BARU - GAYA KARTU UNDANGAN --- */
#opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    overflow: hidden; /* Pastikan pintu tidak menyebabkan scroll */
    display: flex;
    justify-content: center;
    align-items: center;
}

.opening-gate {
    position: absolute;
    top: 0;
    width: 50.5%; /* Sedikit overlap untuk menutupi celah */
    height: 100%;
    background-color: var(--gate-color);
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1);
    /* Menambahkan shadow untuk efek 3D */
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

#left-gate {
    left: 0;
    transform-origin: left;
}

#right-gate {
    right: 0;
    transform-origin: right;
}

/* State setelah tombol di klik */
#opening.opened #left-gate {
    transform: translateX(-100%);
}
#opening.opened #right-gate {
    transform: translateX(100%);
}

.opening-content {
    position: relative;
    z-index: 101; /* Di atas pintu */
    text-align: center;
    color: var(--gate-text-color);
    padding: 2rem;
    transition: opacity 0.8s ease;
}
#opening.opened .opening-content {
    opacity: 0;
}

.opening-subtitle {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 300;
}

.opening-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin: 0.5rem 0;
    font-weight: 700;
}

.opening-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    margin: 0 0 2rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

@media (max-width: 600px) {
  .opening-subtitle {
    font-size: 1rem;
  }

  .opening-title {
    font-size: 1.5rem;
  }

  .opening-name {
    font-size: 2rem;
  }

  .cta-button {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }

  .opening-content {
    padding: 1.5rem;
  }
}


/* --- KONTEN UTAMA --- */
#invitation-content {
    /* akan diubah ke 'block' oleh JS */
}

/* --- HEADER UTAMA (HERO) --- */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Overlay sedikit lebih gelap untuk kontras teks yang lebih baik */
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 700;
    margin: 0;
    color: var(--light-text);
}

.profile-picture {
    margin: 2rem auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- JUDUL BAGIAN --- */
header p {
    font-size: 0.1rem;
    font-family: var(--font-heading);
    color: var(--light-text);
    margin-bottom: 0.5rem;
}
h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 7vw, 3rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
}

/* --- HITUNG MUNDUR --- */
.countdown {
    margin-top: 2rem;
}
.countdown ul {
  display: flex;
  justify-content: center;
  padding: 0;
  list-style: none;
  gap: 1rem;
  flex-wrap: wrap; /* Agar responsif di layar kecil */
}
.countdown li {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--light-text);
  font-weight: 300;
  background: rgba(0,0,0,0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}
.countdown span {
  display: block;
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

@media (max-width: 600px) {
  .hero {
    padding: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .profile-picture {
    width: 120px;
    height: 120px;
    margin: 1.5rem auto;
  }

  .countdown {
    margin-top: 1rem;
  }

  .countdown ul {
    gap: 0.5rem;
  }

  .countdown li {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .countdown span {
    font-size: 2rem;
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 1.5rem;
  }
}

/* --- BAGIAN UTAMA LAINNYA --- */
main section {
    padding: 5rem 2rem;
}
main section:nth-child(even) {
    background-color: #fff;
}
.details-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.detail-item h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* --- TOMBOL --- */
.cta-button, .map-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.cta-button {
    background-color: var(--primary-color);
    color: var(--light-text);
}
.cta-button:hover, .map-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.opening-content .cta-button {
    background-color: var(--gate-text-color);
    color: var(--gate-color);
    font-weight: 700;
}
.map-button {
    margin-top: 1rem;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

/* --- GALERI --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.gallery-grid img {
    width: 100%;
    height: 250px; /* Tinggi gambar sama */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* --- RSVP --- */
.rsvp-section {
    background-color: var(--primary-color);
    color: var(--light-text);
}
.rsvp-section h2, .rsvp-section p {
    text-align: center;
    color: var(--light-text);
}
#rsvp-form {
    max-width: 500px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#rsvp-form input, #rsvp-form select {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--background-color);
    color: var(--text-color);
}
#rsvp-form .cta-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-weight: 700;
}
.form-message {
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    min-height: 20px;
}

.footer {
  padding: 0.5rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1rem;
  font-family: sans-serif;
}

.footer a.wa-link {
  color: #25D366;
  font-weight: bold;
  text-decoration: none;
  margin-left: 0.3rem;
}

.footer a.wa-link:hover {
  text-decoration: underline;
  color: #1ebc57;
}