*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-dvorac:  #4A6FA5;
    --color-crkva:   #8B5E3C;
    --color-rusevina:#6B6B6B;
    --sidebar-width: 420px;
    --radius:        8px;
    --shadow:        0 2px 12px rgba(0,0,0,0.15);
    --font:          system-ui, -apple-system, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: #222;
    overflow: hidden;
}

#app {
    position: relative;
    height: 100vh;
    width: 100%;
}

/* ── Karta ── */
#map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ── Markeri ── */
.map-marker {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-marker__dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    transform: rotate(45deg);
}

/* ── Kontrole ── */
.controls {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 50px;
    padding: 6px 10px;
    box-shadow: var(--shadow);
}

.controls__filters {
    display: flex;
    gap: 4px;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, color 0.15s;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn--active {
    background: #222;
    color: #fff;
}

.controls__geo {
    border: none;
    background: transparent;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    border-left: 1px solid #eee;
    padding-left: 10px;
    margin-left: 4px;
    transition: color 0.15s;
}

.controls__geo:hover {
    color: #000;
}

/* ── Overlay ── */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 20;
    transition: opacity 0.2s;
}

.overlay--hidden {
    display: none;
}

/* ── Sidebar ── */
.sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: #fff;
    z-index: 30;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: transform 0.25s ease;
}

.sidebar--hidden {
    transform: translateX(100%);
}

.sidebar__close {
    position: sticky;
    top: 0;
    float: right;
    margin: 12px 12px 0 0;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.sidebar__close:hover {
    background: #e8e8e8;
}

.sidebar__content {
    padding: 20px;
    clear: both;
}

/* ── Detail view ── */
.detail__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.detail__category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.badge {
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 50px;
    color: #555;
}

.detail__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.detail__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.stars {
    color: #f5a623;
    font-size: 16px;
    letter-spacing: 1px;
}

.stars--empty {
    color: #ddd;
}

.detail__rating-count {
    font-size: 13px;
    color: #888;
}

.detail__rating-none {
    font-size: 13px;
    color: #aaa;
    font-style: italic;
}

.detail__description {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 16px;
}

.detail__description p + p {
    margin-top: 10px;
}

.detail__link {
    display: inline-block;
    font-size: 13px;
    color: #4A6FA5;
    text-decoration: none;
    margin-bottom: 20px;
}

.detail__link:hover {
    text-decoration: underline;
}

/* ── Galerija ── */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 20px;
}

.gallery__item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: opacity 0.15s;
}

.gallery__item:hover img {
    opacity: 0.85;
}

/* ── Akcije ── */
.detail__actions {
    margin: 20px 0;
}

/* ── Gumbi ── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    text-decoration: none;
}

.btn--primary {
    background: #222;
    color: #fff;
    width: 100%;
    text-align: center;
}

.btn--primary:hover {
    background: #444;
}

.btn--secondary {
    background: #f0f0f0;
    color: #333;
    width: 100%;
    text-align: center;
}

.btn--secondary:hover {
    background: #e4e4e4;
}

/* ── Komentari ── */
.detail__comments h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.comment {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment__meta strong {
    font-size: 13px;
}

.comment__meta time {
    font-size: 12px;
    color: #aaa;
    margin-left: auto;
}

.comment__text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.no-comments {
    font-size: 13px;
    color: #aaa;
    font-style: italic;
    padding: 8px 0;
}

/* ── Upload forma ── */
.upload-form {
    background: #f8f8f8;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.upload-form--hidden {
    display: none;
}

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 14px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    :root {
        --sidebar-width: 100%;
    }

    .sidebar {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 85vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        transition: transform 0.25s ease;
    }

    .sidebar--hidden {
        transform: translateY(100%);
    }

    .controls {
        top: auto;
        bottom: 90px;
        padding: 4px 8px;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

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

/* ── Upload forma ── */
.uform__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.uform__field {
    margin-bottom: 14px;
}

.uform__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.uform__field input,
.uform__field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border 0.15s;
    background: #fff;
    color: #222;
}

.uform__field input:focus,
.uform__field textarea:focus {
    outline: none;
    border-color: #4A6FA5;
}

.uform__field textarea {
    resize: vertical;
    min-height: 80px;
}

.uform__hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    display: block;
}

