:root {
  --accent: #ff6b3d;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --text: #333;
  --muted: #777;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 15px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

h1 {
  background: var(--accent);
  color: #fff;
  padding: 20px;
  text-align: center;
  margin: 0;
}

/* SEARCH */
.search-box {
  text-align: center;
  margin: 20px;
}

.search-box input {
  width: 100%;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 25px;
  border: 1px solid #ddd;
  font-size: 15px;
}

.search-box input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* FILTERS */
.filters {
  text-align: center;
}

.filter-btn {
  margin: 5px;
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  background: #eee;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.filter-btn:hover {
  background: #ffd9cc;
}

.filter-btn.is-active {
  background: var(--accent);
  color: #fff;
}

/* GRID */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 25px;
  padding: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
}

.card h3 {
  margin: 10px 0 5px;
  font-size: 17px;
}

.card p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}

/* TAG */
.tag {
  align-self: center;
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 12px;
  background: #ffe7df;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* TAG CHIPS */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.tag-chip {
  font: inherit;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #e3e6ea;
  background: #f3f5f8;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

button.tag-chip:hover,
button.tag-chip:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  outline: none;
}

/* on cards, push chips to the bottom for even alignment */
.card .tags {
  margin-top: auto;
  padding-top: 10px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 0 25px 40px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
}

.modal-title {
  margin: 14px 0 6px;
}

.modal-desc {
  color: var(--muted);
  margin: 0 0 12px;
}

.modal-location {
  font-weight: 600;
  margin: 0 0 16px;
}

/* MAP LINK */
.map-link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
}

.map-link:hover {
  background: #e85a2c;
}
