/* ================================================
   SINGLE WORK — single-work.css
   Loaded by single-work.php
   Ported from sauzey-theme-cwk/css/single-work.css (2026-06-14).
   Lightbox arrow buttons added for prev/next navigation.
   ================================================ */

/* Gallery grid */
.hwd-gallery-wrap {
    margin: 1.5rem 0;
}

.hwd-gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hwd-gallery .gallery-item {
    margin: 0;
}

.hwd-gallery .gallery-item img {
    display: block;
    width: 120px;
    height: 90px;
    object-fit: cover;
    cursor: zoom-in;
    border: 1px solid #ccc;
    transition: opacity 0.2s ease;
}

.hwd-gallery .gallery-item img:hover {
    opacity: 0.8;
}

/* Prev / next work navigation */
#nav-single {
    overflow: hidden;
    margin: 1rem 0;
}

#nav-single .left  { float: left; }
#nav-single .right { float: right; }

/* Fade-in on page load */
@keyframes swFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.row.content.description {
    animation: swFadeIn 0.4s ease-out;
}

/* ================================================
   LIGHTBOX
   ================================================ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    cursor: default;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Zoomed state — scrollable */
.lightbox-overlay.zoomed {
    align-items: flex-start;
    justify-content: flex-start;
    overflow: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.lightbox-image {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    max-width: 90vw;
    max-height: 90vh;
}

/* Close button */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(30, 30, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    padding-bottom: 3px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(30, 30, 30, 1);
}

/* Prev / next arrow buttons inside lightbox */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: none; /* shown by JS when gallery has >1 image */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    padding: 0 0 2px 0;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(30, 30, 30, 0.9);
}

/* Hide arrows in zoomed state to avoid clutter */
.lightbox-overlay.zoomed .lightbox-prev,
.lightbox-overlay.zoomed .lightbox-next {
    display: none !important;
}
