body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(to bottom, #fff0f5, #ffe4e1);
  color: #4a2c2c;
  line-height: 1.6;
}

.hero {
  text-align: center;
  padding: 120px 20px 80px;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/hero-photo.jpg') center/cover no-repeat;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  margin: 0;
  letter-spacing: 2px;
}

.subtitle { font-size: 1.4rem; margin: 20px 0; }

.music-btn {
  background: #ff69b4;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.music-btn:hover { transform: scale(1.1); background: #ff1493; }

.timeline {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 6px;
  background: #ff69b4;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 3px;
  z-index: 0;
}

/* Base memory card: Stack everything vertically (date on top) */
.memory {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 120px 0; /* Extra margin for breathing room around cards */
  position: relative;
  gap: 15px; /* Space between date and image/content */
  text-align: center;
}

.memory:nth-child(even) {
  flex-direction: column; /* No reverse needed in column mode */
}

.date {
  background: #ff69b4;
  color: white;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(255,105,180,0.3);
  z-index: 2;
  position: relative; /* Not absolute by default */
  margin-bottom: 10px;
}

/* Desktop/tablet: Side-by-side image + content, date above the pair */
@media (min-width: 769px) {
  .memory {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    text-align: left;
  }

  .memory:nth-child(even) {
    flex-direction: row-reverse;
  }

  /* Position date above the card, centered on timeline */
  .date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -40px; /* Adjust this number if date is too high/low: -30px to -50px */
    margin: 0;
  }

  img, .content {
    width: 45%;
  }

  .content {
    padding: 40px 35px; /* More padding to prevent any edge overlap */
  }
}

/* Mobile: Keep stacked (date top, then image, then content) */
@media (max-width: 768px) {
  .memory {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  img, .content {
    width: 100%;
  }

  .content {
    padding: 30px 25px;
  }

  .date {
    position: relative; /* Stays on top naturally */
  }
}

img, video {
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  transition: transform 0.4s;
}

img:hover, video:hover { transform: scale(1.03); }

.content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}

.final {
  text-align: center;
  font-size: 1.4rem;
  padding: 60px 20px;
  background: white;
  margin: 80px auto;
  max-width: 700px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255,105,180,0.2);
}

.signature {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-top: 20px;
  color: #ff69b4;
}
