/* ============================================================================
   completed-projects.css
   Styles for the Completed Projects section / page.
   Consumed by both the reusable component and projects.php.
   ============================================================================ */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.cp-section {
    padding: 5rem 0 4rem;
    background-color: var(--light-bg, #f5f7fa);
}

/* ── Section header ──────────────────────────────────────────────────────── */
.cp-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.cp-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary, #0D9488);
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 0.85rem;
}

.cp-section-title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--navy, #0B2345);
    line-height: 1.2;
    margin: 0 0 0.85rem;
}

.cp-section-sub {
    font-size: 0.975rem;
    color: var(--slate, #64748b);
    line-height: 1.75;
    margin: 0;
}

/* ── Filter navigation ───────────────────────────────────────────────────── */
.cp-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.cp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 100px;
    border: 1.5px solid rgba(13, 148, 136, 0.25);
    background: transparent;
    color: var(--slate, #64748b);
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
}

.cp-filter-btn:hover {
    border-color: var(--primary, #0D9488);
    color: var(--primary, #0D9488);
    background: rgba(13, 148, 136, 0.06);
    transform: translateY(-1px);
}

.cp-filter-btn.active {
    background: var(--primary, #0D9488);
    border-color: var(--primary, #0D9488);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

/* ── Projects grid ───────────────────────────────────────────────────────── */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.cp-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(11, 35, 69, 0.07);
    border: 1px solid rgba(11, 35, 69, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
    position: relative;
}

.cp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(11, 35, 69, 0.14);
}

/* Card inner transition for filter animation */
.cp-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease,
                opacity 0.25s ease, filter 0.25s ease;
}

/* ── Card media (image wrapper) ──────────────────────────────────────────── */
.cp-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
}

.cp-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cp-card:hover .cp-card-img {
    transform: scale(1.06);
}

/* Subtle gradient overlay on hover */
.cp-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(11, 35, 69, 0.55) 0%,
        rgba(11, 35, 69, 0.08) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cp-card:hover .cp-card-overlay {
    opacity: 1;
}

/* ── Category badge ──────────────────────────────────────────────────────── */
.cp-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary, #0D9488);
    padding: 0.28rem 0.65rem;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── Play button ─────────────────────────────────────────────────────────── */
.cp-card-play {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary, #0D9488);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.22);
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.2s, color 0.2s;
}

.cp-card-play:hover {
    background: var(--primary, #0D9488);
    color: #fff;
    transform: scale(1.12);
}

/* ── Card info block ─────────────────────────────────────────────────────── */
.cp-card-info {
    padding: 1rem 1.1rem 1.1rem;
}

.cp-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy, #0B2345);
    margin: 0 0 0.3rem;
    line-height: 1.35;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-card-type {
    font-size: 0.78rem;
    color: var(--slate, #64748b);
    margin: 0 0 0.65rem;
    line-height: 1.4;
}

.cp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(11, 35, 69, 0.07);
    padding-top: 0.65rem;
}

.cp-card-location {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate, #64748b);
    letter-spacing: 0.01em;
}

.cp-card-location svg {
    color: var(--primary, #0D9488);
    flex-shrink: 0;
}

/* ── CTA row below the grid ──────────────────────────────────────────────── */
.cp-cta-row {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}



/* ── Stats strip (projects page) ─────────────────────────────────────────── */
.cp-stats-strip {
    background: #fff;
    border-bottom: 1px solid rgba(11, 35, 69, 0.08);
    padding: 1.5rem 0;
}

.cp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    divide-x: 1px solid rgba(11, 35, 69, 0.1);
    gap: 0;
}

.cp-stat-item {
    text-align: center;
    padding: 0.75rem 1rem;
    border-right: 1px solid rgba(11, 35, 69, 0.08);
}

.cp-stat-item:last-child {
    border-right: none;
}

.cp-stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary, #0D9488);
    line-height: 1;
    display: block;
}

.cp-stat-num sup {
    font-size: 1rem;
    vertical-align: super;
}

.cp-stat-lbl {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    display: block;
    margin-top: 0.3rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
    .cp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Mobile */
@media (max-width: 768px) {
    .cp-section {
        /* padding: 3.5rem 0 3rem; */
    }

    .cp-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

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

    .cp-filter-nav {
        gap: 0.45rem;
    }

    .cp-filter-btn {
        font-size: 0.78rem;
        padding: 0.45rem 0.9rem;
    }

}
