:root {
  --brand: #7c3aed;
  --brand-2: #ff5a5f;
  --brand-3: #ffb224;
  --grad: linear-gradient(120deg, #7c3aed 0%, #ff5a5f 55%, #ffb224 100%);
  --ink: #16121f;
  --ink-2: #4b4458;
  --muted: #8b8398;
  --line: #ece8f1;
  --bg: #ffffff;
  --bg-soft: #f7f5fb;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(31, 18, 51, 0.08);
  --shadow-lg: 0 18px 50px rgba(31, 18, 51, 0.16);
  --accent: #7c3aed;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1160px, 92vw); margin-inline: auto; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.6rem 1.05rem; border-radius: 999px;
  border: 1px solid transparent; transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(124, 58, 237, .35); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(124, 58, 237, .45); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); }
/* Icon-only "U mojoj blizini" (the name lives in aria-label/title). */
.btn-near {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; font: inherit; font-size: 1.05rem; line-height: 1;
  cursor: pointer; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.btn-near:hover { border-color: var(--brand); color: var(--brand); }
.btn-near:active { transform: translateY(1px); }
.btn-block { width: 100%; justify-content: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand img { height: 34px; }
/* The collapse wrapper is transparent on desktop: nav + actions flow as direct header-inner children. */
.nav-collapse { display: contents; }
.main-nav { display: flex; align-items: center; gap: 1.2rem; margin-left: 0.5rem; }
.main-nav > a { color: var(--ink-2); font-weight: 600; padding: 0.4rem 0; }
.main-nav > a:hover { color: var(--brand); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.user-chip { font-weight: 600; color: var(--ink-2); cursor: pointer; }
.user-chip:hover { color: var(--brand); }
.inline-form { display: inline; margin: 0; }

/* Favorites quick-link: standalone heart icon (logged-in only). Source-ordered after the account
   actions, so it sits right of "Odjava" on desktop and — once the menu collapses — right of the hamburger on mobile. */
.fav-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--brand-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fav-link:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Compact "Dodaj događanje" CTA — desktop hides it (the full button sits in .header-actions);
   once the menu collapses it stays visible in the header bar, left of the hamburger. */
.btn-add-event-m { display: none; gap: .3rem; }
.btn-add-event-m svg { flex: none; }

/* Gradovi / Općine dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 0.4rem 0; display: inline-flex; align-items: center; gap: .3rem; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { content: "▾"; font-size: .75em; color: var(--muted); }
.nav-dropdown[open] > summary { color: var(--brand); }
.nav-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .6rem; min-width: 220px; }
.nav-menu-all { display: block; font-weight: 700; color: var(--brand); padding: .35rem .5rem .5rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.nav-menu-list { display: grid; }
.nav-menu-list.cols { grid-template-columns: 1fr 1fr; gap: 0 .6rem; max-height: 60vh; overflow-y: auto; }
.nav-menu-list a { padding: .35rem .5rem; border-radius: 8px; color: var(--ink-2); white-space: nowrap; font-size: .92rem; }
.nav-menu-list a:hover { background: var(--bg-soft); color: var(--brand); }

/* Hero */
.hero {
  position: relative; padding: 4.5rem 0 2.5rem;
  background:
    radial-gradient(900px 380px at 12% -10%, rgba(124, 58, 237, .16), transparent 60%),
    radial-gradient(800px 360px at 92% 0%, rgba(255, 90, 95, .15), transparent 55%),
    var(--bg-soft);
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -1.2px; margin: 0 0 .6rem; }
.hero-sub { font-size: 1.12rem; color: var(--ink-2); margin: 0 0 1.8rem; max-width: 38ch; }

/* Search */
.search-form {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 1rem; box-shadow: var(--shadow); display: grid; gap: 0.9rem;
}
/* Grid items may shrink below their content — without this the nowrap chip strip's min-content
   blows the form's single column out past the card on narrow screens. */
.search-form > * { min-width: 0; }
.search-row { display: flex; gap: 0.6rem; align-items: stretch; }
.search-go { padding-inline: 1.5rem; }

/* Smart search field: chips + free text in one box, grouped suggestions beneath */
.smart-field { position: relative; flex: 1; min-width: 0; }
.smart-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; min-height: 100%;
  padding: 0.4rem 2.2rem 0.4rem 0.6rem; border-radius: 12px; cursor: text;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.smart-box:focus-within { outline: 2px solid var(--brand); background: #fff; }
.smart-input {
  flex: 1 1 160px; min-width: 120px; font: inherit; border: none; background: transparent;
  padding: 0.45rem 0.2rem; color: var(--ink);
}
.smart-input:focus { outline: none; }
.smart-input::-webkit-search-cancel-button { display: none; }
.smart-clear {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); border: none;
  background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 0 .2rem;
}
.smart-clear:hover { color: var(--brand); }
.smart-chip {
  display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%;
  padding: 0.25rem 0.3rem 0.25rem 0.6rem; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  background: rgba(124, 58, 237, .1); color: var(--brand); border: 1px solid rgba(124, 58, 237, .25);
}
.smart-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-chip-x {
  border: none; background: transparent; color: inherit; font-size: 1.05rem; line-height: 1;
  cursor: pointer; padding: 0 .25rem; border-radius: 999px;
}
.smart-chip-x:hover { background: rgba(124, 58, 237, .18); }
.smart-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; max-height: 340px;
  overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: none;
}
.smart-group {
  padding: 0.5rem 0.8rem 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
}
.smart-group + .smart-group, .smart-item + .smart-group { border-top: 1px solid var(--line); margin-top: 0.25rem; padding-top: 0.6rem; }
.smart-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; cursor: pointer; font-size: .92rem; }
.smart-item:hover, .smart-item.active { background: var(--bg-soft); }
.smart-ic { flex-shrink: 0; }
.smart-main { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-sub { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; cursor: pointer; user-select: none;
  padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: 0.92rem; white-space: nowrap;
}
.chip input { display: none; }
.chip.active, .chip:hover { border-color: var(--brand); color: var(--brand); background: rgba(124, 58, 237, .06); }

/* Time chips + category + icon sort + icon near-me in one line on desktop; on mobile the chips keep
   the whole top line as a sideways-scrolling strip and the three controls wrap beneath it. */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
/* Styled like the time chips (same pill, type and colors) — appearance: none drops the native
   menulist chrome, the data-URI chevron replaces the platform arrow. */
.filter-row > select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.92rem; color: var(--ink-2);
  padding: 0.45rem 2rem 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234b4458' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
  max-width: 12rem;
}
.filter-row > select:hover { border-color: var(--brand); color: var(--brand); background-color: rgba(124, 58, 237, .06); }
.filter-row > select:focus { outline: 2px solid var(--brand); }

/* Icon-only sort: the transparent native select covers the icon, so it opens the platform picker. */
.icon-select {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.icon-select:hover { border-color: var(--brand); color: var(--brand); }
.icon-select:focus-within { outline: 2px solid var(--brand); }
.icon-select select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; border: none;
}

@media (max-width: 640px) {
  /* The field and the submit button can't share a phone-width line — stack them: full-width
     smart field, full-width Pretraži beneath it. */
  .search-row { flex-wrap: wrap; }
  .smart-field { flex: 1 1 100%; }
  .smart-input { flex-basis: 120px; min-width: 0; }
  .search-go { flex: 1 1 100%; justify-content: center; }

  /* Compact chips lead the row and wrap onto extra lines when the width runs out — nothing ever
     clips at the card edge; the category/sort/near-me controls follow beneath them. */
  .filter-row .chips { flex: 1 1 100%; min-width: 0; }
  .filter-row .chip { padding: 0.4rem 0.75rem; font-size: 0.86rem; }
}

/* Results */
.results { padding: 2.2rem 0 3.5rem; }
.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.results-count { font-weight: 700; color: var(--ink-2); }
.results-title { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--ink); }

