/* ---------- Color Variables ---------- */
:root {
  --blue-main: #007BA7;   /* Cerulean */
  --blue-dark: #004466;   /* Navy */
  --blue-light: #66CFFF;  /* Sky */
}

/* ---------- Base ---------- */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  color: var(--blue-main);

  /* Wallpaper background */
  background: url('../img/wallpaper2.png') repeat;
  background-size: 400px 400px;
  background-attachment: fixed;
}

/* Overlay tint */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--blue-main);
  z-index: -1;
}

body.centered {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  text-align: center;
}

h1, h2 {
  margin: 0;
  text-align: center;
  font-weight: 600;
}

a {
  text-decoration: none;
  transition: 0.3s;
  cursor: pointer; /* make all <a> show as clickable */
}

/* ---------- Buttons ---------- */
button,
.btn,
.btn-link {
  display: block;
  text-align: center;
  margin: 0;
  padding: 14px;
  width: 100%;
  background: var(--blue-main);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: background 0.3s;
}

button:hover,
.btn:hover,
.btn-link:hover {
  background: var(--blue-dark);
}

/* ---------- Inputs & Forms ---------- */
form {
  background: #fff;
  padding: 0px;
  border-radius: 12px;
  margin: 0;
}

form h2 {
  margin: 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
}

.form-group { margin: 0; }

input, select {
  width: 100%;
  padding: 12px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  background: transparent;
  box-sizing: border-box;
  transition: 0.2s;
}

input:focus, select:focus {
  border-color: #999;
  outline: none;
}

.form-row {
  display: flex;
  gap: 10px;
  margin: 0;
}

.form-row .form-group {
  flex: 1 1 50%;
  max-width: 50%;
}

.form-row input[name="city"] { flex: 1; }
.form-row select[name="state"] { flex: 0 0 80px; text-align: center; }
.form-row input[name="zip"] { flex: 0 0 100px; text-align: center; }

/* ---------- Containers ---------- */
.container {
  max-width: 700px;
  margin: 20px auto auto auto;
  padding: 0;
}

/* ---------- Card Utility ---------- */
.card {
  background:#fff;
  padding: 20px 20px 20px 20px;
  border-radius:12px;
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Success Box ---------- */
.success-box {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;

  max-width: 600px;
  width: 100%;
  text-align: center;
}

.success-box h1 {
  font-family: 'Allura', cursive;
  font-size: 60px;
  margin: 0;
  color: var(--blue-main);
}

.success-box p {
  font-size: 18px;
  margin: 0;
}

/* ---------- Language Toggle ---------- */
.toggle {
  position: relative;       /* no more absolute */
  top: auto;
  right: auto;

  display: flex;
  justify-content: center;  /* center above envelope */
  gap: 8px;
  margin: 10px auto 15px;   /* space above envelope */
  z-index: 10;
}

.toggle a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin: 0;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

/* Inactive state */
.toggle a:not(.active) {
  background: #f1f1f1;
  color: #555;
  border: 1px solid #ccc;
}

/* Active EN */
.toggle a[href*="lang=en"].active {
  background: var(--blue-light);
  color: #fff;
  border: 1px solid var(--blue-main);
}

/* Active ES */
.toggle a[href*="lang=es"].active {
  background: var(--blue-main);
  color: #fff;
  border: 1px solid var(--blue-dark);
}

/* ---------- Banner ---------- */
.banner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
  border-radius: 12px;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.banner-content {
  position: absolute;
  top: 50%;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  color: #222;
  line-height: 1.4;
  box-sizing: border-box;
}

.banner .names {
  font-family: 'Allura', cursive;
  font-size: clamp(36px, 6vw, 72px);
  margin: 0;
  color: #222;
  font-weight: 600;
}

.banner p {
  font-size: clamp(14px, 2.5vw, 20px);
  margin: 0;
  line-height: 1.5;
}

.banner strong {
  font-size: clamp(16px, 3vw, 22px);
  margin: 0;
  display: block;
}

.banner .invite-line {
  font-size: clamp(16px, 3vw, 22px);
  font-style: italic;
  margin: 0;
  color: #555;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .banner {
    position: relative;
  }

  .banner-content {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    min-height: 600px;
    text-align: center;
    color: #222;
    line-height: 1.4;
    box-sizing: border-box;
  }

  .banner .names { font-size: 48px; }
  .banner p { font-size: 18px; }
  .banner strong,
  .banner .invite-line { font-size: 20px; }
}

