/* ═══════════════════════════════════════════════
   المشاريع المنجزة — بطاقات وصفحات المحتوى
   ═══════════════════════════════════════════════ */

/* ── شبكة البطاقات ── */
.cmp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 991px) { .cmp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .cmp-grid { grid-template-columns: 1fr; } }

.cmp-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #efe9e0;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(92, 23, 49, .05);
    transition: transform .3s ease, box-shadow .3s ease;
    animation: cmpIn .5s ease both;
}
.cmp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 38px rgba(92, 23, 49, .13);
    color: inherit;
}
@keyframes cmpIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.cmp-grid .cmp-card:nth-child(2) { animation-delay: .08s; }
.cmp-grid .cmp-card:nth-child(3) { animation-delay: .16s; }
.cmp-grid .cmp-card:nth-child(4) { animation-delay: .24s; }
.cmp-grid .cmp-card:nth-child(5) { animation-delay: .32s; }
.cmp-grid .cmp-card:nth-child(6) { animation-delay: .40s; }

.cmp-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f2ece3;
}
.cmp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.cmp-card:hover .cmp-card-media img { transform: scale(1.06); }
.cmp-card-media-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: #d9c9ae;
}
.cmp-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(40, 8, 20, .78) 0%, rgba(40, 8, 20, .12) 45%, transparent 65%);
}
.cmp-card-title {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 16px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.cmp-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(214, 152, 50, .95);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.cmp-card-excerpt {
    padding: 14px 18px 0;
    font-size: 14px;
    line-height: 1.9;
    color: #6b6258;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cmp-card-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 18px;
    margin-top: auto;
    color: #5a1932;
    font-weight: 700;
    font-size: 14px;
    transition: gap .2s ease;
}
.cmp-card:hover .cmp-card-cta { gap: 14px; color: #D69832; }

/* ── صفحة المشروع: المقاطع ── */
.cmp-article {
    max-width: 820px;
    margin: 0 auto;
}
.cmp-hero {
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 36px;
    box-shadow: 0 12px 36px rgba(92, 23, 49, .12);
}
.cmp-hero img { width: 100%; display: block; }

.cmp-text {
    font-size: 17px;
    line-height: 2.2;
    color: #374151;
    margin-bottom: 30px;
}
.cmp-figure,
.cmp-video {
    margin: 0 0 34px;
    text-align: center;
}
.cmp-figure img {
    max-width: 100%;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .10);
}
.cmp-figure figcaption,
.cmp-video figcaption {
    margin-top: 12px;
    font-size: 13.5px;
    color: #9a8d80;
    font-weight: 600;
}
.cmp-video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .12);
    background: #000;
}
.cmp-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cmp-footer-nav {
    border-top: 1px solid #efe9e0;
    margin-top: 44px;
    padding-top: 22px;
    text-align: center;
}
.cmp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #5a1932;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 26px;
    border: 1.5px solid #e4dade;
    border-radius: 99px;
    transition: all .2s;
}
.cmp-back-link:hover { background: #5a1932; color: #fff; border-color: #5a1932; }
