/* WorkProof Gallery — Public Styles
   All classes namespaced under .workproof- to avoid theme conflicts */

.workproof-gallery-root *,
.workproof-gallery-root *::before,
.workproof-gallery-root *::after {
    box-sizing: border-box;
}

.workproof-gallery-root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1d2327;
    line-height: 1.5;
}

/* Loading state */
.workproof-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px;
    color: #646970;
}
.workproof-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #1B5896;
    border-radius: 50%;
    animation: workproof-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes workproof-spin { to { transform: rotate(360deg); } }

/* Filter bar */
.workproof-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}
.workproof-filter-btn {
    padding: 6px 16px;
    border: 1px solid #dcdcde;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #646970;
    transition: all 0.15s;
}
.workproof-filter-btn:hover,
.workproof-filter-btn.active {
    background: #1B5896;
    border-color: #1B5896;
    color: #fff;
}
.workproof-search {
    margin-left: auto;
}
.workproof-search input {
    padding: 6px 14px;
    border: 1px solid #dcdcde;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    width: 200px;
    transition: border-color 0.15s;
}
.workproof-search input:focus { border-color: #1B5896; }

/* Gallery grid */
.workproof-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Project card */
.workproof-project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.workproof-project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.workproof-card-thumb {
    aspect-ratio: 16/9;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
}
.workproof-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.workproof-project-card:hover .workproof-card-thumb img {
    transform: scale(1.04);
}
.workproof-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 13px;
}
.workproof-card-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1B5896;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}
.workproof-card-body { padding: 18px; }
.workproof-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #1d2327;
}
.workproof-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #646970;
}
.workproof-card-meta-item { display: flex; align-items: center; gap: 4px; }

/* Project detail page */
.workproof-detail-root { max-width: 900px; margin: 0 auto; }

