/* Builders & Sparkle Clean project gallery. Uses the colours from styles.css */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}
.project-filter {
    border: 1px solid #d5e3ee;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    transition: all 0.25s ease;
}
.project-filter:hover { border-color: var(--primary); color: var(--primary); }
.project-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    padding: 0;
    text-align: left;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    font-family: inherit;
    color: inherit;
}
.project-card:hover,
.project-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 79, 127, 0.15);
    outline: none;
}
.project-card:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 25px 50px rgba(0, 79, 127, 0.15); }

.project-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--primary-light);
}
.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.project-card:hover .project-cover img { transform: scale(1.06); }
.project-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 45, 74, 0) 40%, rgba(0, 45, 74, 0.75) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.project-card:hover .project-cover::after { opacity: 1; }

.project-count {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}
.project-view {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    transform: translate(-50%, 10px);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.35s ease;
}
.project-card:hover .project-view { opacity: 1; transform: translate(-50%, 0); }

.project-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem 1.25rem;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
}
.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: var(--text-dark);
}
.project-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}
.project-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.project-card:hover .project-arrow { background: var(--primary); color: var(--white); }

/* Photo viewer */
.project-modal .modal-content {
    background: var(--dark-bg);
    color: var(--white);
    border: 0;
    border-radius: 20px;
    overflow: hidden;
}
.project-modal .modal-header { border: 0; padding: 1.25rem 1.5rem 0.5rem; align-items: flex-start; }
.project-modal .modal-title { font-weight: 700; }
.project-modal .badge {
    background: rgba(79, 195, 247, 0.15);
    color: var(--accent);
    font-weight: 600;
    margin: 0.4rem 0.35rem 0 0;
}
.project-modal-summary { color: rgba(255, 255, 255, 0.65); padding: 0 1.5rem; margin-bottom: 1rem; }
.project-stage {
    position: relative;
    background: #050c17;
    display: flex;
    align-items: center;
    justify-content: center;
    height: min(68vh, 640px);
}
.project-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}
.project-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.project-nav:hover { background: var(--primary); color: var(--white); }
.project-nav.prev { left: 16px; }
.project-nav.next { right: 16px; }
.project-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}
.project-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 1.5rem 1.25rem;
    scrollbar-width: thin;
}
.project-thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 62px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0.55;
    background: none;
    transition: all 0.2s ease;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb:hover { opacity: 0.9; }
.project-thumb.active { opacity: 1; border-color: var(--accent); }

@media (max-width: 575.98px) {
    .project-stage { height: 55vh; }
    .project-nav { width: 40px; height: 40px; }
    .project-nav.prev { left: 8px; }
    .project-nav.next { right: 8px; }
    .project-thumb { width: 64px; height: 48px; }
}
