/* ============================================
   MANIFESTACIJE BANJA LUKA – style.css
   Design system: Baloo 2 / Nunito
   Palette: Coral · Teal · Amber
   ============================================ */

:root {
  --coral:       #E8604C;
  --coral-light: #f5866e;
  --coral-pale:  #fff1ee;
  --teal:        #2A9D8F;
  --teal-light:  #3bbdac;
  --teal-pale:   #edfaf8;
  --amber:       #E9C46A;
  --amber-dark:  #c9a33a;
  --amber-pale:  #fffbee;
  --blue:        #3B82F6;
  --blue-pale:   #eff6ff;
  --brown:       #92693C;
  --brown-pale:  #fdf5ed;
  --ice:         #5B8FB9;
  --ice-pale:    #eff6ff;

  --dark:        #1a1a2e;
  --text:        #2d3748;
  --text-light:  #718096;
  --bg:          #fafaf8;
  --white:       #ffffff;
  --border:      #e2e8f0;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow:      0 2px 14px rgba(0,0,0,0.09);
  --shadow-lg:   0 6px 30px rgba(0,0,0,0.12);
  --radius:      12px;
  --radius-sm:   8px;

  --font-head: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; }

h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; color: var(--dark); }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); }

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--coral);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; opacity: .85; }

.header-nav { display: flex; gap: .25rem; flex-wrap: wrap; }

.header-nav a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-light);
  padding: .35rem .7rem;
  border-radius: 999px;
  transition: all .2s;
}
.header-nav a:hover {
  color: var(--coral);
  background: var(--coral-pale);
  text-decoration: none;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: .6rem 0;
  font-size: .82rem;
  color: var(--text-light);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: .4rem;
  list-style: none;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.breadcrumb li + li::before { content: "›"; color: #cbd5e0; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--coral); text-decoration: none; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2d1b4e 50%, #1a3a4e 100%);
  color: var(--white);
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(232,96,76,.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(42,157,143,.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .75rem;
}

.hero h1 { color: var(--white); margin-bottom: .75rem; }

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
  max-width: 620px;
}

.stat-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.stat-number {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
}

.stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  margin-top: .2rem;
  font-weight: 600;
}

.hero-image {
  margin-top: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/6;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: rgba(255,255,255,.35);
  font-style: italic;
}

.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ── SECTION TITLES ── */
.section-head {
  margin-bottom: 1.75rem;
}
.section-head h2 { margin-bottom: .4rem; }
.section-desc {
  color: var(--text-light);
  font-size: .95rem;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  min-height: 40px; /* touch-friendly */
  -webkit-tap-highlight-color: transparent;
}

.filter-btn.active {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

@media (hover: hover) {
  .filter-btn:hover {
    border-color: var(--coral);
    color: var(--coral);
    background: var(--coral-pale);
  }
}

.filter-btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  font-size: .75rem;
  margin-left: .35rem;
  padding: 0 4px;
}

.filter-btn:not(.active) .count {
  background: var(--border);
  color: var(--text-light);
}

.search-wrap {
  margin-bottom: 1.5rem;
  position: relative;
}

.search-input {
  width: 100%;
  max-width: 400px;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .6rem 1rem .6rem 2.5rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  transition: border-color .2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--coral);
}

.search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── CARD ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.card.hidden { display: none; }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.1rem .5rem;
  gap: .5rem;
}

.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 999px;
}

/* Category badge colours */
.badge-muzika   { background: var(--coral-pale);  color: var(--coral); }
.badge-gastro   { background: var(--amber-pale);  color: var(--amber-dark); }
.badge-kultura  { background: var(--teal-pale);   color: var(--teal); }
.badge-sport    { background: var(--blue-pale);   color: var(--blue); }
.badge-tradicija{ background: var(--brown-pale);  color: var(--brown); }
.badge-zima     { background: var(--ice-pale);    color: var(--ice); }

.card-month {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .6rem;
  white-space: nowrap;
}

.card-body {
  padding: .25rem 1.1rem 0;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: .4rem;
  color: var(--dark);
}

.card-desc {
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: .75rem;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: .75rem;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .85rem;
  color: var(--text);
}

.meta-icon {
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.meta-label {
  color: var(--text-light);
  font-weight: 600;
  min-width: 50px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .6rem 1.1rem;
}

.tag {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .55rem;
}

.card-footer {
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.card-price {
  font-size: .85rem;
  font-weight: 700;
  color: var(--teal);
}

.card-link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--coral);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .25rem;
  transition: gap .2s;
}

