/* Pārskati v2 - full visual + animation redesign. Direct request: "beautiful
   UI and big modern UI with animations graphs/charts already premade but
   also keep the option to generate new ones." Everything here is scoped
   under .parskati-page so it can't leak into /tirgus/, /ipasums/ or the
   property report - those pages share seo.css's plain .stat-cards/
   .trend-bars/.cta-band/.section-block rules, and this redesign overrides
   those classes' look ONLY inside Pārskati rather than editing seo.css
   itself. No new chart library - donuts stay CSS conic-gradient (computed
   server-side in parskati_views.py, unchanged), bars stay plain divs; only
   entrance/count-up animation is new (see parskati.js), driven by
   IntersectionObserver so nothing above the fold janks in already-visible. */

/* .animate-on-scroll/.in-view now lives in base.css (shared site-wide,
   both Pārskati templates load it too) - see parskati.js for this page's
   own count-up/bar-growth logic layered on top. */

/* ---------- Hero - same navy/gold radial-gradient banner language as the
   property report's .report-hero (report.css), reused here rather than
   invented fresh so Pārskati reads as the same product line. ---------- */
.parskati-hero {
  background: radial-gradient(900px 320px at 88% -25%, rgba(200,146,46,.32), transparent 60%),
              linear-gradient(135deg, #12293a 0%, #1c3f57 100%);
  border-radius: 18px; padding: 34px 36px; margin-bottom: 26px; color: #fff;
  box-shadow: 0 10px 30px rgba(18,35,59,.32); position: relative; overflow: hidden;
}
.parskati-hero .breadcrumbs { margin-bottom: 14px; }
.parskati-hero .breadcrumbs a, .parskati-hero .breadcrumbs span { color: rgba(255,255,255,.72); }
.parskati-hero .breadcrumbs a:hover { color: #fff; }
.parskati-hero .breadcrumbs .sep { color: rgba(255,255,255,.4); }
.parskati-hero h1 { color: #fff; font-size: 28px; line-height: 1.25; margin: 0 0 12px; }
.parskati-hero .lede { color: rgba(255,255,255,.82); max-width: 660px; font-size: 14.5px; line-height: 1.6; margin: 0; }
.parskati-hero-ticker {
  display: inline-flex; align-items: baseline; gap: 8px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.parskati-hero-ticker-num { font-size: 30px; font-weight: 800; color: #ffd27a; }
.parskati-hero-ticker-lbl { font-size: 13px; color: rgba(255,255,255,.75); }

/* Detail-page hero adds the period's headline €/m² figure, badge-style
   change indicator, and the custom-range form directly beneath - same
   "big number up top" pattern as the property report's estimate box. */
.parskati-hero-stats { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.parskati-hero-stat-num { font-size: 26px; font-weight: 800; color: #fff; display: flex; align-items: baseline; gap: 8px; }
.parskati-hero-stat-lbl { font-size: 11px; opacity: .78; text-transform: uppercase; letter-spacing: .03em; margin-top: 3px; }
.parskati-hero-badge {
  font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.parskati-hero-badge.up { background: rgba(18,183,106,.22); color: #6ee7a8; }
.parskati-hero-badge.down { background: rgba(240,68,56,.2); color: #ffb199; }

/* ---------- Premade showcase grid (index page) - the "already there,
   click through" reports, now the visual centerpiece instead of three
   plain bordered boxes. Bigger cards, animated donut + count-up stats,
   staggered scroll-in (see parskati.js). ---------- */
.showcase-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.showcase-section-title h2 { font-size: 19px; margin: 0; color: var(--ink); }
.showcase-section-sub { font-size: 13px; color: var(--ink-faint); }

.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-bottom: 16px; }
.showcase-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; text-decoration: none; color: var(--ink); box-shadow: 0 4px 20px rgba(16,24,40,.07);
  border-top: 3px solid #9c7020; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.showcase-card:hover { box-shadow: 0 14px 34px rgba(16,24,40,.14); transform: translateY(-4px); border-top-color: #e0ac4a; }
.showcase-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.showcase-card-head h3 { font-size: 15.5px; margin: 0; color: var(--ink); font-weight: 700; }
.showcase-card-arrow { font-size: 11.5px; font-weight: 700; color: #9c7020; white-space: nowrap; }
.showcase-card-body { display: flex; align-items: center; gap: 18px; }
/* True donut, not a flat solid pie - direct feedback the plain pie circle
   looked unpolished. A CSS mask punches the center out of the same
   server-computed conic-gradient (no chart library, no new data), and
   filter:drop-shadow (not box-shadow, which would shadow the pre-mask
   solid circle rather than the visible ring) gives it real depth. */
.showcase-pie {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0; position: relative;
  -webkit-mask-image: radial-gradient(circle, transparent 56%, #000 57%);
  mask-image: radial-gradient(circle, transparent 56%, #000 57%);
  filter: drop-shadow(0 6px 14px rgba(16,24,40,.16));
  transform: scale(.6); opacity: 0; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .6s ease;
}
.showcase-pie::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.05);
  pointer-events: none;
}
.in-view .showcase-pie { transform: scale(1); opacity: 1; }
.showcase-stats { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.showcase-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.showcase-stat-num { font-size: 16px; font-weight: 800; color: var(--ink); }
.showcase-stat-lbl { font-size: 11px; color: var(--ink-faint); }

/* Smaller, single-stat era cards - a second row so the showcase reads as
   a real variety of premade reports (period AND era), not three near-
   identical "whole Rīga" tiles. */
.showcase-era-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 30px; }
.showcase-era-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--canvas); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--ink); transition: background .15s, transform .15s;
}
.showcase-era-card:hover { background: var(--brand-tint); transform: translateY(-2px); }
.showcase-era-card-name { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.showcase-era-card-count { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.showcase-era-card-num { font-size: 18px; font-weight: 800; color: var(--brand-dark); white-space: nowrap; }

/* ---------- Custom generator - kept fully functional (every field still
   visible, no collapsed/advanced toggle - same rule this project already
   established for Explore/Search), just restyled as its own clearly-
   labelled "build your own" card rather than a plain bordered form so it
   doesn't read as an afterthought below the premade showcase. ---------- */
.parskati-generator {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; box-shadow: 0 4px 20px rgba(16,24,40,.06); margin-bottom: 24px;
}
.parskati-generator-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.parskati-generator-head svg { flex: none; color: #9c7020; }
.parskati-generator-head h2 { font-size: 16px; margin: 0; color: var(--ink); }
.parskati-generator-sub { font-size: 12.5px; color: var(--ink-faint); margin: 2px 0 16px; }

.parskati-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.preset-chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--brand-dark);
  text-decoration: none; transition: box-shadow .15s, border-color .15s, background .15s;
}
.preset-chip:hover { box-shadow: var(--shadow-sm); border-color: var(--brand); background: var(--brand-tint); }

.parskati-filter, .parskati-quickjump { margin-bottom: 0; }
.parskati-quickjump { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.parskati-quickjump h2 { font-size: 13.5px; margin: 0 0 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }

.pf-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pf-field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.pf-field label { font-size: 11px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .03em; }
.pf-field input, .pf-field select {
  padding: 9px 10px; font-size: 14px; font-weight: 500; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--canvas); font-family: inherit;
}
.pf-field input:focus, .pf-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

.btn-primary, .btn-secondary {
  border: none; border-radius: var(--radius-sm); padding: 10px 22px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: filter .15s, transform .15s;
}
.btn-primary { background: linear-gradient(135deg, #e0ac4a, #9c7020); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-secondary { background: var(--brand-tint); color: var(--brand-dark); }
.btn-secondary:hover { background: var(--line-soft); }

.era-table td.era-label { font-weight: 600; }
.era-table .era-gap-note { font-size: 12px; color: var(--ink-faint); }

/* ---------- Era donut (detail page) - bigger, animated scale-in on
   scroll, legend rows now carry their own animated progress-bar fill
   instead of a static swatch dot, so the "% of deals" number has a
   visual counterpart that grows in, not just a table row. ---------- */
.era-pie-wrap { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.era-pie {
  width: 180px; height: 180px; border-radius: 50%; flex-shrink: 0; position: relative;
  -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 59%);
  mask-image: radial-gradient(circle, transparent 58%, #000 59%);
  filter: drop-shadow(0 10px 26px rgba(16,24,40,.14));
  transform: scale(.6); opacity: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .7s ease;
}
.era-pie::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.05);
  pointer-events: none;
}
.in-view .era-pie { transform: scale(1); opacity: 1; }
.era-legend { display: flex; flex-direction: column; gap: 12px; min-width: 260px; flex: 1; }
.era-legend-row { display: flex; flex-direction: column; gap: 4px; }
.era-legend-top { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.era-legend-swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.era-legend-pct { font-weight: 800; color: var(--ink); min-width: 42px; }
.era-legend-label { color: var(--ink-soft); flex: 1; font-weight: 600; }
.era-legend-count { color: var(--ink-faint); font-size: 12px; }
.era-bar-track { height: 6px; border-radius: 4px; background: var(--canvas); overflow: hidden; }
.era-bar-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }

.methodology-note {
  background: var(--brand-tint); border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 10px 0 22px;
}

.parskati-filter-detail {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.parskati-filter-detail .pf-row { gap: 10px; }
.parskati-filter-detail .pf-field { min-width: 130px; }

/* ---------- Detail-page modern stat cards - override seo.css's plain
   .stat-cards ONLY inside .parskati-page (see file header comment); every
   other page using .stat-cards keeps seo.css's original flat style. ---------- */
.parskati-page .stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 32px; }
.parskati-page .stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 3px 14px rgba(16,24,40,.05); border-left: 3px solid var(--brand);
}
.parskati-page .stat-card .stat-num { font-size: 26px; font-weight: 800; color: var(--ink); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.parskati-page .stat-card .stat-lbl { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }

/* ---------- Insights - was a plain <ul>, now a row of callout chips with
   an accent bar, matching the stat-card visual language above instead of
   reading as leftover bullet text. ---------- */
.insight-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.insight-list li {
  position: relative; padding: 12px 16px 12px 20px; background: var(--canvas); border-radius: 10px;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.55;
}
.insight-list li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #e0ac4a, #9c7020); }

/* ---------- Trend bars - override seo.css's static .trend-bars for this
   page only: bars grow from 0 height on scroll-in instead of rendering at
   full height immediately (see parskati.js, data-height attr). ---------- */
.parskati-page .trend-bars { display: flex; align-items: flex-end; gap: 10px; padding: 0 4px; height: 130px; }
.parskati-page .trend-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; height: 100%; justify-content: flex-end; }
.parskati-page .trend-bar-track { height: 110px; width: 100%; display: flex; align-items: flex-end; }
.parskati-page .trend-bar {
  width: 100%; background: linear-gradient(180deg, #2c6a8f, #1c3f57); border-radius: 5px 5px 0 0;
  min-height: 3px; transition: height .8s cubic-bezier(.2,.8,.2,1);
}
.parskati-page .trend-bar-label { font-size: 11px; color: var(--ink-faint); }
.parskati-page .trend-bar-value { font-size: 11px; font-weight: 700; color: var(--ink); }

/* ---------- Movers / worst-movers - ranked "leaderboard" rows instead of
   a plain table, still real <table> markup underneath for accessibility/
   SEO text extraction. ---------- */
.movers-list { display: flex; flex-direction: column; gap: 8px; }
.mover-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.mover-row:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }
.mover-rank {
  width: 26px; height: 26px; border-radius: 50%; background: var(--canvas); color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.mover-name { flex: 1; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.mover-ppsqm { font-size: 13px; color: var(--ink-faint); white-space: nowrap; }
.mover-badge {
  font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 20px; white-space: nowrap; min-width: 64px; text-align: center;
}
.mover-badge.up { background: #e6f7ee; color: #0a7a4e; }
.mover-badge.down { background: #fdecea; color: #c0392b; }

/* Visible FAQ, mirrors the FAQPage structured data built from the same
   real stats (see parskati_views.py::_build_report) - kept as plain
   question/answer pairs, not an accordion, since the point is crawlable
   text depth, not an interaction pattern. */
.parskati-faq { display: flex; flex-direction: column; gap: 4px; }
.parskati-faq-item {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px;
}
.parskati-faq-item h3 { font-size: 14.5px; margin: 0 0 4px; color: var(--ink); }
.parskati-faq-item p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* ---------- Conversion CTA - overrides seo.css's plain .cta-band inside
   Pārskati only, with a two-button layout (Explore this data / go
   Subscriber) instead of one link, per the site-wide "hints/journeys to
   purchase" request. ---------- */
.parskati-page .cta-band {
  background: radial-gradient(600px 200px at 85% -30%, rgba(200,146,46,.28), transparent 60%),
              linear-gradient(135deg, #12293a 0%, #1c3f57 100%);
  border-radius: 16px; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; color: #fff; margin-bottom: 26px;
}
.parskati-page .cta-band h3 { font-size: 18px; margin: 0 0 5px; }
.parskati-page .cta-band p { margin: 0; opacity: .82; font-size: 13.5px; max-width: 460px; }
.parskati-page .cta-band-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.parskati-page .cta-band .btn-white {
  background: #fff; color: var(--brand-dark); font-weight: 700; font-size: 13.5px; padding: 10px 20px;
  border-radius: 20px; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s;
}
.parskati-page .cta-band .btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.parskati-page .cta-band .btn-gold {
  background: linear-gradient(135deg, #e0ac4a, #9c7020); color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 10px 20px; border-radius: 20px; text-decoration: none; white-space: nowrap; transition: transform .15s, filter .15s;
}
.parskati-page .cta-band .btn-gold:hover { transform: translateY(-2px); filter: brightness(1.08); }

@media (max-width: 640px) {
  .pf-row { flex-direction: column; align-items: stretch; }
  .pf-field { min-width: 0; }
  .parskati-hero { padding: 24px 22px; }
  .parskati-hero h1 { font-size: 22px; }
  .era-pie-wrap { gap: 20px; }
  .era-pie { width: 130px; height: 130px; }
}