.event-grid {
  display: grid; gap: 1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.event-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease, opacity .2s ease;
  display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
/* Stretched link covers the whole card; interactive overlays (like button) sit above it. */
.event-card-link { position: absolute; inset: 0; z-index: 1; }
.card-like { position: absolute; right: 10px; top: 10px; z-index: 2; }
.card-like .like-btn {
  padding: .3rem .65rem; font-size: .82rem; background: rgba(0, 0, 0, .55); color: #fff;
  border-color: transparent; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.card-like .like-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.card-like .like-btn.liked { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.card-like .like-btn .heart { font-size: .95rem; }
/* Past (already-held) favourite: de-emphasised card + "held" tag. */
.event-card.past { opacity: .5; }
.event-card.past:hover { opacity: .8; }
.held-tag {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px;
}
/* Already-held event marker on the map: desaturated + faded. */
.marker-past { filter: grayscale(100%); opacity: .6; }
.tl-item.past { opacity: .5; }
/* "Already held" note in the event detail schedule. */
.held-note {
  margin: 0; padding: .6rem .8rem; border-radius: 10px; font-weight: 600;
  background: rgba(124, 58, 237, .08); color: var(--ink-2); border: 1px solid var(--line);
}
.held-archive { margin: .5rem 0 0; font-size: .9rem; }

/* Cancelled-event warning (detail page): loud red banner + hero chip. */
.cancelled-banner {
  display: flex; align-items: flex-start; gap: 0.7rem;
  margin: 0 0 1.2rem; padding: 0.9rem 1.1rem; border-radius: 12px;
  background: #fdeced; border: 1px solid #f3b6bb; color: #b3121d;
}
.cancelled-banner strong { display: block; font-weight: 800; font-size: 1.05rem; }
.cancelled-banner .cancelled-icon { font-size: 1.3rem; line-height: 1.3; }
.cancelled-banner .cancelled-note { color: #c24a52; font-weight: 600; font-size: .92rem; }
.type-chip.cancelled-chip { background: #d21c28; }

/* 404 page */
.notfound { padding: 5.5rem 0 7rem; text-align: center; background: var(--bg-soft); }
.notfound-code {
  margin: 0; font-size: clamp(6rem, 20vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -6px;
}
.notfound-title { margin: 0.4rem 0 0.6rem; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.8px; }
.notfound-text { margin: 0 auto 2rem; color: var(--ink-2); max-width: 46ch; }
.notfound-actions { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }

/* Favorites month calendar */
.fav-calendar { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cal-title { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.cal-nav {
  border: 1px solid var(--line); background: #fff; color: var(--ink); width: 36px; height: 36px;
  border-radius: 10px; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.cal-nav:hover { border-color: var(--brand); color: var(--brand); }
/* minmax(0, …) keeps all seven columns equal — a plain 1fr track grows to fit a long event title. */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .5rem; text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.cal-cell { min-width: 0; min-height: 96px; padding: .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-empty { background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,.018) 6px, rgba(0,0,0,.018) 12px); }
.cal-daynum { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.cal-today .cal-daynum { background: var(--brand); color: #fff; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.cal-ev { display: flex; align-items: center; gap: .3rem; font-size: .76rem; color: var(--ink); text-decoration: none; padding: .12rem .25rem; border-radius: 6px; background: color-mix(in srgb, var(--c) 12%, transparent); }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 24%, transparent); }
.cal-ev.past { opacity: .5; }
.cal-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--c); flex: 0 0 auto; }
.cal-ev-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell.has-ev { cursor: pointer; }
.cal-cell.cal-selected { background: color-mix(in srgb, var(--brand) 7%, transparent); box-shadow: inset 0 0 0 2px var(--brand); }
/* Day schedule panel under the grid — opened by tapping a day with events. */
.cal-day-panel { border-top: 2px solid var(--brand); }
.cal-day-title { padding: .7rem 1rem .4rem; font-weight: 800; color: var(--ink); }
.cal-day-ev { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.cal-day-ev:hover { background: color-mix(in srgb, var(--c) 10%, transparent); }
.cal-day-ev.past { opacity: .55; }
.cal-day-time { flex: 0 0 auto; min-width: 4.2rem; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.cal-day-ev .cal-dot { width: 9px; height: 9px; }
.cal-day-body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.cal-day-name { font-weight: 600; }
.cal-day-venue { font-size: .82rem; color: var(--muted); }
.cal-day-go { margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
@media (max-width: 640px) {
  /* Compact month grid: day number on top, event dots wrapping beneath; the day panel carries the detail. */
  .cal-cell { min-height: 56px; flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 3px; overflow: hidden; }
  .cal-daynum { width: 100%; }
  .cal-ev { padding: 1px; background: none; }
  .cal-ev-t { display: none; }
  .cal-dot { width: 8px; height: 8px; }
  .cal-day-time { min-width: 3.4rem; }
}
.event-thumb {
  position: relative; aspect-ratio: 16 / 10; background-size: cover; background-position: center;
  background-color: #2a2140;
}
.type-chip {
  position: absolute; left: 10px; top: 10px; color: #fff; font-size: .76rem; font-weight: 700;
  padding: 0.25rem 0.6rem; border-radius: 999px; letter-spacing: .2px;
}
.type-chip.lg { position: static; font-size: .85rem; padding: 0.3rem 0.8rem; }
.like-badge {
  position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: .78rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
}
.event-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.event-date { display: flex; align-items: baseline; gap: 0.5rem; color: var(--accent); font-weight: 700; font-size: .9rem; }
.event-date .d-time { color: var(--muted); font-weight: 600; }
.event-title { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -.3px; }
.event-place { color: var(--ink-2); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.distance { color: var(--brand); font-weight: 600; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--ink-2); }
.empty-emoji { font-size: 3rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.pager-info { color: var(--muted); font-weight: 600; }

/* Like button */
.like-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font: inherit; font-weight: 700;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1rem; color: var(--ink);
}
.like-btn:hover { border-color: var(--brand-2); color: var(--brand-2); }
.like-btn.liked { background: rgba(255, 90, 95, .1); border-color: var(--brand-2); color: var(--brand-2); }
.like-btn .heart { font-size: 1.05rem; }

/* Detail */
.detail-hero {
  min-height: 320px; display: flex; align-items: flex-end;
  background-color: #2a2140; position: relative; overflow: hidden;
}
.detail-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 5, 16, .82)); }
.detail-hero-inner { position: relative; z-index: 1; color: #fff; padding: 2.5rem 0; }
.detail-hero-inner h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0.6rem 0 0; letter-spacing: -1px; }
.detail-summary { max-width: 60ch; color: rgba(255, 255, 255, .9); }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 2.2rem; padding: 2.2rem 0 4rem; }
.detail-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.price-tag { font-weight: 700; color: var(--ink-2); }
.prose h2 { letter-spacing: -.4px; }
.prose p { color: var(--ink-2); white-space: pre-line; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-top: 1.5rem; }
.gallery img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.gallery-item { display: block; }
/* Gallery lightbox slider */
.lightbox-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 2rem; background: rgba(8, 5, 16, .92); }
.lightbox-modal.open { display: flex; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 92vw; }
.lb-img { max-width: 100%; max-height: 82vh; border-radius: 10px; object-fit: contain; }
.lb-caption { color: #fff; text-align: center; max-width: 70ch; }
.lb-counter { position: absolute; top: 1.2rem; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: .9rem; }
.lb-close { position: absolute; top: .8rem; right: 1.2rem; background: none; border: none; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; padding: .2rem .5rem; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: none; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
@media (max-width: 600px) { .lb-nav { width: 42px; height: 42px; font-size: 1.7rem; } .lb-prev { left: .3rem; } .lb-next { right: .3rem; } }

.detail-side .card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow);
}
.detail-side h3 { margin: 0 0 0.8rem; }
.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.schedule li { padding: 0.5rem 0.7rem; background: var(--bg-soft); border-radius: 10px; font-weight: 600; font-size: .92rem; }
/* Dates read as sentences ("subota, … od 18 do 21 h") — capitalize only the leading letter. */
.schedule li::first-letter, .tl-date::first-letter { text-transform: uppercase; }
.venue { margin-bottom: 0.8rem; display: flex; gap: 0.7rem; align-items: center; }
.venue-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-soft); }
.organizer-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; font-weight: 600; }
.organizer-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }

/* Sections */
.section { padding: 2.5rem 0 4rem; }
.page-title { font-size: 2rem; letter-spacing: -.6px; }
.page-lead { margin: .4rem 0 1.4rem; max-width: 62ch; }
.section-title { margin: 2rem 0 1.2rem; letter-spacing: -.4px; }

/* Organizers */
.organizer-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.organizer-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem;
  text-align: center; box-shadow: var(--shadow); transition: transform .12s ease;
}
.organizer-card:hover { transform: translateY(-3px); }
.organizer-card img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 0 auto 0.7rem; background: var(--bg-soft); }
.organizer-name { font-weight: 700; }
.verified { color: var(--brand); }
.organizer-cover { height: 220px; border-radius: var(--radius); background-size: cover; background-position: center; background-color: var(--bg-soft); margin-bottom: 1.4rem; }
.organizer-header { display: flex; gap: 1.4rem; align-items: center; margin-bottom: 1.5rem; }
.organizer-logo { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; background: var(--bg-soft); }
.organizer-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }

