/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold-deep: #7a5c0a;
  --gold: #b8860b;
  --gold-light: #c9a84c;
  --gold-pale: #f5edd5;
  --gold-ghost: #fbf6ec;
  --cream: #fafaf5;
  --white: #ffffff;
  --text: #1e1e1e;
  --text-mid: #4a4a4a;
  --text-light: #777777;
  --border: #e4d9c0;
  --error: #b33a2b;
  --success: #2e7d52;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.13);
  --radius: 12px;
  --transition: 0.22s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lato", "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a0c00 0%, #4a2900 45%, #8b6914 100%);
  text-align: center;
  padding: 60px 20px 50px;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero-slides.is-ready {
  opacity: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

/* pan bottom→top only when image can overflow vertically (wide/landscape viewports) */
@media (min-width: 768px) {
  .hero-slide {
    background-position: center bottom;
    transition:
      opacity 2s ease-in-out,
      background-position 36s linear;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 6, 0, 0.35), rgba(20, 10, 0, 0.45));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 620px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 14px;
}

.hero-dates {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.04em;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 60px;
  flex: 1;
}

/* ─── Intro card ─────────────────────────────────────────────────────────────── */
.intro-card {
  background: var(--gold-ghost);
  border: 1px solid var(--gold-pale);
  border-left: 4px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
  color: var(--text-mid);
  font-size: 0.97rem;
}

/* ─── Form card ──────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ─── Form sections ──────────────────────────────────────────────────────────── */
.form-section {
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-deep);
  font-family: "Lato", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.section-hint {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: -10px;
  margin-bottom: 16px;
}

/* ─── Field groups ───────────────────────────────────────────────────────────── */
.field-group {
  margin-bottom: 18px;
}
.field-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.required {
  color: var(--gold);
}
.optional {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.82rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23777' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.field-error {
  display: block;
  font-size: 0.82rem;
  color: var(--error);
  margin-top: 5px;
  min-height: 1.1em;
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--error);
}

/* ─── Number controls ────────────────────────────────────────────────────────── */
.number-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.number-field label {
  text-align: center;
  font-size: 0.85rem;
}

.age-range {
  display: block;
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.78rem;
}

.number-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.num-btn {
  width: 36px;
  height: 40px;
  border: none;
  background: var(--gold-ghost);
  color: var(--gold-deep);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.num-btn:hover {
  background: var(--gold-pale);
}
.num-btn:active {
  background: var(--border);
}

.number-control input[type="number"] {
  flex: 1;
  border: none;
  border-radius: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 4px;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.number-control input[type="number"]::-webkit-inner-spin-button,
.number-control input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* ─── Radio cards (accommodation) ────────────────────────────────────────────── */
.radio-group {
  display: grid;
  gap: 10px;
}

.radio-card {
  display: flex;
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card-content {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0 10px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.radio-card:hover .radio-card-content {
  border-color: var(--gold-light);
  background: var(--gold-ghost);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
  border-color: var(--gold-light);
  background: var(--gold-ghost);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.radio-card-icon {
  grid-row: 1 / 3;
  font-size: 1.4rem;
  align-self: center;
}

.radio-card-title {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text);
}

.radio-card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ─── Camp section (animated) ────────────────────────────────────────────────── */
.camp-section {
  background: var(--gold-ghost);
  border-top: 1px dashed var(--gold-pale) !important;
  overflow: hidden;
  max-height: 600px;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease,
    opacity 0.3s ease;
  opacity: 1;
}

.camp-section.hidden {
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  pointer-events: none;
  border: none !important;
}

/* ─── Group members section ──────────────────────────────────────────────────── */
.group-section {
  overflow: hidden;
  max-height: 3000px;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease,
    opacity 0.3s ease;
  opacity: 1;
}

.group-section.hidden {
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  pointer-events: none;
  border: none !important;
}

.member-subgroup-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold-deep);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.member-name-age {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 10px;
  align-items: start;
}

/* ─── Checkboxes ─────────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--text-mid);
  padding: 8px 12px;
  border-radius: 8px;
  transition: background var(--transition);
}

.checkbox-item:hover {
  background: var(--gold-pale);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ─── Inline radio (transport) ───────────────────────────────────────────────── */
.radio-inline-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--text-mid);
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition:
    border-color var(--transition),
    background var(--transition);
}

.radio-inline:hover {
  border-color: var(--gold-light);
  background: var(--gold-ghost);
}

.radio-inline input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.radio-inline:has(input:checked) {
  border-color: var(--gold-light);
  background: var(--gold-ghost);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

/* ─── Form footer / Submit ───────────────────────────────────────────────────── */
.form-footer {
  padding: 24px 28px;
  background: var(--gold-ghost);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.35);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(184, 134, 11, 0.45);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ─── Success card ───────────────────────────────────────────────────────────── */
.success-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 32px;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.35);
}

.success-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.success-card p {
  color: var(--text-mid);
  margin-bottom: 10px;
}

.success-dates {
  font-weight: 600;
  color: var(--gold) !important;
  font-size: 0.95rem;
  margin-bottom: 28px !important;
}

.btn-secondary {
  padding: 10px 28px;
  background: transparent;
  border: 2px solid var(--gold-light);
  color: var(--gold-deep);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.btn-secondary:hover {
  background: var(--gold-pale);
}

/* ─── Error banner ───────────────────────────────────────────────────────────── */
.error-banner {
  background: #fdf0ee;
  border: 1px solid #e8a99f;
  border-left: 4px solid var(--error);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  color: var(--error);
  font-size: 0.92rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #1a0c00;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 22px 16px;
  font-size: 0.83rem;
  line-height: 1.8;
}

.site-footer a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.8rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ─── Admin styles ───────────────────────────────────────────────────────────── */
.admin-header {
  background: #1a0c00;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  color: var(--gold-light);
}

.admin-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-sm {
  padding: 7px 16px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition);
}

.btn-sm:hover {
  opacity: 0.85;
}
.btn-gold {
  background: var(--gold-light);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.75);
}

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* Login */
.login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--gold-deep);
  margin-bottom: 8px;
}

.login-card p {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.login-card .field-group {
  text-align: left;
}

.login-card .btn-submit {
  width: 100%;
  margin-top: 8px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-deep);
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Table */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.table-toolbar h3 {
  font-size: 0.95rem;
  color: var(--text-mid);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  background: var(--gold-ghost);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0ede5;
  color: var(--text-mid);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: var(--gold-ghost);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-camp {
  background: #e8f4e8;
  color: #2e7d52;
}
.badge-temple {
  background: #eae6f8;
  color: #4a2f8a;
}
.badge-other {
  background: #f0f0f0;
  color: #666;
}

.btn-delete {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid #e8a99f;
  color: var(--error);
  font-size: 0.78rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition);
}

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

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
  font-size: 0.93rem;
}

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .form-section {
    padding: 22px 18px 20px;
  }
  .form-footer {
    padding: 20px 18px;
  }
  .number-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .number-field label {
    text-align: left;
  }
  .radio-inline-group {
    flex-direction: column;
  }
  .admin-container {
    padding: 16px 12px 40px;
  }
  .login-card {
    padding: 30px 22px;
  }
}
