/* ============================================
   Project Details
   ============================================ */

.project-details__container {
    max-width: 1020px;
}

/* ── Meta bar: Category / Location / Published / Share ── */
.project-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

/* كل عنصر margin: 0 auto فالمسافات بتتوزع بالتساوي (مش لازقة في الأطراف) */
.project-meta-bar__item,
.project-meta-bar__share {
    margin-inline: auto;
}

.project-meta-bar__item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-meta-bar__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-meta-bar__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--n200);
}

.project-meta-bar__icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.project-meta-bar__label {
    display: block;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--n500);
}

.project-meta-bar__item strong {
    display: block;
    font-size: 18px;
    line-height: 27px;
    font-weight: 500;
    color: var(--text-black);
}

.project-meta-bar__share {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.project-meta-bar__share-label {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--n500);
}

.project-meta-bar__share-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-meta-bar__share-icons a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 0.8px solid var(--n200);
    border-radius: 9.6px;
    transition: transform .2s, border-color .2s;
}

.project-meta-bar__share-icons a img {
    display: block;
    width: 18.29px;
    height: 18.29px;
    object-fit: contain;
}

.project-meta-bar__share-icons a:hover {
    transform: translateY(-2px);
    border-color: var(--primary-600);
}

/* ── الصورة الرئيسية ── */
.project-details__cover {
    aspect-ratio: 1020 / 513;
    border-radius: 40px;
    overflow: hidden;
    margin-bottom: 32px;
}

.project-details__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── محتوى المشروع ── */
.project-details__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* العنوان + الفقرة الافتتاحية: 16 بينهم، وبعدهم 24 للفقرات */
.project-details__intro,
.project-details__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-details__heading {
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
    color: var(--text-black);
}

.project-details__heading--first {
    font-size: 30px;
    font-weight: 600;
    line-height: 38px;
}

.project-details__paragraph {
    font-size: 18px;
    line-height: 28px;
    color: var(--n500);
}

.project-details__second {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-details__second .project-details__paragraph {
    line-height: 27px;
}

.project-details__quote {
    position: relative;
    margin: 0;
    min-height: 100px;
    padding-inline-start: 27px; /* 2 للخط + 25 gap */
}

.project-details__quote::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 2px;
    height: 100%; /* = 100px (min-height) إلا لو الاقتباس أطول */
    border-radius: 6px;
    background: var(--n200);
}

.project-details__quote p,
.project-details__quote cite {
    max-width: 723px;
}

.project-details__quote p {
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    color: var(--text-black);
}

.project-details__quote cite {
    display: block;
    margin-top: 24px;
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
    font-style: normal;
    color: var(--n500);
}

/* ── معرض الصور: صفوف 250px، الصف (مربع، مربع، عريض) والي بعده بالعكس ── */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-gallery__row {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    height: 250px;
}

.project-gallery__row--a { grid-template-columns: 250fr 250fr 488fr; }
.project-gallery__row--b { grid-template-columns: 488fr 250fr 250fr; }
.project-gallery__row--2 { grid-template-columns: 1fr 1fr; }
.project-gallery__row--1 { grid-template-columns: 1fr; }

.project-gallery__row img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* ── مشاريع مقترحة — Section مستقل بعرض الصفحة، خلفية رمادي فاتح ── */
.related-projects-band {
    position: relative;
    background: #F9FAFB;
    padding-block: 80px;
    overflow: hidden;
}

.related-projects-band::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 756px;
    height: 535px;
    background-image: url('../images/textures/related-projects-pattern-topleft.svg');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

.related-projects-band::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 810px;
    height: 725px;
    background-image: url('../images/textures/related-projects-pattern-bottomright.svg');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

html[dir="rtl"] .related-projects-band::before,
html[dir="rtl"] .related-projects-band::after {
    transform: scaleX(-1);
}

.related-projects-band .container {
    position: relative;
    z-index: 1;
}

.project-details__related-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 48px;
    color: var(--text-black);
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .related-projects-band {
        padding-block: 48px;
    }
    .related-projects-band::before,
    .related-projects-band::after {
        display: none;
    }
    .project-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-meta-bar__item,
    .project-meta-bar__share {
        margin-inline: 0;
    }
    .project-gallery__row {
        height: 200px;
    }
}

@media (max-width: 700px) {
    .project-gallery__row,
    .project-gallery__row--a,
    .project-gallery__row--b {
        height: auto;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: none;
        grid-auto-rows: auto;
    }
    .project-gallery__row img {
        height: auto;
        max-height: none;
        aspect-ratio: 1 / 1;
    }
    .project-gallery__row--a img:last-child,
    .project-gallery__row--b img:first-child,
    .project-gallery__row--1 img {
        grid-column: 1 / -1;
        aspect-ratio: 488 / 250;
    }
    .project-details__heading,
    .project-details__heading--first {
        font-size: 24px;
        line-height: 1.4;
    }
    .project-details__cover {
        border-radius: 24px;
    }
}
