:root {
  --primary: #D4AF37;
  --secondary: #F9F6F0;
  --dark: #1A1A1A;
  --light: #FFFFFF;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #fff8f3 0%, #fbeee6 100%);
  font-family: 'Montserrat', Arial, sans-serif;
  color: #b48a78;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 1rem;
}

/* Navigation */
nav {
  background: rgba(255, 248, 243, 0.95);
  box-shadow: 0 2px 16px #e9b38422;
  border-radius: 0 0 1.5rem 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.2rem 0 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: box-shadow 0.2s;
}

nav.scrolled {
  box-shadow: 0 4px 24px #e9b38433;
  background: #fff8f3ee;
}

nav a {
  color: #b48a78;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.08rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.8rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav a:hover, nav a:focus {
  box-shadow: 0 2px 12px #e9b38433;
  background: linear-gradient(90deg, #e9b384 60%, #b48a78 100%);
  color: #fff;
}

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem 1rem;
  background: linear-gradient(120deg, #fff8f3 60%, #fbeee6 100%);
  border-radius: 0 0 2rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

header h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3.2rem;
  color: #b48a78;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 1.2rem;
  color: #b48a78;
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4.5rem 1rem 2.5rem 1rem;
  border-radius: 0 0 2.5rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(180,138,120,0.07);
  animation: fadeInUp 1s both;
}

.hero-flower-top,
.hero-flower-bottom {
  width: 100%;
  height: 60px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.8;
}

.hero-flower-top {
  background-image: url('images/flower-top.svg');
  margin-bottom: -30px;
}

.hero-flower-bottom {
  background-image: url('images/flower-bottom.svg');
  margin-top: -30px;
}

.hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: 3.5rem;
  color: #b48a78;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 12px #fbeee6;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero-nama {
  display: inline-block;
  padding: 0 0.2em;
}

.and {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  color: #e9b384;
  margin: 0 0.5rem;
  vertical-align: middle;
  font-weight: bold;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1.25rem;
  color: #b48a78;
  margin-top: 0.7rem;
  letter-spacing: 1px;
  font-weight: 500;
  text-shadow: 0 1px 8px #fff8f3;
}

/* Sections */
section {
  max-width: 700px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 2px 16px rgba(180,138,120,0.07);
  padding: 2rem 1.5rem;
  margin-bottom: 2.5rem;
}

section, .card, .gallery-item, .gift-card, .overlay-card-genz {
  box-shadow: 0 6px 32px rgba(233,179,132,0.13);
  border-radius: 1.5rem;
}

section h2 {
  font-family: 'Great Vibes', cursive;
  color: #b48a78;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-align: center;
}

section h2, .section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.3em;
}
section h2::after, .section-header h2::after {
  content: "";
  display: block;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg,#e9b384 60%,#b48a78 100%);
  border-radius: 2px;
  margin: 0.4em auto 0 auto;
  opacity: 0.5;
}

/* Story Section */
#story p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.8;
}

.story-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(180,138,120,0.05);
  flex-wrap: wrap;
}

.story-card-genz {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  background: #fff8f3;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px #e9b38422;
  padding: 2.2rem 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  justify-content: center;
}

.story-card-genz {
  background: rgba(255,248,243,0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid #e9b38433;
}

.story-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.story-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px #e9b38433;
  border: 3px solid #e9b38433;
  background: #fff;
}

.story-img-caption {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: #6d4c41; /* Warna coklat gelap, rasio kontras tinggi terhadap #fff9f5 */
  font-weight: 600;
  margin-top: 0.3rem;
  letter-spacing: 0.5px;
}

.profession-caption {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: #5d3a2e;
  margin-top: -10px;
}

.story-text {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 400px;
  align-self: center;
}

.tiktok-live-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.tiktok-embed {
  width: 100% !important;
  max-width: 360px !important;
  min-width: 220px !important;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px #e9b38433;
  background: #fff;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(180,138,120,0.08);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 1rem;
  width: 100%;
  max-width: 560px;
  height: 315px;
  margin: 0 auto;
  display: block;
  background: #fff;
  box-shadow: 0 2px 12px #e9b38433;
}

/* Video Section */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 16:9 Aspect Ratio for landscape videos */
    background: var(--secondary);
    border-radius: 1.2rem;
    overflow: hidden;
}

.video-container iframe,
.video-container .tiktok-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    background: #fff;
}

/* Portrait Mode for Mobile */
@media (max-width: 767.98px) {
    .video-container {
        padding-top: 177.78%; /* Keep 16:9 on mobile */
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .video-container {
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
    }
}

/* Video Wrapper Shadows */
.video-container iframe,
.video-container .tiktok-embed {
    box-shadow: 0 4px 24px rgba(233,179,132,0.15);
}

/* Gift Section */
.gift {
  text-align: center;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.gift-card {
  background: #fff8f3;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px #e9b38422;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.gift-card i {
  font-size: 2rem;
  color: #b48a78;
  margin-bottom: 0.5rem;
}

#accNumber {
  font-weight: bold;
  color: #b48a78;
  letter-spacing: 1px;
}

#copyBtn {
  background: #e9b384;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.4rem 1.2rem;
  margin-left: 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
  margin-top: 0.7rem;
}