.card-link:hover { text-decoration: none; gap: .5rem; }

/* No-results */
.no-results {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  grid-column: 1 / -1;
  font-size: 1rem;
}

.no-results.visible { display: block; }

/* ── MAP SECTION ── */
.map-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  isolation: isolate; /* contain Leaflet z-indexes, prevent overflow above sticky header */
}

#map {
  height: 460px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 1.25rem;
  z-index: 1;
}

.map-filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.map-filter-btn {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all .2s;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .map-filter-btn:hover { border-color: var(--teal); color: var(--teal); }
}
.map-filter-btn.active { background: var(--teal); border-color: var(--teal); color: var(--white); }

.map-note {
  font-size: .82rem;
  color: var(--text-light);
  margin-top: .6rem;
  font-style: italic;
}

/* ── CALENDAR TABLE ── */
.calendar-section { background: var(--bg); }

.calendar-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.calendar-table th {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  padding: .8rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.calendar-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.calendar-table tr:last-child td { border-bottom: none; }
.calendar-table tr:hover td { background: var(--bg); }

.cal-month {
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--dark);
  white-space: nowrap;
}

.cal-season {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .1rem .5rem;
}
.cal-season.prolece  { background: #f0fdf4; color: #15803d; }
.cal-season.ljeto    { background: #fff7ed; color: #c2410c; }
.cal-season.jesen    { background: #fef9c3; color: #a16207; }
.cal-season.zima     { background: #eff6ff; color: #1d4ed8; }

.cal-events { color: var(--text); }
.cal-events strong { font-weight: 700; color: var(--dark); }

.cal-badges { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ── TIPS SECTION ── */
.tips-section { background: var(--white); border-top: 1px solid var(--border); }

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.tip-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.tip-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.tip-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

.tip-text {
  font-size: .875rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── FAQ ── */
.faq-section { background: var(--bg); border-top: 1px solid var(--border); }

.faq-list { max-width: 800px; display: flex; flex-direction: column; gap: .6rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.faq-q:hover { background: var(--bg); }

.faq-q[aria-expanded="true"] { color: var(--coral); }

.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--text-light);
  transition: transform .3s, background .2s, border-color .2s;
}

.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
}

.faq-a.open { max-height: 500px; }

.faq-a-inner {
  padding: 0 1.25rem 1rem;
  font-size: .925rem;
  color: var(--text-light);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

/* ── SHARE SECTION ── */
.share-section {
  background: var(--coral);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--white);
}

.share-section h2 { color: var(--white); margin-bottom: .5rem; }
.share-subtitle { color: rgba(255,255,255,.8); font-size: .95rem; margin-bottom: 1.5rem; }

.share-buttons {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  color: var(--white);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.share-btn:hover { background: rgba(255,255,255,.28); border-color: white; text-decoration: none; }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 2rem 0;
  font-size: .875rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a { color: rgba(255,255,255,.55); }
.footer-links a:hover { color: var(--amber); text-decoration: none; }

.footer-note {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

/* ── UTILITY ── */
.text-coral  { color: var(--coral); }
.text-teal   { color: var(--teal); }
.text-amber  { color: var(--amber-dark); }
.mb-0 { margin-bottom: 0 !important; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  section { padding: 2.5rem 0; }

  .hero { padding: 2.5rem 0 2rem; }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  #map { height: 340px; }

  .tips-grid { grid-template-columns: 1fr 1fr; }

  .share-buttons { flex-direction: column; align-items: center; }

  /* Search input full width on mobile */
  .search-input { max-width: 100%; }

  /* Filter bar: allow scrolling on very small screens */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .4rem;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }

  /* Map filter bar same treatment */
  .map-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .4rem;
    scrollbar-width: none;
  }
  .map-filter-bar::-webkit-scrollbar { display: none; }

  /* Calendar table: compact on mobile */
  .calendar-table th,
  .calendar-table td { padding: .55rem .65rem; font-size: .82rem; }

  /* Hero image: hide on very small if broken */
  .hero-image { aspect-ratio: 16/7; }
}

@media (max-width: 480px) {
  .tips-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { gap: .35rem; }
  .filter-btn { font-size: .8rem; padding: .4rem .75rem; }
}

/* ── LEAFLET POPUP OVERRIDES ── */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-popup-content {
  font-size: .875rem !important;
  line-height: 1.55 !important;
  margin: .75rem !important;
}

.popup-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: .25rem;
}

.popup-row {
  color: var(--text-light);
  font-size: .82rem;
  display: flex;
  gap: .35rem;
  margin-bottom: .15rem;
}
