/* ================================
  Base elements
================================ */
body {
  margin: 0;
  padding: 0 20px;
  font-family:  "Bodoni Moda", serif;
  color: white;
  text-align: center;
  background: white;
}

h1 {
  font-family: "Bodoni Moda", serif;
  letter-spacing: 3px;
  font-size: 64px;
  font-weight: 100;
  color: #2A343D;
  white-space: normal;
}

p {
  font-family: "Bodoni Moda", serif;
  letter-spacing: 2px;
  font-size: 16px;
  color: #2A343D;
}

a {
  font-family: "Bodoni Moda", serif;
  letter-spacing: 3px;
  color: #2A343D;
  font-size: 16px;
  text-decoration: none;
}
  
footer {
  font-family: 'Monsieur La Doulaise', cursive;
  margin-top: 70px;
  margin-bottom: 60px;
  font-size: 48px;
  color: #4C555E;
  display: flex;
  flex-direction: column; 
  align-items: center;
}

/* ================================
  Reusable elements
================================ */
.height {
  height: 100vh;
}

.space {
  padding-left: 10px;
  padding-right: 10px;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap; /* lets content wrap when needed */
}

.div-item {
  min-width: 80px;
  color: #2A343D;
  font-family: "Monsieur La Doulaise", cursive;
  letter-spacing: 3px;
  font-size: 40px;
  justify-content: center;
}

.vertical-line {
  width: 1.5px;             
  height: 100px;
  background-color: #2A343D;
}

.horizontal-line {
  border: none;
  border-top: 1px solid #2A343D;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSubtle 1.5s ease-out forwards;
  animation-delay: 2.5s;
}

#scroll-up-link p {
  font-size: 18px;
}

/* ================================
  links
================================ */
.page-link {
  position: relative;
  display: inline-block;
  font-family: "Bodoni Moda", serif;
  font-size: 26px;
  letter-spacing: 3px;
  color: #2A343D;
  text-decoration: none;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* underline link */
.page-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 60%;
  height: 1px;
  background-color: #2A343D;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

.page-link:hover {
  transform: scale(1.05);
}

.page-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.web-link {
  text-decoration: none;
  color: #2A343D;
}

.web-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px; 
  color: #2A343D;
}

.highlight-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  color: #2A343D;
}

.info .registry-link {
  font-family: 'Monsieur La Doulaise', cursive;
  font-size: 34px;
  letter-spacing: 2px;
  color: #2A343D;
}

.button-link {
  display: inline-block;
  padding: 12px 36px;
  font-family: "Bodoni Moda", serif;
  font-size: 20px;
  letter-spacing: 3px;
  color: #2A343D;
  background-color: transparent;
  border: 1px solid #2A343D;
  border-radius: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 1rem;
}

.button-link:hover {
  color: white;
  background-color: #2A343D;
  transform: scale(1.03);
}

/* ================================
  Text
================================ */
.small-text {
  font-family:"Bodoni Moda", serif;
  font-size: 16px;
  font-weight: 100;
  padding-top: 10px;
  color: #4C555E;
  text-align: center;
}

.info {
  font-family: "Bodoni Moda", serif;
  font-size: 20px;
  font-weight: 100;
  margin: 20px;
  display: flex;
  justify-content: center;
  color: #2A343D;
}

.info h2 {
  font-family: "Bodoni Moda", serif;
  font-size: 30px;
  font-weight: 100;
  letter-spacing: 3px;
  margin-bottom: 2rem;
}

.info .fancy {
  font-family: 'Monsieur La Doulaise', cursive;
  font-size: 48px;
  margin-top: 0;
}

.info a {
  font-size: 20px;
  letter-spacing: 0;
  letter-spacing: 3px;
}

.underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

#initials {
  border-bottom: 1px solid #aaa;
  padding-top: 0 18px 16px;
  text-transform: none;
}

.title {
  display: inline-block;
  font-family: "Bodoni Moda", serif;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 20px;
  color: #2A343D;
  margin-top: 30px;
  opacity: 0;
  transform: scaleX(1.3) translateY(20px);
  transform-origin: center; /* ensures it expands evenly from the middle */
  animation: expandIn 2.5s ease-out forwards;
}

/* ================================
  Login elements
================================ */
#passwordInput {
  width: 100%;
  border: none;
  background: none;
  color: #2A343D;
  text-align: center;
  font-size: 18px;
  font-family: "Bodoni Moda", serif;
  letter-spacing: 5px;
  margin: 50px 0;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSubtle 1.5s ease-out forwards;
  animation-delay: 3s;
}

#passwordInput::placeholder {
  color: #2A343D;
  letter-spacing: 3px;
}

#passwordInput:focus {
  outline: none;
  color: #2A343D;
}

#error {
    opacity: 0;
    font-size: 14px;
    color: #2A343D;
}
.error-visible {
    opacity: 1 !important;
}

.shake {
  animation: shake 0.5s ease;
}

#enter-button {
  width: 100%;
  max-width: 200px;
  text-align: center;
  position: relative;
  border: none;
  font-family: "Monsieur La Doulaise", cursive;
  font-size: 42px;
  color: #2A343D;
  background: transparent;
  letter-spacing: 3px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSubtle 1.5s ease-out forwards; 
  animation-delay: 3.5s;
}

#enter-button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 60%;
  height: 1px;
  background-color: #2A343D;
  transition: transform 0.4s ease;
}

#enter-button:hover::after {
  transform: translateX(-50%) scaleX(1);
}

#loginForm {
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  gap: 30px;
  width: 100%;
}