#copyBtn:hover {
  background: #b48a78;
}

.gift-note {
  display: block;
  margin-top: 1rem;
  color: #b48a78;
  font-size: 1rem;
  text-align: center;
}

/* RSVP Form */
.rsvp {
  max-width: 600px;
  margin: 0 auto;
}

.rsvp form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: center;
}

.rsvp input, .rsvp select, .rsvp textarea {
  width: 90%;
  max-width: 350px;
  padding: 0.7rem 1rem;
  border: 1px solid #e9b384;
  border-radius: 0.7rem;
  font-size: 1rem;
  background: #f8fafc;
  transition: border 0.2s;
}

.rsvp input:focus, .rsvp select:focus, .rsvp textarea:focus {
  border: 1.5px solid #b48a78;
  outline: none;
}

.rsvp button[type="submit"] {
  background: linear-gradient(90deg, #e9b384 60%, #b48a78 100%);
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.7rem 2.2rem;
  font-size: 1.1rem;
  font-family: var(--font-body), sans-serif;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(180,138,120,0.08);
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rsvp button[type="submit"]:hover {
  background: linear-gradient(90deg, #b48a78 60%, #e9b384 100%);
  transform: scale(1.04);
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1.3rem;
  margin: 2.5rem 0 1.5rem 0;
  color: #b48a78;
  font-family: var(--font-body), sans-serif;
}

.countdown div {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(180,138,120,0.07);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 70px;
  animation: fadeInUp 1s both;
}

.countdown span {
  font-size: 2.2rem;
  font-weight: bold;
  display: block;
  color: #e9b384;
}

/* Success/Error Messages */
#rsvpMessage {
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#rsvpMessage.show {
  opacity: 1;
}

#rsvpMessage.success {
  background: #d4edda;
  color: #155724;
}

#rsvpMessage.error {
  background: #f8d7da;
  color: #721c24;
}

/* Location Section - Estetik & Elegan */
#location {
  background: linear-gradient(120deg, #fff8f3 60%, #fbeee6 100%);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(180,138,120,0.10);
  padding-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s both;
}

#location h2 {
  font-family: 'Great Vibes', cursive;
  color: #b48a78;
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 12px #fbeee6;
}

.location-text {
  color: #b48a78;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  text-align: center;
  font-style: italic;
  letter-spacing: 0.5px;
  animation: fadeInUp 1.2s both;
}

.map-container {
  width: 100%;
  height: 400px;
  margin: 20px 0;
  border-radius: 1.2rem;
  box-shadow: 0 4px 24px rgba(180,138,120,0.13);
  overflow: hidden;
  position: relative;
  animation: zoomIn 1.2s both;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 1.2rem;
  filter: grayscale(0.08) brightness(0.98) drop-shadow(0 2px 12px #e9b38433);
  transition: filter 0.3s;
}

.map-container:hover iframe {
  filter: grayscale(0) brightness(1) drop-shadow(0 4px 24px #e9b38455);
}

.btn-wrap {
  text-align: center;
  margin-top: 1.2rem;
  animation: fadeInUp 1.4s both;
}

.btn-map {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1.08rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: 0.5px;
  border: none;
  outline: none;
}

/* Overlay effect for all buttons */
button,
.btn-map,
#open-invitation-btn {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
  box-shadow: 0 2px 12px #e9b38433;
  z-index: 1;
}

button::after,
.btn-map::after,
#open-invitation-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(233,179,132,0.18);
  border-radius: 100%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(.4,0,.2,1), height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
  opacity: 0.7;
  z-index: -1;
}

button:active::after,
.btn-map:active::after,
#open-invitation-btn:active::after {
  width: 220%;
  height: 500%;
  opacity: 0;
  transition: 0s;
}

/* Hover effect for all buttons */
button:hover,
.btn-map:hover,
#open-invitation-btn:hover {
  box-shadow: 0 6px 24px #e9b38455;
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(90deg, #b48a78 60%, #e9b384 100%);
  color: #fff;
}

/* Gen Z, elegan, responsif, estetik */
.overlay-genz {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(255,248,243,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.4s;
  animation: fadeInDown 0.7s;
}

.overlay-card-genz {
  background: rgba(255,248,243,0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid #e9b38433;
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 90vw;
  animation: fadeInDown 1s;
}

.overlay-card-genz h2 {
  font-family: 'Great Vibes', cursive;
  color: #4e2a2a;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1.5px;
}

.overlay-card-genz p {
  font-size: 1.15rem;
  color: #b48a78;
  margin-bottom: 1.5rem;
}

#guest-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e9b384;
  display: inline-block;
  margin-top: 0.3rem;
}

.btn-genz, .btn-map, #open-invitation-btn, .btn-music-genz {
  border: none;
  border-radius: 1.2rem;
  padding: 0.9rem 2.7rem;
  font-size: 1.13rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px #e9b38433;
  background: linear-gradient(90deg,#e9b384 60%,#b48a78 100%);
  color: #fff;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-genz:active::after, .btn-map:active::after, #open-invitation-btn:active::after, .btn-music-genz:active::after {
  width: 220%;
  height: 500%;
  opacity: 0;
  transition: 0s;
}

.btn-genz:hover, .btn-map:hover, #open-invitation-btn:hover, .btn-music-genz:hover {
  box-shadow: 0 6px 24px #e9b38455;
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(90deg, #b48a78 60%, #e9b384 100%);
  color: #fff;
}

.btn-music-genz {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: #fff8f3;
  border-radius: 50%;
  padding: 14px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-music-genz i {
  color: #b48a78;
  font-size: 1.3rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px);}
  to { opacity: 1; transform: translateY(0);}
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92);}
  to { opacity: 1; transform: scale(1);}
}

