/* ===== 1) SEARCH BAR (iz php copy.txt) ===== */
/* === SEARCH BAR POSITION FIX (based on real measurements) === */
/* Mijenja flex anchor sa dna na vrh na pravom containeru */
.elementor-element-2b73e6a7 > .e-con-inner {
  justify-content: flex-start !important;
}
/* Pomjera search bar nagore za 48px da odgovara Land poziciji */
.elementor-element-78d9b5c {
  margin-top: -48px !important;
}
.houzez-search-main .nav-tabs { 
  margin-bottom: 0px !important; 
  border-bottom: none !important; 
  position: relative; 
  z-index: 1 !important;
}
/* Prisiljavanje kontejnera da ne "režu" rezultate koji izlaze van okvira */
.houzez-ele-search-form-wrapper,
.elementor-element-78d9b5c,
.elementor-element-2b73e6a7 {
  overflow: visible !important;
}
/* Roditeljske grupe polja - osnovni z-index */
.houzez-ele-search-form-wrapper .elementor-field-group {
  position: relative;
  z-index: 1;
}

/* Keyword grupa je TRAJNO iznad ostalih jer njezini rezultati padaju "preko" njih */
.houzez-ele-search-form-wrapper .elementor-field-group:first-child,
.houzez-ele-search-form-wrapper .elementor-field-group-796108b {
  z-index: 50 !important;
}

