html, body {
  overflow-x: hidden;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Times', serif;
  background: #f7f9fc;
  color: #333;
  max-width: 100vw;
}

/* 🔒 Locking for preloader */
body.locked main,
body:not(.unlocked) main {
  display: none !important;
}
body.unlocked main {
  display: block;
}
body.unlocked .page-content {
  animation: fadeIn 0.5s ease-in forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 🌐 General Layout */
header {
  text-align: center;
  position: sticky;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
h1 {
  margin: 0;
  font-size: 2.5rem;
}
.registry {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 0 2rem;
  max-width: 1000px;
  margin: auto;
}
.item {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.2s ease;
  max-width: 150px;
}
.item:hover {
  transform: translateY(-4px);
}
.item iframe, .item img {
  max-width: 100%;
  border-radius: 8px;
}
.item a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #65C3B7;
  text-decoration: none;
  font-weight: 600;
}
.divider {
  border: none;
  height: 2px;
  background-color: #ccc;
  width: 60%;
  margin: 0 auto 2rem auto;
}
.registry-section {
  padding-bottom: 2rem;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
section > h1 {
  text-align: center;
  font-size: 2rem;
  margin-top: 2rem;
}
.badge {
  display: block;
  background-color: #d1ffd6;
  color: #1a7f37;
  padding: 1rem;
  border-radius: 6px;
  font-weight: 600;
  margin: 1rem auto;
  text-align: center;
  max-width: 90%;
  box-sizing: border-box;
}

.badge h1 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.3;
  word-wrap: break-word;
}

.badge i {
  margin-left: 0.5rem;
}

/* 🎯 Donation Box */
.donation-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 3rem auto;
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}
.donation-wrapper h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.progress-container {
  width: 100%;
  background-color: #f1f3f5;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.progress-bar {
  height: 20px;
  width: 0%;
  background: linear-gradient(to right, #00b894, #00cec9);
  transition: width 0.6s ease-in-out;
  border-radius: 12px 0 0 12px;
}
.donation-form {
  position: relative;
  width: 100%;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.donation-form input[type="number"] {
  flex: 1 1 120px;
  max-width: 150px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: 0.2s ease-in-out;
  box-sizing: border-box;
  text-align: center;
}
.donation-form input[type="number"]:focus {
  border-color: #66c3b7;
  box-shadow: 0 0 6px rgba(0,112,243,0.2);
  outline: none;
}
.donation-form button {
  flex: 1 1 120px;
  max-width: 150px;
  background-color: #66c3b7;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.85rem 1rem;          /* equal padding on all sides */
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;     /* fallback */
}

/* Hover and active states */
.donation-form button:hover {
  background-color: #84d7cd;
  transform: translateY(-1px);
}

.donation-form button:active {
  background-color: #66c3b7;
  transform: scale(0.98);
}

/* 📱 Donation Mobile Adjustments */
@media (max-width: 600px) {
  .registry {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    padding: 0 1rem;
  }

  .registry .item {
    max-width: 100%;
  }
  .donation-form input[type="number"],
.donation-form button {
  width: 100%;
  max-width: 100%;
  max-height: 50px;
  font-size: 0.85rem;
  padding: 0.55rem 0.8rem;
  line-height: 1.2rem;
  box-sizing: border-box;
  text-align: center;
  /* Remove fixed height here for desktop */
}
  .donation-wrapper {
    padding: 0.75rem 1rem;
    margin: 1.5rem 1rem;
    width: auto;
    box-sizing: border-box;
  }

  .donation-wrapper h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .donation-form {
    flex-direction: column;
    gap: 0.6rem;
  }

 .donation-section form {
  padding: 1.25rem;
  margin: 1.5rem 1rem;
  width: auto;
  box-sizing: border-box;
}

.donation-section form label {
  font-size: 0.95rem;
}

.donation-section form input[type="text"],
.donation-section form input[type="email"],
#payment-element,
#submit {
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
}

  #submit {
    border-radius: 6px;
  }

  .donation-goal {
    margin: 1.5rem 1rem;
    padding: 0;
  }
}



/* 💳 Stripe Payment Form */
.donation-section {
  padding: 1rem; /* slightly more breathing room on mobile */
}

.donation-section form {
  background-color: white;
  max-width: 500px; /* Stripe Element is typically more narrow */
  margin: 2rem auto; /* slightly less vertical spacing */
  padding: 1.5rem; /* slightly tighter than before */
  border-radius: 16px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-sizing: border-box;
}