/* Footer */
.footer {
  background: #fff8f3;
  padding: 2rem 0 1rem 0;
  text-align: center;
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0 -2px 16px #e9b38422;
}

.footer-flower {
  width: 100%;
  height: 40px;
  background: url('images/flower-footer.svg') center no-repeat;
  background-size: contain;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.footer-text small {
  display: block;
  color: #b48a78;
  font-size: 0.98em;
  margin-top: 0.3em;
  letter-spacing: 0.2px;
}

/* Responsive Design */
@media (max-width: 900px) {
  .gallery-item img { width: 140px; height: 140px; }
  .story-card-genz { flex-direction: column; gap: 1.2rem; padding: 1.2rem; }
  .story-img { width: 110px; height: 110px; }
  .video-wrapper iframe { max-width: 98vw; height: 45vw; min-height: 180px; }
  .tiktok-embed { max-width: 98vw !important; }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem;
    gap: 1rem;
  }
  nav a {
    font-size: 0.8rem;
  }
  header h1 {
    font-size: 3rem;
  }
  section {
    padding: 4rem 1rem;
  }
  .countdown {
    gap: 0.5rem;
  }
  .countdown div {
    min-width: 60px;
  }
  .countdown span {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2.1rem; }
  .subtitle { font-size: 1.05rem; }
  nav { gap: 0.3rem; font-size: 0.95rem; }
  .gallery { gap: 0.5rem; }
  .gallery-item img { width: 98vw; height: 38vw; min-width: 120px; min-height: 80px; }
  .map-container { height: 220px; }
  .footer-flower { height: 24px; }
  .video-wrapper iframe { height: 42vw; min-height: 160px; }
  .tiktok-embed { min-width: 98vw !important; }
  .story-img { width: 90px; height: 90px; }
  .story-text { max-width: 98vw; }
  section {
    padding: 2.2rem 0.5rem;
    margin-bottom: 1.2rem;
  }
  .gift-card, .story-card-genz {
    padding: 1.2rem 0.5rem;
  }
}

.gallery-item {
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 36px #e9b38444;
  z-index: 2;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* Perbaiki kontras warna agar memenuhi standar WCAG 2 AA (rasio minimal 4.5:1) */

/* Untuk .story-img-caption dan .story-text, gunakan warna lebih gelap */
.story-img-caption,
.story-text > p,
.story-text > p > i {
  color: #6d4c41; /* Warna coklat gelap, rasio kontras tinggi terhadap #fff9f5 */
}

/* Jika background section/about berbeda, pastikan background tetap terang */
.about.section,
.story-card-genz {
  background: #fff9f5;
}

/* Untuk judul section */
.section-title.container.aos-animate > h2,
.section-header h2,
.section-title h2 {
  color: #6d4c41; /* Coklat gelap, kontras tinggi terhadap #fff9f5 */
}

/* Untuk teks italic pada card acara */
.card-body.text-center > .fst-italic,
.card-body.text-center > .fst-italic > span {
  color: #5d3a2e;
}

.footer-text,
.footer-text a,
.footer-text b,
.footer-text small {
  color: #6d4c41;
}

.overlay-card-genz p {
  color: #6d4c41;
}

#guest-name {
  color: #a0527a;
}

.gift-card p,
#accNumber,
.gift-note {
  color: #6d4c41;
}

#copyBtn {
  background: #8c4f6a;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.4rem 1.2rem;
  margin-left: 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
  margin-top: 0.7rem;
}

#copyBtn:hover {
  background: #a0527a;
}

/* Modal Gallery */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1000;
  padding-top: 100px; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%; 
  overflow: auto; 
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

.modal-content {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.gallery-item img {
  cursor: pointer;
}

/* Invite Friend Modal */
.modal-content-invite {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 1.5rem;
  text-align: center;
  position: relative;
}

.close-invite {
  position: absolute;
  top: 10px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
}

.close-invite:hover,
.close-invite:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#inviteForm input {
  width: 90%;
  max-width: 350px;
  padding: 0.7rem 1rem;
  border: 1px solid #e9b384;
  border-radius: 0.7rem;
  font-size: 1rem;
  background: #f8fafc;
  transition: border 0.2s;
}