/* Homepage, events first (October 2026): the event list must be visible
   without scrolling. Loaded after the inline homepage styles. */

/* Compact hero */
.hero {
  min-height: 0;
  padding-top: clamp(18px, 2.4vw, 34px);
  padding-bottom: clamp(10px, 1.6vw, 22px);
  align-items: start;
}
.hero-intro h1.hero-title-question {
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: .92;
}
.hero-intro .hero-copy { margin-top: 10px; }
/* Two hero buttons (clubs, events); styles shared by both homepages. */
.venue-jumps { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.venue-jumps a { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 20px; border: 1px solid rgba(243, 239, 228, .14); border-radius: 999px; color: #f3efe4; font-size: .9rem; font-weight: 800; }
.venue-jumps a:first-child { color: #0c0d0b; background: #7ce5ff; border-color: #7ce5ff; }

/* Desktop weather panel: forecast only, without the clothing tip box. */
.hero-program { align-self: start; }
.weather-feature { min-height: 0; padding-top: 16px; padding-bottom: 16px; }
.weather-advice { display: none; }

/* Section heading keeps the homepage display size, with room above it.
   The events section follows a hidden #events anchor, so target it directly. */
.hero + .section { padding-top: clamp(28px, 3vw, 44px); }
#dogadanja { padding-top: clamp(28px, 3vw, 44px); }
#dogadanja .section-title { line-height: .9; }

/* Filter bar in rows, so no filter is hidden off-screen.
   Row 1: search, genre filters, count. Row 2: seasonal guides. Row 3: quick
   views as text links (they lead to other pages; the pills filter this list).
   Desktop wraps; phones scroll each row sideways with a fade at the right edge. */
.filter-bar.filter-row {
  padding: 14px 0 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  overflow: visible;
}
.filter-row .search-toggle { width: 44px; height: 44px; }
.filter-row .chips { min-width: 0; width: auto; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.filter-row .chip {
  min-height: 44px;
  padding: 0 16px;
  border-color: rgba(243, 239, 228, .26);
  font-size: .8125rem;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.filter-row .chip:hover { border-color: var(--paper-soft); color: var(--paper); }
.filter-row .chip[aria-pressed="true"] { border-color: var(--paper); color: var(--ink); background: var(--paper); }
.filter-row .result-count { margin: 0; justify-self: end; font-size: .8125rem; }
.section-count { display: none; }
.filter-secondary { grid-column: 1 / -1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.filter-secondary .seasonal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-secondary .seasonal-row:empty { display: none; }
.filter-bar .seasonal-link { min-height: 44px; font-size: .8125rem; white-space: nowrap; }
.filter-secondary .intent-links {
  flex-basis: 100%;
  margin: 2px 0 0;
  padding: 0 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
}
.filter-secondary .intent-links a {
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--paper-soft);
  background: none;
  font-size: .8125rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgba(243, 239, 228, .28);
  text-underline-offset: 5px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.filter-secondary .intent-links a::after { margin-left: 5px; content: "↗"; font-size: .75em; opacity: .65; }
.filter-secondary .intent-links a:hover { color: var(--paper); border: 0; background: none; text-decoration-color: var(--acid); }
.intent-label { margin-right: 4px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

@media (max-width: 760px) {
  .hero { padding: 14px 0 6px; gap: 0; }
  .hero-intro .eyebrow { display: none; }
  /* Sized to the longest word so it can't push the page sideways: NAJBOLJI is
     7.7 em wide, TONIGHT? 8.1 em, and the column is the screen minus 28px. */
  .hero-intro h1.hero-title-question { font-size: min(3.6rem, calc((100vw - 28px) / 7.8)); line-height: .9; }
  html[lang="en"] .hero-intro h1.hero-title-question { font-size: min(3.6rem, calc((100vw - 28px) / 8.2)); }
  .site-header .nav { gap: 10px; }
  .hero-intro .hero-copy { display: block; margin-top: 12px; font-size: .92rem; line-height: 1.45; }
  .venue-jumps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .venue-jumps a { justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; font-size: .76rem; line-height: 1.15; }
  .mobile-hero-tools { display: none; }
  .hero + .section,
  #dogadanja { padding-top: 34px; }
  /* The count sits above the heading as a kicker on phones. */
  #dogadanja .section-head { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
  .section-count { display: block; color: var(--cyan); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
  .section-count:empty { display: none; }
  .filter-row .result-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  .filter-bar.filter-row { margin-inline: 0; padding: 10px 0 12px; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  /* Free entry is the most used filter on phones: keep it on screen. */
  .filter-row .chip[data-filter="all"] { order: -2; }
  .filter-row .chip[data-filter="free"] { order: -1; }
  .filter-secondary { display: contents; }
  .filter-row .chips,
  .filter-secondary .seasonal-row,
  .filter-secondary .intent-links {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Both edges bleed into the 14px page gutter and fade out, so a row
       scrolled sideways softens on the left the same way it does on the
       right. At rest the first pill starts exactly where the fade ends. */
    margin-left: -14px;
    padding-left: 14px;
    margin-right: -14px;
    padding-right: 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l, 14px), #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l, 14px), #000 calc(100% - 36px), transparent);
  }
  /* Where scroll-linked animations work, the left fade widens to match
     the right one once the row has been scrolled. */
  @supports (animation-timeline: scroll()) {
    .filter-row .chips,
    .filter-secondary .seasonal-row,
    .filter-secondary .intent-links {
      animation: filter-fade-l linear both;
      animation-timeline: scroll(self inline);
      animation-range: 0px 40px;
    }
    .filter-row .chips { animation-name: filter-fade-l-tight; }
  }
  /* The type chips sit beside the search button, so they cannot bleed
     left; their fade only appears once they are scrolled. */
  .filter-row .chips { margin-left: 0; padding-left: 0; --fade-l: 0px; }
  .filter-row .chips::-webkit-scrollbar,
  .filter-secondary .seasonal-row::-webkit-scrollbar,
  .filter-secondary .intent-links::-webkit-scrollbar { display: none; }
  .filter-secondary .seasonal-row { grid-column: 1 / -1; grid-row: 2; }
  .filter-secondary .intent-links { grid-column: 1 / -1; grid-row: 3; margin-top: 0; padding-left: 16px; gap: 0 18px; }
  .filter-secondary .intent-links a { min-height: 44px; }
  .intent-label { display: none; }
}

/* Left fade width for the sideways-scrolling filter rows on phones. */
@property --fade-l { syntax: '<length>'; inherits: false; initial-value: 14px; }
@keyframes filter-fade-l { from { --fade-l: 14px; } to { --fade-l: 40px; } }
@keyframes filter-fade-l-tight { from { --fade-l: 0px; } to { --fade-l: 28px; } }

/* The list opens with the first 24 events; one button shows the rest
   (set by the homepage script, classes are in the static markup too). */
.event-list.is-collapsed .event-row:nth-of-type(n + 25) { display: none; }
.event-more { margin: 14px 0 0; padding-top: 14px; display: none; flex-direction: column; align-items: center; }
.event-list.is-collapsible + .event-more { display: flex; }
.event-more button {
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink-soft);
  font: inherit;
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.event-more button:hover { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.event-more button:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.event-more small { display: block; margin-top: 10px; color: var(--muted); font-size: .75rem; font-weight: 600; text-align: center; }
@media (max-width: 760px) {
  .event-more { margin-top: 10px; padding-top: 16px; }
  .event-more button { width: 100%; }
}

/* One divider between the filter row and the list (the list had its own). */
#event-list.event-list { border-top: 0; }

/* Event search: magnifier first in the filter row, the field and shortcuts under it
   (assets/js/event-search.js). 16px input text keeps iOS from zooming in. */
.search-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink, #0c0d0b);
  background: var(--paper, #f3efe4);
  cursor: pointer;
}
.search-toggle svg { width: 17px; height: 17px; }
.search-toggle[aria-expanded="true"] { background: #08c4e8; }
.search-toggle:focus-visible { outline: 2px solid #08c4e8; outline-offset: 2px; }
.event-search { padding: 16px 0 16px; }  /* clear of the filter row's bottom line */
.event-search[hidden], .event-search-suggest[hidden] { display: none; }
.event-search-field {
  height: 50px;
  padding: 0 6px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #08c4e8;
  border-radius: 999px;
  background: #191b17;
}
.event-search-field > svg { width: 18px; height: 18px; flex: none; color: #08c4e8; }  /* the magnifier only */
.event-search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--paper, #f3efe4);
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}
.event-search-field input::placeholder { color: #7f837a; }
.event-search-field input::-webkit-search-cancel-button { display: none; }
.event-search-clear {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8f938a;
  background: transparent;
  cursor: pointer;
}
.event-search-clear svg { width: 18px; height: 18px; display: block; }
.event-search-clear:hover { color: var(--paper, #f3efe4); }
.event-search-suggest h4 {
  margin: 16px 4px 8px;
  color: #8f938a;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.event-search-suggest .sug { display: flex; flex-wrap: wrap; gap: 8px; }
.event-search-suggest button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(243, 239, 228, .16);
  border-radius: 999px;
  color: #d8d5ca;
  background: transparent;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.event-search-suggest button:hover { color: var(--paper, #f3efe4); border-color: var(--paper, #f3efe4); }

/* Optical centring on phones: the caps sat ~1px low in the 38px pills. */
@media (max-width: 760px) {
  .filter-row .chip,
  .filter-row .intent-links a,
  .filter-bar .seasonal-link { padding-bottom: 2px; }
}

/* Kvarner na dlanu banner: the 3D page's poster behind live numbers. */
.map-banner.is-kvarner { border: 1px solid var(--line); color: var(--paper); background: var(--ink); }
.map-banner.is-kvarner::after { inset: 0; width: auto; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; background: linear-gradient(90deg, rgba(12, 13, 11, .9), rgba(12, 13, 11, .28) 56%, rgba(12, 13, 11, 0)); }
.map-banner.is-kvarner picture { position: absolute; inset: 0; }
.map-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.map-banner.is-kvarner h2 { font-size: clamp(1.9rem, 4.4vw, 4.6rem); font-weight: 800; letter-spacing: -.06em; line-height: .98; overflow-wrap: normal; }
.map-banner.is-kvarner p { color: #d8d5ca; }
.map-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.map-actions .map-button { margin-top: 0; }
.map-button.is-primary { color: var(--ink); background: var(--cyan); }
.map-button.is-ghost { border: 1px solid var(--line); color: var(--paper); background: rgba(12, 13, 11, .6); }
.map-banner.is-kvarner .pin { border-color: var(--line); color: var(--paper); background: rgba(12, 13, 11, .84); box-shadow: none; }
@media (max-width: 900px) {
  .map-banner.is-kvarner { min-height: 0; gap: 26px; }
  .map-banner.is-kvarner::after { top: 0; right: 0; background: linear-gradient(0deg, rgba(12, 13, 11, .9), rgba(12, 13, 11, .6) 60%, rgba(12, 13, 11, .34)); }
  .map-banner.is-kvarner .map-pins { min-height: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .map-banner.is-kvarner .pin { position: static; }
}