/* Dodatno podizanje kada je u fokusu za svaki slučaj */
.houzez-ele-search-form-wrapper .elementor-field-group:focus-within {
  z-index: 100 !important;
}
/* Sami rezultati (dropdown) moraju biti na vrhu unutar te grupe */
.auto-complete, 
#auto_complete_ajax {
  z-index: 10000 !important;
  display: block !important;
  position: absolute !important;
}
.rs-accordion-wrapper{position:relative;width:100%;z-index:1 !important;}
.houzez-ele-search-form-wrapper .elementor-field-group-field-cities,
.houzez-ele-search-form-wrapper .elementor-field-group-480218a {
  flex: 0 0 140px !important;
  width: 140px !important;
  max-width: 140px !important;
  min-width: 120px !important;
}
.houzez-ele-search-form-wrapper .elementor-field-group-field-keyword {
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 200px !important;
}
.houzez-ele-search-form-wrapper .elementor-field-group-345a8cb,
.houzez-ele-search-form-wrapper .elementor-field-group-field-baths,
.houzez-ele-search-form-wrapper .elementor-field-group-field-types,
.houzez-ele-search-form-wrapper .elementor-field-group-303c0af,
.houzez-ele-search-form-wrapper .elementor-field-group-15e1b4d,
.houzez-ele-search-form-wrapper .rs-label-group {
  flex: 1 1 16% !important;
  width: 0 !important;
  max-width: 100% !important;
  min-width: 110px !important;
}
.rs-accordion-btn { display:flex; justify-content:space-between; align-items:center; width:100%; padding:6px 12px; background:#fff; border:1px solid #ddd; border-radius:4px; cursor:pointer; font-size:14px; color:#555; height:38px; box-sizing:border-box; }
.rs-selected-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 90%;
}
.rs-accordion-btn:hover{border-color:#bbb}
.rs-accordion-dropdown{display:none;position:absolute;top:100%;left:0;width:100%;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:9999;overflow-y:auto;max-height:210px}
.rs-accordion-dropdown.open{display:block}
.rs-group-header{display:flex;justify-content:space-between;align-items:center;padding:9px 14px;background:#f8f8f8;border-bottom:1px solid #eee;cursor:pointer;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:#777;user-select:none}
.rs-group-header:hover{background:#f0f0f0}
.rs-group-header .rs-arrow{font-size:10px;transition:transform .2s;color:#aaa}
.rs-group-header.open .rs-arrow{transform:rotate(180deg)}
.rs-group-options{display:none;background:#fff}
.rs-group-options.open{display:block}
.rs-option{display:flex;align-items:center;gap:8px;padding:8px 14px 8px 22px;font-size:13px;color:#444;cursor:pointer;border-bottom:1px solid #f5f5f5;transition:background .15s}
.rs-option:hover{background:#fff8ec;color:#e8a820}
.rs-option.selected{background:#fff8ec;color:#e8a820;font-weight:600}
.rs-option .rs-check{width:14px;height:14px;border:1.5px solid #ddd;border-radius:3px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:10px;color:transparent;transition:all .15s}
.rs-option.selected .rs-check{background:#e8a820;border-color:#e8a820;color:#fff}
.rs-selected-label{color:#333;font-size:13px}
.rs-clear-btn{display:none;padding:8px 14px;text-align:center;font-size:12px;color:#e8a820;cursor:pointer;border-top:1px solid #eee;background:#fff}
.rs-clear-btn:hover{background:#fff8ec}
.rs-clear-btn.visible{display:block}
.rs-live-search{width:100%;padding:8px 12px;border:none;border-bottom:1px solid #eee;font-size:13px;outline:none;box-sizing:border-box;color:#444;background:#fff;position:sticky;top:0;z-index:1;}
.rs-live-search::placeholder{color:#bbb;}
.houzez-contact-form,
.agent-contact-wrap {
  max-width: 350px;
  width: 100%;
}
.rs-luxury-row {
  flex: 0 0 100%;
  width: 100%;
  padding: 4px 0 0 0;
}
.rs-luxury-sub-wrapper {
  max-width: 280px;
  width: 100%;
}
.houzez-ele-search-form-wrapper .elementor-field-group-field-status[style*="opacity: 0"] {
  flex: 0 0 0px !important;
  width: 0px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.houzez-ele-search-form-wrapper .elementor-field-group-9469ba1 { display: none !important; }
.houzez-ele-search-form-wrapper .elementor-field-group-field-max-area,
.houzez-ele-search-form-wrapper .elementor-field-group-field-min-area,
.houzez-ele-search-form-wrapper .elementor-field-group-field-area-max,
.houzez-ele-search-form-wrapper .elementor-field-group-field-area-min,
.houzez-ele-search-form-wrapper .elementor-field-group-field-size-max,
.houzez-ele-search-form-wrapper .elementor-field-group-field-size-min,
.houzez-ele-search-form-wrapper .elementor-field-group[class*="area-max"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="max-area"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="area-min"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="min-area"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="max_area"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="min_area"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="size-max"],
.houzez-ele-search-form-wrapper .elementor-field-group[class*="size-min"] { display: none !important; }
.houzez-ele-search-form-wrapper .elementor-field-group-e747e03,
.houzez-ele-search-form-wrapper .elementor-field-group-eefb8df,
.houzez-ele-search-form-wrapper .elementor-field-group-c517b88,
.houzez-ele-search-form-wrapper .elementor-field-group-c07cd5d,
.houzez-ele-search-form-wrapper .elementor-field-group-8758fee,
.houzez-ele-search-form-wrapper .elementor-field-group-ed86ed9 {
  display: none !important;
}
.rs-amenity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 6px 0 2px 0;
  align-items: center;
}
.rs-amenity-toggle {
  padding: 3px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  white-space: nowrap;
}
.rs-amenity-toggle:hover { border-color: #bbb; color: #666; }
.rs-amenity-toggle.state-yes { background: #fff8ec; border-color: #e8a820; color: #e8a820; font-weight: 600; }

/* ===== 2) 360 FILTER + PAGINACIJA ===== */
        .rs-360-filter-wrapper { position: relative; width: 100%; min-width: 200px; margin-bottom: 30px; }
        .rs-360-filter-dropdown { position: relative; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; color: #fff; user-select: none; cursor: pointer; width: 100%; }
        .rs-360-filter-selected { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 500; }
        .rs-360-filter-selected svg { transition: transform 0.3s ease; }
        .rs-360-filter-dropdown.open .rs-360-filter-selected svg { transform: rotate(180deg); }
        .rs-360-filter-options {
            position: absolute; top: 100%; left: 0; width: 100%; background: #1a1a1a; border: 1px solid #333; border-radius: 8px;
            margin-top: 5px; padding: 10px 0; list-style: none; opacity: 0; visibility: hidden; transform: translateY(-10px);
            transition: all 0.2s ease; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,0.5); max-height: 400px; overflow-y: auto;
        }
        .rs-360-filter-dropdown.open .rs-360-filter-options { opacity: 1; visibility: visible; transform: translateY(0); }
        .rs-360-filter-options li { padding: 12px 20px; transition: background 0.2s ease, color 0.2s ease; cursor: pointer; }
        .rs-360-filter-options li.active { background: #5154ff; }
        .rs-360-filter-options li:hover:not(.active) { background: rgba(81, 84, 255, 0.2); }
        .rs-360-widget-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #888; margin: 0 0 10px 0; }
        
        /* Pagination CSS */
        .rs-360-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; width: 100%; }
        .rs-360-page-btn { 
            width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; 
            background: #fff; border: 1px solid #ddd; border-radius: 50%; cursor: pointer; 
            font-weight: 700; font-size: 14px; transition: all 0.2s; color: #D4AF37;
        }
        .rs-360-page-btn:hover { border-color: #D4AF37; color: #D4AF37; }
        .rs-360-page-btn.active { background: #D4AF37; border-color: #D4AF37; color: #fff; box-shadow: 0 4px 10px rgba(212,175,55,0.3); }
        .rs-360-page-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ===== 3) 360 KARTICE / GRID / POPUP ===== */
                .rs-360-widget-grid { display: grid; gap: 24px; padding: 20px 0; }
                .rs-360-widget-grid.rs-cols-1 { grid-template-columns: 1fr; }
                .rs-360-widget-grid.rs-cols-2 { grid-template-columns: repeat(2, 1fr); }
                .rs-360-widget-grid.rs-cols-3 { grid-template-columns: repeat(3, 1fr); }
                .rs-360-widget-grid.rs-cols-4 { grid-template-columns: repeat(4, 1fr); }
                
                @media (max-width: 1024px) { .rs-360-widget-grid { grid-template-columns: repeat(2, 1fr) !important; } }
                @media (max-width: 768px) { .rs-360-widget-grid { grid-template-columns: 1fr !important; } }

                .rs-360-card {
                    background: #fff;
                    border-radius: 12px;
                    overflow: hidden;
                    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
                    cursor: pointer;
                    transition: transform 0.3s ease, box-shadow 0.3s ease;
                    position: relative;
                }
                .rs-360-card:hover {
                    transform: translateY(-5px);
                    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
                }
                .rs-360-image {
                    width: 100%;
                    aspect-ratio: 3 / 2;
                    background-size: cover;
                    background-position: center;
                    position: relative;
                }
                .rs-360-overlay {
                    position: absolute;
                    top:0; left:0; width:100%; height:100%;
                    background: rgba(0,0,0,0.25);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: background 0.3s ease;
                }
                .rs-360-card:hover .rs-360-overlay {
                    background: rgba(0,0,0,0.5);
                }
                .rs-360-play-wrapper {
                }
                .rs-360-play-btn {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    transition: transform 0.3s ease;
                    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
                }
                .rs-360-card:hover .rs-360-play-btn {
                    transform: scale(1.1);
                }
                .rs-360-play-btn span {
                    color: #fff;
                    font-size: 11px;
                    font-weight: 700;
                    margin-top: 4px;
                    letter-spacing: 1px;
                    text-transform: uppercase;
                }
                .rs-360-info {
                    position: absolute;
                    bottom: 0; left: 0;
                    width: 100%;
                    padding: 40px 20px 20px 20px;
                    text-align: center;
                    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
                }
                .rs-360-title {
                    margin: 0;
                    font-size: 17px;
                    font-weight: 600;
                    color: #fff;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
                }

                /* Popup CSS */
                #rs-360-popup-container {
                    position: fixed;
                    top: 0; left: 0; width: 100vw; height: 100vh;
                    background: rgba(0,0,0,0.85);
                    z-index: 999999;
                    display: flex;
                    flex-direction: column;
                    backdrop-filter: blur(8px);
                    -webkit-backdrop-filter: blur(8px);
                    opacity: 0;
                    visibility: hidden;
                    transition: opacity 0.3s ease, visibility 0.3s ease;
                }
                #rs-360-popup-container.active {
                    opacity: 1;
                    visibility: visible;
                }
                .rs-360-popup-body {
                    transform: scale(0.95);
                    transition: transform 0.3s ease;
                }
                #rs-360-popup-container.active .rs-360-popup-body {
                    transform: scale(1);
                }
                .rs-360-popup-inner {
                    position: fixed;
                    top: 0; left: 0; width: 100%; height: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }
                .rs-360-popup-body {
                    position: relative;
                    width: 90vw;
                    height: 85vh;
                    /* Isti constraints kao i za iframe kako bi 'X' pratio kuteve */
                    max-height: calc(90vw * 2 / 3);
                    max-width: calc(85vh * 3 / 2);
                    aspect-ratio: 3 / 2;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }
                .rs-360-popup-close {
                    position: absolute;
                    top: -55px; /* Postavljamo ga malo iznad kuta */
                    right: -60px; /* Potpuno izbačen udesno van ruba ture */
                    cursor: pointer;
                    background: rgba(255,255,255,0.1);
                    width: 44px; height: 44px;
                    border-radius: 50%;
                    transition: all 0.2s;
                    z-index: 1000000;
                }
                .rs-360-popup-close::before, .rs-360-popup-close::after {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    width: 20px;
                    height: 2px;
                    background-color: #fff;
                    border-radius: 2px;
                }
                .rs-360-popup-close::before { transform: translate(-50%, -50%) rotate(45deg); }
                .rs-360-popup-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
                .rs-360-popup-close:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
                
                .rs-360-popup-body iframe {
                    width: 100% !important;
                    height: 100% !important;
                    aspect-ratio: 3 / 2;
                    background: #000;
                    border: none;
                    border-radius: 12px;
                    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
                }
                /* MOBILNI: X (close) je na desktopu izbacen VAN okvira ture (top:-55/right:-60) -> na uskom
                   ekranu izlazi VAN desne ivice pa se ne vidi i tura se ne moze zatvoriti. Na mobilnom ga
                   vracamo UNUTAR gornjeg-desnog ugla ture (uvijek na ekranu). Transform sa body-ja mora ici
                   na none (inace pravi lazni okvir + poremeti pozicioniranje). */
                /* MOBILNI FIX v2: raniji X (u uglu ture, position:absolute) je u LANDSCAPE-u (kad se gleda
                   360/video) blizu vrha ekrana pa ga prekrije browser/fullscreen UI ("dio browser taba").
                   Sad je X FIKSIRAN na vrh-desno EKRANA (ne okvira ture) sa safe-area odmakom (notch),
                   veci + jaca pozadina + najvisi z-index -> uvijek dostupan u obje orijentacije.
                   NAPOMENA: ako video ode u NATIVNI fullscreen (browser ga preuzme), izlaz je browserovo
                   dugme za izlaz iz fullscreena; nas X radi za 360  turu i inline video. */
                @media (max-width:768px){
                    #rs-360-popup-container.active .rs-360-popup-body{ transform:none !important; }
                    #rs-360-popup-container .rs-360-popup-close{
                        position:fixed !important;
                        top:calc(env(safe-area-inset-top, 0px) + 14px) !important;
                        right:calc(env(safe-area-inset-right, 0px) + 14px) !important;
                        left:auto !important; bottom:auto !important;
                        width:46px !important; height:46px !important;
                        background:rgba(0,0,0,0.78) !important;
                        box-shadow:0 2px 12px rgba(0,0,0,0.6) !important;
                        z-index:2147483647 !important;
                    }
                    #rs-360-popup-container .rs-360-popup-close::before,
                    #rs-360-popup-container .rs-360-popup-close::after{ width:22px !important; height:2.5px !important; }
                }

/* ===== 4) 360 SEARCH WRAPPER ===== */
                    .rs-360-search-wrapper { display: flex; width: 100%; margin: 0 auto; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
                    .rs-360-search-input { flex: 1; border: 1px solid #1a1a1a; padding: 6px 20px; outline: none; font-size: 15px; }
                    .rs-360-search-btn { border: none; padding: 0 25px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; transition: opacity 0.2s; }
                    .rs-360-search-btn:hover { opacity: 0.9; }
                    @media (max-width: 480px) {
                        .rs-360-search-btn span { display: none; }
                        .rs-360-search-btn { padding: 0 15px; }
                    }