/* Carousel */
.workproof-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 32px;
    aspect-ratio: 16/9;
}
.workproof-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
}
.workproof-carousel-slide {
    flex: 0 0 100%;
    height: 100%;
}
.workproof-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.workproof-carousel-slide iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.workproof-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
.workproof-carousel-btn:hover { background: rgba(0,0,0,0.8); }
.workproof-carousel-prev { left: 12px; }
.workproof-carousel-next { right: 12px; }
.workproof-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.workproof-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.15s;
}
.workproof-carousel-dot.active { background: #fff; }

/* Project detail info */
.workproof-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}
.workproof-detail-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    background: #f6f7f7;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 28px;
}
.workproof-spec { display: flex; flex-direction: column; gap: 2px; }
.workproof-spec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #646970; font-weight: 600; }
.workproof-spec-value { font-size: 15px; font-weight: 500; color: #1d2327; }

.workproof-detail-description {
    font-size: 16px;
    line-height: 1.7;
    color: #3c434a;
    margin-bottom: 32px;
}
.workproof-detail-description p { margin: 0 0 1em; }

/* Enquiry CTA */
.workproof-enquiry-cta {
    background: linear-gradient(135deg, #1B5896, #154a7a);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-bottom: 40px;
}
.workproof-enquiry-cta h3 { margin: 0 0 8px; font-size: 20px; }
.workproof-enquiry-cta p  { margin: 0 0 20px; opacity: 0.9; }
.workproof-cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: #1B5896;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: opacity 0.15s;
}
.workproof-cta-btn:hover { opacity: 0.9; color: #1B5896; }

/* Related projects */
.workproof-related h3 { font-size: 20px; margin-bottom: 16px; }
.workproof-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Back link */
.workproof-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #646970;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.15s;
}
.workproof-back-link:hover { color: #1B5896; }

/* Error & empty states */
.workproof-error, .workproof-empty {
    text-align: center;
    padding: 48px 20px;
    color: #646970;
}
.workproof-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .workproof-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
    .workproof-detail-title { font-size: 22px; }
    .workproof-detail-specs { grid-template-columns: 1fr 1fr; }
    .workproof-filter-bar   { gap: 6px; }
    .workproof-search input { width: 140px; }
}

/* ═══════════════════════════════════════════════
   LAYOUT: Masonry
   [workproof layout="masonry"]
   ═══════════════════════════════════════════════ */
.workproof-layout-masonry {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 24px;
}
.workproof-layout-masonry .workproof-project-card {
    break-inside: avoid;
}
.workproof-layout-masonry .workproof-card-thumb {
    aspect-ratio: auto;
}
.workproof-layout-masonry .workproof-card-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
@media (max-width: 600px) {
    .workproof-layout-masonry { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════
   LAYOUT: List
   [workproof layout="list"]
   ═══════════════════════════════════════════════ */
.workproof-layout-list {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: column;
    gap: 16px;
}
.workproof-list-card {
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    min-height: 200px;
}
.workproof-list-thumb {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}
.workproof-list-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.workproof-list-card:hover .workproof-list-thumb img {
    transform: scale(1.04);
}
.workproof-list-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.workproof-list-body .workproof-card-title {
    font-size: 18px;
    margin-bottom: 8px;
}
.workproof-list-excerpt {
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
    margin: 0 0 12px;
}
@media (max-width: 700px) {
    .workproof-list-card { flex-direction: column; }
    .workproof-list-thumb {
        flex: none;
        height: 200px;
    }
}

/* ═══════════════════════════════════════════════
   LAYOUT: Carousel
   [workproof layout="carousel"]
   ═══════════════════════════════════════════════ */
.workproof-gallery-carousel {
    position: relative;
    margin-bottom: 40px;
}
.workproof-gc-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}
.workproof-gc-track::-webkit-scrollbar { display: none; }
.workproof-gc-slide {
    flex: 1 0 0%;
    min-width: 280px;
    scroll-snap-align: start;
}
.workproof-gc-slide .workproof-project-card {
    height: 100%;
}
.workproof-gc-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
.workproof-gc-btn:hover { background: rgba(0,0,0,0.85); }
.workproof-gc-prev { left: -16px; }
.workproof-gc-next { right: -16px; }
@media (max-width: 600px) {
    .workproof-gc-slide { flex: 0 0 85vw; }
    .workproof-gc-prev { left: 4px; }
    .workproof-gc-next { right: 4px; }
}

/* ═══════════════════════════════════════════════
   LAYOUT: Featured
   [workproof layout="featured"]
   First project full-width hero, rest in grid
   ═══════════════════════════════════════════════ */
.workproof-layout-featured {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.workproof-featured-hero {
    grid-column: 1 / -1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: block !important;
    background: #1d2327;
    color: #fff;
}
.workproof-featured-thumb {
    position: relative;
    aspect-ratio: 21/9;
    overflow: hidden;
    background: #111;
}
.workproof-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.workproof-featured-hero:hover .workproof-featured-thumb img {
    transform: scale(1.03);
}
.workproof-featured-overlay {
    position: relative;
    background: #1d2327;
    color: #fff;
    padding: 24px 32px;
}
.workproof-featured-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
    color: #fff;
}
.workproof-featured-excerpt {
    font-size: 15px;
    margin: 0 0 10px;
    opacity: 0.85;
    line-height: 1.5;
    color: #fff;
}
@media (max-width: 600px) {
    .workproof-featured-thumb { aspect-ratio: 16/9; }
    .workproof-featured-title { font-size: 20px; }
    .workproof-featured-overlay { padding: 16px 16px; }
}

/* ═══════════════════════════════════════════════
   PROJECT PAGE IMAGE LAYOUTS
   ═══════════════════════════════════════════════ */

/* ── Grid thumbnail layout ─────────────────────
   [workproof_project images="grid"] */
.workproof-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}
.workproof-img-grid-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
    cursor: pointer;
    position: relative;
}
.workproof-img-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.workproof-img-grid-item:hover img { transform: scale(1.05); }
.workproof-img-grid-video {
    aspect-ratio: 16/9;
}
.workproof-img-grid-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.workproof-ba-extra {
    margin-top: 16px;
}
@media (max-width: 600px) {
    .workproof-img-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Hero + thumbnails layout ──────────────────
   [workproof_project images="hero"] */
.workproof-hero-layout {
    margin-bottom: 32px;
}
.workproof-hero-main {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 12px;
}
.workproof-hero-main img {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.workproof-hero-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
}
.workproof-hero-thumbs::-webkit-scrollbar { display: none; }
.workproof-hero-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.6;
}
.workproof-hero-thumb.active {
    border-color: #1B5896;
    opacity: 1;
}
.workproof-hero-thumb:hover { opacity: 1; }
.workproof-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Before & after slider ─────────────────────
   [workproof_project images="beforeafter"] */
.workproof-ba-container {
    margin-bottom: 32px;
}
.workproof-ba-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}
.workproof-ba-after {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.workproof-ba-after img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.workproof-ba-before {
    position: absolute;
    top: 0; left: 0; width: 50%; height: 100%;
    overflow: hidden;
    border-right: 3px solid #fff;
}
.workproof-ba-before img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* JS sets the width to match the container */
.workproof-ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: auto;
    transform: translateX(-50%);
}
.workproof-ba-handle-line {
    flex: 1;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.workproof-ba-handle-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    cursor: col-resize;
    flex-shrink: 0;
}
.workproof-ba-labels {
    display: flex;
    justify-content: space-between;
    padding: 10px 4px 0;
}
.workproof-ba-label {
    font-size: 13px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media (max-width: 600px) {
    .workproof-ba-handle-circle { width: 36px; height: 36px; font-size: 14px; }
}
