/* join-in.css — Join-in group tours хуудас */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ===== Hero ===== */
.ji-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(460px, 70vh, 680px);
  padding: 64px 0 56px;
  background: #123f28;
  color: #fff;
}
.ji-hero picture, .ji-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.ji-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 15, 0.85) 0%, rgba(10, 22, 15, 0.45) 45%, rgba(10, 22, 15, 0.1) 100%);
}
.ji-hero-text { position: relative; z-index: 1; }
.ji-hero h1, .ji-hero p { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45); }
.ji-eyebrow { display: block; margin-bottom: 14px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steppe-green); }
.ji-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.ji-hero h1 em { font-style: italic; color: #F0C58A; }
.ji-hero p { max-width: 720px; margin-top: 16px; color: rgba(255, 255, 255, 0.88); }
.ji-steps { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; list-style: none; }
.ji-steps li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(12, 24, 17, 0.55); backdrop-filter: blur(4px); font-size: 0.92rem;
}
.ji-steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sand-gold); color: var(--charcoal); font-size: 0.85rem; }

/* ===== Шүүлтүүр ===== */
.ji-list { padding: 40px 0 80px; background: var(--ivory); min-height: 50vh; }
.ji-filter {
  display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px;
  padding: 12px; background: #fff; border: 1px solid #e6e8df; border-radius: 14px;
  box-shadow: 0 10px 28px rgba(31, 35, 35, 0.06);
}
.ji-filter input, .ji-filter select {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid #dcdfd4; border-radius: 10px; background: #fff;
  font: inherit; font-size: 0.95rem; color: var(--charcoal);
}
.ji-filter input:focus, .ji-filter select:focus { outline: 2px solid var(--steppe-green); border-color: transparent; }
.ji-count { margin: 20px 0 4px; color: #5b6360; font-size: 0.95rem; }

/* ===== Сараар бүлэглэсэн жагсаалт ===== */
.ji-month { margin-top: 28px; }
.ji-month h2 { margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; font-size: 1.5rem; margin-bottom: 14px; }
.ji-month h2 span { color: var(--sand-gold); }
.ji-month h2 small { margin-left: auto; font-size: 0.85rem; font-weight: 400; color: #6b726f; letter-spacing: 0; }
.ji-cards { display: grid; gap: 16px; }

.ji-card {
  display: grid; grid-template-columns: 240px 1fr;
  background: #fff; border: 1px solid #e6e8df; border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(31, 35, 35, 0.05);
}
.ji-card.is-guaranteed { border-left: 5px solid var(--altai-forest); }
.ji-card.is-almost { border-left: 5px solid var(--sand-gold); }
.ji-img { display: block; background: #dfe5da; min-height: 180px; }
.ji-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ji-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.ji-top { display: flex; flex-wrap: wrap; gap: 8px; }
.ji-badge, .ji-tag { padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.ji-badge.is-guaranteed { background: #e3f1e6; color: var(--altai-forest); }
.ji-badge.is-almost { background: #fbefdc; color: #8a5a17; }
.ji-tag { background: #eef0ea; color: #4c5450; font-weight: 600; }
.ji-body h3 { font-size: 1.25rem; }
.ji-body h3 a { color: var(--charcoal); text-decoration: none; }
.ji-body h3 a:hover { color: var(--altai-forest); }
.ji-dates { font-size: 0.95rem; color: #4c5450; }
.ji-pax { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.92rem; color: #4c5450; }
.ji-slots { display: flex; gap: 4px; }
.ji-slots span { width: 22px; height: 8px; border-radius: 4px; background: #e3e6dd; }
.ji-slots span.is-on { background: var(--altai-forest); }
.is-almost .ji-slots span.is-on { background: var(--sand-gold); }
.ji-members { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.ji-members li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--ivory); font-size: 0.88rem;
}
.ji-members small { display: block; font-size: 0.75rem; color: #6b726f; line-height: 1.2; }
.ji-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--altai-forest); color: #fff; font-weight: 700; font-size: 0.85rem; }
.ji-paid { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--altai-forest); }
.ji-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.ji-actions small { margin-left: auto; color: #6b726f; }
.ji-full { font-weight: 700; color: #8a5a17; }

.ji-empty { margin-top: 32px; padding: 32px; text-align: center; background: #fff; border-radius: 16px; border: 1px dashed #cfd4c8; }
.ji-empty p + p { margin: 8px auto 18px; max-width: 560px; color: #5b6360; }

/* ===== Чат ===== */
.ji-chat {
  width: min(560px, 100% - 24px); max-height: min(720px, 100vh - 40px);
  margin: auto; padding: 0; border: 0; border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.ji-chat[open] { display: flex; flex-direction: column; }
.ji-chat::backdrop { background: rgba(12, 20, 16, 0.55); }
.ji-chat-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--altai-forest); color: #fff; }
.ji-chat-head h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.ji-chat-head p { font-size: 0.85rem; opacity: 0.85; }
.ji-chat-close { border: 0; background: none; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.ji-chat-body { flex: 1; min-height: 220px; overflow-y: auto; padding: 16px 20px; background: var(--ivory); display: flex; flex-direction: column; gap: 10px; }
.ji-chat-empty { margin: auto; text-align: center; color: #6b726f; font-size: 0.92rem; }
.ji-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); font-size: 0.93rem; }
.ji-msg.is-me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #e3f1e6; }
.ji-msg.is-team { border: 1px solid var(--sand-gold); }
.ji-msg-who { font-size: 0.75rem; color: #6b726f; margin-bottom: 2px; }
.ji-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e6e8df; }
.ji-chat-form textarea { flex: 1; resize: none; padding: 10px 12px; border: 1px solid #dcdfd4; border-radius: 10px; font: inherit; font-size: 0.95rem; }
.ji-chat-signin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid #e6e8df; font-size: 0.88rem; color: #5b6360; }

@media (max-width: 760px) {
  .ji-filter { grid-template-columns: 1fr 1fr; }
  .ji-search, .ji-filter label:last-child { grid-column: 1 / -1; }
  .ji-card { grid-template-columns: 1fr; }
  .ji-img { min-height: 0; aspect-ratio: 16 / 7; }
  .ji-actions small { margin-left: 0; }
}
