/* ============================================================
   Projects Hub
============================================================ */
.ph-page { padding: 140px 0 80px; }
.ph-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.ph-header h1 { font-size: 2.4rem; color: var(--black); }
.ph-subtitle { color: var(--gray); margin-top: 12px; }

.ph-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.ph-search {
    flex: 1 1 280px;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}
.ph-search:focus { outline: none; border-color: var(--red-primary); }

.ph-tabs, .ph-status-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-tab, .ph-status-btn {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: var(--white);
    color: var(--gray);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ph-tab:hover, .ph-status-btn:hover { border-color: var(--red-primary); color: var(--red-primary); }
.ph-tab.active, .ph-status-btn.active { background: var(--red-primary); border-color: var(--red-primary); color: var(--white); }

.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.ph-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid #eee; border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ph-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.ph-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ph-card-img, .ph-card-img--placeholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-card-img--placeholder { background: linear-gradient(135deg, var(--red-deep), #2a0a0a); }
.ph-badge { position: absolute; top: 14px; left: 14px; padding: 5px 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--white); }
.ph-badge--delivered { background: var(--red-primary); }
.ph-badge--in-hand { background: var(--gray); }
.ph-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.ph-card-name { font-size: 1.1rem; color: var(--black); margin: 0; }
.ph-card-meta { font-size: 0.82rem; color: var(--gray); margin: 0; }
.ph-card-desc { font-size: 0.88rem; color: var(--gray); margin: 6px 0 0; line-height: 1.5; }
.ph-card-figure { font-size: 0.92rem; font-weight: 600; color: var(--red-primary); margin: 10px 0 0; }
.ph-empty { text-align: center; color: var(--gray); padding: 60px 0; }

/* ============================================================
   Project Detail
============================================================ */
.pd-page { padding: 140px 0 80px; }
.pd-back { display: inline-block; margin-bottom: 28px; color: var(--red-primary); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.pd-back:hover { text-decoration: underline; }

.pd-hero { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 12px; }
.pd-hero-img, .pd-hero-img--placeholder { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.pd-hero-img:hover { opacity: .88; }
.pd-hero-img--placeholder { background: linear-gradient(135deg, var(--red-deep), #2a0a0a); }
.pd-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.pd-thumb { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; transition: opacity .2s, transform .2s; }
.pd-thumb:hover { opacity: .78; transform: scale(1.05); }

/* ── Lightbox ──────────────────────────────────────────────────── */
.pd-lb { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.93); display: flex; align-items: center; justify-content: center; }
.pd-lb[hidden] { display: none; }
.pd-lb-wrap { display: flex; align-items: center; justify-content: center; max-width: 90vw; max-height: 88vh; }
.pd-lb-img { max-width: 90vw; max-height: 88vh; object-fit: contain; display: block; border-radius: 4px; user-select: none; }
.pd-lb-close { position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 18px; width: 42px; height: 42px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.pd-lb-close:hover { background: var(--red-primary); border-color: var(--red-primary); }
.pd-lb-prev, .pd-lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 22px; width: 52px; height: 72px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.pd-lb-prev { left: 16px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.pd-lb-next { right: 16px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.pd-lb-prev:hover, .pd-lb-next:hover { background: var(--red-primary); border-color: var(--red-primary); }
.pd-lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.45); font-size: 11px; font-weight: 700; letter-spacing: 2px; font-family: Montserrat, sans-serif; pointer-events: none; }
.pd-lb-title { position: absolute; top: 20px; left: 24px; height: 42px; display: flex; align-items: center; max-width: calc(100vw - 280px); color: rgba(255,255,255,.75); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-family: Montserrat, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
@media (max-width: 640px) { .pd-lb-title { font-size: 10px; max-width: calc(100vw - 180px); } }

.pd-header { margin-bottom: 28px; }
.pd-badge { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--white); margin-right: 10px; }
.pd-badge--delivered { background: var(--red-primary); }
.pd-badge--in-hand { background: var(--gray); }
.pd-sector { font-size: 0.82rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; }
.pd-title { font-size: 2rem; color: var(--black); margin: 14px 0 8px; }
.pd-location { color: var(--gray); margin: 0; }

.pd-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 36px; }
.pd-stat { flex: 1 1 160px; padding: 18px 22px; background: var(--off-white); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
.pd-stat-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray); }
.pd-stat-value { font-size: 1.2rem; font-weight: 600; color: var(--black); }

.pd-section-title { font-size: 1.3rem; color: var(--black); margin: 0 0 14px; }
.pd-scope { color: var(--gray); line-height: 1.7; max-width: 760px; }

.pd-facts { display: flex; flex-direction: column; gap: 8px; margin: 28px 0; }
.pd-fact { display: flex; gap: 8px; font-size: 0.92rem; }
.pd-fact-label { font-weight: 600; color: var(--black); }
.pd-fact-value { color: var(--gray); }

.rp-section { margin-top: 56px; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 18px; }
.rp-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.rp-card-img, .rp-card-img--placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.rp-card-img--placeholder { background: linear-gradient(135deg, var(--red-deep), #2a0a0a); }
.rp-card-name { font-size: 0.92rem; color: var(--black); font-weight: 600; }

@media (max-width: 640px) {
    .ph-controls { flex-direction: column; align-items: stretch; }
    .pd-stats { flex-direction: column; }
}
