/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  font-family: 'Georgia', serif;
  background-color: #fdfcfb;
  color: #2e3d2e;
  background-image: url('florall1.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ---------- NAVBAR (always on top) ---------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  /* use fixed if you want it always visible while scrolling */
  top: 0;
  z-index: 9999;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #6c8b6f;
  font-weight: bold;
}

nav a:hover {
  color: #d4af37;
}

/* ---------- HERO / HEADER ---------- */
/* The header no longer draws the crown as a background */
header {
  position: relative;
  margin: 2rem;
  border-radius: 1.25rem;
  background: transparent;
}

.header-overlay {
  margin: 0 auto;
  max-width: 900px;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
  /* no BIG top padding anymore—image provides space */
  padding: 0 2rem 2.25rem;
  text-align: center;
}

/* Crown image that reserves space and scales safely */
.crown {
  display: block;
  max-width: 700px;
  /* cap its width so it doesn’t stretch too wide */
  width: 80%;
  /* responsive sizing */
  height: auto;
  /* keeps aspect ratio */
  margin: 0 auto;
  margin-bottom: 0;
}

/* Text under the crown; gap scales with viewport */
.header-text {
  margin-top: -5rem;
  /* smaller gap than before */
  padding-bottom: 1.5rem;
  /* less bottom padding */
}

.header-text h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  color: #8a6d24;
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.header-text p {
  margin: 0.3rem 0;
  color: #223122;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  text-align: center;
}

.header-text .timer {
  color: #d4af37;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  text-align: center;
}

/* ---------- RSVP PAGE HEADER TEXT ---------- */
.rsvp-header {
  margin: -5rem auto 0 auto;
  padding-bottom: 2rem;
  text-align: center;
}

.rsvp-header h1 {
  font-family: 'Great Vibes', cursive;
  color: #8a6d24;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 3rem);
}

.rsvp-header p {
  max-width: 60ch;
  margin: 0 auto;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: #223122;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.8);
  margin-top: 2rem;
}

/* ---------- RSVP FORM ---------- */
.rsvp-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: url("https://i.imgur.com/QeEVo3e.png") no-repeat center contain;
  min-height: auto;
}

.rsvp-form-wrapper {
  position: relative;
  background: url('florall2.jpg') center/contain no-repeat;
  border: 3px solid #d4af37;
  border-radius: 1rem;
  max-width: 500px;
  width: 100%;
  padding: clamp(1rem, 3.5vw, 1.75rem);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  /* keeps blur inside rounded corners */
}

/* Blurred background effect */
.rsvp-form-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  /* copies floral image */
  filter: blur(8px) brightness(1.1);
  /* blur + slight brighten */
  transform: scale(1.1);
  /* prevents blur edges showing */
  z-index: 0;
}

/* Ensures form content is above blurred background */
.rsvp-form-wrapper>* {
  position: relative;
  z-index: 1;
}

.rsvp-form-wrapper p,
form label {
  color: #223122;
  /* darker for contrast */
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
}

form label {
  margin: 0.5rem 0 0.2rem;
  font-weight: 600;
  color: #3c503c;
}

form input,
form select {
  padding: 0.6rem;
  border: 1px solid #b5cbbb;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: #f9fff9;
}

form button {
  margin-top: 1.5rem;
  padding: 0.75rem;
  background-color: #6c8b6f;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color .3s ease, transform .05s ease;
}

form button:hover {
  background-color: #567457;
}

form button:active {
  transform: translateY(1px);
}

.header-text h1,
.header-text p,
.rsvp-header h1,
.rsvp-header p {
  text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.8),
    1px -1px 0 rgba(255, 255, 255, 0.8),
    -1px 1px 0 rgba(255, 255, 255, 0.8),
    1px 1px 0 rgba(255, 255, 255, 0.8),
    3px 4px 8px rgba(255, 255, 255, 1.2);
  /* soft dark shadow */
}

/* ----------Index PAGE CONTENT ---------- */
main {
  max-width: 900px;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
  align-items: center;
  text-align: center;
}


/* ---------- EDGE CASE TUNING ---------- */
@media (max-width: 380px) {
  .crown {
    max-height: 36vh;
  }

  .header-text {
    margin-top: 12px;
  }
}

@media (min-aspect-ratio: 16/9) {
  .crown {
    max-height: 34vh;
  }
}

