/* Atlas Biljaka: početna (pretraga, cvjeta sada, mapa porodica, katalog). Tokeni iz atlas.css. */

.home { overflow-x: clip; }
.kicker { display: inline-block; }

/* ---------- hero ---------- */
.h-hero { position: relative; min-height: min(640px, 76vh); display: grid; place-items: center; padding: 72px var(--gutter) 64px;
  background: radial-gradient(60% 55% at 50% 42%, var(--accent-mist) 0%, transparent 70%), var(--paper); isolation: isolate; }
.h-center { position: relative; z-index: 2; width: min(720px, 100%); text-align: center; }
.h-center h1 { font-size: clamp(3rem, 8vw, 6.2rem); line-height: .95; letter-spacing: -.02em; margin: 14px 0 12px; }
.h-sub { color: var(--ink-soft); font-size: clamp(1.02rem, 1.6vw, 1.2rem); margin: 0 auto 28px; max-width: 32em; }


/* pretraga */
.h-search { position: relative; display: flex; align-items: center; gap: 12px; height: 66px; padding: 0 18px 0 22px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(21, 48, 43, .04), 0 18px 50px rgba(21, 48, 43, .12);
  transition: box-shadow .25s, border-color .25s; text-align: left; }
.h-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), 0 18px 50px rgba(21, 48, 43, .14); }
.h-search > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent-deep); stroke-width: 2; stroke-linecap: round; }
.h-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 500 1.12rem var(--sans); color: var(--ink); }
.h-search input::placeholder { color: var(--muted); }
.h-search input::-webkit-search-cancel-button { display: none; }
.h-search kbd { font: 600 .75rem var(--sans); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 8px; }
.sresults { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 20; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: 0 24px 60px rgba(21, 48, 43, .18); padding: 8px; max-height: 60vh; overflow: auto; }
.sresults ul { list-style: none; margin: 0; padding: 0; }
.sresults li a { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.sresults li[aria-selected="true"] a, .sresults li a:hover { background: var(--accent-mist); }
.sresults li img { width: 56px; height: 37px; object-fit: contain; mix-blend-mode: multiply; }
.sresults li b { font: 600 1.02rem var(--serif); }
.sresults li i { color: var(--ink-soft); margin-left: 6px; }
.sresults li small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.sresults mark { background: color-mix(in srgb, var(--primrose) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-empty { margin: 10px 14px; color: var(--muted); }

.h-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.qk { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 8px 15px; font: 500 .9rem var(--sans); color: var(--ink-soft); cursor: pointer; transition: all .2s; }
.qk:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-pale); transform: translateY(-1px); }


/* ---------- blokovi ---------- */
.h-block { max-width: var(--maxw); margin: 0 auto; padding: 72px var(--gutter) 0; }
.h-head { margin-bottom: 26px; }
.h-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 8px 0 8px; }
.h-head p { color: var(--ink-soft); margin: 0; }

/* cvjeta sada */
.now-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 16px; overflow-x: auto; padding: 4px 4px 18px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; }
.now-card { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.now-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(21, 48, 43, .05), 0 22px 44px rgba(21, 48, 43, .12); }
.now-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; mix-blend-mode: multiply; }
.now-card b { display: block; font: 600 1.2rem var(--serif); }
.now-card i { color: var(--ink-soft); font-size: .9rem; }
.ntag { position: absolute; top: 12px; left: 12px; z-index: 1; font: 600 .7rem var(--sans); letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; background: var(--accent-pale); color: var(--accent-ink); }
.ntag.now { background: var(--primrose); color: #5a4508; }
.ntag.lo { background: var(--primrose-pale); color: #6b5410; }

/* traka mjeseci (cvjetanje) */
.mstrip { display: inline-grid; grid-template-columns: repeat(12, 1fr); gap: 2px; width: 100%; max-width: 168px; }
.mstrip i { height: 7px; border-radius: 2px; background: var(--line-soft); position: relative; }
.mstrip i.v1 { background: color-mix(in srgb, var(--primrose) 50%, var(--surface)); }
.mstrip i.v2 { background: var(--primrose); }
.mstrip i.now { outline: 2px solid var(--accent-deep); outline-offset: 1px; }
.mstrip.sm { max-width: none; }

/* ---------- mapa porodica ---------- */
.tree-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.tree-wrap { position: relative; overflow: hidden; padding: 18px 0 8px; }
.tree { position: relative; z-index: 2; }
.tree-links { position: absolute; left: 0; top: 18px; z-index: 1; overflow: visible; }
.tree-links path { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 1.6; transition: stroke .25s, stroke-width .25s, opacity .25s; }
.tn { position: absolute; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(21, 48, 43, .05); font: inherit; color: var(--ink);
  text-align: left; cursor: pointer; text-decoration: none; transition: opacity .25s, border-color .25s, box-shadow .25s, transform .25s; }
.tn::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--accent); }
.tn.r-c::before { background: var(--accent-deep); } .tn.r-o::before { background: var(--seed); }
.tn.r-f::before { background: var(--primrose); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primrose) 35%, transparent); }
.tn.r-g::before { background: var(--pink); }
.tn span { display: flex; flex-direction: column; min-width: 0; }
.tn b { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn i { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn em { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-pale); border-radius: 99px; padding: 1px 7px; margin-left: 2px; }
.tn.leaf { padding: 4px 12px 4px 4px; border-radius: 99px; }
.tn.leaf::before { display: none; }
.tn.leaf img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 40%; background: var(--paper); flex: none; }
.tn.leaf b { font-family: var(--serif); font-size: .98rem; }
.tn:hover, .tn:focus-visible { border-color: var(--accent); box-shadow: 0 6px 18px rgba(21, 48, 43, .12); outline: 0; }
.tree-wrap.hl .tn:not(.on) { opacity: .28; }
.tree-wrap.hl .tree-links path:not(.on) { opacity: .15; }
.tree-wrap.hl .tree-links path.on { stroke: var(--accent-deep); stroke-width: 2.4; }