.donation-section form label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.donation-section form input[type="text"],
.donation-section form input[type="email"] {
  padding: 0.65rem 0.9rem; /* slightly less padding than before */
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  width: 100%;
  box-sizing: border-box;
}
.donation-section form input:focus {
  border-color: #66c3b7;
  box-shadow: 0 0 6px rgba(0,112,243,0.2);
  outline: none;
}
#payment-element {
  min-height: 60px;
  box-sizing: border-box;
}
#submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  background-color: #66c3b7;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
#submit:hover {
  background-color: #84d7cd;
  transform: translateY(-1px);
}
#error-message {
  margin-top: 1rem;
  color: red;
  font-weight: 500;
  text-align: center;
}
@media (max-width: 768px) {
  .donation-section form {
    max-width: 90%;
    padding: 1.5rem;
  }
  #submit {
    font-size: 0.95rem;
    padding: 0.9rem;
  }
}

/* 💡 Misc */
.donation-goal {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
  box-sizing: border-box;
}

/* 🔄 Preloader */
#site-preloader {
  position: fixed;
  inset: 0;
  background-color: #F6F9FC;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}
#site-preloader.visible {
  opacity: 1;
  pointer-events: all;
}
#site-preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
.preloader-spinner-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
}
.custom-spinner div {
  animation: spin 1s linear infinite;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  box-shadow: 0 4px 0 0 #66c3b7;
  position: absolute;
  top: 20px;
  left: 20px;
  transform-origin: 50% 50%;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.preloader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  object-fit: contain;
}
@media (max-width: 600px) {
  .preloader-spinner-wrapper {
    width: 100px;
    height: 100px;
  }
  .custom-spinner div {
    width: 70px;
    height: 70px;
    top: 15px;
    left: 15px;
  }
  .preloader-logo {
    width: 60px;
    height: 60px;
  }
}

/* 🎯 Button with Arrow */
.custom-arrow-button {
  position: relative;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  background: #66c3b7;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.custom-arrow-button:hover {
  background-color: #84d7cd;
  transform: translateY(-1px);
}
.custom-arrow-button::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  border-right: 4px solid white;
  border-top: 4px solid white;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease, margin-left 0.3s ease;
}
.custom-arrow-button:hover::after {
  opacity: 1;
  margin-left: 16px;
}
.preloader-lock {
  overflow: hidden;
}
.footer-payment-icons {
  display: flex;
  gap: 12px;
  font-size: 28px;
  justify-content: center;
  margin-top: 20px;
}
.logo {
  height: auto;
  max-height: 60px;
  width: auto;
  max-width: 100%;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.logo:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  flex-wrap: wrap;
}

.header-logo img {
  height: 60px; /* or whatever size fits */
  float: left;
  display: block;
}
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-logo img {
    height: 60px;
    margin-bottom: 0.5rem;
    display:inline-block;
  }

  .header-text h1,
  .header-text p {
    float: none;
    text-align: center;
  }
}

.header-text h1 {
  margin: 0;
  float: left;
  width: 100%;
}

.header-text p {
  margin: 0;
  color: #66c3b7;
  display: block;
  clear: left;
}
.subtitle {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: #66c3b7;
  font-weight: 500;
  text-align: left;
}

@media (max-width: 768px) {
  .subtitle {
    text-align: center;
  }
}
.container {
  font-family: "Times New Roman", Times, serif;
  width: 100%;
  max-width: 700px;
  margin: 2rem auto; /* guarantees side space without modifying body */
  padding: 1.5rem;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .container {
    padding: 1rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    width: calc(100% - 2rem); /* forces 1rem of space on both sides */
  }
}

    .signature {
      margin-top: 2rem;
      font-style: italic;
    }

    .photo {
      text-align: center;
      margin-top: 2rem;
    }

    .photo img {
      max-width: 100%;
      border-radius: 10px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
/* Reset */
#nav-menu,
#nav-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Times New Roman", Times, serif;
}

/* Hamburger button (no longer sticky) */
.hamburger {
  position: absolute; /* Changed from fixed to absolute */
  top: 1rem;
  right: 1rem;
  height: 40px;
  width: 40px;
  font-size: 28px;
  line-height: 1;
  background: none;
  border: none;
  color: #2f1444;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  z-index: 10001;
}

.hamburger:hover {
  background-color: #83D7CD;
  color: white;
}

