/* ==========================================================================
   AquaNature - Project Gallery Styles
   Loaded only on project-related pages (see inc/enqueue.php).
   ========================================================================== */

/* Filter bar */
.project-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid #e0e4e8;
    align-items: center;
}
.project-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-filter-label {
    font-weight: 700; font-size: 13px; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-light); margin-right: 6px;
}
.project-filter-chip {
    display: inline-block; padding: 6px 14px; font-size: 13px; font-weight: 600;
    background: var(--light-bg); color: var(--text); border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}
.project-filter-chip:hover { background: var(--blue); color: #fff; }
.project-filter-chip.active { background: var(--navy); color: #fff; }

/* Masonry-ish grid via CSS columns (progressively enhanced by JS) */
.project-grid {
    columns: 3;
    column-gap: 16px;
    margin-bottom: 40px;
}
.project-grid .project-card {
    display: block; position: relative;
    break-inside: avoid;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid #e8ecf0;
}
.project-grid .project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.project-card-img { width: 100%; }
.project-card-img img { width: 100%; height: auto; display: block; }
.project-card-info { padding: 16px 20px; }
.project-card-info h3 {
    font-size: 17px; font-weight: 800; color: var(--text);
    margin-bottom: 4px; line-height: 1.3;
}
.project-card-meta {
    font-size: 13px; color: var(--text-light); letter-spacing: 0.2px;
}

/* Single project: meta bar */
.project-meta-bar {
    display: flex; flex-wrap: wrap; gap: 32px;
    padding: 20px 24px; background: var(--light-bg);
    margin: 0 0 28px;
}
.project-meta-item { display: flex; flex-direction: column; }
.project-meta-item .meta-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-light); margin-bottom: 3px;
}
.project-meta-item .meta-value {
    font-size: 15px; font-weight: 700; color: var(--text);
}

/* Before / after */
.before-after-pair {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.before-after-fig { margin: 0; position: relative; }
.before-after-fig img { width: 100%; height: auto; display: block; }
.before-after-fig figcaption {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,0.7); color: #fff;
    padding: 4px 12px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    border-radius: 2px;
}

/* Gallery inside single project */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}
.project-gallery-item {
    display: block; overflow: hidden; aspect-ratio: 1;
    background: var(--light-bg);
}
.project-gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.project-gallery-item:hover img { transform: scale(1.05); }

/* Client blurb */
.client-blurb {
    background: var(--light-bg); border-left: 4px solid var(--blue);
    padding: 28px 32px; margin: 0;
}
.client-blurb p {
    font-family: 'Lora', serif; font-size: 20px; font-weight: 500;
    font-style: italic; color: var(--text); line-height: 1.5;
}

/* Project nav */
.project-navigation {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: center; gap: 12px; padding: 32px 0 0;
    border-top: 1px solid #e0e4e8; margin-top: 40px;
}
.project-navigation a {
    font-weight: 700; font-size: 14px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.project-navigation .nav-all {
    background: var(--blue); color: #fff; padding: 10px 20px;
}
.project-navigation .nav-all:hover { background: var(--blue-dark); color: #fff; }

/* Lightbox (minimal, vanilla JS) */
.an-lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 40px;
    opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
.an-lightbox.open { opacity: 1; visibility: visible; }
.an-lightbox img {
    max-width: 100%; max-height: 100%;
    object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.an-lightbox-close, .an-lightbox-prev, .an-lightbox-next {
    position: absolute; background: none; border: none;
    color: #fff; font-size: 36px; cursor: pointer;
    padding: 12px; line-height: 1;
}
.an-lightbox-close { top: 20px; right: 20px; }
.an-lightbox-prev  { left: 30px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.an-lightbox-next  { right: 30px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.an-lightbox-counter {
    position: absolute; bottom: 20px; left: 50%;
    transform: translateX(-50%); color: rgba(255,255,255,0.7);
    font-size: 13px; font-weight: 600; letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
    .project-grid { columns: 2; }
}
@media (max-width: 768px) {
    .project-grid { columns: 1; }
    .project-filter-bar { flex-direction: column; align-items: stretch; }
    .before-after-pair { grid-template-columns: 1fr; }
    .an-lightbox-prev, .an-lightbox-next { font-size: 32px; }
    .an-lightbox-close { font-size: 28px; }
}