/* ================================
  Home page elements
================================ */
#countdown {
  font-size: 40px;
  letter-spacing: 3px;
  font-weight: 100;
  font-family: "Monsieur La Doulaise", cursive;
  margin-top: 15px;
  margin-bottom: 50px;
  color: #2A343D;
}

.fade {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSubtle 1.5s ease-out forwards;
}

.delay-1  { animation-delay: 0.5s; }
.delay-2  { animation-delay: 1s; }
.delay-3  { animation-delay: 1.4s; }
.delay-4  { animation-delay: 1.8s; }
.delay-5  { animation-delay: 2.2s; }
.delay-6  { animation-delay: 2.6s; }
.delay-7  { animation-delay: 3s; }
.delay-8  { animation-delay: 3.4s; }
.delay-9  { animation-delay: 3.8s; }
.delay-10 { animation-delay: 4.2s; }
.delay-11 { animation-delay: 4.6s; }
.delay-12 { animation-delay: 5s; }
.delay-13 { animation-delay: 5.4s; }
.delay-14 { animation-delay: 5.8s; }
.delay-15 { animation-delay: 6.2s; }
.delay-16 { animation-delay: 6.6s; }
.delay-17 { animation-delay: 7s; }

/* ================================
  RSVP form 
================================ */
#target {
  padding-bottom: 0;
}

#rsvpForm input,
#rsvpForm select,
#rsvpForm textarea {
  width: 100%;
  box-sizing: border-box; 
  padding: 12px 15px;
  margin-top: 5px;
  margin-bottom: 30px;
  font-family: "Bodoni Moda", serif;
  font-size: 18px;
  border: 1px solid #2A343D;
  border-radius: 6px;
  outline: none;
  text-align: center;
}

#rsvpForm textarea {
  min-height: 100px;
  resize: vertical;
}

#rsvpForm input:focus,
#rsvpForm select:focus,
#rsvpForm textarea:focus {
  border-color: #2A343D;
  box-shadow: 0 0 8px rgba(42, 52, 61, 0.2);
}

#rsvpForm button {
  font-family: "Bodoni Moda", serif;
  font-size: 20px;
  color: #2A343D;
  border: none;
  background-color: transparent;
  padding: 12px 40px;
  margin-top: 20px;
  letter-spacing: 4px;
  cursor: pointer;
}

#rsvpForm button:hover {
  transform: scale(1.05);
}

.rsvp-another {
  font-size: 20px;
}

#postRsvpOptions h3 {
  font-family: "Monsieur La Doulaise", cursive;
  font-size: 40px;
  letter-spacing: 3px;
  font-weight: 200;
}

#otherDietContainer {
  opacity: 0;
  transform: translateY(-5px);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

#otherDietContainer.show-content {
  opacity: 1;
  transform: translateY(0);
  max-height: 100px; 
}

.rsvp-container {
  max-width: 500px;
  width: 90%;
  margin: 50px auto 80px auto;
  font-family: "Bodoni Moda", serif;
  text-align: center;
  letter-spacing: 2px;
  color: #2A343D;
}

.hidden-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

/* Reuse existing animation for show-content */
.show-content {
  display: block;
  animation: fadeInSubtle 0.6s ease forwards;
}

/* ================================
  Page layout components
================================ */
.page-tabs {
  justify-content: center;
}

.page-tabs .nav-link {
  color: #2A343D;
  font-size: 18px;
  letter-spacing: 1px;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
}

.page-tabs .nav-link:hover {
  border-bottom: 1px solid #2A343D;
  color: #2A343D;
}

.page-tabs .nav-link.active {
  color: #2A343D !important;
  border-bottom: 1px solid #2A343D !important;
  background: none !important;
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.page-card {
  border: 1px solid #dcdcdc;
  padding: 1.5rem;
  border-radius: none;
  background: white;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.page-card h3 {
  font-family: "Monsieur La Doulaise", cursive;
  color:#2A343D;
  font-weight: 100;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  font-size: 32px;
}

/* center accordion text */
.accordion-flush .accordion-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  text-align: center;
}

.accordion-flush .accordion-body {
  text-align: center;
}

.accordion-flush .accordion-item {
  margin-top: 1rem;
}

.accordion-flush .accordion-button:not(.collapsed)  {
  background-color: #2A343D;
}

.accordion-flush .accordion-button:not(.collapsed) .accordion-title p {
  color: white;
}

.accordion-flush .accordion-button:focus,
.accordion-flush .accordion-button:active {
  box-shadow: none;
  outline: none;
}

.accordion-flush .accordion-button:not(.collapsed) {
    box-shadow: none;
}

/* ================================
  Images
================================ */
.dresscode-gallery {
  width: 100%;
}

.full-moodboard {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

/* ================================
  Animations
  https://www.w3schools.com/Css/css3_animations.asp
================================ */
@keyframes expandIn {
  0% {
    opacity: 0;
    transform: scaleX(1.4) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) translateY(0);
  }
}

@keyframes fadeInSubtle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shake animation for the error message */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
  100% { transform: translateX(0); }
}

.fade-in-subtle {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSubtle 2.5s ease-out forwards;
}

/* ================================
  Media queries
================================ */
/* Mobile */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
  }

  .container .space {
    display: none;
  }

  .title {
    font-size: 38px;
    letter-spacing: 12px;
    animation: expandInMobile 2s ease-out forwards;
  }

  .smaller-title {
    font-size: 38px;         
    letter-spacing: 5px;
    animation: expandInMobile 2s ease-out forwards;
  }

  @keyframes expandInMobile {
    0% {
      opacity: 0;
      transform: scaleX(1.3) translateY(25px);
    }
    100% {
      opacity: 1;
      transform: scaleX(1) translateY(0);
    }
  }
}

/* Tablet */
@media (min-width: 768px) {
  .page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .page-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