/* srednja širina (laptop, uži prozor): sitniji čvorovi da sve stane bez rezanja naziva */
.tree-wrap.compact .tn { gap: 7px; padding: 6px 9px 6px 8px; }
.tree-wrap.compact .tn b { font-size: .82rem; }
.tree-wrap.compact .tn i { font-size: .68rem; }
.tree-wrap.compact .tn em { font-size: .66rem; padding: 1px 6px; }
.tree-wrap.compact .tn::before { width: 7px; height: 7px; }
.tree-wrap.compact .tn.leaf { padding: 3px 10px 3px 3px; }
.tree-wrap.compact .tn.leaf img { width: 36px; height: 36px; }
.tree-wrap.compact .tn.leaf b { font-size: .88rem; }

/* telefon: uvučena lista umjesto kolona */
.tree-wrap.narrow { overflow: visible; }
.tree-wrap.narrow .tree { min-width: 0; }
.tree-wrap.narrow .tn { padding: 5px 10px 5px 8px; border-radius: 12px; }
.tree-wrap.narrow .tn.leaf img { width: 36px; height: 36px; }
.tree-wrap.narrow .tn b { font-size: .86rem; }
@media (max-width: 700px) { .tree-legend { display: none; } }

/* ---------- katalog ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.fgroup > span { width: 130px; flex: none; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 13px; font: 500 .86rem var(--sans); color: var(--ink-soft);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.m { padding: 5px 9px; min-width: 42px; }
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 16px; }
.fbar p { margin: 0; color: var(--ink-soft); }
.fbar p b { color: var(--ink); font-size: 1.1rem; }
#active { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.act { border: 0; background: var(--accent-pale); color: var(--accent-ink); border-radius: 99px; padding: 5px 11px; font: 500 .84rem var(--sans); cursor: pointer; }
.act span { margin-left: 4px; opacity: .7; }
.dd { position: relative; display: flex; align-items: center; gap: 10px; }
.dd-l { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font: 600 .9rem var(--sans); color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(21, 48, 43, .05); transition: border-color .2s, box-shadow .2s; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.dd-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-deep); stroke-width: 2.2; stroke-linecap: round; transition: transform .25s; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; margin: 0; padding: 6px; list-style: none; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(21, 48, 43, .16); animation: ddin .16s ease-out; }
.dd-menu li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 11px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.dd-menu li:hover, .dd-menu li.act { background: var(--accent-mist); color: var(--ink); }
.dd-menu li[aria-selected="true"] { color: var(--accent-ink); font-weight: 600; }
.dd-menu li[aria-selected="true"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes ddin { from { opacity: 0; transform: translateY(-6px); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: var(--ink); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; animation: rise .45s both; }
.pcard:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgba(21, 48, 43, .05), 0 26px 50px rgba(21, 48, 43, .14); }
.pimg { display: block; aspect-ratio: 3 / 2; background: radial-gradient(70% 70% at 50% 55%, var(--surface), var(--paper)); overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.pcard:hover .pimg img { transform: scale(1.06); }
.pbody { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px 18px; flex: 1; }
.pfam { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
.pbody b { font: 600 1.32rem var(--serif); }
.pbody i { color: var(--ink-soft); }
.ptags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.ptags span { font-size: .74rem; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 99px; padding: 2px 8px; color: var(--ink-soft); }
.pfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.pfoot .badge { white-space: nowrap; }
.grid-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.grid-empty button { border: 0; background: none; color: var(--accent-deep); font: inherit; text-decoration: underline; cursor: pointer; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.home + .site-foot { margin-top: 90px; }

/* ---------- telefon i tablet ---------- */
@media (max-width: 760px) {
  .h-hero { min-height: auto; padding: 40px 16px 44px; align-items: start; }
  .h-hero { display: flex; flex-direction: column; align-items: stretch; }
  .h-search { height: 58px; padding: 0 14px 0 16px; }
  .h-search kbd { display: none; }
    .h-block { padding-top: 56px; }
  .fgroup > span { width: 100%; }
  .filters { padding: 14px; }
  .fbar { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard { animation: none; }
}