/* Auth */
.auth-page { display: flex; justify-content: center; padding: 3.5rem 0; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: 0; letter-spacing: -.5px; }
.stack-form { display: grid; gap: 0.9rem; margin-top: 1rem; }
.stack-form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
.stack-form input { font: inherit; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); }
.stack-form input:focus { outline: 2px solid var(--brand); background: #fff; }
.alert { background: rgba(255, 90, 95, .12); color: #c0303a; padding: 0.7rem 0.9rem; border-radius: 10px; font-weight: 600; }
.notice { background: rgba(124, 58, 237, .1); color: #5b21b6; padding: 0.7rem 0.9rem; border-radius: 10px; font-weight: 600; }
.auth-intro { margin: 1rem 0 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.auth-alt { margin-top: 1rem; color: var(--ink-2); }
.auth-alt a { color: var(--brand); font-weight: 700; }
.code-input { letter-spacing: 0.45em; text-align: center; font-size: 1.5rem; font-weight: 800; padding-left: 0.45em !important; }
.resend-form { margin-top: 0.6rem; }
/* Honeypot: kept in the DOM for bots but removed from view and the accessibility tree. */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: linear-gradient(180deg, #1c1630, #16121f); color: #cfc8db; margin-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2.5rem; padding: 2.8rem 0 2.2rem; flex-wrap: wrap; }
.footer-brand { max-width: 42ch; }
.footer-brand p { color: #9c93ab; margin: 0.7rem 0 0; line-height: 1.5; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 999px; background: rgba(255, 255, 255, .08); color: #e6e1f0;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.social-link:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0;
  font-size: .9rem; color: #8a8198; flex-wrap: wrap;
}
.footer-pages { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-pages a { color: #cfc8db; text-decoration: none; }
.footer-pages a:hover { color: #fff; text-decoration: underline; }

/* Static content page (Impressum, Termini i uvjeti, Kontakt …). */
.content-page { max-width: 760px; }
.content-cover {
  height: clamp(180px, 32vw, 320px); border-radius: var(--radius); background-size: cover;
  background-position: center; background-color: #2a2140; margin-bottom: 1.6rem;
}
.content-body { color: var(--ink-2); line-height: 1.7; font-size: 1.02rem; }
.content-body h2 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; color: var(--ink); }
.content-body h3 { font-size: 1.12rem; margin: 1.4rem 0 .5rem; color: var(--ink); }
.content-body p { margin: 0 0 1rem; }
.content-body ul, .content-body ol { margin: 0 0 1rem 1.3rem; }
.content-body a { color: var(--brand); }
.content-body blockquote {
  margin: 1rem 0; padding: .4rem 1rem; border-left: 3px solid var(--brand); color: var(--ink-2);
  background: rgba(124, 58, 237, .05);
}

/* FAQ page (/cesta-pitanja): sections of <details> accordions. */
.faq-page { max-width: 820px; }
.faq-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.faq-toc-link {
  display: inline-block; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 600; background: #fff;
}
.faq-toc-link:hover { border-color: var(--brand); color: var(--brand); }
.faq-section { margin-bottom: 1.8rem; scroll-margin-top: 84px; }
.faq-section-title { font-size: 1.25rem; margin: 0 0 .8rem; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  margin-bottom: .6rem; scroll-margin-top: 84px; overflow: hidden;
}
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .9rem 1.1rem; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--brand); }
.faq-chevron { flex-shrink: 0; transition: transform .18s ease; color: var(--muted); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--brand); }
.faq-answer { padding: 0 1.1rem 1rem; }
.faq-answer > :first-child { margin-top: 0; }

.htmx-request.event-grid, .htmx-request #rezultati { opacity: .55; transition: opacity .15s ease; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }

  /* Mobile nav: hamburger reveals a drawer holding the links, dropdowns and account actions. */
  .nav-toggle { display: flex; margin-left: 0; }
  .header-inner { gap: .75rem; }
  .btn-add-event-m { display: inline-flex; margin-left: auto; padding: .5rem .8rem; font-size: .9rem; }
  /* The always-visible compact CTA replaces the drawer copy. */
  .header-actions .btn-add-event { display: none; }
  .nav-collapse {
    display: none; position: absolute; top: 68px; left: 0; right: 0; z-index: 55;
    flex-direction: column; align-items: stretch; gap: .1rem;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: .5rem 1rem 1rem; max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-collapse.open { display: flex; }
  .main-nav { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .main-nav > a, .nav-dropdown > summary { padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
  .nav-dropdown { position: static; }
  .nav-dropdown > summary { justify-content: space-between; }
  .nav-menu { position: static; box-shadow: none; border: none; padding: .2rem 0 .6rem .8rem; min-width: 0; }
  .nav-menu-list:not(.cols) { gap: .1rem; }
  .header-actions { margin: .8rem 0 0; flex-wrap: wrap; }
}

/* ---- Festival programme: day tabs + screening cards + detail modal ---------------------------- */
/* min-width:0 lets the 1fr grid column shrink below its content's intrinsic width, so a long day-tab
   row scrolls inside .prog-tabs instead of stretching the whole page. */
.detail-main { min-width: 0; }
/* Hero "↑ festival" link sits below the title (static, not the absolutely-positioned card chip). */
.detail-hero-inner .parent-chip {
  display: inline-flex; align-items: center; margin-top: .55rem; text-decoration: none;
  background: rgba(255, 255, 255, .22);
}
.programme { margin-top: 2rem; }
.prog-tabs {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: 1.1rem;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.prog-tab {
  flex: 0 0 auto; cursor: pointer; font: inherit; font-weight: 700; font-size: .9rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.prog-tab:hover { border-color: var(--brand); color: var(--brand); }
.prog-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(124,58,237,.3); }
.prog-tab.is-today:not(.active) { border-color: var(--brand); }
.prog-tab-count {
  font-size: .72rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px;
  background: rgba(0,0,0,.08); color: inherit;
}
.prog-tab.active .prog-tab-count { background: rgba(255,255,255,.28); }

.prog-day { display: none; }
.prog-day.active { display: block; animation: prog-fade .18s ease; }
@keyframes prog-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.screening-card { text-decoration: none; color: inherit; cursor: pointer; }
.event-date .d-venue { color: var(--ink-2); font-weight: 600; }
.event-date .d-venue::before { content: "· "; color: var(--muted); }

/* Modal */
.prog-modal {
  position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center;
  padding: 1.5rem; background: rgba(8, 5, 16, .82); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.prog-modal.open { display: flex; }
.prog-modal-card {
  position: relative; width: min(680px, 100%); max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden; /* the body scrolls (below), not the card, so the
                                                              close button keeps a fixed corner and never scrolls away */
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
/* The scrolling layer. Keeping the scroll here instead of on the card lets the absolutely-positioned close
   button float over a pinned top-right corner, reachable however long the modal is. */
.prog-modal-body { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.prog-modal-close {
  position: absolute; right: .6rem; top: .6rem; z-index: 2; width: 38px; height: 38px; border-radius: 999px;
  border: none; cursor: pointer; font-size: 1.6rem; line-height: 1; color: #fff; background: rgba(0,0,0,.45);
}
.prog-modal-close:hover { background: rgba(0,0,0,.7); }
.prog-modal-loading { padding: 2.5rem 1.5rem; text-align: center; color: var(--ink-2); font-weight: 600; }

.evm-photo {
  aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: #2a2140;
  border-radius: var(--radius) var(--radius) 0 0;
}
.evm-main { padding: 1.2rem 1.4rem 1.5rem; }
.evm-title { margin: .6rem 0 .2rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -.4px; }
.evm-summary { margin: 0 0 .8rem; color: var(--ink-2); font-weight: 600; }
.evm-meta { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.evm-meta li { display: flex; gap: .5rem; color: var(--ink); font-size: .95rem; }
.evm-ico { flex: 0 0 auto; }
.evm-desc { color: var(--ink-2); line-height: 1.6; white-space: pre-line; }
.evm-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }

@media (max-width: 860px) {
  .prog-modal { padding: 0; align-items: flex-end; }
  /* dvh, not vh: a bottom-anchored sheet sized in vh pushes its top — and the close button — up behind the
     mobile browser's address bar; dvh measures the actually-visible viewport, keeping the close on-screen. */
  .prog-modal-card { max-height: 92vh; max-height: 92dvh; border-radius: var(--radius) var(--radius) 0 0; }
  .prog-modal-body { padding-bottom: env(safe-area-inset-bottom); } /* clear the home indicator */
}

/* Favorites: view switcher, timeline, maps */
.fav-heading { margin: 2.2rem 0 1rem; font-size: 1.35rem; }
.fav-heading:first-of-type { margin-top: 1.2rem; }

.view-tabs { display: inline-flex; gap: .25rem; padding: .25rem; margin: 0 0 1.2rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.view-tab { font: inherit; font-weight: 600; color: var(--ink-2); background: transparent; border: none; border-radius: 9px; padding: .45rem .9rem; cursor: pointer; }
.view-tab:hover { color: var(--brand); }
.view-tab.active { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; top: .3rem; bottom: .3rem; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 1.4rem 1.2rem; }
.tl-dot { position: absolute; left: -1.2rem; top: .25rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent, var(--brand)); transform: translateX(-5px); box-shadow: 0 0 0 3px #fff; }
.tl-date { font-weight: 700; color: var(--ink); font-size: .92rem; }
.tl-card { display: flex; align-items: center; gap: .7rem; margin-top: .3rem; color: inherit; text-decoration: none; }
.tl-thumb { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 12px; background: var(--bg-soft) center/cover no-repeat; }
@media (max-width: 640px) { .tl-thumb { width: 76px; height: 76px; } }
.tl-body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.tl-title { font-weight: 700; color: var(--ink); }
.tl-card:hover .tl-title { color: var(--brand); }
.tl-meta { font-size: .88rem; }

/* OpenStreetMap (Leaflet) containers. z-index:0 keeps Leaflet's controls/panes below the sticky header. */
.osm-map { position: relative; z-index: 0; height: 480px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.osm-map-sm { height: 240px; border-radius: 12px; }
/* The global `img { max-width: 100% }` reset clamps Leaflet tiles to their map-pane's width. A map built
   inside freshly-HTMX-swapped results (the paginated map view) can have a 0-wide pane at layout time, which
   collapses every tile to width 0 — the map looks blank even though the markers still show (the page-2
   "karta se ne vidi" bug). Leaflet's own `.leaflet-container img` guard doesn't win here, so exempt our own
   map images explicitly; tiles then keep their natural 256px size. */
.osm-map img { max-width: none; }
.map-note { margin-top: .7rem; }

/* Results Lista/Karta toggle (right side of the results-head row) */
.results-views { display: inline-flex; gap: .2rem; padding: .2rem; flex: 0 0 auto; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
.results-view { font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink-2); background: transparent; border: none; border-radius: 7px; padding: .35rem .85rem; cursor: pointer; }
.results-view:hover { color: var(--brand); }
.results-view.active { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Branded map marker: the Nayave logo tile + a small pointer, replacing Leaflet's default blue pin. */
.nayave-marker { position: relative; }
.nayave-marker img { display: block; width: 34px; height: 34px; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.nayave-marker::after { content: ''; position: absolute; left: 50%; top: 33px; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.nayave-marker.marker-past img { filter: grayscale(1) opacity(.6); }

/* Cluster badge: branded gradient circle with the count of events at/near a spot (click to expand). */
.nayave-cluster { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7C3AED, #FF5A5F, #FFB224); color: #fff; font-weight: 800; font-size: .95rem;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* Marker popup: small cover thumbnail + name + date */
.map-pop { display: flex; gap: .6rem; align-items: center; min-width: 150px; }
.map-pop-img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.map-pop-name { font-weight: 700; line-height: 1.25; }
.map-pop-name a { color: var(--brand); }
.map-pop-date { color: var(--muted); font-size: .82rem; margin-top: .15rem; }

/* Add-to-calendar actions (event detail) */
.cal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.btn-sm { padding: .4rem .7rem; font-size: .85rem; }

/* Social share (event detail, blog post) — round icon buttons under a top border */
.share { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.share-label { display: block; margin-bottom: .55rem; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.share-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  cursor: pointer; transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.share-btn svg { width: 18px; height: 18px; }
.share-btn:hover { transform: translateY(-2px); color: #fff; }
.share-btn:active { transform: translateY(0); }
.share-fb:hover { background: #1877f2; border-color: #1877f2; }
.share-wa:hover { background: #25d366; border-color: #25d366; }
.share-vb:hover { background: #7360f2; border-color: #7360f2; }
.share-x:hover { background: #000; border-color: #000; }
.share-em:hover { background: var(--brand); border-color: var(--brand); }
.share-copy:hover { background: var(--brand); border-color: var(--brand); }
.share-copy.copied { background: #25d366; border-color: #25d366; color: #fff; }

/* Place (grad / općina) pages */
.lead { font-size: 1.05rem; margin: 0 0 1.4rem; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.place-card { display: flex; flex-direction: column; min-height: 132px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform .15s ease, box-shadow .15s ease; }
.place-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.place-cover { flex: 1; min-height: 92px; background-image: linear-gradient(135deg, var(--brand), #b794f4); background-size: cover; background-position: center; }
.place-name { padding: .6rem .8rem; font-weight: 700; color: var(--ink); }

.place-hero { position: relative; min-height: 280px; display: flex; align-items: flex-end; background-image: linear-gradient(135deg, var(--brand), #6d28d9); background-size: cover; background-position: center; }
.place-hero.no-cover::after { display: none; }
.place-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.62)); }
.place-hero-inner { position: relative; z-index: 1; padding: 2.2rem 0; color: #fff; }
.place-hero h1 { margin: .25rem 0 0; font-size: clamp(2rem, 5vw, 3rem); color: #fff; }
.place-kind { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; opacity: .92; }
.place-intro { font-size: 1.08rem; line-height: 1.7; max-width: 72ch; color: var(--ink-2); margin: 0 0 2rem; overflow-wrap: break-word; }
.place-intro p { margin: 0 0 1rem; }
.place-intro p:last-child { margin-bottom: 0; }
.place-intro h2 { font-size: 1.3rem; margin: 1.6rem 0 .5rem; color: var(--ink); }
.place-intro h3 { font-size: 1.1rem; margin: 1.3rem 0 .4rem; color: var(--ink); }
.place-intro ul, .place-intro ol { margin: 0 0 1rem 1.3rem; }
.place-intro a { color: var(--brand); }
.place-intro strong { color: var(--ink); }
.place-intro blockquote { margin: 0 0 1rem; padding: .4rem 0 .4rem 1rem; border-left: 3px solid var(--line); color: var(--ink-2); }
.place-cta { margin-top: 1.6rem; }

/* Organizer directory filter */
.org-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.4rem; }
.org-filter input[type=search], .org-filter select { font: inherit; padding: .55rem .75rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.org-filter .org-filter-q { flex: 1 1 220px; min-width: 180px; }
.org-filter input[type=search]:focus, .org-filter select:focus { outline: 2px solid var(--brand); }

/* Custom date range */
.date-range { display: none; gap: .8rem; flex-wrap: wrap; align-items: center; }
.date-range label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.date-range input[type=date] { font: inherit; padding: .5rem .7rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.date-range input[type=date]:focus { outline: 2px solid var(--brand); }

/* ---- Blog ---- */
.blog-page .page-title { margin-bottom: 1rem; }
.blog-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }
.blog-cat {
  display: inline-flex; align-items: center; padding: .35rem .85rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--ink-2); background: var(--card);
}
.blog-cat.active, .blog-cat:hover { border-color: var(--brand); color: var(--brand); background: rgba(124, 58, 237, .06); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.blog-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-link { position: absolute; inset: 0; z-index: 1; }
.blog-thumb {
  position: relative; height: 160px; background: var(--bg-soft) center/cover no-repeat;
  background-image: linear-gradient(120deg, rgba(124, 58, 237, .18), rgba(255, 90, 95, .14));
}
.blog-thumb .type-chip { position: absolute; left: .7rem; bottom: .7rem; background: var(--brand); }
.blog-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.blog-date { font-size: .85rem; color: var(--muted); font-weight: 600; }
.blog-title { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -.3px; }
.blog-summary { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.blog-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; }

.blog-post-meta { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.blog-post-cat {
  display: inline-flex; padding: .2rem .7rem; border-radius: 999px; background: rgba(124, 58, 237, .1);
  color: var(--brand); border: 1px solid rgba(124, 58, 237, .25); font-size: .85rem; font-weight: 700;
}
.blog-post-back { margin-top: 2.2rem; }
.content-body img { max-width: 100%; height: auto; border-radius: 12px; }

/* Author chip on the post page + the author's own page. */
.blog-author-chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .7rem .2rem .25rem;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: .85rem; font-weight: 700; text-decoration: none;
}
.blog-author-chip:hover { border-color: var(--brand); color: var(--brand); }
.blog-author-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; background: rgba(124, 58, 237, .1); font-size: .85rem;
}
.blog-author-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.6rem; }
.blog-author-head .page-title { margin-bottom: .3rem; }
.blog-author-photo {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line); background: rgba(124, 58, 237, .1);
  display: inline-flex; align-items: center; justify-content: center; font-size: 2rem;
}
.blog-author-bio { margin: 0; color: var(--ink-2); line-height: 1.55; white-space: pre-line; max-width: 46rem; }
.blog-author-posts-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px; margin: 0 0 1rem; }
@media (max-width: 560px) {
  .blog-author-head { flex-direction: column; align-items: flex-start; gap: .8rem; }
}

/* Event blocks embedded in blog posts (expanded server-side from the editor's markers). */
.blog-event-card {
  display: flex; gap: .9rem; align-items: stretch; margin: 1.4rem 0; padding: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--brand));
  border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bec-thumb { flex: 0 0 132px; min-height: 108px; background: var(--bg-soft) center/cover no-repeat; }
.bec-body { display: flex; flex-direction: column; gap: .25rem; padding: .8rem 1rem; min-width: 0; }
.bec-tags { display: flex; gap: .4rem; align-items: center; }
.bec-tags .type-chip { position: static; }
.bec-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.3px; }
.bec-meta { font-size: .9rem; color: var(--ink-2); }
.bec-sep { color: var(--muted); }
.bec-cancelled { display: inline-flex; padding: .1rem .55rem; border-radius: 999px; background: #d21c28; color: #fff; font-size: .78rem; font-weight: 700; }
.bec-more { font-size: .88rem; font-weight: 700; color: var(--brand); margin-top: .15rem; }
@media (max-width: 560px) {
  .blog-event-card { flex-direction: column; }
  .bec-thumb { flex-basis: auto; height: 140px; }
}

/* Hero badge: total number of active (published, upcoming) events. */
.hero-count {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; padding: .38rem .95rem;
  border-radius: 999px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line);
  font-weight: 700; font-size: .95rem; color: var(--ink-2); backdrop-filter: blur(4px);
}
.hero-count strong { color: var(--brand); font-weight: 800; }

/* ---- Public event submission (/dodaj-dogadanje) ---- */
.submit-page { padding: 2.2rem 0 3rem; }
.submit-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }
/* minmax(0, …): a bare 1fr's min-width:auto would let wide intrinsic content (file inputs,
   datetime pickers) stretch the column past the viewport and force horizontal scrolling. */
@media (max-width: 900px) { .submit-grid { grid-template-columns: minmax(0, 1fr); } }
.submit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2rem;
  box-shadow: var(--shadow);
}
.submit-card h1 { margin-top: 0; letter-spacing: -.5px; }
.submit-intro { margin: 0; color: var(--muted); font-weight: 500; line-height: 1.55; }
.stack-form textarea, .stack-form select {
  font: inherit; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); width: 100%;
}
.stack-form textarea { resize: vertical; }
.stack-form textarea:focus, .stack-form select:focus { outline: 2px solid var(--brand); background: #fff; }
/* File inputs don't shrink below their intrinsic width (~380px) on their own — without the
   explicit width cap they push the whole card wider than a phone screen. */
.stack-form input[type="file"] { padding: 0.55rem 0.6rem; font-size: .9rem; width: 100%; min-width: 0; max-width: 100%; }
.stack-form input[type="datetime-local"] { width: 100%; min-width: 0; }
.mode-section, .stack-form label { min-width: 0; }
.mode-switch {
  display: flex; gap: .35rem; padding: .35rem; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.mode-option { flex: 1; position: relative; }
.mode-option input { position: absolute; opacity: 0; inset: 0; }
.mode-option span {
  display: block; text-align: center; padding: .55rem .5rem; border-radius: 9px;
  font-weight: 700; font-size: .95rem; color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.mode-option input:checked + span { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.mode-option input:focus-visible + span { outline: 2px solid var(--brand); }
.mode-section { display: grid; gap: 0.9rem; }
.field-row { display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.form-hint { margin: -0.45rem 0 0; font-size: .8rem; color: var(--muted); font-weight: 500; line-height: 1.45; }
.submit-callouts { display: grid; gap: 1rem; }
.callout {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.15rem;
  font-size: .92rem; line-height: 1.55;
}
.callout strong { display: block; margin-bottom: .3rem; }
.callout p { margin: 0; color: var(--muted); font-weight: 500; }
.callout a { color: var(--brand); font-weight: 700; }
.btn-add-event { gap: .35rem; white-space: nowrap; }
.btn-add-event svg { flex: none; }
/* display:grid above would override the UA's [hidden] rule — without this both mode sections show at once. */
.mode-section[hidden] { display: none; }

/* Category landing pages (/kategorija, /danas, /vikend) */
a.type-chip { text-decoration: none; }
.cat-siblings { margin-top: 2.4rem; }
.cat-siblings-title { font-size: 1.05rem; letter-spacing: -.3px; margin: 0 0 .8rem; }
.cat-siblings-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-chip {
  display: inline-flex; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .88rem;
}
.cat-chip:hover { border-color: #7C3AED; color: #7C3AED; }
