/* Trange Frange — početna i liste oglasa (početna, pretraga) */
.tf {
    --tf-forest: #1E4A2C;
    --tf-forest-deep: #153821;
    --tf-sun: #FFD333;
    --tf-sun-deep: #F2C200;
    --tf-ground: #F4F6F0;
    --tf-sage: #DCE7D3;
    --tf-ink: #17261B;
    --tf-muted: #5B6A5F;
    --tf-line: #E1E7DB;
    --tf-display: 'Bricolage Grotesque', 'Rubik', system-ui, sans-serif;
    --tf-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;

    background: var(--tf-ground);
    color: var(--tf-ink);
    font-family: var(--tf-body);
    font-size: 16px;
    line-height: 1.55;
}
.tf *, .tf *::before, .tf *::after { box-sizing: border-box; }
.tf a { text-decoration: none; }
.tf h1, .tf h2, .tf h3 { font-family: var(--tf-display); color: inherit; margin: 0; }
.tf-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Dugmad ---------- */
.tf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.4rem;
    border-radius: 999px; border: 2px solid transparent;
    font-family: var(--tf-body); font-weight: 600; font-size: 1rem; line-height: 1;
    cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.tf-btn i { font-size: 1.25em; }
.tf-btn:active { transform: translateY(1px); }
.tf-btn--sun { background: var(--tf-sun); color: var(--tf-ink); }
.tf-btn--sun:hover { background: var(--tf-sun-deep); color: var(--tf-ink); }
.tf-btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.tf-btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.tf-btn--forest { background: var(--tf-forest); color: #fff; }
.tf-btn--forest:hover, .tf-btn--forest[aria-expanded="true"] { background: var(--tf-forest-deep); color: #fff; }
.tf-btn--line { border-color: var(--tf-line); color: var(--tf-forest); background: #fff; font-size: .9rem; }
.tf-btn--line:hover { border-color: var(--tf-forest); color: var(--tf-forest); }
.tf-btn--block { width: 100%; }
.tf a:focus-visible, .tf button:focus-visible, .tf-pick:focus-within {
    outline: 3px solid var(--tf-sun); outline-offset: 3px;
}
.tf-link { color: var(--tf-forest); font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.tf-link:hover { color: var(--tf-forest-deep); text-decoration: underline; }

/* ---------- Hero ---------- */
.tf-hero {
    background: var(--tf-forest);
    color: #fff;
    padding: 72px 0 0;
    position: relative;
    overflow: hidden;
}
.tf-hero::before {           /* blagi "papirni" krug iza stvari */
    content: ""; position: absolute; right: -120px; top: -160px;
    width: 640px; height: 640px; border-radius: 50%;
    background: var(--tf-forest-deep);
}
.tf-hero__grid {
    position: relative;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.tf-hero__count {
    display: inline-flex; align-items: center; gap: .6rem;
    color: var(--tf-sage); font-size: .95rem; margin: 0 0 1.25rem;
}
.tf-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tf-sun); box-shadow: 0 0 0 4px rgba(255,211,51,.22); }
.tf-hero__title {
    font-size: clamp(2.6rem, 5.6vw, 4.6rem);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.035em;
    max-width: 12ch;
    color: #fff;
}
.tf-hero__lead {
    margin: 1.5rem 0 2rem; max-width: 46ch;
    font-size: 1.125rem; color: rgba(255,255,255,.82);
}
.tf-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Swap scena */
.tf-stage {
    position: relative; height: 440px;
}
.tf-polaroid {
    position: absolute; width: 58%; max-width: 280px;
    background: #fff; color: var(--tf-ink);
    padding: 12px 12px 16px; border-radius: 14px;
    box-shadow: 0 24px 50px -18px rgba(0,0,0,.55);
    display: flex; flex-direction: column; gap: 4px;
    transition: transform .55s cubic-bezier(.7,0,.3,1), opacity .35s ease;
}
.tf-polaroid--a { left: 0; top: 10px; transform: rotate(-6deg); }
.tf-polaroid--b { right: 0; bottom: 10px; transform: rotate(5deg); }
.tf-polaroid__img {
    display: grid; place-items: center;
    aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
    background: var(--tf-sage);
}
.tf-polaroid__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-polaroid__img i { font-size: 5rem; color: var(--tf-forest); }
.tf-polaroid__name { font-family: var(--tf-display); font-weight: 700; font-size: 1.1rem; line-height: 1.2; margin-top: 8px; }
.tf-polaroid__city { font-size: .85rem; color: var(--tf-muted); display: inline-flex; align-items: center; gap: 4px; }
.tf-stage__swap {
    position: absolute; left: 50%; top: 50%;
    width: 76px; height: 76px; margin: -38px 0 0 -38px;
    display: grid; place-items: center;
    border-radius: 50%; background: var(--tf-sun); color: var(--tf-ink);
    font-size: 2.2rem; z-index: 3;
    box-shadow: 0 0 0 8px var(--tf-forest);
    transition: transform .6s cubic-bezier(.7,0,.3,1);
}
/* Faza izmene: kartice prelaze jedna preko druge */
.tf-stage.is-swapping .tf-polaroid--a { transform: translate(40%, 30%) rotate(4deg) scale(.92); opacity: 0; }
.tf-stage.is-swapping .tf-polaroid--b { transform: translate(-40%, -30%) rotate(-5deg) scale(.92); opacity: 0; }

/* Koraci */
.tf-steps {
    position: relative;
    list-style: none; margin: 64px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255,255,255,.16);
}
.tf-steps li {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 26px 24px 30px 0;
}
.tf-steps li + li { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.16); }
.tf-steps__n {
    flex: none; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    border: 2px solid var(--tf-sun); color: var(--tf-sun);
    font-family: var(--tf-display); font-weight: 700;
}
.tf-steps strong { display: block; font-size: 1.05rem; }
.tf-steps span { color: rgba(255,255,255,.72); font-size: .95rem; }

/* ---------- Kategorije ---------- */
.tf-cats {
    position: sticky; top: 0; z-index: 20;
    background: rgba(244,246,240,.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--tf-line);
}
.tf-cats__scroll {
    display: flex; gap: 8px; overflow-x: auto; padding: 14px 0;
    scrollbar-width: none;
}
.tf-cats__scroll::-webkit-scrollbar { display: none; }
.tf-chip {
    flex: none; white-space: nowrap;
    padding: .5rem 1rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--tf-line);
    color: var(--tf-ink); font-size: .92rem; font-weight: 500;
    transition: border-color .15s, background-color .15s;
}
.tf-chip:hover { border-color: var(--tf-forest); color: var(--tf-forest); }
.tf-chip.is-active { background: var(--tf-forest); border-color: var(--tf-forest); color: #fff; }

/* ---------- Oglasi ---------- */
.tf-listing { padding: 48px 0 80px; scroll-margin-top: 0; }
.tf-listing__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 24px; }
.tf-listing__head h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }

