/* ================================================
   SINGLE WORK — single-work.css
   Loaded by single-work.php
   ================================================ */

.single-work-container {
    max-width: 92vw;
    margin: 0 auto 50px;
}

/* Breadcrumb */
.sw-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #555;
    font-family: var(--font-body);
}

.sw-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.sw-breadcrumb a:hover {
    color: #000;
    text-decoration: underline;
}

/* Main display area — mobile-first: single column */
.work-display-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    padding-bottom: 40px;
    animation: swFadeIn 0.5s ease-out;
}

/* Two-column layout: ≥ 1025px */
@media (min-width: 1025px) {
    .work-display-area {
        flex-direction: row;
        gap: 3rem;
        align-items: flex-start;
        max-height: calc(100svh - 220px);
    }

    .work-details-column {
        flex: 0 0 25%;
        max-width: 25%;
        padding-top: 20svh;
    }

    .work-media-column {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(100svh - 220px);
        position: relative;
    }

    .image-container {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .work-image {
        max-width: 100%;
        max-height: calc(100svh - 220px - 2rem);
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Caption sizing in narrow left column */
    .work-caption { font-size: 0.9rem; }

    .work-caption .work-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .work-caption .work-year,
    .work-caption .work-media,
    .work-caption .work-dimensions {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .work-caption .work-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-top: 1rem;
    }
}

/* Single-column layout: ≤ 1024px — image above, caption below */
@media (max-width: 1024px) {
    .work-display-area {
        flex-direction: column;
        margin-top: 2rem;
    }

    .work-details-column {
        order: 2;
        width: 100%;
    }

    .work-media-column {
        order: 1;
        margin-bottom: 1.5rem;
        width: 100%;
    }

    .image-container {
        width: 100%;
        max-height: 70svh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .work-image {
        max-width: 100%;
        max-height: 60svh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 500px) {
    .work-image { max-height: 85svh; }
}

/* Image slides */
.work-image-slide {
    display: none;
    width: 100%;
    max-width: 900px;
    height: 100%;
}

.work-image-slide.active {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    background: #ccc;
    border: 1px solid #aaa;
    color: #666;
}

/* Caption — default (mobile) sizes */
.work-caption {
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.work-title {
    font-size: 1.1em;
    font-weight: 400;
    margin: 0 0 4px;
    color: #222;
    text-transform: uppercase;
}

.work-year,
.work-media,
.work-dimensions {
    font-size: 1em;
    margin-bottom: 2px;
    color: #555;
    line-height: 1.4;
}

.work-excerpt {
    font-size: 1em;
    color: #555;
    margin-top: 0.5rem;
    line-height: 1.5;
    font-style: italic;
}

/* Carousel dots */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 12px;
    border-radius: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #aaa;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover,
.carousel-dot.active {
    border-color: #444;
    background: #666;
}

/* Prev / next / position counter */
.work-position-nav {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.work-position-nav .nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 40px;
    text-decoration: none;
    color: #555;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.work-position-nav .nav-arrow:hover:not(.disabled) { color: #000; }
.work-position-nav .nav-arrow.disabled { color: #aaa; cursor: default; }

.work-position-nav .position-counter {
    font-size: 0.9rem;
    color: #555;
    min-width: 20px;
    text-align: center;
}

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

/* Zoom cursor on page images — white stroke */
.work-image {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='14' r='9'/%3E%3Cline x1='21' y1='21' x2='29' y2='29'/%3E%3Cline x1='14' y1='10' x2='14' y2='18'/%3E%3Cline x1='10' y1='14' x2='18' y2='14'/%3E%3C/svg%3E") 14 14, zoom-in;
}

/* Lightbox overlay
------------------------------ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #dedecc;
    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 so user can pan around full-size image */
.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.15);
    flex-shrink: 0;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(222, 222, 204, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: #444;
    font-size: 2.2rem;
    font-weight: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    padding-bottom: 3px;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-family: "Inter", sans-serif;
}

.lightbox-close:hover {
    border-color: rgba(0, 0, 0, 0.6);
    background: rgba(222, 222, 204, 1);
}
