/* ============ Objects list ============ */
.objects,
.object {
    max-width: 1180px;
    margin: 0 auto;
    padding: 70px 40px 90px;
}

.objects__head {
    margin-bottom: 32px;
}

.objects__title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 10px;
    color: var(--dark);
}

.objects__title .mark {
    color: var(--orange);
}

.objects__subtitle {
    font-size: 18px;
    color: var(--grey);
    margin: 0;
}

/* Filter */
.objects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.filter-chip {
    border: 1px solid rgba(28, 28, 26, 0.15);
    background: transparent;
    color: var(--dark);
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.filter-chip:hover {
    border-color: var(--orange);
}

.filter-chip.is-active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

/* Grid */
.objects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.object-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 6px 24px rgba(28, 28, 26, 0.06);
    transition: transform .18s, box-shadow .18s;
}

/* The explicit display above would otherwise override the [hidden] attribute
   the filter sets, so re-assert it. */
.object-card[hidden] {
    display: none;
}

.object-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(28, 28, 26, 0.12);
}

.object-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--dark-card) center/cover no-repeat;
}

.object-card__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 100px;
}

.object-card__body {
    padding: 18px 20px 22px;
}

.object-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.object-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--orange);
    background: rgba(244, 122, 31, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
}

.object-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.object-card__location {
    font-size: 14px;
    color: var(--grey);
}

.objects-empty {
    color: var(--grey);
    font-size: 17px;
    padding: 30px 0;
}

/* ============ Object detail ============ */
.object__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.object__back {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}

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

.object__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.object__title {
    font-size: clamp(30px, 4.5vw, 50px);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 8px;
    color: var(--dark);
}

.object__location {
    font-size: 18px;
    color: var(--grey);
    margin: 0 0 32px;
}

.object-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 44px;
}

.object-gallery__item {
    aspect-ratio: 4 / 3;
    border: none;
    padding: 0;
    border-radius: 12px;
    background: var(--dark-card) center/cover no-repeat;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
}

.object-gallery__item:hover {
    opacity: .92;
    transform: scale(1.01);
}

.object__section {
    margin-bottom: 32px;
    max-width: 820px;
}

.object__section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--dark);
}

.object__text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--dark-grey);
}

.object__text p {
    margin: 0 0 14px;
}

.object__text ul {
    margin: 0 0 14px;
    padding-left: 22px;
}

.object__text li {
    margin-bottom: 6px;
}

.object__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 12px;
}

/* ============ Lightbox ============ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 86vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox__close {
    top: 24px;
    right: 24px;
    font-size: 26px;
}

.lightbox__nav--prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 900px) {
    .objects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .objects,
    .object {
        padding: 56px 16px 64px;
    }

    .objects-grid {
        grid-template-columns: 1fr;
    }

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

    .lightbox__nav {
        width: 42px;
        height: 42px;
    }
}
