#newindex {
    padding: 24px;
    margin: 10px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    width: 100%;
    flex: 1 1 100%;
    box-sizing: border-box;
}
#newindex .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
#newindex .section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
#newindex .see-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(to right, var(--primary) 50%, var(--light-purple) 50%);
    background-size: 200% 100%;
    background-position: right bottom;
    padding: 16px;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: background-position 0.7s ease;
}
#newindex .see-all-link:hover {
    background-position: left bottom;
}
#newindex .small-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 16px 0;
}
#newindex .card-wrapper {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: none !important;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#newindex .card-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
#newindex .card-link {
    display: block;
    text-decoration: none;
}
#newindex .card-image {
    position: relative;
    width: 100%;
    height: 170px;
    min-height: 170px;
    max-height: 170px;
    overflow: hidden;
    flex-shrink: 0;
}
#newindex .card-thumb-img,
#newindex .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#newindex .card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
}
#newindex .card-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
#newindex .card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
#newindex .card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 26px;
    flex-wrap: wrap;
}
#newindex .card-tag {
    font-size: 12px;
    color: #555;
    background: #f0f0f5;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
#newindex .card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
    margin-bottom: 6px;
}
#newindex .card-location-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
#newindex .card-location a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: color 0.7s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}
#newindex .card-location a:hover {
    color: var(--light-purple);
}
#newindex .card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
    margin-bottom: 10px;
}
#newindex .card-features {
    display: flex;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #777;
}
#newindex .card-features span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
#newindex .card-features svg {
    color: #999;
    flex-shrink: 0;
}
#newindex .slider-dots {
    display: none;
}
@media (max-width: 1000px) {
    #newindex {
        padding: 24px !important;
    }
    .section-content-sidebar-grid > .row:has(#newindex) {
        flex-direction: column;
    }
}
@media (max-width: 992px) {
    #newindex .small-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 450px) {
    #newindex {
        padding: 0 !important;
        box-shadow: none !important;
    }
    #newindex .small-cards-wrapper {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 12px;
        padding-bottom: 8px;
        margin: 0 0 16px 0;
    }
    #newindex .card-wrapper {
        flex: 0 0 100%;
        max-width: 100% !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        min-height: auto;
    }
    #newindex .small-cards-wrapper {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    #newindex .small-cards-wrapper::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    #newindex .slider-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
    }
    #newindex .slider-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        flex-shrink: 0;
    }
    #newindex .slider-dot.active {
        background: var(--primary);
        padding: 5px;
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--light-purple) 15%, transparent);
        transform: scale(1.15);
    }
}
.zone-populare-section {
    padding: 24px 0;
}
.zone-populare-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
}
.zone-populare-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.zona-card {
    flex: 0 0 calc((100% - 5 * 16px) / 6);
    max-width: calc((100% - 5 * 16px) / 6);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}
.zona-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    color: inherit;
}
.zona-card-image {
    width: 100%;
    height: 110px;
    overflow: hidden;
}
.zona-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.zona-card-info {
    padding: 10px 12px 12px;
}
.zona-nume {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 2px;
}
.zona-numar {
    font-size: 12px;
    color: #888;
}
@media (max-width: 992px) {
    .zona-card {
        flex: 0 0 calc((100% - 2 * 16px) / 3);
        max-width: calc((100% - 2 * 16px) / 3);
    }
}
@media (max-width: 576px) {
    .zona-card {
        flex: 0 0 calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}

/* ========================================================================
   HERO PRINCIPAL — #home-search-hero
   ======================================================================== */

#home-search-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px 20px;
    box-sizing: border-box;
}
#home-search-hero .header-bg-image {
    position: absolute;
    inset: 0;
    background-image: url(../images/backgrounds/background-homepage.png);
    background-size: cover;
    background-position: center;
    z-index: 0;
}
#home-search-hero .header-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.55), rgba(10, 10, 20, 0.65));
}
#home-search-hero .page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
    color: #fff;
}
#home-search-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 20px 0;
    text-shadow: none;
}
#home-search-hero .hero-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: #e8e8ee;
    max-width: 640px;
    margin: 0 auto 32px auto;
    line-height: 1.5;
}
#home-search-hero .header-form-wrapper {
    max-width: 850px;
    width: 850px;
    margin: 0 auto;
}
#home-search-hero .search-bar-row {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 16px;
    padding: 6px;
    gap: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
#home-search-hero .search-select-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box
}

#home-search-hero .search-submit-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(to right, var(--primary) 50%, var(--light-purple) 50%);
    background-size: 200% 100%;
    background-position: right bottom;
    padding: 16px;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: background-position 0.7s ease;
}
#home-search-hero .search-submit-btn:hover {
    background-position: left bottom;
}

/* ========================================================================
   TOM SELECT — stil unificat pentru toate select-urile din hero
   (mod, imobil, zona — toate arata identic, un singur set de reguli)
   ======================================================================== */

/* Wrapper-ul general Tom Select, umple tot spatiul din .search-select-wrap */
#home-search-hero .search-select-wrap .ts-wrapper {
    width: 100%;
    box-sizing: border-box;
}

#home-search-hero .ts-wrapper.single .ts-control {
    width: 100%;
    box-sizing: border-box;
    border: none !important;
    background: transparent !important;
    padding: 15px 32px 15px 20px !important;
    box-shadow: none !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    cursor: pointer;
}

/* Textul (placeholder sau valoarea selectata) — font unificat, fara wrap */
#home-search-hero .ts-wrapper.single .ts-control {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DOAR input-ul de cautare — NU toate elementele din interior (asta cauza bug-ul "Toate ...Bu") */
#home-search-hero .ts-wrapper.single .ts-control input {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
}

/* Ascundem sageata implicita Tom Select, folosim una singura, custom */
#home-search-hero .ts-wrapper.single .ts-control::after {
    display: none !important;
}

#home-search-hero .search-select-wrap:not(:has(.ts-wrapper))::after,
#home-search-hero .search-select-wrap:has(.ts-wrapper)::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* Cand dropdown-ul e deschis */
#home-search-hero .ts-wrapper.dropdown-active .ts-control {
    background: #faf8fc !important;
}

/* Dropdown-ul (lista de optiuni) */
#home-search-hero .ts-dropdown {
    border-radius: 12px !important;
    border: 1px solid #ececf0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
    margin-top: 8px !important;
    background: #fff !important;
    z-index: 999 !important;
    overflow: hidden;
}

#home-search-hero .ts-dropdown .option {
    padding: 10px 16px !important;
    font-size: 14px;
    color: #1a1a2e;
}

/* Evidentiaza partea din text care se potriveste cu ce ai scris (highlight de cautare) */
#home-search-hero .ts-dropdown .option mark {
    background: #fceeb5;
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

#home-search-hero .ts-dropdown .active {
    background-color: #f5f0fb !important;
    color: var(--primary, #780976) !important;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    #home-search-hero .header-form-wrapper {
        width: 100%;
    }
}

@media (max-width: 700px) {
    #home-search-hero h1 {
        font-size: 32px;
    }
    #home-search-hero .hero-subtitle {
        font-size: 15px;
    }
    #home-search-hero .search-bar-row {
        flex-wrap: wrap;
        border-radius: 20px;
    }
    #home-search-hero .search-select-wrap {
        flex: 1 1 100%;
    }
    #home-search-hero .search-submit-btn {
        width: 100%;
        justify-content: center;
        border-radius: 14px;
        margin-top: 6px;
        padding: 14px 0;
    }
}