:root {
    --bg-deep: #05070a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-blue: #BBA368;
    --accent-teal: #BBA368;
    --text-main: #f5f5f7;
    --text-dim: #86868b;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow-x: hidden;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.7;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAVIGACIJA --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(5, 7, 10, 0.4);
    backdrop-filter: blur(25px);
    z-index: 2000;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-box {
    background: transparent;
    padding: 10px 0 0 0;
    display: flex;
    align-items: center;
    transition: var(--transition);
    z-index: 2100;
}

.logo-img {
    height: 70px;
}

.nav-links.desktop-nav {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
}

.nav-links.mobile-nav {
    display: none;
}

.nav-links.desktop-nav>li {
    position: relative;
    padding: 10px 0;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-teal);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #111418;
    border: 1px solid var(--glass-border);
    min-width: 220px;
    border-radius: 18px;
    padding: 10px;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.dropdown li {
    list-style: none;
    position: relative;
}

.dropdown a {
    padding: 10px 15px;
    display: block;
    border-radius: 10px;
    font-size: 13px;
}

.dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-links li:hover>.dropdown,
.nav-links.mobile-nav li>.dropdown {
    display: block;
    animation: slideUp 0.3s ease;
}

/* Sub-dropdown */
.sub-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    display: none;
    background: #161b22;
    border: 1px solid var(--glass-border);
    min-width: 200px;
    border-radius: 18px;
    padding: 10px;
    margin-left: 5px;
}

.dropdown li:hover>.sub-dropdown {
    display: block;
    animation: slideRight 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* CTA Button */
.cta-add {
    background: var(--accent-blue);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 30px;
    opacity: 1 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(187, 163, 104, 0.3);
}

.cta-add:hover {
    background: #A38D57;
    transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 2100;
}

/* --- HERO --- */
.hero {
    height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(5, 7, 10, 1)),
        url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 100px 20px 0;
}

.hero-content h1 {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- SEARCH/FILTER BAR --- */
.search-container {
    margin-top: -160px;
    position: relative;
    z-index: 100;
    scroll-margin-top: 100px;
}

.search-bar {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(200px);
    border: 1px solid var(--glass-border);
    padding: 15px 25px;
    border-radius: 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr) auto;
    align-items: center;
    gap: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* Luxury Accordion Alignment */
.luxury-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr) auto;
    gap: 12px;
    padding: 0 25px;
    margin-bottom: 20px;
    position: relative;
    z-index: 101;
}

.luxury-accordion {
    grid-column: 2 / 6;
    width: 925px; /* Precision requested */
    max-width: 100%;
    justify-self: start; /* Start at Lokacija border */
    border: 1px solid var(--accent-teal);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(187, 163, 104, 0.05);
}

.luxury-header {
    padding: 12px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(187, 163, 104, 0.05);
    transition: background 0.3s;
}

.luxury-header:hover {
    background: rgba(187, 163, 104, 0.1);
}

.luxury-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; /* For arrow positioning */
}

.luxury-actions-spacer {
    grid-column: 6;
    width: 155px; /* Matches search-actions width */
    pointer-events: none;
    visibility: hidden;
}

.lux-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(5, 7, 10, 0.6);
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.lux-nav-btn:hover {
    background: var(--accent-teal);
    color: white;
    box-shadow: 0 0 15px var(--accent-teal);
}

.lux-nav-btn.prev { left: 10px; }
.lux-nav-btn.next { right: 10px; }

#luxury-grid {
    display: flex;
    flex-wrap: nowrap; /* Force single row */
    overflow-x: hidden; /* Only moves via carousel JS */
    gap: 15px;
    padding: 20px;
    border-top: 1px solid rgba(187, 163, 104, 0.1);
    scroll-behavior: smooth;
}


.filter-group {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    padding-right: 10px;
}

.filter-group:last-of-type {
    border-right: none;
}

.filter-group label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 6px;
    letter-spacing: 1px;
    font-weight: 700;
}

.filter-group select,
.filter-group input {
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    outline: none;
    width: 100%;
}

.search-btn-icon {
    background: var(--accent-blue);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

/* --- GRID --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 0 40px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}

.prop-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.prop-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent-teal);
}

.img-box {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1.5s ease;
}

.prop-card:hover .img-box img {
    transform: scale(1.1);
}

.badge-container {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.prop-badge {
    position: relative;
    background: var(--accent-teal);
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.badge-sale {
    background: #fff;
    color: #000;
}

.badge-rent {
    background: #3b82f6; /* Modern Blue */
    color: #fff;
}

