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

:root {
  --gold:    #c9993a;
  --gold-lt: #f0d07a;
  --deep:    #1a1230;
  --purple:  #3b2d6e;
  --cream:   #fdf6e3;
  --text:    #2c2440;
  --muted:   #6b5f8a;
  --white:   #ffffff;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,.15);
}

body {
  font-family: 'Georgia', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Header ───────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--deep) 0%, var(--purple) 100%);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23c9993a' opacity='.25'/%3E%3C/svg%3E") repeat;
}

.header-inner { position: relative; }

.om-symbol {
  font-size: 3.5rem;
  color: var(--gold-lt);
  display: block;
  margin-bottom: .5rem;
  text-shadow: 0 0 30px rgba(201,153,58,.6);
}

header h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: .03em;
}

header p {
  margin-top: .6rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  font-style: italic;
}

/* ── Nav ──────────────────────────────────────────────────── */
nav {
  background: var(--deep);
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: .7rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

nav a {
  color: var(--gold-lt);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: color .2s;
}
nav a:hover { color: var(--white); }

/* ── Main ─────────────────────────────────────────────────── */
main { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem 4rem; }

/* ── Section headers ──────────────────────────────────────── */
.section-title {
  text-align: center;
  font-size: 1.7rem;
  color: var(--purple);
  margin-bottom: .4rem;
}
.section-divider {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0 auto 2rem;
}

/* ── Loading / Error states ───────────────────────────────── */
.state-msg {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-style: italic;
}
.state-msg.error { color: #b00020; }

/* ── Trip Cards ───────────────────────────────────────────── */
#trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.trip-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.trip-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.trip-card .card-img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--purple), var(--deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.card-body h3 {
  font-size: 1.3rem;
  color: var(--purple);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.badge {
  background: var(--cream);
  border: 1px solid rgba(201,153,58,.4);
  color: var(--text);
  border-radius: 20px;
  padding: .2rem .75rem;
  font-size: .82rem;
}
.badge-green {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}
.badge-amber {
  background: #fff8e1;
  border-color: #ffe082;
  color: #7a5800;
}

.card-body p { color: var(--muted); font-size: .95rem; flex: 1; }

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}

.seats-badge {
  font-size: .82rem;
  color: var(--muted);
}
.seats-badge.low { color: #c0392b; font-weight: 600; }

.btn-register {
  margin-top: .75rem;
  width: 100%;
  padding: .85rem;
  background: linear-gradient(135deg, var(--purple), var(--deep));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .04em;
  transition: opacity .2s;
}
.btn-register:hover { opacity: .88; }
.btn-register:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 1;
}

/* ── About section ────────────────────────────────────────── */
#about {
  margin-top: 4rem;
  background: linear-gradient(135deg, var(--deep) 0%, var(--purple) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
}
#about h2 { color: var(--gold-lt); margin-bottom: 1rem; }
#about p { color: rgba(255,255,255,.85); max-width: 620px; margin: 0 auto; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  position: relative;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } }

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.4rem; cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal h2 { color: var(--purple); margin-bottom: .25rem; font-size: 1.3rem; }
.modal .trip-summary {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.form-group label { font-size: .9rem; color: var(--text); font-weight: 600; }
.form-group input {
  padding: .65rem .9rem;
  border: 1.5px solid #d0c8e8;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--purple); }
.form-group .hint { font-size: .78rem; color: var(--muted); }

.modal-total {
  background: var(--cream);
  border-radius: 8px;
  padding: .75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}
.modal-total strong { color: var(--gold); font-size: 1.2rem; }

.btn-pay {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #0f9d58, #0b7a43);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.btn-pay:hover { opacity: .9; }
.btn-pay:disabled { opacity: .6; cursor: not-allowed; }

.pay-note {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .6rem;
}

.payment-error {
  color: #b00020;
  font-size: .85rem;
  margin: -.5rem 0 .75rem;
}

/* ── Success message ──────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 1.5rem 0;
}
.success-icon { font-size: 3.5rem; display: block; margin-bottom: .75rem; }
.success-box h3 { color: #0b7a43; margin-bottom: .5rem; }
.success-box p { color: var(--muted); font-size: .95rem; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--deep);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .85rem;
}
footer a { color: var(--gold-lt); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { gap: 1.2rem; font-size: .85rem; }
  .modal { padding: 1.5rem; }
}