.uform__optional {
    font-weight: 400;
    color: #aaa;
    font-size: 12px;
}

.uform__required {
    color: #e53e3e;
}

.uform__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

/* ── Zvjezdice ── */
.uform__stars {
    margin-bottom: 14px;
}

.star-row {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 26px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.1s, transform 0.1s;
    user-select: none;
    line-height: 1;
}

.star:hover,
.star--active {
    color: #f5a623;
}

.star:hover {
    transform: scale(1.15);
}

/* ── Dropzone ── */
.uform__dropzone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #888;
}

.uform__dropzone:hover,
.uform__dropzone.dragover {
    border-color: #4A6FA5;
    background: #f0f5ff;
    color: #4A6FA5;
}

.uform__dropzone span {
    font-size: 13px;
}

.uform__dropzone small {
    font-size: 11px;
    color: #bbb;
}

/* ── Preview ── */
.uform__preview-wrap {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

.uform__preview-wrap img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.uform__preview-wrap button {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Error / Success ── */
.uform__error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.uform__error--hidden {
    display: none;
}

.uform__success {
    text-align: center;
    padding: 24px 16px;
    color: #4A6FA5;
}

.uform__success p {
    margin-top: 12px;
    font-size: 14px;
    color: #444;
}

/* ── Search ── */
.controls__search {
    position: relative;
}

.controls__search input {
    border: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    padding: 6px 12px;
    width: 220px;
    background: transparent;
    color: #222;
}

.controls__search input::placeholder {
    color: #aaa;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 50;
    border: 1px solid #eee;
}

.search-results--hidden {
    display: none;
}

.search-results__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f5f5f5;
}

.search-results__item:last-child {
    border-bottom: none;
}

.search-results__item:hover {
    background: #f8f8f8;
}

.search-results__name {
    font-size: 13px;
    color: #222;
}

.search-results__name mark {
    background: #fff3cd;
    color: #222;
    border-radius: 2px;
    padding: 0 1px;
}

.search-results__cat {
    font-size: 11px;
    color: #aaa;
    margin-left: 8px;
    white-space: nowrap;
}

.search-results__empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #aaa;
    text-align: center;
}

/* ── Mobile search ── */
@media (max-width: 600px) {
    .controls__search input {
        width: 140px;
    }
    .search-results {
        width: 260px;
    }
}

/* ── Report modal select popravak ── */
.report-modal__select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    background: #fff;
    color: #222;
    cursor: pointer;
    appearance: auto;
}

.report-modal__select:focus {
    outline: none;
    border-color: #4A6FA5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
}

.report-modal__box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.report-modal__box h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}

.report-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.report-modal__actions .btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #333;
    transition: background 0.15s;
}

.report-modal__actions .btn:hover {
    background: #e8e8e8;
}

.report-modal__actions .btn--red {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}

.report-modal__actions .btn--red:hover {
    background: #c53030;
}
.gallery__caption {
    font-size: 11px;
    color: #888;
    padding: 4px 4px 6px;
    line-height: 1.4;
    font-style: italic;
}
/* ── Custom select ── */
.custom-select {
    position: relative;
    user-select: none;
}

.custom-select__selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #222;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid #eee;
    margin-right: 4px;
}

.custom-select__selected svg {
    transition: transform 0.2s;
    color: #888;
    flex-shrink: 0;
}

.custom-select--open .custom-select__selected svg {
    transform: rotate(180deg);
}

.custom-select__options {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    overflow: hidden;
    z-index: 50;
}

.custom-select--open .custom-select__options {
    display: block;
}

.custom-select__option {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    transition: background 0.1s;
    border-bottom: 1px solid #f5f5f5;
}

.custom-select__option:last-child {
    border-bottom: none;
}

.custom-select__option:hover {
    background: #f8f8f8;
}

.custom-select__option--active {
    color: #4A6FA5;
    font-weight: 600;
    background: #f0f5ff;
}
.detail__condition {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}
