/* Emmaus World Retreats - följer sajtens tokens i child-temat (emmaus-divi.css) */
.ewr {
  --ewr-men: #3a3228;
  --ewr-women: #c8a96a;
  --ewr-gold: var(--emmaus-gold, #b88a44);
  --ewr-brown: var(--emmaus-brown, #6f4d37);
  --ewr-text: var(--emmaus-text, #2b241f);
  --ewr-muted: var(--emmaus-muted, #6b5f56);
  --ewr-line: rgba(184, 138, 68, 0.25);
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ewr-text);
}

/* ── Filter ─────────────────────────────────── */
.ewr-filters {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  background: var(--emmaus-surface, #fff);
  border: 1px solid var(--ewr-line);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 26px rgba(43, 36, 31, 0.07);
}

.ewr-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }

.ewr-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ewr-gold);
}

.ewr input[type="search"],
.ewr select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(111, 77, 55, 0.22);
  border-radius: 10px;
  background: #fbf9f5;
  font-family: inherit;
  font-size: 16px;
  color: var(--ewr-text);
  box-sizing: border-box;
}

.ewr select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  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 d='M1 1l5 5 5-5' fill='none' stroke='%23b88a44' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.ewr input[type="search"]:focus,
.ewr select:focus {
  outline: none;
  border-color: var(--ewr-gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.22);
}

.ewr-seg {
  display: inline-flex;
  height: 46px;
  border: 1px solid rgba(111, 77, 55, 0.22);
  border-radius: 999px;
  overflow: hidden;
  background: #fbf9f5;
}

.ewr-seg button {
  border: 0;
  background: transparent;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ewr-brown);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ewr-seg button + button { border-left: 1px solid rgba(111, 77, 55, 0.15); }
.ewr-seg button:hover { background: rgba(200, 169, 106, 0.12); }
.ewr-seg button.is-on { background: var(--ewr-men); color: #fff; }
.ewr-seg button[data-type="women"].is-on { background: var(--ewr-women); }
.ewr-seg button:focus-visible { outline: 2px solid var(--ewr-gold); outline-offset: -2px; }

.ewr-count {
  margin: 22px 0 14px;
  font-size: 16px;
  color: var(--ewr-muted);
  text-align: center;
}

.ewr-count strong { color: var(--ewr-brown); }

/* ── Karta ──────────────────────────────────── */
.ewr-map-wrap { position: relative; }

.ewr-map {
  height: 480px;
  border-radius: var(--emmaus-radius, 22px);
  overflow: hidden;
  border: 1px solid var(--ewr-line);
  box-shadow: var(--emmaus-shadow, 0 18px 55px rgba(43, 36, 31, 0.10));
  background: #efe7d8;
  z-index: 0;
}

.ewr-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  color: var(--ewr-brown);
  box-shadow: 0 4px 14px rgba(43, 36, 31, 0.12);
}

.ewr-legend span { display: inline-flex; align-items: center; gap: 6px; }

.ewr-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ewr-dot-men { background: var(--ewr-men); }
.ewr-dot-women { background: var(--ewr-women); }

/* Markörer */
.ewr-pin {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ewr-pin-men { background: var(--ewr-men); }
.ewr-pin-women { background: var(--ewr-women); }

/* Kluster i sajtens färger */
.ewr .marker-cluster,
.ewr .marker-cluster div { background-clip: padding-box; }

.ewr .marker-cluster { background: rgba(200, 169, 106, 0.35); border-radius: 50%; }

.ewr .marker-cluster div {
  width: 32px;
  height: 32px;
  margin: 4px;
  border-radius: 50%;
  background: #4a5240;
  color: #fff;
  text-align: center;
  font: 700 13px/32px Georgia, serif;
}

/* Popup */
.ewr .leaflet-popup-content-wrapper { border-radius: 14px; }
.ewr .leaflet-popup-content { margin: 14px 18px; font-family: Georgia, serif; font-size: 14px; line-height: 1.5; }
.ewr-pop-date { color: var(--ewr-gold); font-weight: 700; display: block; }
.ewr-pop-title { color: var(--ewr-brown); font-weight: 700; display: block; margin: 2px 0; }
.ewr-pop-place { color: var(--ewr-muted); display: block; }
.ewr .ewr-pop-link { display: inline-block; margin-top: 6px; color: var(--ewr-gold) !important; font-weight: 700; }

/* ── Lista ──────────────────────────────────── */
.ewr-month {
  margin: 46px 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ewr-gold);
}

.ewr-month::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 169, 106, 0.55), transparent);
}

.ewr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ewr-card {
  display: flex;
  flex-direction: column;
  background: var(--emmaus-surface, #fff);
  border: 1px solid var(--ewr-line);
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 8px 26px rgba(43, 36, 31, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ewr-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(43, 36, 31, 0.12);
}

.ewr-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ewr-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ewr-men);
}

.ewr-badge-women { background: var(--ewr-women); }

.ewr-country {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ewr-muted);
  text-align: right;
}

.ewr-date {
  color: var(--ewr-gold);
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
}

.ewr .ewr-title {
  font-size: 18px;
  line-height: 1.35;
  color: var(--ewr-brown);
  margin: 0 0 8px;
  padding: 0;
}

.ewr .ewr-place {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ewr-muted);
  margin: 0 0 16px;
  padding: 0;
}

.ewr-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.ewr .ewr-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ewr-gold);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ewr .ewr-btn:hover { background: var(--ewr-brown); transform: translateY(-1px); }
.ewr .ewr-btn-own { background: #4a5240; }

.ewr .ewr-maplink {
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ewr-brown);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ewr .ewr-maplink:hover { color: var(--ewr-gold); }

.ewr-src {
  width: 100%;
  font-size: 12px;
  color: #9a8d80;
}

.ewr-more-wrap { text-align: center; margin-top: 34px; }

.ewr .ewr-more {
  border: 2px solid var(--ewr-gold);
  background: #fff;
  color: var(--ewr-gold);
  border-radius: 999px;
  padding: 12px 30px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ewr .ewr-more:hover { background: var(--ewr-gold); color: #fff; }

.ewr-empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--ewr-muted);
  font-style: italic;
}

.ewr-updated {
  margin-top: 30px;
  text-align: center;
  font-size: 13px;
  color: #9a8d80;
}

/* ── Responsivt ─────────────────────────────── */
@media (max-width: 980px) {
  .ewr-filters { grid-template-columns: 1fr 1fr; }
  .ewr-field-search { grid-column: 1 / -1; }
  .ewr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ewr-map { height: 400px; }
}

@media (max-width: 640px) {
  .ewr-filters { grid-template-columns: 1fr; padding: 16px; }
  .ewr-seg { width: 100%; }
  .ewr-seg button { flex: 1; }
  .ewr-grid { grid-template-columns: 1fr; }
  .ewr-map { height: 340px; border-radius: 16px; }
  .ewr-legend { left: 10px; bottom: 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .ewr-card, .ewr-card:hover, .ewr .ewr-btn:hover { transition: none; transform: none; }
}
