/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #F4F5F7; color: #1A1A2E; line-height: 1.4; }
a { text-decoration: none; color: inherit; }

/* === NAVBAR === */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #E8E8E8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 0 20px;
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: 56px;
}
.logo {
  font-size: 18px; font-weight: 800; color: #FF6B35;
  white-space: nowrap; flex-shrink: 0;
}
.logo span { color: #1A1A2E; }

/* === FILTER BAR === */
.filter-bar {
  position: sticky; top: 56px; z-index: 90;
  background: #fff; border-bottom: 1px solid #E8E8E8;
  padding: 10px 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filter-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.search-input {
  flex: 1; min-width: 180px; max-width: 280px;
  padding: 7px 14px; border: 1.5px solid #E0E0E0; border-radius: 20px;
  font-size: 14px; outline: none; transition: border-color .2s;
}
.search-input:focus { border-color: #FF6B35; }

.filter-group { display: flex; gap: 4px; flex-wrap: wrap; }

.filter-btn {
  padding: 6px 14px; border: 1.5px solid #E0E0E0; border-radius: 20px;
  background: #fff; font-size: 13px; cursor: pointer; transition: all .15s;
  color: #555; white-space: nowrap;
}
.filter-btn:hover { border-color: #FF6B35; color: #FF6B35; }
.filter-btn.active { background: #FF6B35; border-color: #FF6B35; color: #fff; font-weight: 600; }

.filter-select {
  padding: 6px 12px; border: 1.5px solid #E0E0E0; border-radius: 20px;
  background: #fff; font-size: 13px; cursor: pointer; outline: none; color: #555;
  transition: border-color .2s;
}
.filter-select:focus { border-color: #FF6B35; }

/* View Toggle */
.view-toggle { margin-left: auto; display: flex; gap: 4px; }
.view-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #E0E0E0; border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 16px; transition: all .15s;
}
.view-btn.active { background: #FF6B35; border-color: #FF6B35; }

/* === MAIN CONTENT === */
.main { max-width: 1280px; margin: 0 auto; padding: 16px 20px 40px; }

.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.results-count { font-size: 14px; color: #666; }
.results-count strong { color: #1A1A2E; }

/* === EVENT GRID === */
.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .events-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .events-grid { grid-template-columns: 1fr; } }

/* === EVENT CARD === */
.event-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  overflow: hidden; cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.card-photo {
  position: relative; height: 140px; overflow: hidden; flex-shrink: 0;
}
.card-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.event-card:hover .card-photo img { transform: scale(1.04); }

.card-photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.category-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; border-radius: 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: #fff;
}

.free-badge {
  position: absolute; top: 8px; right: 8px;
  background: #009688; color: #fff;
  padding: 3px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 700;
}

.card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

.card-title {
  font-size: 13.5px; font-weight: 700; color: #1A1A2E;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.card-date { font-size: 12px; font-weight: 600; color: #FF6B35; }
.card-sep { color: #CCC; font-size: 11px; }
.card-city { font-size: 12px; color: #777; }
.card-time { font-size: 11px; color: #AAA; margin-top: 1px; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center; padding: 60px 20px; color: #999;
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }

/* === SWIPE MODE === */
.swipe-container { display: none; }
.swipe-container.active { display: flex; flex-direction: column; align-items: center; padding: 20px 20px 40px; }

.swipe-progress-wrap {
  width: 100%; max-width: 420px; margin-bottom: 16px;
}
.swipe-progress-bar {
  height: 4px; background: #E8E8E8; border-radius: 2px; overflow: hidden;
}
.swipe-progress-fill {
  height: 100%; background: #FF6B35; border-radius: 2px;
  transition: width .3s;
}
.swipe-counter { font-size: 13px; color: #999; text-align: center; margin-top: 6px; }

.swipe-card-wrap {
  width: 100%; max-width: 420px; position: relative;
  perspective: 1000px;
}

/* Stack effect: next card visible behind */
.swipe-card-next {
  position: absolute; top: 6px; left: 4px; right: 4px;
  background: #fff; border-radius: 16px; height: 520px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 1; pointer-events: none;
  transform: scale(0.97);
}

.swipe-card {
  position: relative; z-index: 2;
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  overflow: hidden; cursor: grab;
  user-select: none; touch-action: none;
  transition: transform .08s;
}
.swipe-card.animating { transition: transform .35s cubic-bezier(.25,.46,.45,.94), opacity .35s; }
.swipe-card.fly-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.swipe-card.fly-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }

.swipe-photo { position: relative; height: 300px; overflow: hidden; }
.swipe-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
}
.swipe-category {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 12px; border-radius: 14px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; color: #fff;
}

/* Swipe overlays */
.swipe-overlay-skip, .swipe-overlay-save {
  position: absolute; top: 20px;
  padding: 8px 18px; border-radius: 8px; border: 3px solid;
  font-size: 22px; font-weight: 900; letter-spacing: 2px;
  opacity: 0; transition: opacity .1s; pointer-events: none; z-index: 10;
  transform: rotate(-15deg);
}
.swipe-overlay-skip { left: 20px; color: #FF3B5C; border-color: #FF3B5C; transform: rotate(-10deg); }
.swipe-overlay-save { right: 20px; color: #4CAF50; border-color: #4CAF50; transform: rotate(10deg); }

.swipe-info { padding: 18px 20px 24px; }
.swipe-title { font-size: 20px; font-weight: 800; color: #1A1A2E; margin-bottom: 8px; line-height: 1.3; }
.swipe-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.swipe-date { font-size: 15px; font-weight: 700; color: #FF6B35; }
.swipe-city { font-size: 14px; color: #666; }
.swipe-time-row { font-size: 13px; color: #999; }

.swipe-actions {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 24px; padding: 0 20px 8px;
}
.swipe-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform .15s, box-shadow .15s;
}
.swipe-btn:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.swipe-btn-skip { background: #fff; color: #FF3B5C; border: 2px solid #FFE0E6; }
.swipe-btn-skip:hover { background: #FFF0F3; }
.swipe-btn-save { background: #FF6B35; color: #fff; width: 72px; height: 72px; font-size: 28px; }
.swipe-btn-save:hover { background: #E85A25; }
.swipe-btn-undo { background: #fff; color: #999; border: 2px solid #EEE; font-size: 18px; }

.swipe-hint { text-align: center; font-size: 12px; color: #CCC; margin-top: 10px; }

.swipe-done {
  text-align: center; padding: 40px 20px;
  font-size: 18px; color: #666;
}
.swipe-done .big-emoji { font-size: 56px; display: block; margin-bottom: 16px; }

/* Saved events counter badge */
.saved-badge {
  background: #4CAF50; color: #fff;
  padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: 700;
  margin-left: 6px;
}

/* === GRID hidden when swipe active === */
.grid-container { display: block; }
.grid-container.hidden { display: none; }

/* === PROVINCE SECTION HEADER === */
.section-label {
  font-size: 13px; font-weight: 700; color: #999; text-transform: uppercase;
  letter-spacing: .8px; margin: 20px 0 10px;
}

/* === FOOTER === */
.footer {
  text-align: center; padding: 32px 20px; font-size: 13px; color: #AAA;
  border-top: 1px solid #EBEBEB; margin-top: 40px; background: #fff;
}

/* === MOBILE ADJUSTMENTS === */
@media (max-width: 600px) {
  .filter-bar { padding: 8px 12px; }
  .navbar { padding: 0 14px; }
  .navbar-inner { gap: 8px; }
  .logo { font-size: 16px; }
  .main { padding: 12px 12px 40px; }
  .swipe-card-wrap { max-width: 100%; }
  .swipe-photo { height: 240px; }
  .swipe-btn { width: 56px; height: 56px; }
  .swipe-btn-save { width: 64px; height: 64px; }
}
