/* DETAIL HERO */
.detail-hero {
    padding: 10rem 0 4rem;
    border-bottom: 0.5px solid var(--gray-lt);
}

.detail-hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.detail-hero__back {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--gray);
    transition: color 0.2s ease;
}

.detail-hero__back:hover {
    color: var(--black);
}

.detail-hero__title {
    font-size: clamp(42px, 3vw, 80px);
    font-weight: 300;
    color: var(--black);
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.detail-hero__desc {
    font-size: 18px;
    color: var(--gray);
    max-width: 600px;
    line-height: 1.7;
}

/* MAIN IMAGE */
.detail-main-img {
    padding: 0rem 0;
}

.detail-main-img__wrap {
    width: 60%;
    margin: 0 auto;
    max-height: 480px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.detail-main-img__wrap::after {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-main-img__wrap:hover::after {
    opacity: 1;
}

.detail-main-img__wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.detail-main-img__wrap:hover img {
    transform: scale(1.03);
}


/* LIGHTBOX */
.main-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
}

.main-lightbox.active {
    display: block;
}

.main-lightbox__container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 5rem;
}

.main-lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.main-lightbox__close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10000;
}

.main-lightbox__close:hover {
    opacity: 1;
}

.main-lightbox__prev,
.main-lightbox__next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s ease;
}

.main-lightbox__prev { left: 1.5rem; }
.main-lightbox__next { right: 1.5rem; }

.main-lightbox__prev:hover,
.main-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.main-lightbox__prev:disabled,
.main-lightbox__next:disabled {
    opacity: 0.2;
    cursor: default;
}

.main-lightbox__counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    letter-spacing: 2px;
    z-index: 10000;
}


/* DETAIL CONTENT */
.detail-content {
    padding: 2rem 0;
}

.detail-content__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 6rem;
    align-items: start;
}

.detail-content__info {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-info__block .label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.detail-info__block p {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 300;
    color: var(--black);
}

.detail-content__text .label {
    display: block;
    margin-bottom: 1rem;
    color: var(--gold);
}

.detail-content__title {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 300;
    color: var(--black);
    margin-bottom: 2rem;
}

.detail-content__desc {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.9;
    max-width: 680px;
}

.detail-content__desc p {
    margin-bottom: 1.25rem;
}


/* GALLERY */
.detail-gallery {
    padding: 2rem 0;
    border-top: 0.5px solid var(--gray-lt);
}

.detail-gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 280px;
    gap: 12px;
    margin-top: 3rem;
}

.detail-gallery__item {
    overflow: hidden;
    border-radius: 4px;
}

/* 1-rasm — katta, chap */
.detail-gallery__item:nth-child(1) {
    grid-column: span 7;
    grid-row: span 2;
}

/* 2-rasm — o'ng yuqori */
.detail-gallery__item:nth-child(2) {
    grid-column: span 5;
}

/* 3-rasm — o'ng pastki */
.detail-gallery__item:nth-child(3) {
    grid-column: span 5;
}

/* 4-rasm — kichik */
.detail-gallery__item:nth-child(4) {
    grid-column: span 4;
}

/* 5-rasm — o'rta */
.detail-gallery__item:nth-child(5) {
    grid-column: span 4;
}

/* 6-rasm — kichik */
.detail-gallery__item:nth-child(6) {
    grid-column: span 4;
}

/* 7+ rasmlar */
.detail-gallery__item:nth-child(n+7) {
    grid-column: span 6;
}

.detail-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: zoom-in;
}

.detail-gallery__item:hover img {
    transform: scale(1.05);
}



/* RELATED */
.related {
    padding: 3rem 0;
    background: var(--black);
    position: relative;
    overflow: hidden;
}

.related::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(200, 169, 110, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.related .section-header {
    margin-bottom: 4rem;
}

.related .label {
    color: var(--gold);
}

.related .section-title {
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 300;
    color: var(--white);
    margin-top: 0.75rem;
    line-height: 1.05;
}

.related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

.related .project-card {
    background: var(--black);
    padding: 0;
    transition: background 0.3s ease;
    position: relative;
}

.related .project-card:hover {
    background: #1f1e1c;
}

.related .project-card__img-wrap {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
}

.related .project-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: grayscale(30%);
}

.related .project-card:hover .project-card__img-wrap img {
    transform: scale(1.06);
    filter: grayscale(0%);
}

.related .project-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: #2a2927;
}

.related .project-card__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(0,0,0,0.6);
    padding: 4px 10px;
}

.related .project-card__info {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.related .project-card__title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.related .project-card:hover .project-card__title {
    color: var(--gold);
}

.related .project-card__desc {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
}

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

@media (max-width: 480px) {
    .related__grid {
        grid-template-columns: 1fr;
    }
}