/* =========================
   RESET & GENERAL STYLES
========================= */

/* Reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* =========================
   HEADER & NAVBAR
========================= */

/* Full-width header */
.site-header {
  width: 100%;
  background-color: #6495ED;
  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;
}

/* Sticky Navbar */
.navbar {
  position: -webkit-sticky; /* Safari support */
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: #6495ED;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.navbar ul {
  list-style: none;
  text-align: center;
  padding: 1rem 0;
  margin: 0 auto;
  max-width: 900px;
}
.navbar li {
  display: inline-block;
  margin: 0 15px;
}
.navbar a {
  color: white;
  font-weight: bold;
  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: #6495ED;
  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);
}

/* Fixed fallback class */
.navbar.fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
body.navbar-fixed-padding {
  padding-top: calc(var(--nav-height, 0px)) !important;
}

/* =========================
   SECTIONS & HEADINGS
========================= */

section {
  padding: 20px;
  margin: 20px auto;
  background-color: #fff;
  border-radius: 8px;
  width: 900px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
section h2 {
  font-size: 2rem;
  color: #6495ED;
  margin-bottom: 10px;
  text-align: center;
}

/* =========================
   EVENT SUBSECTIONS
========================= */

.event-subsection {
  margin: 20px 0;
  padding: 15px;
  border-left: 3px solid #6495ED;
  background: #fff;
  transition: transform 0.2s ease;
}
.event-subsection:hover {
  transform: translateX(5px);
}
.event-subsection h3 {
  font-size: 1.3rem;
  color: #6495ED;
  margin-bottom: 10px;
}
.event-subsection p {
  font-size: 1.1rem;
  margin: 5px 0;
}

.gen-subsection {
  margin: 20px 0;
  padding: 15px;
  border-left: 3px solid #6495ED;
  background: #fff;
  transition: transform 0.2s ease;
}
.gen-subsection:hover {
  transform: translateX(5px);
}
.gen-subsection h3 {
  font-size: 1.3rem;
  color: #6495ED;
  margin-bottom: 10px;
}
.gen-subsection p {
  font-size: 1.1rem;
  margin: 5px 0;
}
.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;
}

#transportation-instructions-index{
  max-width: 1300px;
  margin: 20px auto;
}
/* =========================
   IMAGES
========================= */

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

/* =========================
   FORM STYLING
========================= */

/* General form layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.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;
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Submit button */
.submit-button {
  background: #6495ED;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  border: none;
  margin-top: 20px;
  cursor: pointer;
}

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

/* =========================
   RSVP SECTION
========================= */

#rsvp {
  width: 95%;
  max-width: 1300px;
  margin: 20px auto;
}
#rsvp-form {
  max-width: 1200px;
  margin: 0 auto;
}

#transportation-instructions{
  width: 95%;
  max-width: 1300px;
  margin: 20px auto;
}

/* =========================
   COMMENTS SECTION
========================= */

.comments-section {
  margin: 20px 0;
}
#additional-comments {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* =========================
   MENU SECTION
========================= */

#menu {
  padding: 2rem 1rem;
}
.menu-course {
  margin-bottom: 2rem;
}
#menu hr {
  border: none;
  border-top: 2px solid #ccc;
  margin: 2rem 0;
}

/* =========================
   GUEST TABLE
========================= */

.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;
  vertical-align: top;
}
.guest-table input[type="text"],
.guest-table input[type="email"],
.guest-table select,
.guest-table textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background-color: white;
  box-sizing: border-box;
}
.guest-table label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #444;
}

/* Add/Delete guest buttons */
.delete-guest {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.delete-guest:hover {
  background: #cc0000;
}
.disabled-delete {
  opacity: 0.5;
  pointer-events: none;
}
#add-guest {
  background: #6495ED;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  margin: 10px 0;
}
#add-guest:disabled {
  background: #cccccc;
  cursor: not-allowed;
}
.guest-row {
  display: none;
}
.guest-row.active {
  display: table-row;
}
.guest-table input[type="text"]:focus,
.guest-table input[type="email"]:focus,
.guest-table select:focus,
.guest-table textarea:focus {
  border-color: #66afe9;
  outline: none;
}

/* =========================
   TOGGLE SWITCH
========================= */

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 28px;
  transition: background-color 0.4s;
  z-index: 1;
}
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.4s;
}
.switch input:checked + .slider {
  background-color: #4CAF50;
}
.switch input:checked + .slider::before {
  transform: translateX(22px);
}

/* =======================================================
 REGISTRY SECTION
======================================================= */

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


/* =========================
   UTILITIES
========================= */

.hidden {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.centered {
  text-align: center;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 768px) {
  .invitation-image {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .navbar,
  section {
    width: 95%;
  }
  .guest-table {
    display: block;
    overflow-x: auto;
  }
  .guest-table th,
  .guest-table td {
    min-width: 120px;
  }
}