/* Nav menu */
#nav-menu {
  position: absolute; /* Changed from fixed to absolute */
  top: 60px; /* below header */
  right: 1rem;
  width: 240px;
  max-height: 0;
  overflow: visible;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  padding: 0;
  z-index: 10000;
  font-family: 'Inter', sans-serif;
  opacity: 0;
  visibility: hidden;
  font-family: "Times New Roman", Times, serif;
}

/* Show nav menu when open */
#nav-menu.open {
  max-height: 600px;
  padding: 0.5rem 0;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
}

/* Nav list */
#nav-menu ul {
  display: flex;
  flex-direction: column;
}

/* Nav items links and submenu buttons */
#nav-menu ul li a,
#nav-menu ul li button.submenu-toggle {
  text-decoration: none;
  padding: 0.75rem 1rem;
  display: block;
  text-align: left;
  color: #2f1444;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  width: 100%;
  font-size: 1rem;
}

/* Hover states */
#nav-menu ul li a:hover,
#nav-menu ul li button.submenu-toggle:hover {
  background-color: #f0f0f0;
}

/* Submenu styling */
.has-submenu {
  position: relative;
  z-index: 100002;
}
#nav-menu .submenu,
#nav-menu .submenu a,
#nav-menu .submenu-toggle {
  font-family: "Times New Roman", Times, serif;
}
#nav-menu .submenu {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  flex-direction: column;
  padding-left: 1rem;
  margin: 0;
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out, visibility 0.4s ease-out;
  border-left: 2px solid #83D7CD;
  position: absolute;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  width: auto; /* Matches the original menu width */
  white-space: normal; /* Allows text wrapping */
  word-wrap: break-word;
  left: 0;
  z-index: 100000;
}

/* Make sure it expands when active */
#nav-menu .submenu.active {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
  z-index: 100001 !important;
}

/* Submenu links */
#nav-menu .submenu li a {
  padding: 0.5rem 1rem;
  font-weight: 400;
  color: #444;
}

/* Submenu toggle arrow */
.submenu-toggle::after {
  content: "▼";
  float: right;
  transition: transform 0.3s ease;
}

.submenu-toggle.open::after {
  transform: rotate(180deg);
}

/* 📱 Responsive adjustments */
@media (min-width: 768px) {
  #nav-menu {
    position: absolute; /* Changed from fixed to absolute */
    top: 60px;
    right: 1rem;
    width: 240px;
  }
}
#content-wrapper {
  transition: margin-top 0.3s ease-in-out;
}
.add-to-calendar-link{
  display: inline-block;
  padding: 0.5rem 0.5rem;
  color: black;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  background-color: #fff;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.add-to-calendar-link:hover {
  background-color: #F0F0F0;
  transform: translateY(-2px);
  text-decoration: none;
}
form#rsvp-form {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  max-width: 500px;
  margin: 2rem auto;
  font-family: 'Times New Roman', Times, serif;
  color: #333;
  /* Ensure mobile spacing */
  width: 90%;
  box-sizing: border-box;
}

form#rsvp-form h2,
form#rsvp-form p {
  margin-bottom: 1rem;
}

form#rsvp-form input,
form#rsvp-form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Times New Roman', Times, serif;
  margin-bottom: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

form#rsvp-form label {
  display: block;
  margin: 0.5rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

form#rsvp-form input:focus {
  border-color: #66c3b7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 195, 183, 0.25);
}
.rsvp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-left: 0rem; /* optional if you want to nudge the group over */
}
.rsvp-button {
  margin-left: 0rem;
}

@media (min-width: 768px) {
  .rsvp-button {
    margin-left: 0rem; /* Reinforce spacing if needed */
  }
}
/* 🔧 Stripe Form Input Consistency Fix */
#payment-form input[type="text"],
#payment-form input[type="email"],
#payment-form input[type="tel"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* Stripe Payment Element Styling */
#payment-element {
  width: 100%;
  padding: 0.75rem 0;
  box-sizing: border-box;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #payment-form {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  #payment-form input,
  #payment-element {
    width: 100%;
    font-size: 1rem;
  }

  #submit {
    width: 100%;
    font-size: 1rem;
    padding: 0.85rem;
  }
}
.tiny-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-left: 10px;
  border: 2.5px solid rgba(255,255,255,0.7);      /* Brighter, more visible faint border */
  border-top: 2.5px solid #fff;                   /* Pure white for the moving segment */
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  background: transparent;
  box-shadow: none;
  opacity: 1; /* You can reduce this (e.g. 0.8) if you want it less bold, but keep at 1 for visibility */
}
@media (max-width: 600px) {
  .tiny-spinner {
    width: 14px;
    height: 14px;
    margin-left: 7px;
  }
}