.banner-table td.subtitle,
.banner-table td.date,
.banner-table td.location-label,
.banner-table td.location-text {
  font-size: clamp(18px, 4vw, 20px);
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  margin: 0;
  padding: 4px 0;
}

/* Adjust for Galaxy S24 Ultra width (1080px) */
@media (min-width: 1000px) and (max-width: 1200px) {
  .banner {
    position: relative;
  }

  .banner-content {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    min-height: 650px;
    text-align: center;
    color: #222;
    line-height: 1.4;
    box-sizing: border-box;
  }
}

/* Envelope Wrapper */
.envelope {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  perspective: 1200px;
  border-radius: 12px;
  overflow: hidden;
}

.flap-top,
.flap-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: #fff;
  z-index: 5;
  backface-visibility: hidden;
}

.flap-top {
  top: 0;
  border-bottom: 1px solid #ddd;
  transform-origin: top center;
  transform: rotateX(0deg);
}

.flap-bottom {
  bottom: 0;
  border-top: 1px solid #ddd;
  transform-origin: bottom center;
  transform: rotateX(0deg);
}

/* Animations */
.envelope.open .flap-top {
  animation: openTop 1.5s forwards ease-in-out;
}

.envelope.open .flap-bottom {
  animation: openBottom 1.5s forwards ease-in-out 0.5s;
}

@keyframes openTop {
  from { transform: rotateX(0deg); }
  to   { transform: rotateX(-180deg); }
}

@keyframes openBottom {
  from { transform: rotateX(0deg); }
  to   { transform: rotateX(180deg); }
}

/* Envelope Content */
.envelope .content {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  z-index: 1;
}

/* ---------- Footer ---------- */
.footer-nopadding {
  background:#fff;
  padding: 20px 0 0 0;
  border-radius:12px;
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  text-align: center;
  padding: 0;
  margin: 0;
}

.site-footer .footer-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
}

.site-footer p { margin: 0; }

.site-footer a {
  color: var(--blue-main);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}
.site-footer a:hover { color: var(--blue-dark); }

.site-footer .footer-slogan {
  font-family: 'Allura', cursive;
  font-size: 5vw;   /* scales purely with viewport width */
  font-weight: normal;
  color: var(--blue-main);
  margin: 0;
  text-align: center;
  line-height: 1.2;
  display: block;
  width: 100%;
}



.contact-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 20px 0;
}

.contact-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.site-footer {
  position: relative;
}

.admin-gear {
  display: block;
  text-align: center;
  margin: 15px auto 0;
  font-size: 26px;
  color: #555;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.admin-gear:hover {
  opacity: 0.9;
  color: var(--blue-dark);
  transform: scale(1.1);
}

/* ==========================
   Sort Controls
   ========================== */
.sort-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: space-between; /* distribute buttons across row */
}

.sort-btn {
  flex: 1 1 0;               /* all buttons equal width */
  text-align: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
}

.sort-btn:hover {
  background: transparent;
}

.sort-btn.active {
  background: #007BA7;
  color: #fff;
}


/* ==========================
   Card Action Buttons
   ========================== */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.card-actions form {
  flex: 1; /* each form/button takes equal width */
}

.btn-action {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.btn-action.edit {
  background: #007BA7;
  color: #fff;
}

.btn-action.edit:hover {
  background: #005f80;
}

.btn-action.delete {
  background: #dc3545;
  color: #fff;
}

.btn-action.delete:hover {
  background: #a71d2a;
}




