/*
  GoHome public site: the look of gohome.hr, rebuilt with modern CSS.
  Hand-written, no framework. Mobile first: the base rules are the phone layout, then
    @media (width >= 48rem)    tablet (still one column)
    @media (width >= 61.25rem) desktop (two columns, horizontal menus)
  Values come from the old gohome.css (see the design spec); colours are tokens on :root.
*/
@layer reset, tokens, base, layout, components, pages, utilities;

/* ================================================================ reset */
@layer reset {
    *, *::before, *::after { box-sizing: border-box; }
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
    ul, ol { padding: 0; }
    fieldset { padding: 0; border: 0; min-inline-size: 0; }
    img, picture { max-inline-size: 100%; block-size: auto; border: 0; }
    button, input, select, textarea { font: inherit; color: inherit; }
    button { cursor: pointer; }
    [hidden] { display: none !important; }
}

/* ================================================================ tokens */
@layer tokens {
    :root {
        /* brand */
        --brand: #9c0c16;
        --brand-hover: #710407;
        --brand-ink: #900;
        --brand-tint: #f6bcbc;

        /* gradients that were 1px images */
        --grad-header-home: linear-gradient(#a1101c, #980b15 25%, #8d0911 50%, #83070e 75%, #6f050b);
        --grad-header-search: linear-gradient(#b21b2d 0 40px, #a91524 75px, #930a13 112px, #76060b 150px);
        --grad-button: linear-gradient(#9c0c16, #910913 25%, #7e070d 50%, #6c0307 75%, #600202);
        --grad-search-band: linear-gradient(#fff, #f0f0f0 60%, #cacaca);
        --grad-footer: linear-gradient(#bbb 0, #e5e5e5 75px, #ebebeb 150px);
        --grad-price-tag: linear-gradient(#a21118, #570100);
        --grad-new: linear-gradient(#598526, #1c3a04);
        --grad-price-down: linear-gradient(#6a9a30, #3d6a12);
        --grad-price-up: linear-gradient(#c0392b, #8b1a0e);

        /* text */
        --text: #000;
        --text-strong: #363636;
        --text-number: #464646;
        --text-heading: #454545;
        --text-title: #444;
        --text-sub: #393939;
        --text-body: #555;
        --text-muted: #636363;
        --text-soft: #757575;
        --text-faint: #767676;
        --text-pager: #5c5c5c;
        --text-on-brand: #fff;

        /* lines and surfaces */
        --line: #e5e5e5;
        --line-home-box: #e1e1e1;
        --line-box: #d5d5d5;
        --line-column: #d3d3d3;
        --line-footer-h: #c8c8c8;
        --line-footer-li: #d1d1d1;
        --line-feature: #ddd;
        --line-list: #dfdfdf;
        --line-pager: #7f7f7f;
        --line-copyright: #bcbcbc;
        --surface: #fff;
        --surface-alt: #f6f6f6;
        --surface-tab: #ebebeb;
        --surface-panel: #eee;
        --surface-menu: #f8f8f8;
        --surface-home-box: #e1e1e1;
        --surface-footer: #ebeceb;
        --surface-dropdown: #000;
        --line-dropdown: #313131;

        /* accents */
        --green: #598527;
        --green-dark: #406618;
        --green-save: #318231;
        --red: #b0281a;
        --verde-bg: #c7e89a;
        --verde-inner: #edfbda;
        --teaser-blue: #005c7f;
        --info-green: #486b1f;
        --report-bg: #f6e7e7;
        --report-line: #e1d2d3;
        --success-bg: #d3f3b2;
        --success-line: #a4c87f;
        --failure-bg: #fee4e4;
        --failure-line: #f5c5c5;
        --focus: #0b5cad;

        /* type */
        --font: Arial, Helvetica, sans-serif;
        --fs-sm: .8rem;
        --fs-snippet: .9rem;
        --fs-title: 1.1rem;
        --fs-h1-rest: 1.3rem;
        --fs-menu: .75rem;
        --fs-tiny: 11px;

        /* sizes */
        --gutter: clamp(.6rem, 2.5vw, 1.25rem);
        --container: 60rem;
        --sidebar: 18.75rem;
        --rest-main: 39.7rem;
        --gap-col: 1.5625rem;

        /* radii and shadows */
        --r-pager: 3px;
        --r-badge: 5px;
        --r-tab: 10px 10px 0 0;
        --r-box: 10px;
        --r-side: 12px;
        --r-column: 15px;
        --shadow-card: 0 0 10px 2px #e5e5e5;
    }
}

/* ================================================================ base */
@layer base {
    body {
        font-family: var(--font);
        font-size: 1rem;
        line-height: 1.4;
        color: var(--text);
        background: var(--surface);
        overflow-wrap: break-word;
    }

    a { color: var(--brand); }
    a:hover { text-decoration: none; }

    :focus-visible {
        outline: 2px solid var(--focus);
        outline-offset: 2px;
    }

    .visually-hidden {
        position: absolute !important;
        inline-size: 1px;
        block-size: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .skip-link {
        position: absolute;
        inset-inline-start: .5rem;
        inset-block-start: -3rem;
        z-index: 100;
        padding: .5rem 1rem;
        background: var(--brand);
        color: var(--text-on-brand);
        border-radius: 4px;
    }
    .skip-link:focus { inset-block-start: .5rem; }

    main:focus { outline: none; }

    .muted, .hint { color: var(--text-faint); }
    .lead { font-size: 1rem; color: var(--text-sub); margin-block-end: 1rem; }
    .count { color: var(--text-faint); font-weight: 400; }
    .my { color: var(--brand); }
    .top-menu .my { color: var(--brand-tint); }

    .notice {
        margin: 10px auto;
        inline-size: min(var(--container), 100% - 2 * var(--gutter));
        padding: .6rem .9rem;
        background: var(--surface-panel);
        border-radius: var(--r-box);
        font-size: var(--fs-sm);
        color: var(--text-strong);
    }

    @media (width >= 61.25rem) {
        body { line-height: normal; }
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            scroll-behavior: auto !important;
            transition: none !important;
            animation: none !important;
        }
    }
}

/* ================================================================ layout: header */
@layer layout {
    .site-header {
        position: relative;
        background: var(--brand);
        color: var(--text-on-brand);
    }

    .site-header__bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 1rem;
        min-block-size: 2.75rem;
        padding-inline: var(--gutter);
    }

    .site-header__logo {
        display: block;
        line-height: 0;
        margin-inline: auto;
        padding-block: 13px 9px;
    }

    /* phone menu button */
    .menu-toggle {
        display: none;
        align-items: center;
        gap: .5rem;
        min-block-size: 2.75rem;
        margin-inline-start: auto;
        padding: 0 .25rem;
        background: none;
        border: 0;
        color: var(--text-on-brand);
        font-size: var(--fs-sm);
        font-weight: 700;
    }
    .js .menu-toggle { display: inline-flex; }
    .menu-toggle__icon {
        inline-size: 1.25rem;
        block-size: .9rem;
        background:
            linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
            linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
            linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
    }
    .menu-toggle[aria-expanded="true"] .menu-toggle__icon {
        background:
            linear-gradient(45deg, transparent 45%, currentColor 45% 55%, transparent 55%),
            linear-gradient(-45deg, transparent 45%, currentColor 45% 55%, transparent 55%);
    }
    .site-header--rest .menu-toggle {
        position: absolute;
        inset-inline-end: var(--gutter);
        inset-block-start: 13px;
    }

    /* the menu (phone: vertical list behind the button) */
    .top-menu { inline-size: 100%; }
    .js .top-menu:not(.is-open) { display: none; }
    .top-menu__list {
        list-style: none;
        display: flex;
        flex-direction: column;
        padding-block: .25rem .75rem;
        font-size: .9rem;
        font-weight: 700;
    }
    .top-menu__item { position: relative; border-block-start: 1px solid rgb(255 255 255 / .2); }
    .top-menu a {
        display: block;
        padding: .7rem .25rem;
        color: var(--text-on-brand);
        text-decoration: none;
    }
    .top-menu a:hover { text-decoration: underline; }
    .top-menu a:focus-visible, .menu-toggle:focus-visible, .top-menu__sub-toggle:focus-visible { outline-color: #fff; }
    .top-menu__sub { list-style: none; padding-inline-start: 1rem; font-size: .85rem; }
    .top-menu__sub-toggle { display: none; }

    @media (width >= 61.25rem) {
        .site-header__bar {
            flex-wrap: nowrap;
            min-block-size: 0;
        }
        .js .menu-toggle { display: none; }
        .js .top-menu:not(.is-open), .top-menu { display: block; }
        .site-header__logo { margin-inline: 0; padding-block: 0 9px; }

        .top-menu__list {
            flex-direction: row;
            align-items: center;
            padding: 0;
            font-size: var(--fs-menu);
        }
        .top-menu__item { border: 0; }
        .top-menu__item + .top-menu__item::before {
            content: "";
            position: absolute;
            inset-inline-start: 0;
            inset-block-start: 50%;
            block-size: 11px;
            translate: 0 -50%;
            border-inline-start: 1px dotted rgb(255 255 255 / .5);
        }
        .top-menu a {
            block-size: 30px;
            line-height: 30px;
            padding: 0 10px;
        }
        .top-menu__item:first-child > a { padding-inline-start: 0; }
        .top-menu__item--end { margin-inline-start: auto; }
        .top-menu__item--end::before { display: none; }

        /* "Sve o GoHome tražilici": a black dropdown on hover and keyboard focus */
        .top-menu__sub {
            display: none;
            position: absolute;
            inset-inline-start: 0;
            inset-block-start: 100%;
            z-index: 50;
            inline-size: 210px;
            padding: 0;
            font-size: 90%;
            background: var(--surface-dropdown);
            border-block-start: 10px solid var(--line-dropdown);
            border-radius: 0 10px 10px 10px;
        }
        .top-menu__sub li { border-block-end: 1px solid var(--line-dropdown); }
        .top-menu__sub li:last-child { border-block-end: 0; }
        .top-menu__sub a { block-size: auto; line-height: 2.5em; padding-inline: 10px; }
        .top-menu__sub a:hover { color: silver; text-decoration: none; }
        .top-menu__item--sub:hover, .top-menu__item--sub:focus-within, .top-menu__item--sub.is-open {
            background: var(--surface-dropdown);
            border-radius: 10px 10px 0 0;
        }
        .top-menu__item--sub:hover::before, .top-menu__item--sub:focus-within::before, .top-menu__item--sub.is-open::before,
        .top-menu__item--sub:hover + .top-menu__item::before, .top-menu__item--sub:focus-within + .top-menu__item::before { display: none; }
        .top-menu__item--sub:hover > .top-menu__sub,
        .top-menu__item--sub:focus-within > .top-menu__sub,
        .top-menu__item--sub.is-open > .top-menu__sub { display: block; }

        /* touch screens without hover: a small button opens the dropdown */
        @media (hover: none) {
            .top-menu__item--sub { display: flex; align-items: center; }
            .top-menu__sub-toggle {
                display: block;
                inline-size: 1.75rem;
                block-size: 30px;
                background: none;
                border: 0;
                color: var(--text-on-brand);
            }
            .top-menu__sub-toggle::after { content: "\25BE"; }
        }

        /* home: 60px bar, menu in the 960px container */
        .site-header--home { block-size: 60px; background: var(--brand) var(--grad-header-home); }
        .site-header--home .site-header__bar { inline-size: min(var(--container), 100%); margin-inline: auto; padding: 20px 0 0; }

        /* content pages: 100px bar, white logo above the menu */
        .site-header--rest { block-size: 100px; background: var(--brand) var(--grad-header-search) bottom / 100% 150px no-repeat; }
        .site-header--rest .site-header__bar {
            flex-direction: column;
            align-items: flex-start;
            inline-size: min(var(--container), 100%);
            margin-inline: auto;
            padding: 13px 0 0;
        }
        .site-header--rest .top-menu { inline-size: 100%; }

        /* search pages: 150px bar, leaderboard at the top, menu in the bottom 40px */
        .site-header--search { block-size: 150px; background: var(--brand) var(--grad-header-search) top / 100% 150px no-repeat; }
        .site-header--search .site-header__bar { position: absolute; inset-inline: 0; inset-block-end: 10px; padding-inline: 20px; }
    }

    @media (prefers-reduced-motion: no-preference) {
        .top-menu a { transition: color .15s; }
    }
}

/* ================================================================ layout: page shells */
@layer layout {
    .home-main {
        inline-size: min(var(--container), 100% - 2 * var(--gutter));
        margin-inline: auto;
        text-align: center;
    }

    .search-main { display: block; }

    .rest-wrap {
        inline-size: min(var(--container), 100% - 2 * var(--gutter));
        margin: 20px auto 5px;
        display: grid;
        gap: var(--gap-col);
    }
    .rest-main { min-inline-size: 0; }

    @media (width >= 61.25rem) {
        .rest-wrap { margin-block-start: 30px; }
        .rest-wrap--column {
            grid-template-columns: minmax(0, var(--rest-main)) var(--sidebar);
            justify-content: space-between;
            align-items: start;
        }
    }
}

/* ================================================================ layout: footer */
@layer layout {
    .site-footer {
        margin-block-start: 20px;
        padding-block: 18px 20px;
        background: var(--surface-footer) var(--grad-footer) top / 100% 300px no-repeat;
        font-size: var(--fs-sm);
        color: var(--text-muted);
    }
    .site-footer__inner { inline-size: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
    .shell-search .site-footer__inner { inline-size: auto; padding-inline: var(--gutter); }

    .site-footer__cells {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-block-end: 20px;
    }
    .footer-cell__title {
        padding-block-end: 12px;
        border-block-end: 1px solid var(--line-footer-h);
        font-size: var(--fs-sm);
        font-weight: 700;
        color: var(--text-muted);
    }
    .footer-cell ul { list-style: none; }
    .footer-cell li { line-height: 3; border-block-end: 1px solid var(--line-footer-li); }
    .footer-cell li a { display: block; font-weight: 700; color: var(--brand); text-decoration: none; }
    .footer-cell li a:hover { color: var(--text-muted); }
    .footer-cell p { padding-block-start: 8px; }

    .social { display: flex; gap: 8px; padding-block-start: 10px; }
    .social__link { display: block; line-height: 0; }
    .social__link:hover { opacity: .8; }

    .copyright {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: .5rem;
        padding-block-start: 10px;
        border-block-start: 1px dashed var(--line-copyright);
        color: var(--text-soft);
    }
    .copyright__logo { line-height: 0; }

    @media (width >= 48rem) {
        .site-footer__cells { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
        .footer-cell li { line-height: 1.7; }
    }
    @media (width >= 61.25rem) {
        .site-footer__cells { grid-template-columns: repeat(4, 140px) 155px; }
        .footer-cell ul li a { padding-block: 2px; }
    }
}

/* ================================================================ components: forms and buttons */
@layer components {
    .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        min-block-size: 2rem;
        padding: .3rem .8rem;
        border: 0;
        border-radius: 3px;
        background: var(--brand);
        color: var(--text-on-brand);
        font-weight: 700;
        font-size: .9rem;
        text-decoration: none;
    }
    .button:hover { background: var(--brand-hover); color: var(--text-on-brand); }
    .button--grey { background: #888; border: 1px solid #777; font-weight: 400; }
    .button--grey:hover { background: #666; border-color: #555; }

    .link-button {
        padding: 0;
        background: none;
        border: 0;
        color: var(--brand);
        font-size: var(--fs-sm);
        text-decoration: underline;
    }
    .link-button:hover { text-decoration: none; }
    .inline-form { display: inline; }

    .form-errors { color: var(--brand-ink); font-size: var(--fs-sm); font-weight: 700; }
    .form-errors:empty, .form-errors.validation-summary-valid { display: none; }
    .form-errors ul { padding-inline-start: 1.1rem; }
    .field-error { color: var(--brand-ink); font-size: var(--fs-sm); }
    .field-error:empty { display: none; }
    .input-validation-error { border-color: var(--brand-ink) !important; }
    .form-status { margin: .25rem 0 0; font-size: var(--fs-sm); }
    .form-status:empty { display: none; }

    /* search form: the home box and the band of the search pages */
    .search-form { display: flex; flex-direction: column; gap: .6rem; }
    .search-form__input {
        inline-size: 100%;
        min-block-size: 2.75rem;
        padding: .5rem 1rem;
        border: 1px solid #a8a8a8;
        border-radius: var(--r-box);
        background: #fff;
        color: var(--text-muted);
        font-weight: 700;
        font-size: .9rem;
    }
    .search-form__button {
        min-block-size: 2.75rem;
        padding: 0 1.5rem;
        border: 0;
        border-radius: var(--r-box);
        background: var(--brand);
        color: var(--text-on-brand);
        font-weight: 700;
        font-size: .9rem;
        letter-spacing: .05em;
    }
    .search-form__button:hover { background: var(--brand-hover); }

    @media (width >= 48rem) {
        .search-form { flex-direction: row; align-items: center; }
        .search-form__input { flex: 1 1 auto; min-inline-size: 0; }
    }
}

/* ================================================================ components: boxes */
@layer components {
    .side-box {
        padding: 15px;
        background: var(--surface);
        border: 1px solid var(--line-box);
        border-radius: var(--r-side);
        font-size: var(--fs-sm);
        color: var(--text-soft);
    }
    .side-box__title, .side-box__subtitle {
        margin-block-end: 12px;
        font-size: var(--fs-sm);
        font-weight: 700;
        color: var(--text-heading);
    }
    .side-box__subtitle { margin-block: 10px 3px; }
    .side-box__title a { color: var(--text-heading); text-decoration: none; }
    .side-box p { margin-block-end: 3px; }
    .side-box a { text-decoration: none; }
    .side-box a:hover { text-decoration: underline; }
    .side-box img { display: block; }

    .link-box__list { list-style: none; }
    .link-box__list li { padding-block: .45rem; }
    .link-box__hint { color: var(--text-faint); }
    /* the town cloud: QueryLink.Weight 1-5 (the old font1-3 were 15/19/23 px) */
    .link-box .weight-1 a { font-size: .85rem; }
    .link-box .weight-2 a { font-size: .95rem; }
    .link-box .weight-3 a { font-size: 1.05rem; }
    .link-box .weight-4 a { font-size: 1.2rem; }
    .link-box .weight-5 a { font-size: 1.45rem; }
    .town-cloud .link-box__list { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; }
    /* the search sidebar's keyword searches of the place: a plain, compact list (only the town page is a cloud) */
    .place-keywords [class^="weight-"] a { font-size: inherit; }
    .place-keywords .link-box__list li { padding-block: .2rem; }

    .side-note { margin: 0; padding-inline: 15px; font-size: var(--fs-sm); }

    /* text ads */
    .text-ad + .text-ad { margin-block-start: 12px; }
    .text-ad__image { display: inline-block; margin-block-end: 5px; line-height: 0; }
    .text-ad__title { margin-block-end: 3px; font-size: var(--fs-sm); color: var(--text-heading); }
    .text-ad__text { color: var(--text-soft); }

    /* featured properties (108x81) and projects (251x188) */
    .featured__slot {
        position: relative;
        padding-block-end: 35px;
        margin-block-end: 10px;
        border-block-end: 1px solid var(--line-feature);
    }
    .featured__slot:last-child { margin-block-end: 0; padding-block-end: 0; border-block-end: 0; }
    .featured__slot:has(.featured__next):last-child { padding-block-end: 35px; }
    .featured__item { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 11px; align-items: start; font-size: .85em; }
    .featured__image { line-height: 0; }
    .featured__image img { inline-size: 100%; block-size: auto; }
    .featured__title { margin-block-end: 3px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-heading); }
    .featured__text p { margin-block-end: 3px; font-size: var(--fs-sm); color: var(--text-soft); }
    .featured__link { font-size: var(--fs-sm); overflow-wrap: anywhere; }
    /* a partner zone's logo row (Kind "logo"): the logo alone, at its own size */
    .featured__item--logo { display: block; }
    .featured__logo { display: inline-block; line-height: 0; }
    .featured__logo img { max-inline-size: 100%; block-size: auto; }
    /* no picture (a partner's text ad, a listing without one): the text takes the whole width, not the picture's column */
    .featured__item--text { display: block; }
    .featured--large .featured__item { grid-template-columns: minmax(0, 1fr); }
    .featured--large .featured__image img { inline-size: 251px; max-inline-size: 100%; }
    .featured__next {
        position: absolute;
        inset-inline-end: 0;
        inset-block-end: 8px;
        inline-size: 30px;
        block-size: 30px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #eee;
        color: gray;
    }
    .featured__next::before { content: "\25BA"; font-size: .9rem; }
    .featured__next:hover { background: #ddd; }
    html:not(.js) .featured__next { display: none; }

    @media (width >= 61.25rem) {
        .featured__item { grid-template-columns: 108px minmax(0, 1fr); }
        .featured__next { inline-size: 20px; block-size: 21px; }
        .featured__next::before { font-size: .6rem; }
    }

    /* partner zones */
    .zone--zonanjuskalo { border-color: #fdcd00; }
    .zone--zonanjuskalo .side-box__title { margin: -15px -15px 12px; padding: 10px 15px; background: #fdcd00; border-radius: 12px 12px 0 0; color: #000; }
    .zone--zonaazzuro .side-box__title { color: #0b6aa2; }

    /* image banners: never wider than their slot */
    .banner { display: flex; justify-content: center; line-height: 0; }
    .banner__img { block-size: auto; }
    .banner--home { margin-block: 0 10px; }
    .banner--footer { margin-block: 0 20px; }
    .banner--sidebar img { inline-size: 100%; }
    .banner--header { padding-block: 8px; }

    .banner__frame { display: block; max-inline-size: 100%; border: 0; }
    .banner__frame--mobile { display: none; }

    @media (width < 48rem) {
        .banner--desktop-only { display: none; }
        .banner--has-mobile .banner__frame--desktop { display: none; }
        .banner--has-mobile .banner__frame--mobile { display: block; }
    }
    @media (width >= 61.25rem) {
        .banner--header {
            position: absolute;
            inset-block-start: 10px;
            inset-inline-start: 50%;
            translate: -50% 0;
            padding: 0;
        }
        .banner--sidebar img { inline-size: 300px; }
    }
}

/* ================================================================ components: pager */
@layer components {
    /* Phones: "‹ Prethodna | Stranica 6 od 20 | Sljedeća ›" with 44 px targets; from tablets: 1 … 4 5 [6] 7 8 … 20. */
    .pager {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
        margin-block: 1.25rem 1.5rem;
        font-size: var(--fs-sm);
    }
    .pager__info { order: 2; text-align: center; font-size: var(--fs-tiny); color: var(--text-faint); letter-spacing: .01em; }
    .pager__list { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .375rem; }
    .pager__page { display: none; }
    .pager__status { flex: 1; text-align: center; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
    .pager__btn, .pager__num {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        min-block-size: 44px;
        min-inline-size: 44px;
        padding-inline: .9rem;
        border: 1px solid var(--line-box);
        border-radius: var(--r-badge);
        background: var(--surface);
        color: var(--brand);
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color .15s, border-color .15s, color .15s;
    }
    .pager__arrow { font-size: 1.35em; line-height: 1; }
    a.pager__btn:hover, a.pager__num:hover { background: var(--surface-alt); border-color: var(--brand); color: var(--brand-hover); }
    .pager__btn:focus-visible, .pager__num:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
    .pager__num.is-current { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
    .pager__btn.is-disabled { border-color: var(--line); color: var(--text-faint); background: var(--surface-alt); cursor: default; }
    .pager__gap { min-inline-size: 1.5rem; text-align: center; color: var(--text-faint); }

    @media (width >= 48rem) {
        .pager { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
        .pager__info { order: 0; text-align: start; }
        .pager__list { justify-content: flex-end; gap: .3rem; }
        .pager__status { display: none; }
        .pager__page { display: block; }
        .pager__btn, .pager__num { min-block-size: 34px; min-inline-size: 34px; padding-inline: .6rem; }
        .pager__step-text { font-weight: 400; }
    }
    @media (width >= 48rem) {
        /* a pager in a narrow column (the town page's keyword cloud) keeps the compact "‹ | Stranica 2 od 3 | ›" form */
        .search-sidebar .pager { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
        .search-sidebar .pager__info { order: 2; text-align: center; }
        .search-sidebar .pager__list { justify-content: space-between; }
        .search-sidebar .pager__status { display: block; }
        .search-sidebar .pager__page { display: none; }
        .search-sidebar .pager__step-text { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    }
    @media (prefers-reduced-motion: reduce) {
        .pager__btn, .pager__num { transition: none; }
    }
}

/* ================================================================ components: tooltips (price change, price history) */
@layer components {
    .tip {
        display: none;
        position: absolute;
        inset-block-start: 100%;
        inset-inline-start: 0;
        z-index: 40;
        inline-size: max-content;
        max-inline-size: min(280px, 80vw);
        padding: 6px 5px;
        background: #000;
        color: #d1d1d1;
        border-radius: 0 5px 5px 5px;
        font-size: var(--fs-tiny);
        font-weight: 400;
        line-height: 1.5;
        text-align: start;
    }
    .tip a { color: #d1d1d1; }
    .tip b { color: #fff; }
    .tip__title { color: #8dc63f; }
    .tip__line { display: block; }
    :is(.price-tag, .price-history):is(:hover, :focus-within) > .tip { display: block; }
}

/* ================================================================ pages: home */
@layer pages {
    .home-logo { display: block; margin: 0 auto; padding-block: 20px; inline-size: 240px; block-size: auto; box-sizing: content-box; }

    .home-search { inline-size: min(620px, 100%); margin-inline: auto; text-align: start; }
    .home-search__tabs { display: flex; gap: 20px; padding-inline-start: 30px; }
    .home-search__tab {
        display: block;
        padding: 0 1.5rem;
        line-height: 3.5rem;
        border: 1px solid var(--line-home-box);
        border-block-end: 0;
        border-radius: var(--r-tab);
        color: var(--text-faint);
        font-size: 1.2rem;
        text-decoration: none;
    }
    .home-search__tab:hover, .home-search__tab[aria-current="page"] { background: var(--surface-home-box); color: #000; }
    .home-search__tab[aria-current="page"] { cursor: default; }
    .home-search__box { padding: 30px 5% 10px; background: var(--surface-home-box); border-radius: var(--r-box); }
    .search-form--home { gap: 3%; }
    .search-form--home .search-form__input {
        min-block-size: 3rem;
        border: 1px solid;
        border-color: #fff #b2b2b2 #b2b2b2 #fff;
        color: var(--text-strong);
        font-size: 1rem;
    }
    .search-form--home .search-form__input:focus { border-color: #d5d5d5 #b2b2b2 #b2b2b2 #d5d5d5; }
    .search-form--home .search-form__button { min-block-size: 3rem; font-size: 1rem; text-shadow: 1px 1px 1px #000; margin-block: 3% .2em; }

    .home-popular { inline-size: min(530px, 100%); margin-inline: auto; padding-block: 30px; line-height: 2.5; }
    .home-popular__title { font-size: 1rem; font-weight: 400; }
    .home-popular__list { list-style: none; }
    .home-popular__list li + li { border-block-start: 1px solid var(--line); }
    .home-popular a { display: block; padding-inline: 20px; text-decoration: none; }
    .home-popular a:hover { text-decoration: underline; }

    .home-count {
        inline-size: min(588px, 100%);
        margin-inline: auto;
        padding-block: 15px;
        font-size: var(--fs-sm);
        font-weight: 400;
    }

    .home-links {
        inline-size: min(410px, 100%);
        margin: 0 auto 20px;
        padding: 15px 5px;
        border-block-start: 1px solid var(--line);
        line-height: 2;
    }
    .home-links ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; }
    .home-links a { color: var(--text-faint); text-decoration: none; }
    .home-links a:hover { text-decoration: underline; }

    /* Italy and Czechia: the towns with keyword searches (old index.aspx "dir_root"), in up to five columns */
    .home-towns { inline-size: min(1000px, 100%); margin: 5px auto 25px; }
    .home-towns__title { font-size: 1.5rem; font-weight: 400; color: var(--text-strong); }
    .home-towns__text { margin-block: 6px 10px; }
    .home-towns__list { list-style: none; columns: 5 140px; column-gap: 20px; text-align: start; line-height: 1.75; }
    .home-towns__list li { break-inside: avoid; }

    @media (width >= 61.25rem) {
        .home-logo { padding-block: 45px 50px; }
        .home-search__tabs { gap: 5px; }
        .home-search__tab { line-height: 40px; padding: 0 20px; font-size: 1rem; }
        .home-search__box { padding: 30px 5% 30px; }
        .search-form--home { gap: 2%; }
        .search-form--home .search-form__input { flex: 0 1 76%; min-block-size: 0; block-size: 42px; padding: 0 11px; border-radius: 0; font-size: 1rem; }
        .search-form--home .search-form__button {
            flex: 0 0 18%;
            min-block-size: 0;
            block-size: 40px;
            margin: 0;
            padding: 0 6px;
            border-radius: 0;
            background: var(--brand) var(--grad-button);
            letter-spacing: 0;
        }
        .search-form--home .search-form__button:hover { background: var(--brand-hover); }

        .home-popular { line-height: 2; }
        .home-popular__title, .home-popular__list, .home-popular__list li { display: inline; }
        .home-popular__list li + li { border: 0; }
        .home-popular a { display: inline; padding: 0; }
        .home-popular__list li:not(.home-popular__more):not(:nth-last-child(2))::after { content: ","; }
        .home-popular__more { margin-inline-start: .3em; }

        .home-count { padding: 30px 15px; }
        .home-links { padding: 0; border: 0; font-size: var(--fs-sm); line-height: normal; }
        .home-links ul { gap: 0 3px; }
        .home-links a { color: #8a8a8a; }
    }
}

/* ================================================================ pages: search (band, teaser, refine, tabs) */
@layer pages {
    .search-band { padding: 15px var(--gutter); background: var(--surface); }
    .search-band__row { display: flex; flex-direction: column; gap: 10px; }
    .search-band__logo { line-height: 0; align-self: flex-start; }
    .search-band__side { font-size: var(--fs-sm); line-height: 1; color: var(--text-faint); }
    .search-band__side a { color: var(--text-faint); text-decoration: none; }
    .search-band__side a:hover { text-decoration: underline; }
    .search-band__found { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; padding-block-start: 10px; }
    .found { font-size: var(--fs-sm); font-weight: 400; line-height: 1.8; color: var(--text-faint); }
    .found b { color: var(--text-number); }
    .found__timing { font-size: var(--fs-tiny); color: var(--text-faint); white-space: nowrap; }

    @media (width >= 61.25rem) {
        .search-band {
            padding: 15px 15px 30px;
            background: var(--surface) var(--grad-search-band) bottom / 100% 117px no-repeat;
        }
        .search-band__row { flex-direction: row; align-items: center; gap: 20px; }
        .search-band .search-form--band { flex: 0 1 60%; gap: 17px; }
        .search-form--band .search-form__input { min-block-size: 0; block-size: 32px; padding: 0 10px; border-radius: 0; font-size: 1rem; }
        .search-form--band .search-form__button { min-block-size: 0; block-size: 32px; padding: 0 20px; border-radius: 0; font-size: 1rem; }
        .search-band__side { margin-inline-start: auto; }
        .search-band__found { padding: 0 0 0 147px; }
        .found { line-height: normal; }
    }

    /* teaser boxes */
    .teaser {
        position: relative;
        display: none;
        align-items: center;
        gap: 6px;
        margin: 0 20px 20px;
        min-block-size: 60px;
        padding-inline-end: 40px;
        border-radius: var(--r-box);
        color: #fff;
    }
    .teaser--blue {
        background:
            radial-gradient(120% 140% at 100% 0, rgb(0 170 210 / .55), transparent 45%),
            linear-gradient(#0078a6 0 70%, var(--teaser-blue));
    }
    .teaser--green { background: linear-gradient(#5b8a28, var(--info-green)); }
    .teaser__icon { flex: 0 0 auto; align-self: flex-start; margin: -20px 0 0 -7px; }
    .teaser__icon--lens { margin: -25px 0 0 5px; }
    .teaser__text { padding-block: 10px; font-size: var(--fs-snippet); line-height: 1.4; text-shadow: 1px 1px 1px #4c4c4c; }
    .teaser__text em { font-style: normal; font-weight: 700; }
    .teaser__text a { color: #fff; font-weight: 700; }
    .teaser__close {
        position: absolute;
        inset-inline-end: 6px;
        inset-block-start: 6px;
        inline-size: 24px;
        block-size: 24px;
        border: 0;
        background:
            linear-gradient(45deg, transparent 44%, #fff 44% 56%, transparent 56%) center / 9px 9px no-repeat,
            linear-gradient(-45deg, transparent 44%, #fff 44% 56%, transparent 56%) center / 9px 9px no-repeat;
    }
    html:not(.js) .teaser__close { display: none; }
    @media (width >= 61.25rem) {
        .teaser { display: flex; }
    }

    /* refine ("Ograniči pretragu"): a disclosure on phones, a bar with dropdowns on desktop */
    .refine {
        margin: 0 var(--gutter);
        background: var(--surface-panel);
        border-radius: var(--r-box);
        font-size: var(--fs-sm);
    }
    .refine__summary {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        list-style: none;
        font-weight: 700;
        color: var(--text-muted);
        cursor: pointer;
    }
    .refine__summary::marker { content: ""; }
    .refine__summary::after { content: "\25BC"; color: gray; }
    .refine[open] > .refine__summary::after { content: "\25B2"; }
    .refine__groups { list-style: none; padding: 0 10px 10px; }
    .refine__group { padding-block: 10px; }
    .refine__toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0;
        background: none;
        border: 0;
        color: var(--brand);
        font: inherit;
        font-weight: 700;
        line-height: 1;
        pointer-events: none;
    }
    /* the ▼ arrow, centred on the text by the flex row */
    .refine__toggle::before {
        content: "";
        flex: none;
        border-inline: 4px solid transparent;
        border-block-start: 5px solid currentColor;
        transition: rotate .15s;
    }
    .refine__toggle[aria-expanded="true"]::before { rotate: 180deg; }
    .refine__menu {
        list-style: none;
        margin-block-start: 10px;
        background: var(--surface-menu);
        border: 1px solid var(--line);
        border-radius: var(--r-box);
        overflow: hidden;
    }
    .refine__menu li { border-block-end: 1px solid var(--line); }
    .refine__menu li:last-child { border-block-end: 0; }
    .refine__menu a {
        display: block;
        padding: 5px 10px;
        line-height: 2.5;
        background: var(--surface);
        color: var(--text-muted);
        font-size: 1rem;
        font-weight: 700;
        text-decoration: none;
    }
    .refine__menu a:hover { color: var(--brand); }
    .refine__hint { font-weight: 400; font-size: 90%; }

    /* Desktop: one 48px row; label, the filters with even spacing and thin separators, sorting at the right end. */
    @media (width >= 61.25rem) {
        .refine {
            display: flex;
            align-items: stretch;
            margin: 0;
            block-size: 48px;
            padding-inline: 8px;
            background: var(--surface);
            border-block-end: 1px solid var(--line);
            border-radius: 0;
        }
        .refine__summary {
            display: flex;
            align-items: center;
            padding: 0 16px 0 12px;
            line-height: 1;
            pointer-events: none;
            cursor: default;
        }
        .refine__summary::after, .refine[open] > .refine__summary::after { content: none; }
        /* <details> wraps its content in a box of its own: let the groups take part in the bar's flex row */
        .refine::details-content { display: contents; }
        .refine__groups { display: flex; flex: 1; align-items: stretch; block-size: 48px; padding: 0; }
        .refine__group { position: relative; display: flex; align-items: center; padding: 0; }
        .refine__group::before {
            content: "";
            block-size: 14px;
            border-inline-start: 1px solid var(--line);
        }
        .refine__group--sort { margin-inline-start: auto; }
        .refine__group--sort::before { display: none; }
        .refine__toggle {
            align-self: stretch;
            padding: 0 14px;
            border-radius: 6px;
            pointer-events: auto;
            cursor: pointer;
        }
        .refine__group:hover > .refine__toggle,
        .refine__toggle[aria-expanded="true"] { color: var(--text-muted); background: var(--surface-panel); }
        .refine__toggle:focus-visible { outline-offset: -3px; }
        .refine__menu {
            display: none;
            position: absolute;
            inset-inline-start: 0;
            inset-block-start: 100%;
            z-index: 30;
            min-inline-size: 12rem;
            inline-size: max-content;
            margin: 0;
            border-block-end: 0;
            box-shadow: 0 6px 16px rgb(0 0 0 / .12);
        }
        .refine__group--sort .refine__menu { inset-inline: auto 0; }
        .refine__menu a { padding: 0 10px; line-height: 25px; background: none; font-size: var(--fs-sm); }
        .refine__group:hover > .refine__menu,
        .refine__group:focus-within > .refine__menu,
        .refine__toggle[aria-expanded="true"] + .refine__menu { display: block; }
    }

    /* result tabs: Web / Slike and the index statistics */
    .result-tabs {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 10px;
        margin: 10px var(--gutter);
    }
    .result-tabs__nav { flex: 1 0 100%; border-block-end: 1px solid var(--line); }
    .result-tabs__list { list-style: none; display: flex; gap: 10px; }
    .result-tabs__tab {
        display: block;
        margin-block-end: -1px;
        padding: 5px 10px;
        line-height: 27px;
        border: 1px solid var(--line);
        border-block-end: 0;
        border-radius: var(--r-tab);
        background: var(--surface-tab);
        color: var(--text-faint);
        font-weight: 700;
        text-decoration: none;
    }
    .result-tabs__tab:hover, .result-tabs__tab[aria-current="page"] { background: var(--surface); color: #000; }
    .result-tabs__tab[aria-current="page"] { cursor: default; box-shadow: 3px -3px 3px #eee; }
    .result-tabs__indexed { font-size: var(--fs-sm); color: var(--text-muted); }

    .top-result-ad a {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px;
        background: #daf664;
        border: 1px solid #ccc;
        border-radius: var(--r-box);
        box-shadow: var(--shadow-card);
        color: #5c5c5c;
        font-weight: 700;
        font-size: var(--fs-sm);
        text-decoration: none;
    }

    @media (width >= 61.25rem) {
        .result-tabs {
            flex-wrap: nowrap;
            margin: 18px 20px 10px;
            border-block-end: 1px solid var(--line);
        }
        .result-tabs__nav { flex: 0 0 auto; border: 0; }
        .result-tabs__list { gap: 4px; padding-inline-start: 10px; }
        .result-tabs__tab { padding: 0 9px; font-size: var(--fs-sm); }
        .result-tabs__tab[aria-current="page"] { padding-inline: 11px; box-shadow: none; }
        .result-tabs__indexed { padding-block-end: 6px; text-align: end; }
        .top-result-ad { flex: 0 1 auto; margin-block-end: 2px; }
        .top-result-ad a { padding: 0; background: none; border: 0; box-shadow: none; }
    }
}

/* ================================================================ pages: results */
@layer pages {
    .search-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin-inline: var(--gutter);
    }
    .search-results { min-inline-size: 0; container-type: inline-size; }
    .search-empty { padding-block: 20px; font-size: var(--fs-sm); color: var(--text-faint); }

    .results { list-style: none; }

    /* one result: a card on phones, a row with a separator on larger screens */
    .result {
        margin-block-end: 5%;
        padding: 3%;
        border: 1px solid #ccc;
        border-radius: var(--r-box);
        box-shadow: var(--shadow-card);
    }
    .result__body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
    .result__sponsored {
        position: absolute;
        inset-block-start: 3px;
        inset-inline-end: 4px;
        inline-size: 24px;
        block-size: 24px;
        background: url("/images/sponsored.png") no-repeat;
    }
    /* GoHome.Web's thumbnail: 160x120 from 600px up, 4:3 cover, 6px radius */
    .result-thumb { display: block; line-height: 0; margin-block-end: .5rem; }
    .result-thumb img {
        inline-size: 100%;
        max-block-size: 220px;
        object-fit: cover;
        border-radius: 6px;
        background: var(--surface-alt);
    }
    /* No photo (or it failed to load): the same box with a house icon and "Nema slike" */
    .result-thumb__none {
        display: grid;
        place-content: end center;
        inline-size: 100%;
        block-size: 96px;
        padding-block-end: 10px;
        border: 1px dashed #d4d4d4;
        border-radius: 6px;
        background: var(--surface-alt) url("/images/no-image.svg") no-repeat center 30% / 56px auto;
        color: #8a8a8a;
        font-size: .75rem;
        line-height: 1.2;
        text-align: center;
    }
    .result__head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 8px;
        padding-inline-end: 30px;
    }
    .result__title { margin: 6px 0 5px 4px; font-size: var(--fs-title); font-weight: 700; line-height: 1.25; }
    .result__title a { color: var(--brand); }
    .result__title a:visited { color: #555; }
    .result__title a:hover { text-decoration: none; }
    .result__sqm { flex-basis: 100%; margin-inline-start: 4px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-strong); }

    .price-tag { position: relative; display: inline-block; margin-inline-start: -3%; }
    .price-tag__button {
        inline-size: 54px;
        block-size: 30px;
        padding: 0 8px 0 0;
        border: 0;
        clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
        color: #fff;
        font-weight: 700;
        font-size: .9rem;
    }
    .price-tag--down .price-tag__button, .price-tag--down.price-tag--small { background: var(--grad-price-down); }
    .price-tag--up .price-tag__button, .price-tag--up.price-tag--small { background: var(--grad-price-up); }

    .price-history { position: relative; display: inline-block; }
    .price-history__button {
        inline-size: 23px;
        block-size: 19px;
        border: 0;
        border-radius: 5px 5px 0 0;
        background: url("/images/history.png") no-repeat 3px 3px;
    }
    .price-history:is(:hover, :focus-within) .price-history__button { background-color: #000; }

    .result__meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 4px;
        margin: 4px 4px 0;
        font-size: var(--fs-sm);
        font-weight: 700;
        color: var(--green);
    }
    .badge-new {
        margin-inline-end: 4px;
        padding: 2px 4px;
        background: var(--green) var(--grad-new);
        border-radius: 3px;
        box-shadow: 0 1px 0 #1a3906;
        color: #fff;
        font-size: var(--fs-tiny);
    }
    .result__desc { margin: 5px 4px 8px; font-size: var(--fs-snippet); line-height: 1.2; color: var(--text-body); }
    /* "Cerca simili a {query}: {keyword search}" (Italy and Czechia, the old #frequenti line) */
    .result__similar { margin: -3px 4px 8px; font-size: var(--fs-snippet); line-height: 1.3; color: var(--text-body); }


    /* the gohome.hr price tag and marks on photos (photo search cards) */
    .price-label {
        position: absolute;
        inset-block-start: 8px;
        inset-inline-start: 0;
        padding: 5px;
        background: var(--brand) var(--grad-price-tag);
        border-radius: 0 8px 8px 0;
        color: #fff;
        font-size: var(--fs-sm);
        font-weight: 700;
        line-height: normal;
    }
    .sponsored-mark, .special-mark {
        position: absolute;
        inset-block-start: 8px;
        inset-inline-end: 8px;
        inline-size: 18px;
        block-size: 18px;
        background: url("/images/sponsored-small.png") no-repeat;
    }
    .special-mark { background-image: url("/images/featured-small.png"); }

    @container (width >= 37.5rem) {
        .result__body:has(> .result-thumb) {
            grid-template-columns: 160px minmax(0, 1fr);
            column-gap: 12px;
        }
        .result__body:has(> .result-thumb) > :not(.result-thumb, .result__sponsored) { grid-column: 2; }
        .result-thumb { grid-row: 1 / span 4; margin: 6px 0 0; }
        .result-thumb img { inline-size: 160px; block-size: 120px; max-block-size: none; }
        .result-thumb__none { inline-size: 160px; block-size: 120px; background-size: 64px auto; }
    }

    @media (width >= 48rem) {
        .result {
            margin: 0;
            padding: 10px 0;
            border: 0;
            border-block-end: 1px solid var(--line);
            border-radius: 0;
            box-shadow: none;
        }
        .price-tag { margin-inline-start: -10px; }
        .result__sqm { flex-basis: auto; margin-inline-start: 0; }
        .results__photos { margin-block-end: 0; }
    }


    /* zero results */
    .no-results {
        position: relative;
        margin-block: 10px;
        padding-block-end: 12px;
        min-block-size: 135px;
        background: var(--surface-panel);
        border-radius: var(--r-box);
        container-type: inline-size;
        font-size: var(--fs-sm);
    }
    .no-results-robot { display: none; }
    .no-results__title {
        padding: 12px 15px;
        border-block-end: 1px solid #d8d8d8;
        font-size: var(--fs-sm);
        font-weight: 700;
        color: var(--text-strong);
    }
    .no-results p, .no-results li { padding: 12px 15px 0; font-weight: 700; color: var(--text-faint); }
    .no-results__similar { list-style: none; }
    .no-results li { padding-block-start: 5px; }
    .no-results li span { font-size: 90%; color: var(--text-strong); }
    .no-results .no-results__query { padding-block-start: 5px; color: var(--brand); }
    .no-results .no-results__mail { padding-block: 15px 0; font-weight: 400; }
    @container (width >= 34rem) {
        .no-results-robot { display: block; position: absolute; inset-inline-end: 15px; inset-block-start: 10px; }
        .no-results > :not(.no-results-robot, .no-results__title) { padding-inline-end: 280px; }
    }

    /* green zone and its line above the pager */
    .verde { margin-block-start: 10px; padding: 2px 5px; min-block-size: 4px; background: var(--verde-bg); border-radius: var(--r-box); }
    .verde__ad { display: flex; gap: 12px; margin-block: 3px; padding: 20px; background: var(--verde-inner); border-radius: var(--r-box); font-size: var(--fs-sm); }
    .verde__image { flex: 0 0 auto; line-height: 0; }
    .verde__label { display: block; text-align: end; color: #c0ccb1; font-weight: 700; }
    .verde__title { color: var(--green-dark); font-weight: 700; text-decoration: none; }
    .verde__link { color: var(--green); }
    .verde__text p { padding-block: 2px 7px; color: #000; }

    /* sidebar */
    .search-sidebar { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
    .search-sidebar > * { margin: 0; }
    .popular .link-box__list li { padding-block: 10px; }

    @media (width >= 61.25rem) {
        .search-columns { grid-template-columns: minmax(0, 1fr) var(--sidebar); margin-inline: 20px; align-items: start; }
        .search-sidebar { margin-block-start: 10px; }
        .popular .link-box__list li { padding-block: 0; line-height: 18px; }
        .link-box__list li { padding-block: 1px; }
    }

    /* photo search: GoHome.Web's photo cards (auto-fill 150px, 4:3) with the gohome.hr price tag */
    .search-photos { margin-inline: var(--gutter); container-type: inline-size; }
    .photo-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
    .photo-card a {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: .2rem;
        block-size: 100%;
        padding: .5rem;
        background: var(--surface);
        border: 1px solid var(--surface-tab);
        border-radius: 8px;
        text-decoration: none;
    }
    .photo-card a:hover { background: var(--surface-tab); }
    .photo-card img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-alt); }
    .photo-card__media { position: relative; display: block; line-height: 0; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--surface-alt); }
    .photo-card .price-label { inset-block-start: auto; inset-block-end: 8px; line-height: normal; }
    .photo-card .sponsored-mark, .photo-card .special-mark { inset-block-start: .4rem; inset-inline-end: .4rem; }
    .photo-card .price-tag--small {
        position: absolute;
        inset-block-start: .4rem;
        inset-inline-start: 0;
        line-height: normal;
        padding: 3px 12px 3px 4px;
        clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
        color: #fff;
        font-size: var(--fs-tiny);
        font-weight: 700;
    }
    .photo-card-title { font-size: var(--fs-sm); color: var(--brand); }
    .photo-card .source { font-size: .75rem; color: var(--text-faint); }
    @media (width >= 61.25rem) {
        .search-photos { margin-inline: 20px; }
    }

    /* map list */
    .map-places { margin-block: 10px; }
    .marker-list { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
    .town__top { margin: 10px 0 0; font-size: 1rem; }
    .town__all, .town__map { margin-block: 10px; font-size: var(--fs-sm); }
}

/* ================================================================ pages: market overview (results and town pages) */
@layer pages {
    /* Mobile first: two stat cards per row, bars and tables full width; wider containers put things side by side. */
    .market {
        container-type: inline-size;
        margin-block: 4px 18px;
        background: linear-gradient(var(--surface), var(--surface-menu));
        border: 1px solid var(--line-box);
        border-radius: var(--r-box);
    }
    .market__sample { padding: 0 14px 10px; font-size: var(--fs-tiny); color: var(--text-faint); }
    .market__note { font-size: var(--fs-tiny); font-weight: 400; color: var(--text-faint); }
    .market__note--cards { margin-block-start: 5px; }
    .market__subtitle .market__note { margin-inline-start: .4rem; }
    .market__body { display: grid; gap: 16px; }
    .market__subtitle { display: block; margin-block-end: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); text-align: start; }

    .market__figures { display: grid; gap: 10px; }
    .market__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .stat-card { padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
    .stat-card__label { font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
    .stat-card__value { margin: 2px 0 0; font-size: 1.05rem; font-weight: 700; color: var(--text-number); white-space: nowrap; }
    .stat-card--lead { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
    .stat-card--lead .stat-card__value { color: var(--brand); }
    .stat-card--new .stat-card__value { color: var(--green-dark); }
    /* a card that leads to a search: the whole card is the link's target */
    .stat-card--link { position: relative; }
    .stat-card__link { color: inherit; text-decoration: none; }
    .stat-card__link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
    .stat-card--link:hover { border-color: var(--green-dark); background: var(--surface-alt); }
    .stat-card--link:hover .stat-card__link { text-decoration: underline; }
    .stat-card__link:focus-visible { outline: none; }
    .stat-card__link:focus-visible::after { outline: 2px solid var(--brand); outline-offset: 1px; }

    .moves { padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
    .moves__list { list-style: none; display: grid; gap: 2px; }
    .moves__row {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0 .75rem;
        min-block-size: 36px;
        padding: 5px 7px;
        border-radius: 6px;
        border-inline-start: 3px solid transparent;
        font-size: var(--fs-sm);
        color: var(--text-body);
        text-decoration: none;
    }
    .moves__figures { text-align: end; }
    .moves__row b { font-size: 1rem; }
    .moves__share, .moves__avg { color: var(--text-faint); }
    .moves__row--down .moves__name, .moves__row--down b, .moves__row--avg.is-down b, .move--down { color: var(--green-dark); }
    .moves__row--up .moves__name, .moves__row--up b, .moves__row--avg.is-up b, .move--up { color: var(--red); }
    a.moves__row:hover { background: var(--surface-tab); }
    a.moves__row:hover .moves__name { text-decoration: underline; }
    a.moves__row:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
    /* the search already is this filter: marked, and the link takes the filter out again */
    .moves__row.is-active { background: var(--surface-tab); border-inline-start-color: currentColor; }
    .moves__row--down.is-active { border-inline-start-color: var(--green-dark); }
    .moves__row--up.is-active { border-inline-start-color: var(--red); }
    .moves__row.is-empty .moves__name, .moves__row.is-empty b { color: var(--text-faint); }
    .moves__row--avg { margin-block-start: 4px; padding-block-start: 8px; border-block-start: 1px dashed var(--line-box); border-radius: 0; color: var(--text-muted); }
    .moves__arrow { font-size: .8em; }

    .market__charts, .market__groups { display: grid; gap: 16px; }
    .bars { margin: 0; }
    .bars__list { list-style: none; display: grid; gap: 2px; }
    .bars__row {
        display: grid;
        grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr) 3rem;
        align-items: center;
        gap: 8px;
        min-block-size: 32px;
        padding: 3px 6px;
        border-radius: 6px;
        color: var(--text-body);
        text-decoration: none;
    }
    a.bars__row:hover { background: var(--surface-tab); color: var(--brand); }
    a.bars__row:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
    .bars__label { font-size: var(--fs-sm); line-height: 1.25; }
    .bars__track { display: block; inline-size: 100%; block-size: 10px; background: var(--surface-tab); border-radius: 2px; }
    .bars__fill { fill: var(--brand); }
    .bars--area .bars__fill { fill: var(--green); }
    a.bars__row:hover .bars__fill { fill: var(--brand-hover); }
    .bars--area a.bars__row:hover .bars__fill { fill: var(--green-dark); }
    .bars__count { font-size: var(--fs-sm); font-weight: 700; color: var(--text-number); text-align: end; }

    .market__table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); }
    .market__table caption.market__subtitle { display: table-caption; caption-side: top; }
    .market__table th, .market__table td { padding: 6px 7px; border-block-end: 1px solid var(--line); text-align: start; }
    .market__table thead th { font-size: var(--fs-tiny); font-weight: 400; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
    .market__table tbody th { font-weight: 400; }
    .market__table .num { text-align: end; white-space: nowrap; }
    .market__table a { color: var(--brand); }

    /* Every entry of a longer list (the tables show 10), alphabetical like an index: down a column, then the next,
       in as many columns as fit the block. */
    .market__all { grid-column: 1 / -1; }
    .market__all-toggle { padding: 4px 0; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--brand); }
    .market__all-title { color: var(--text-muted); }
    .market__all-list { list-style: none; columns: 15rem; column-gap: 18px; margin-block-start: 6px; font-size: var(--fs-sm); }
    .market__all-item { display: flex; align-items: baseline; gap: 8px; padding: 5px 2px; border-block-end: 1px solid var(--line); break-inside: avoid; }
    .market__all-item > :first-child { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
    .market__all-item a { color: var(--brand); }
    .market__all-count, .market__all-sqm { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-muted); }
    .market__all-sqm { min-inline-size: 6.5rem; text-align: end; }

    .market__summary { padding-block-start: 12px; border-block-start: 1px solid var(--line); font-size: var(--fs-sm); line-height: 1.6; color: var(--text-body); }

    /* A disclosure, closed until clicked: the summary line carries the title and the key figures. */
    .market__toggle {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .25rem 1rem;
        min-block-size: 44px;
        padding: 8px 40px 8px 14px;
        position: relative;
        cursor: pointer;
        list-style: none;
        font-size: var(--fs-sm);
        color: var(--text-muted);
    }
    .market__toggle::marker { content: ""; }
    .market__toggle::after {
        content: "";
        position: absolute;
        inset-inline-end: 16px;
        inset-block-start: 50%;
        inline-size: 8px;
        block-size: 8px;
        border-inline-end: 2px solid var(--brand);
        border-block-end: 2px solid var(--brand);
        transform: translateY(-70%) rotate(45deg);
        transition: transform .15s;
    }
    .market[open] > .market__toggle::after { transform: translateY(-30%) rotate(-135deg); }
    .market__toggle:hover .market__toggle-title { text-decoration: underline; }
    .market__toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--r-box); }
    .market__toggle-title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--brand); }
    .market__toggle-fact b { color: var(--text-number); }
    .market > .market__body { padding: 4px 14px 14px; }

    /* A search without a property type: tabs over the overview of all listings and one per type (market-tabs.js);
       without the script the tab list links to the sections, all visible one after the other. */
    .market > .market-tabs { padding: 4px 14px 14px; }
    .market-tabs__list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin-block-end: 14px; border-block-end: 1px solid var(--line); }
    .market-tabs__tab {
        display: block;
        margin-block-end: -1px;
        padding: 4px 10px;
        border: 1px solid var(--line);
        border-block-end: 0;
        border-radius: var(--r-tab);
        background: var(--surface-tab);
        color: var(--text-faint);
        font-size: var(--fs-sm);
        font-weight: 700;
        text-decoration: none;
    }
    .market-tabs__tab:hover, .market-tabs__tab[aria-selected="true"] { background: var(--surface); color: #000; }
    .market-tabs__tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
    .market-tabs__count { font-weight: 400; color: var(--text-muted); }
    .market-tabs__heading { margin-block: 18px 6px; font-size: 1rem; color: var(--brand); }
    .market-tabs__panel:first-of-type .market-tabs__heading { margin-block-start: 0; }
    .market-tabs__search { margin-block-end: 10px; font-size: var(--fs-sm); }
    .market-tabs__search a { color: var(--brand); }
    .market-tabs.is-tabbed .market-tabs__heading { display: none; }

    @container (width >= 34rem) {
        .market__cards { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
        .market__charts, .market__groups { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
    }
    @container (width >= 46rem) {
        .market__figures:has(.moves) { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; }
        .market__figures:has(.moves) .market__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (prefers-reduced-motion: reduce) {
        .market__toggle::after { transition: none; }
    }
}

/* ================================================================ pages: content pages and their column */
@layer pages {
    .content { font-size: var(--fs-sm); color: var(--text-faint); }
    .content h1 { margin-block-end: 30px; font-size: var(--fs-h1-rest); font-weight: 700; color: var(--text-title); }
    .content h1 span { color: var(--brand); }
    .content h2 { margin-block-end: 7px; font-size: 1rem; font-weight: 400; color: var(--text-sub); }
    .content h3, .content h4, .content .directory__place {
        margin-block: 15px 5px;
        font-size: var(--fs-sm);
        font-weight: 700;
        color: var(--text-faint);
    }
    .content .directory__place b { color: var(--text-sub); }
    .content p, .content dl { margin-block-end: 20px; }
    .content a { color: var(--brand); }
    .content strong, .content b { color: inherit; }
    .content .lead { font-size: var(--fs-sm); color: var(--text-faint); }
    .content dt { margin-block-start: 10px; font-size: 1.04rem; color: var(--text-sub); }
    .content dd { margin: 0; }
    .content ul:not([class]), .check-list {
        list-style: none;
        margin-block-end: 8px;
    }
    .content ul:not([class]) li, .check-list li {
        padding-inline-start: 14px;
        background: url("/images/check.png") no-repeat 0 8px;
        font-size: 13px;
        line-height: 1.75;
    }
    .content ul:not([class]) li + li, .check-list li + li { margin-block-start: .35rem; }
    .content .video-embed { position: relative; aspect-ratio: 16 / 9; margin-block: 1rem; }
    .content .video-embed iframe { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; }

    @media (width < 48rem) {
        .content, .content .lead, .content ul:not([class]) li, .check-list li { font-size: 1rem; }
        .content h3, .content h4, .content .directory__place { font-size: .9rem; }
    }
    @media (width >= 48rem) {
        .content ul:not([class]) li + li, .check-list li + li { margin: 0; }
    }

    /* a property type's towns (/mjesta/stanovi): the other types' pages, then name and count per row in as many
       columns as fit */
    .type-switch__list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-block-end: 18px; font-size: var(--fs-sm); font-weight: 700; }
    .type-switch__link[aria-current="page"] { color: var(--text-sub); text-decoration: none; }
    .type-towns { list-style: none; columns: 15rem; column-gap: 24px; margin-block-end: 20px; font-size: 13px; }
    .type-towns__item { display: flex; align-items: baseline; gap: 8px; padding: 5px 2px; border-block-end: 1px solid var(--line); break-inside: avoid; }
    .type-towns__item a { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
    .type-towns__count { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-muted); }

    /* right-hand column of the content pages */
    .rest-column { display: flex; flex-direction: column; gap: 25px; min-inline-size: 0; }
    .column-box {
        padding: 20px;
        background: var(--surface-tab);
        border: 1px solid var(--line-column);
        border-radius: var(--r-column);
        font-size: var(--fs-sm);
        color: #747474;
    }
    .column-box__title { margin-block-end: 15px; font-size: 1rem; font-weight: 400; color: var(--text-sub); }
    .column-box p { margin: 0; }
    .column-box b { color: #5a5a5a; }
    .column-menu { list-style: none; border-block-start: 1px solid var(--line-column); }
    .column-menu li { position: relative; border-block-end: 1px solid var(--line-column); }
    .column-menu li::after {
        content: "";
        position: absolute;
        inset-inline-end: 4px;
        inset-block-start: 50%;
        inline-size: 5px;
        block-size: 5px;
        border-block-start: 1px solid #777;
        border-inline-end: 1px solid #777;
        rotate: 45deg;
        translate: 0 -50%;
    }
    .column-menu__space { margin-block-start: 15px; border-block-start: 1px solid var(--line-column); }
    .column-menu a {
        display: block;
        padding-inline-end: 14px;
        line-height: 3;
        color: var(--brand);
        font-weight: 700;
        text-decoration: none;
    }
    .column-menu a:hover { text-decoration: underline; }
    .letter-index { list-style: none; display: flex; flex-wrap: wrap; gap: 0 15px; }
    .letter-index a { display: block; min-inline-size: 1.5rem; line-height: 2.5; color: var(--brand); font-weight: 700; text-decoration: none; }
    .letter-index a:hover, .letter-index a[aria-current="page"] { text-decoration: underline; }
    @media (width >= 61.25rem) {
        .column-menu a { line-height: 27px; }
        .letter-index a { min-inline-size: 0; line-height: 27px; }
    }

    /* agencies and portals */
    .source-list { list-style: none; }
    .source {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding-block: 10px 20px;
        border-block-end: 1px solid var(--line-list);
    }
    .source-list .source__name { color: var(--text-pager); font-weight: 700; text-decoration: none; }
    .source-list .source__name:hover { text-decoration: underline; }
    .source__logo { line-height: 0; }
    .source__info { list-style: none; line-height: 1.65; }
    .source__info b { color: var(--text-sub); }
    @media (width >= 48rem) {
        .source { grid-template-columns: 160px 210px minmax(0, 1fr); align-items: center; gap: 0; }
        .source__name, .source__logo { align-self: stretch; display: flex; align-items: center; justify-content: center; padding-inline: 10px; text-align: center; border-inline-end: 1px solid #eee; }
        .source__info { padding-inline-start: 10px; }
    }

    /* FAQ, news */
    /* .faq, not .tip: .tip is the price tooltip */
    .faq, .news-item { padding-block-end: 5px; margin-block-end: 20px; border-block-end: 1px solid var(--line-list); }
    .faq__example { margin-block-end: 10px; }

    /* site registration form */
    .content .register__question { margin-block-end: 5px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-strong); }
    /* the grey box is a wrapper: a fieldset paints its background from the middle of its legend */
    .register-form__set { margin-block-end: 20px; padding: 20px; background: var(--surface-panel); border-radius: var(--r-column); }
    .register-form__set legend { padding: 0; font-size: 1rem; font-weight: 700; color: var(--text-body); }
    .register-form__set legend + * { margin-block-start: 15px; }
    .register-form .field { display: grid; gap: 5px; margin-block-end: 10px; }
    .register-form label { font-weight: 700; font-size: var(--fs-sm); color: #333; }
    .register-form .field--required label { color: var(--brand-ink); }
    .register-form input {
        inline-size: 100%;
        min-block-size: 2.5rem;
        padding: 5px;
        border: 1px solid #ddd;
        border-inline-end-color: #ccc;
        border-block-end-color: #ccc;
        background: #fff;
        color: #222;
        font-size: .9rem;
    }
    .register-form input:focus { background: var(--surface-menu); border-inline-end-color: #bbb; border-block-end-color: #bbb; }
    .register-form small { font-size: var(--fs-tiny); color: var(--text-faint); text-align: end; display: block; }
    .register-form .field--check { grid-template-columns: auto 3rem auto; align-items: center; justify-content: center; margin: 0; }
    .register-form .field--check input { text-align: center; }
    @media (width >= 48rem) {
        .register-form .field { grid-template-columns: 200px minmax(0, 376px); align-items: center; }
        .register-form .field .field-error { grid-column: 2; }
        .register-form input { min-block-size: 0; }
        .register-form .field small { grid-column: 2; }
        .register-form .field--check { grid-template-columns: 195px 2.5rem auto; justify-content: start; }
        .register-form .field--check label { text-align: end; padding-inline-end: 5px; }
    }
    .register__notice h2 { margin-block-start: 15px; }

    /* report a listing */
    .report-box { margin: 10px 4px 0; background: var(--report-bg); border-radius: 5px; font-size: var(--fs-sm); color: #555; }
    .report-box__title { padding: 10px 15px; border-block-end: 1px solid var(--report-line); font-size: var(--fs-sm); font-weight: 700; color: var(--text-strong); }
    .report-box__help { margin: 0; padding: 10px 15px 0; }
    .report-box__form { display: grid; gap: 6px; padding: 10px 15px 15px; }
    .report-box select, .report-box textarea {
        max-inline-size: 320px;
        padding: 2px 3px;
        border: 1px solid #ccc;
        background: #fff;
        color: var(--text-strong);
        font-weight: 700;
        font-size: var(--fs-sm);
    }
    .report-box textarea { inline-size: 100%; }
    .report-box__buttons { display: flex; gap: 5px; margin: 0; }
    .report-box__done { margin: 0; padding: 8px 15px; font-weight: 700; color: var(--green-dark); }
    .content .report-box h2 { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--text-strong); }
    .content .report-box p { margin: 0; }

    /* MyGoHome */
    .mygohome-header { margin-block-end: 20px; }
    .mygohome-grid { display: grid; gap: 25px; }
    .mygohome-grid h2 { font-size: 1rem; color: var(--text-sub); }
    .saved-list, .query-list { list-style: none; }
    .saved-item { display: grid; gap: .5rem; padding-block: .75rem; border-block-end: 1px solid var(--line-list); }
    .saved-item h3 { margin: 0; font-size: var(--fs-sm); }
    .saved-item img { border-radius: 6px; object-fit: cover; }
    .result-facts { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0; }
    .result-facts .price { font-weight: 700; color: var(--brand); }
    .note-form { display: grid; gap: .35rem; }
    .note-form textarea { padding: .3rem .5rem; border: 1px solid #ccc; }
    .note-form .button { justify-self: start; }
    .query-list li { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding-block: .35rem; border-block-end: 1px solid var(--line-list); }
    .badge { padding: 1px 5px; border-radius: var(--r-badge); color: #fff; font-weight: 700; }
    .badge-down { background: var(--grad-price-down); }
    .badge-up { background: var(--grad-price-up); }
    @media (width >= 48rem) {
        .saved-item { grid-template-columns: 120px minmax(0, 1fr); }
        .saved-item > form { grid-column: 2; }
    }

    /* message and error pages */
    .message-page { display: grid; gap: 10px; justify-items: start; }
    .message-page .no-results-robot { display: block; justify-self: center; }
    .message-page .search-form { inline-size: min(100%, 36rem); }
    .message-page h1 { margin: 0; }
    .message-page p { margin: 0; }
}

/* ================================================================ print */
@media print {
    .site-header, .site-footer, .refine, .search-sidebar, .rest-column, .pager, .skip-link, .banner, .teaser { display: none !important; }
    body { background: #fff; }
}
