/* Reset and basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: figtree;

   height: 100%;
  margin: 0;
  scroll-behavior: smooth;
}

.scroll-container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh; /* ensures full screen sections */
}

/* Header and Footer fixed */
header {
  position: fixed;
  left: 0;
  right: 0;
  height: 90px;
  background-color: rgb(124, 149, 117);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  z-index: 1000;
  font-weight: bold;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 0.5rem 1rem;
    text-align: center;
  }

  .site-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.0 rem;
  }

  .section-nav a {
    font-size: 0.7rem;
  }
}

.site-title {
  margin: 0;
  font-size: 2.0 rem;
  text-align: center;
}

.section-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.section-nav a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.section-nav a:hover {
  color: #b33;
}

footer {
  bottom: 0;
  position: fixed;
  left: 0;
  right: 0;
  height: 25px;
  background-color: rgb(124, 149, 117);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  z-index: 1000;
  font-weight: bold;
  box-sizing: border-box;
}


/* Each full-page section */
section {
  height: calc(100vh); /* viewport minus header/footer */
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(232, 238, 252);
  overflow: hidden;
}

/* Alternating colors for clarity */
section:nth-child(even) {
  background-color: rgb(227, 234, 240);
}

/* Centered content inside each section */
.section-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
  padding: 2rem;
  font-size: 2rem;
}


#welcome {
  background-image: url('images/ringphoto.JPG'); /* Replace with actual filename */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white; /* optional: better contrast */
  position: relative;
}

#welcome::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* semi-transparent dark overlay */
  z-index: 1;
}

#welcome .section-content {
  position: relative;
  z-index: 2; /* makes sure the text is above the overlay */
}

#info {
  padding: 4rem 1rem;
  background: #f5f5f5;
}

.info-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  flex-wrap: wrap;
}

.side-image-right{
  position: relative;
  top: 50px;       /* distance from top of page */
  right: 200px;     /* distance from left of page */
  width: 300px;
  height: auto;
  object-fit: contain;
  border-radius: 0px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.side-image-left{
  position: relative;
  top: 50px;       /* distance from top of page */
  left: 200px;     /* distance from left of page */
  width: 300px;
  height: auto;
  object-fit: contain;
  border-radius: 0px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.info-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  text-align: center;
  flex: 2;
  min-width: 280px;
  height: auto;   
  z-index: 1;
}

.event-title {
  margin-bottom: 2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.event-overview {
  grid-column: 1 / 2;
  grid-row: 1;
}

.timeline {
  grid-column: 1 / 2;
  grid-row: 2;
}

.map-container {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.map-container {
  margin-top: 0rem;
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .info-grid {
    display: flex;
    flex-direction: column;
  }

  .map-container {
    height: 300px;
  }
}

/* Responsive layout */
@media (max-width: 900px) {
  .info-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .side-image {
    width: 90%;
    max-width: 400px;
  }

  .info-content {
    width: 100%;
  }
}
@media (max-width: 900px) {
  .side-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: -6rem; /* pull up under content */
    z-index: 0;
  }

  .side-image-left,
  .side-image-right {
    position: relative;
    width: 40%;
    max-width: 140px;
    height: auto;
    opacity: 1.0;
    transform: scaleX(-1); /* mirror the left image */
  }

  .side-image-left {
    left: -10px;
    z-index: 0;
  }

  .side-image-right {
    right: -10px;
    z-index: 0;
  }

  .info-wrapper {
    position: relative;
    z-index: 2;
  }

  .info-content {
    z-index: 2;
  }
}

/* Container for the full RSVP section */
#rsvp {
  max-width: none;
  margin: 0;
  padding-top: 6rem;
  text-align: center;
  font-family: sans-serif;
  background: #f9f9f9;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* RSVP form styling */
#rsvpForm {
  max-width: 500px;
  margin: 0px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
}

.rsvp-overlay h2,
.rsvp-overlay p {
  text-align: center;
  margin-bottom: 10px;
  color: #333;
  font-family: 'Figtree';
  font-size: 1.1rem;
  color: rgb(0, 0, 0);
  line-height: 1.5;
  margin-top: 0.5rem;
}

#rsvpForm label {
  display: block;
  margin-top: 30px;
  font-weight: 600;
  color: #444;
}

#rsvpForm input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

/* Input container to center inputs */
.input-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 30px;
}

/* Radio group layout */
.radio-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.radio-group label {
  font-weight: normal;
}

#guestNameField {
  margin-top: 40px;
}

/* Submit button styling */
#rsvpForm button[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background-color: #346ca8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#rsvpForm button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Thank you message */
/* Loading spinner */
#loadingSpinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #346ca8;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Thank-you message box */
#thankYouMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 2rem 2rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: green;
  display: none;
  z-index: 100;
}

/* Close button for message */
#thankYouMessage #closeThankYou {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.5rem;
  color: #444;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

/* Grid photo layout */
.rsvp-grid {
  position: fixed;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 5px;
  grid-auto-flow: dense;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.grid-photo {
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
}

/* Grid photo classes */
.photo1 { background-image: url('images/example-photo.jpg'); grid-column: span 2; grid-row: span 2; }
.photo2 { background-image: url('images/example-photo.jpg'); }
.photo3 { background-image: url('images/example-photo.jpg'); }
.photo4 { background-image: url('images/example-photo.jpg'); grid-row: span 3; grid-column: span 2; }
.photo5, .photo6, .photo7, .photo10, .photo11, .photo12,
.photo13, .photo14, .photo15, .photo16, .photo17, .photo18,
.photo19, .photo20, .photo21, .photo22, .photo23, .photo24 {
  background-image: url('images/example-photo.jpg');
}
.photo8 { background-image: url('images/example-photo.jpg'); grid-column: span 2; }
.photo9 { background-image: url('images/example-photo.jpg'); grid-row: span 2; }

/* RSVP overlay styles */
.rsvp-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(61, 75, 52);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}