.tf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.tf-card {
    position: relative;
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--tf-line); border-radius: 18px;
    transition: border-color .15s;
}
.tf-card:hover { border-color: #C4D2BA; }
.tf-card__media {
    position: relative; display: block;
    aspect-ratio: 4 / 3; overflow: hidden;
    border-radius: 17px 17px 0 0; background: var(--tf-sage);
}
.tf-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tf-card:hover .tf-card__media img { transform: scale(1.04); }
.tf-card__noimg { display: grid; place-items: center; height: 100%; color: var(--tf-forest); font-size: 3rem; opacity: .5; }
.tf-card__cond {
    position: absolute; left: 12px; bottom: 12px;
    background: var(--tf-sun); color: var(--tf-ink);
    padding: .25rem .65rem; border-radius: 999px;
    font-size: .8rem; font-weight: 600;
}
.tf-heart {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 0; color: var(--tf-forest);
    font-size: 1.35rem; cursor: pointer;
    box-shadow: 0 4px 14px rgba(23,38,27,.18);
}
.tf-heart .bxs-heart { color: #D6336C; }
.tf-heart:hover { transform: scale(1.06); }

.tf-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.tf-card__title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tf-card__title a { color: var(--tf-ink); }
.tf-card__title a:hover { color: var(--tf-forest); }
.tf-card__desc { margin: 6px 0 0; color: var(--tf-muted); font-size: .92rem; line-height: 1.5; }
.tf-card__meta {
    list-style: none; padding: 0; margin: 12px 0 16px;
    display: flex; flex-wrap: wrap; gap: 6px 14px;
    color: var(--tf-muted); font-size: .85rem;
}
.tf-card__meta li { display: inline-flex; align-items: center; gap: 4px; }
.tf-card__meta i { color: var(--tf-forest); font-size: 1rem; }
.tf-card__foot { margin-top: auto; }
.tf-own {
    display: flex; align-items: center; justify-content: center; min-height: 48px;
    border-radius: 999px; background: var(--tf-ground); color: var(--tf-muted); font-size: .9rem; font-weight: 500;
}

/* Panel za ponudu */
.tf-offer { position: relative; }
.tf-offer__panel {
    width: min(340px, calc(100vw - 32px));
    padding: 16px; margin-top: 8px !important;
    border: 1px solid var(--tf-line); border-radius: 16px;
    box-shadow: 0 20px 50px -12px rgba(23,38,27,.35);
    max-height: 70vh; overflow-y: auto; z-index: 1310;
}
.tf-offer__q { font-family: var(--tf-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 12px; color: var(--tf-ink); }
.tf-pick {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 8px;
    border: 2px solid var(--tf-line); border-radius: 12px; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.tf-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tf-pick img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--tf-sage); }
.tf-pick__name { flex: 1; font-size: .92rem; font-weight: 500; line-height: 1.3; color: var(--tf-ink); }
.tf-pick__name small { display: block; color: var(--tf-muted); font-weight: 400; }
.tf-pick__check { font-size: 1.4rem; color: var(--tf-forest); opacity: 0; }
.tf-pick:hover { border-color: #BFCDB4; }
.tf-pick:has(input:checked) { border-color: var(--tf-forest); background: #F1F6EC; }
.tf-pick:has(input:checked) .tf-pick__check { opacity: 1; }
.tf-pick.is-disabled { opacity: .5; cursor: not-allowed; }
.tf-offer__panel .tf-btn { margin-top: 6px; }
.tf-offer__empty p { margin: 0 0 6px; color: var(--tf-muted); font-size: .92rem; }

/* Prazno stanje */
.tf-empty {
    grid-column: 1 / -1; text-align: center;
    padding: 64px 24px; border: 2px dashed var(--tf-line); border-radius: 18px; background: #fff;
}
.tf-empty > i { font-size: 3rem; color: var(--tf-forest); }
.tf-empty h3 { font-size: 1.5rem; margin: 12px 0 6px; }
.tf-empty p { color: var(--tf-muted); margin: 0 0 20px; }

/* Paginacija */
.tf-pagination { margin-top: 48px; display: flex; justify-content: center; }
.tf-pagination .pagination { gap: 6px; flex-wrap: wrap; justify-content: center; margin: 0; }
.tf-pagination .page-link {
    min-width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 999px !important; border: 1px solid var(--tf-line);
    color: var(--tf-ink); background: #fff; font-weight: 500;
}
.tf-pagination .page-link:hover { border-color: var(--tf-forest); color: var(--tf-forest); background: #fff; }
.tf-pagination .page-item.active .page-link { background: var(--tf-forest); border-color: var(--tf-forest); color: #fff; }
.tf-pagination .page-item.disabled .page-link { color: #A9B3AA; background: transparent; }

/* ---------- Zašto ---------- */
.tf-why { background: var(--tf-sun); padding: 72px 0; }
.tf-why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.tf-why h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; max-width: 14ch; }
.tf-why__copy p { font-size: 1.1rem; margin: 1rem 0 1.75rem; max-width: 42ch; }
.tf-why .tf-btn--sun { background: var(--tf-forest); color: #fff; }
.tf-why .tf-btn--sun:hover { background: var(--tf-forest-deep); color: #fff; }
.tf-why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tf-why__list li {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 18px 0; border-bottom: 1px solid rgba(23,38,27,.18);
}
.tf-why__list li:last-child { border-bottom: 0; }
.tf-why__list i { font-size: 1.9rem; color: var(--tf-forest); flex: none; }
.tf-why__list strong { display: block; font-family: var(--tf-display); font-size: 1.2rem; }
.tf-why__list span { color: #3D4A40; }

/* ---------- Responzivno ---------- */
@media (max-width: 991.98px) {
    .tf-hero { padding-top: 48px; }
    .tf-hero__grid { grid-template-columns: 1fr; gap: 36px; }
    .tf-stage { height: 340px; max-width: 460px; width: 100%; margin: 0 auto; }
    .tf-polaroid { max-width: 220px; }
    .tf-why__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767.98px) {
    .tf-container { padding: 0 16px; }
    .tf-hero::before { width: 420px; height: 420px; top: auto; bottom: 120px; right: -200px; }
    .tf-steps { grid-template-columns: 1fr; margin-top: 40px; }
    .tf-steps li, .tf-steps li + li { padding: 16px 0; border-left: 0; }
    .tf-steps li + li { border-top: 1px solid rgba(255,255,255,.16); }
    .tf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tf-card__body { padding: 12px; }
    .tf-card__title { font-size: 1rem; }
    .tf-card__desc { display: none; }
    .tf-card__meta { gap: 4px 10px; font-size: .8rem; margin: 8px 0 12px; }
    .tf-card__foot .tf-btn { font-size: .82rem; padding: .55rem .6rem; min-height: 42px; gap: .35rem; }
    .tf-card__foot .tf-btn i { display: none; }
    .tf-heart { width: 36px; height: 36px; font-size: 1.15rem; top: 8px; right: 8px; }
    .tf-listing { padding: 32px 0 56px; }
    .tf-offer { position: static; }
}
@media (max-width: 420px) {
    .tf-stage { height: 270px; }
    .tf-polaroid { width: 50%; padding: 8px 8px 12px; }
    .tf-polaroid--a { left: 2%; }
    .tf-polaroid--b { right: 2%; }
    .tf-polaroid__name { font-size: .95rem; }
    .tf-stage__swap { width: 60px; height: 60px; margin: -30px 0 0 -30px; font-size: 1.8rem; }
}
@media (max-width: 359.98px) {
    .tf-grid { grid-template-columns: 1fr; }
    .tf-card__desc { display: block; }
}
@media (prefers-reduced-motion: reduce) {
    .tf *, .tf *::before, .tf *::after { transition: none !important; animation: none !important; }
}