.prop-content {
    padding: 25px;
}

.prop-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.prop-content p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 20px;
}

.prop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.details-row {
    display: flex;
    gap: 12px;
    color: var(--text-dim);
    font-size: 12px;
}

/* --- MODAL --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-inner {
    background: #0f1216;
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 50px;
    overflow-y: auto;
}

/* --- FOOTER --- */
footer {
    background: #000;
    padding: 80px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
}

.mobile-controls {
    display: none;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1024px) {
    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 20px;
        position: relative;
        z-index: 10000;
    }

    .mobile-toggle {
        display: block;
        position: relative;
    }

    .nav-links.desktop-nav {
        display: none;
    }

    .nav-links.mobile-nav {
        display: flex;
        list-style: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        z-index: 9999;
        background: rgba(13, 12, 19, 0.9);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
        flex-direction: column;
        padding: 100px 40px;
        transition: 0.5s ease;
        align-items: flex-start;
        overflow-y: auto;
    }

    .nav-links.mobile-nav.active {
        right: 0;
    }

    .nav-links.mobile-nav>li {
        width: 100%;
        border-bottom: 1px solid var(--glass-border);
        padding: 10px 0;
    }

    .dropdown,
    .sub-dropdown {
        position: static;
        display: none !important;
        padding-left: 20px;
        background: none;
        border: none;
        box-shadow: none;
    }

    .nav-links li.open>.dropdown,
    .dropdown li.open>.sub-dropdown {
        display: block !important;
    }

    .modal-inner {
        grid-template-columns: 1fr;
    }

    .modal-gallery {
        height: 250px;
    }
}

@media (max-width: 1024px) {
    .search-bar {
        grid-template-columns: repeat(3, 1fr) auto;
        gap: 20px;
    }
    .filter-group:nth-child(3) {
        border-right: none;
    }
    .luxury-section {
        grid-template-columns: repeat(3, 1fr) auto;
    }
    .luxury-accordion {
        grid-column: 1 / 4; /* On mid-screens, span all 3 columns */
        width: auto; /* Revert fixed width on smaller screens */
    }
    .luxury-actions-spacer {
        grid-column: 4;
    }
}

@media (max-width: 600px) {
    .hero {
        align-items: flex-start;
        padding-top: 180px;
        height: 75vh;
    }

    .hero-content h1 {
        font-size: 38px;
        margin-bottom: 10px;
    }

    .hero-content p {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .search-container {
        margin-top: -140px;
    }

    .search-bar {
        grid-template-columns: 1fr;
        border-radius: 20px;
        padding: 20px;
    }
    
    .luxury-section {
        display: block;
        padding: 0;
    }
    
    .luxury-accordion {
        grid-column: auto;
        width: 100%; /* Full width on mobile */
    }

    .luxury-actions-spacer {
        display: none;
    }

    .filter-group {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 15px;
        padding-right: 0;
    }
    
    .search-actions {
        justify-content: center;
        padding-top: 15px;
    }
}

.fade-in {
    animation: fadeIn 3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global load animation */
header,
main,
section,
footer {
    opacity: 0;
    animation: fadeIn 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Nav specific fade without movement to respect fixed pos stability */
nav {
    opacity: 0;
    animation: fadeIn 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    /* Reset transform for nav to treat it differently if needed, but fadeIn uses Transform Y.
       Using transform on fixed nav might be okay if it's full width.
       Let's trust it or override simple opacity for nav if desired.
       Actually, let's let Nav fade in too. */
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .about-image img {
        height: 300px !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 50px !important;
    }
}

/* Language Switch */
.lang-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 20px;
    vertical-align: middle;
}

.lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-teal);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.mobile-lang-switch {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 14px;
}

.backdrop-blur-xl {
    -webkit-backdrop-filter: blur(24px) !important;
    backdrop-filter: blur(24px) !important;
}

.transition-all {
    transition-property: all !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-duration: 150ms !important;
}

#overlay-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#overlay-blur.active {
    opacity: 1;
    pointer-events: auto;
}

/* Custom Checkbox for Advanced Filters */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dim);
    user-select: none;
    transition: var(--transition);
}

.checkbox-container:hover {
    color: white;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(255, 255, 255, 0.2);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

