/* =======================================================
   1. RESET AND BASE STYLES
======================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'EB Garamond', Arial, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

/* =======================================================
   2. LAYOUT CONTAINERS
======================================================= */
section {
  padding: 20px;
  margin: 20px auto;
  background-color: #ffffff;
  border-radius: 8px;
  width: 900px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  section {
    width: 95%;
  }
}

/* =======================================================
   3. HEADER AND NAVIGATION
======================================================= */

/* ---------- Site Header ---------- */
.site-header {
  width: 100%;
  background-color: #d2afff;
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.site-header .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}
.site-header h1 {
  font-size: 2rem;
}

/* ---------- Navbar (Sticky) ---------- */
.navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: #d2afff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.navbar ul {
  list-style: none;
  text-align: center;
  padding: 1rem 0;
  max-width: 900px;
  margin: 0 auto;
}
.navbar li {
  display: inline-block;
  margin: 0 15px;
}
.navbar a {
  color: white;
  text-decoration: none;
}
.navbar a:hover {
  text-decoration: underline;
}

/* ---------- RSVP Link Styling ---------- */
.navbar a.rsvp-box-link {
  display: inline-block;
  letter-spacing: 3px;
  padding: 5px 10px;
  border: 2px solid white;
  border-radius: 5px;
  background-color: #f9f9f9;
  color: #d2afff;
  font-weight: 600;
  filter: saturate(3);
  transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.navbar a.rsvp-box-link:hover {
  background-color: transparent;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ---------- Fallback Fixed Navbar ---------- */
.navbar.fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}
body.navbar-fixed-padding {
  padding-top: calc(var(--nav-height, 0px)) !important;
}

/* =======================================================
   4. INVITATION STYLING
======================================================= */
.invitation-text {
  text-align: center;
  margin: 20px auto;
  max-width: 800px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.2rem;
}
.invitation-text h2 {
  font-size: 2rem;
  color: #e1c4ff;
  margin-bottom: 10px;
}
.invitation-text p {
  margin-bottom: 15px;
  line-height: 1.6;
}
.invitation-text a {
  color: #e1c4ff;
  font-weight: bold;
  text-decoration: none;
}
.invitation-text a:hover {
  text-decoration: underline;
}

.invitation-image {
  max-width: 100%;
  width: 700px;
  height: auto;
  margin: 20px auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}
@media (max-width: 768px) {
  .invitation-image {
    width: 100%;
  }
}

/* =======================================================
   5. GUEST TABLE + ADD GUEST
======================================================= */
.guest-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.guest-table th,
.guest-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.guest-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.delete-guest {
  background-color: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 18px;
}
.delete-guest:hover {
  background-color: #cc0000;
}
#add-guest {
  background-color: #e1c4ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 10px 0;
  font-weight: 700;
  transition: filter 0.3s ease;
  filter: saturate(3);
}
#add-guest:hover {
  filter: saturate(7);
}
#add-guest:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}
.guest-row {
  display: none;
}
.guest-row.active {
  display: table-row;
}
@media (max-width: 768px) {
  .guest-table {
    display: block;
    overflow-x: auto;
  }
  .guest-table th,
  .guest-table td {
    min-width: 120px;
  }
}

/* =======================================================
   6. FORMS + COMMENTS
======================================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}
.form-group input,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.comments-section {
  margin: 20px 0;
}
#additional-comments {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Submit button */
.submit-button {
  padding: 10px 20px;
  font-size: 16px;
  margin-top: 20px;
  background-color: #e1c4ff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  filter: saturate(3);
  transition: filter 0.3s ease;
}
.submit-button:hover {
  filter: saturate(7);
}

/* Secondary button */
.secondary-button {
  background-color: #fff;
  color: #e1c4ff;
  border: 2px solid #e1c4ff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin: 20px 0;
  transition: all 0.3s ease;
}
.secondary-button:hover {
  background-color: #e1c4ff;
  color: #fff;
}

/* =======================================================
   7. SECTIONS AND CONTENT
======================================================= */
section h2 {
  font-size: 2rem;
  color: #d2afff;
  letter-spacing: 2px;
  font-weight: 700;
}

.event-subsection {
  margin: 20px 0;
  padding: 15px;
  border-left: 3px solid #e1c4ff;
  background-color: #fff;
  transition: transform 0.2s ease;
}
.event-subsection:hover {
  transform: translateX(5px);
}
.event-subsection h3 {
  color: #e1c4ff;
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.event-subsection p {
  margin: 5px 0;
  font-size: 1.1rem;
}
.event-subsection a:hover {
  text-decoration: underline;
}
.dress-guidelines {
  margin-top: 10px;
  padding-left: 20px;
  list-style-type: disc;
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
}

.dress-guidelines li {
  margin-bottom: 8px;
}

/* =======================================================
   8. MENU SECTION
======================================================= */
#menu {
  padding: 2rem 1rem;
}
.menu-course {
  margin-bottom: 2rem;
}
#menu hr {
  border: none;
  border-top: 2px solid #ccc;
  margin: 2rem 0;
}

/* =======================================================
   9. MAP INTERACTION
======================================================= */
.map-iframe:hover {
  transform: scale(1.03);
}

/* =======================================================
   10. TOGGLE SWITCH
======================================================= */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  min-width: 90px;
  text-align: right;
}
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider-round:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
.switch input:checked + .slider-round {
  background-color: #4CAF50;
}
.switch input:checked + .slider-round:before {
  transform: translateX(26px);
}

/* =======================================================
   11. WEDDING LIST SECTION
======================================================= */
.wedding-list-section {
  padding: 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.wedding-list-preview-image {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.wedding-list-button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  color: #fff;
  background-color: #333;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.wedding-list-button:hover {
  background-color: #555;
}

/* =======================================================
   12. UTILITY CLASSES
======================================================= */
.hidden {
  display: none;
}

.visually-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
