:root {
    --mov-inchis: #351D67;
    --mov-deschis: #7865A5;
    --fundal-card: #F0EEF5;
    --stelute: #CCB8A7;
}

.main-layout {
    grid-template-columns: 3fr 1fr;
}

@media (max-width: 1024px) {
    .main-layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding-bottom: 60px;
    }

    .column-left {
        order: 1;
    }

    /* Coloana din dreapta se mută sub articol */
    .column-right {
        order: 2;
        border-left: none;
        padding-left: 0;
    }
}

/* Bara Filtre */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-start;
    justify-content: start;
    width: 100%;
}

.basic-filter-container {
    display: flex;
    column-gap: 12px;
    row-gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
}


.elegant-dropdown {
    width: 225px;
}

.btn-avansat {
    background: var(--mov-d);
    border: none;
    height: 36px;
    width: max-content;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    font-weight: bold;
    text-align: center;
    text-wrap: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}


@media (max-width: 768px) {
    .elegant-dropdown {
        width: 195px;
        height: 32px;
        padding: 8px 36px 8px 16px;
        /* Spațiu pentru săgeată */
        font-size: 12px;
    }

    .btn-avansat {
        height: 32px;
        padding: 8px 16px;
        font-size: 12px;
    }
}

.unit-list-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

/* Card Unități */
.unit-card {
    display: grid;
    grid-template-columns: 5fr 4fr auto;
    height: 320px;
    gap: 0;
    background: #fff;
    border: 1px solid #F0EEF5;
    border-radius: 16px;
    position: relative;
    transition: 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.unit-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.unit-card-link:hover .unit-card {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.img-wrapper {
    position: relative;
    height: 320px;
}

.img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 16px 0 0 16px;
    display: block;
}

.unit-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
    padding: 16px 20px;
    background: #F0EEF5;
    font-size: 14px;
    line-height: 1.2;
    color: #666;
    /* overflow: hidden; */
}

.unit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-wrap: pretty;
    border-top: 1px solid #351D67;
    border-bottom: 4px solid #351D67;
    margin: 0 -20px;
    padding: 0.2em 20px;
}

.unit-title {
    font-size: 22px;
    display: inline;
    font-size: 20px;
    font-style: italic;
    color: #333;
}

.unit-stars-exponent {
    vertical-align: super;
    font-size: 0.75em;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #CCB8A7;
    letter-spacing: 0;
}

.unit-address {
    font-size: 13px;
    color: #666;
}

/* Badge-uri */
.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.fac-icons {
    position: relative;
    z-index: 2;
}

.badge-nibiru {
    display: inline-block;
    text-align: center;
    text-wrap: pretty;
    width: stretch;
    padding: 6px 8px 5px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.badge-orbita {
    background-color: #351D67;
}

.badge-faleza {
    background-color: #7865A5;
}

.badge-nibiru img {
    display: inline;
    vertical-align: text-top;
    margin-right: 4px;
    width: 14px;
    height: 14px;
}

.fac-icons {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    /* Permite scroll orizontal */
    white-space: nowrap;
    padding: 0 16px;
    margin: 0 -16px;
    scrollbar-width: none;
    /* Ascunde scrollbar pe Firefox */
    -ms-overflow-style: none;
    /* Ascunde scrollbar pe IE/Edge */
    -webkit-overflow-scrolling: touch;
    -webkit-mask: linear-gradient(to right, transparent 0px, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask: linear-gradient(to right, transparent 0px, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.fac-icons img {
    width: 24px;
    height: 24px;
    filter: grayscale(1);
    opacity: 0.7;
}

.fac-icons img:hover {
    filter: none;
    opacity: 1;
}

/* Limitare descriere la 3 rânduri */
.unit-desc {
    font-size: 14px;
    color: #444;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    /* max-height: 3.9em; */
    /* 1.3 x 3 rânduri */
}

.rating-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 160px;
    padding: 16px auto;
}

.trophy-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-box .trophy-container {
    gap: 0px;
    margin-bottom: 4px;
}

.rating-box .laur-img {
    width: 24px;
}

.rating-box .nota-mare {
    font-size: 32px;
    letter-spacing: unset;
    margin-bottom: unset;
}

.rating-box .stars-outer {
    font-size: 20px;
    margin-bottom: 8px;
}

.rating-info-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    padding: 0 20px;
}

/* Overlay Filtre Avansate */
#overlayFiltre {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(53, 29, 103, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
    padding: 32px;
    border-radius: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.grid-filtre {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-clear {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
}

.btn-save {
    background: var(--mov-d);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 50px;
    cursor: pointer;
}

.btn-close {
    width: 100%;
    padding: 10px;
    border-radius: 50px;
    border: 1px solid #ccc;
    background: var(--mov-l);
}

/* MOBIL */
@media (max-width: 768px) {

    .unit-card {
        height: fit-content;
        display: grid;
        grid-template-areas:
            "img img"
            "info details";
        grid-template-columns: 1fr auto;

    }

    .unit-card>.img-wrapper {
        grid-area: img;
    }

    .unit-card>.unit-info {
        grid-area: info;
        gap: 12px;
        border-radius: 0 0 0 16px;
        margin-top: 36px;

    }

    .unit-card>.rating-box {
        grid-area: details;
        width: 140px;
        gap: 32px;
        margin-top: 36px;

    }

    .img-wrapper {
        width: 100%;
        height: 250px;
    }

    .img-wrapper img {
        border-radius: 16px 16px 0 0;
    }

    .unit-header {
        position: absolute;
        display: flex;
        align-items: stretch;
        top: 234px;
        height: 52px;
        padding: auto 24px;
        margin: 0 -20px;
        border-top: none;
        border-bottom: none;
        border-radius: 16px 16px 0 0;
        width: 100%;
        background: #351D67;
        line-height: 0.9;
    }

    .unit-title {
        color: #fff;
        vertical-align: middle;
        align-content: space-evenly;
    }

    .rating-box .laur-img {
        width: 20px;
    }

    .rating-box .nota-mare {
        font-size: 28px;
    }

    .rating-box .stars-outer {
        font-size: 18px;
    }
}

/* TABLETA */
@media (min-width: 769px) and (max-width: 1024px) {
    .rating-box {
        width: 140px;
        gap: 32px;
    }

    .rating-box .laur-img {
        width: 20px;
    }

    .rating-box .nota-mare {
        font-size: 28px;
    }

    .rating-box .stars-outer {
        font-size: 18px;
    }
}