/* countdown timer style */
.countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.countdown .unit {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 86px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.countdown .num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.countdown .label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- messages ---------- */
.msg {
  margin-top: 0.75rem;
}

.msg--success {
  color: #1a7f37;
}

.msg--error {
  color: #b42318;
}

.msg--info {
  opacity: 0.85;
}

/* Admin delete button */
.delete-btn {
  background: #c62828;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.delete-btn:hover {
  background: #b71c1c;
}

.delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Admin table spacing */
table {
  border-collapse: separate;
  /* allows spacing */
  border-spacing: 0 10px;
  /* vertical space between rows */
  width: 100%;
}

thead th {
  padding: 12px 10px;
  text-align: left;
  background: #f5f5f5;
}

tbody tr {
  background: #fff;
}

tbody td {
  padding: 10px 12px;
  /* space inside cells */
  vertical-align: top;
}

/* Admin summary box */
.summary-box {
  display: flex;
  gap: 16px;
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9f9f9;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.summary-label {
  font-size: 0.85rem;
  opacity: 0.7;
}

.summary-value {
  font-size: 1.35rem;
  font-weight: 800;
}

/* ---------- SPONSORS / FOOTER THANK YOU SECTION ---------- */
.sponsors {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(212, 175, 55, 0.75);
  border-radius: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
}

.sponsors h3 {
  margin: 0;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #8a6d24;
  line-height: 1.2;
}

.sponsors-subtext {
  margin: 0.6rem auto 1.75rem;
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.6;
  color: #223122;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1rem;
}

.sponsor-column {
  position: relative;
  padding: 0 1rem;
}

.sponsor-column:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  width: 1px;
  height: calc(100% - 16px);
  background: linear-gradient(to bottom,
      transparent,
      rgba(212, 175, 55, 0.7),
      transparent);
}

.sponsor-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sponsor-column li {
  padding: 0.65rem 0;
  color: #2e3d2e;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* optional soft separator between names */
.sponsor-column li:not(:last-child) {
  border-bottom: 1px solid rgba(108, 139, 111, 0.12);
}

/* Mobile */
@media (max-width: 768px) {
  .sponsors {
    padding: 2rem 1rem;
  }

  .sponsor-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .sponsor-column {
    padding: 0 0.5rem;
    border-bottom: none;
  }

  .sponsor-column:not(:last-child)::after {
    display: block;
  }

  .sponsor-column li {
    font-size: 0.95rem;
    padding: 0.5rem 0;
  }
}

/* ---------- RSVP SECTION ---------- */
.rsvp {
  text-align: center;
  padding: 1rem 1rem;
  margin: 1rem auto;
  max-width: 700px;
  border: none;
  border-radius: 1.25rem;
}

.rsvp p {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
  color: #223122;
}

/* ---------- RSVP BUTTON ---------- */
.rsvp-button {
  background: linear-gradient(145deg, #6c8b6f, #567457);
  color: white;
  border: 2px solid #d4af37;
  padding: 14px 34px;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.25s ease;
}

/* Hover — elegant gold glow */
.rsvp-button:hover {
  background: linear-gradient(145deg, #7da882, #628a67);
  box-shadow:
    0 0 0 3px rgba(212, 175, 55, 0.25),
    0 8px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

/* Click */
.rsvp-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ---------- COURT OF HONOR ---------- */
.court {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
}

/* Decorative squiggly sides */
.court::before,
.court::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.5;
}

/* Left squiggle */
.court::before {
  left: -10px;
  background-image: url("data:image/svg+xml;utf8,\
  <svg viewBox='0 0 40 800' xmlns='http://www.w3.org/2000/svg'>\
  <path d='M20 0 Q5 100 20 200 T20 400 T20 600 T20 800' \
  fill='none' stroke='%23d4af37' stroke-width='8'/>\
  </svg>");
}

/* Right squiggle */
.court::after {
  right: -25px;
  background-image: url("data:image/svg+xml;utf8,\
  <svg viewBox='0 0 40 800' xmlns='http://www.w3.org/2000/svg'>\
  <path d='M20 0 Q35 100 20 200 T20 400 T20 600 T20 800' \
  fill='none' stroke='%23d4af37' stroke-width='8'/>\
  </svg>");
}

.court h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #8a6d24;
  margin-bottom: 0.5rem;
}

.chamberlain {
  color: #223122;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.chamberlain strong {
  color: #8a6d24;
}

.court-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  max-width: 600px;
  margin: 0 auto;
}

.court-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.court-columns li {
  padding: 0.5rem 0;
  font-size: 1.15rem;
  color: #2e3d2e;
}

/* Mobile */
@media (max-width: 768px) {
  .court {
    padding: 2rem 1rem;
  }

  .court-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 100%;
  }

  .court-columns li {
    font-size: 1rem;
    padding: 0.4rem 0;
  }

  .chamberlain {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.4;
  }

  .chamberlain strong {
    white-space: nowrap;
  }

  /* show squiggles on mobile */
  .court::before,
  .court::after {
    opacity: 0.35;
    width: 20px;
  }

  .court::before {
    left: 0;
  }

  .court::after {
    right: 0;
  }
}