/* ================================================
   DK Mosaic Gallery — dk-gallery.css
   ================================================ */

/* ── Mosaic / Masonry Grid ── */
.dk-mosaic-gallery {
    column-count: 3;
    column-gap: 12px;
    padding: 8px;
}

@media (max-width: 900px) {
    .dk-mosaic-gallery { column-count: 2; }
}

@media (max-width: 540px) {
    .dk-mosaic-gallery { column-count: 1; }
}

.dk-gallery-item {
    break-inside: avoid;
    margin: 0 0 12px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.dk-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.dk-gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
}

.dk-gallery-item a:hover img {
    transform: scale(1.04);
    filter: brightness(0.82);
}

/* ── Watermark on thumbnails ── */
.dk-watermark {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: auto;
    color: rgba(255, 255, 255, 0.72);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.62rem;
    font-style: italic;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/* ── Lightbox Overlay ── */
#dk-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#dk-lightbox.dk-open {
    display: flex;
}

#dk-lb-content {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#dk-lb-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: block;
}

#dk-lb-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    margin: 10px 0 0;
    text-align: center;
    font-family: Georgia, serif;
    font-style: italic;
}

/* Watermark inside lightbox */
#dk-lb-watermark {
    position: absolute;
    bottom: 36px;   /* above caption */
    left: 10px;
    right: auto;
    color: rgba(255, 255, 255, 0.55);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.72rem;
    font-style: italic;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    user-select: none;
}

/* Close button */
#dk-lb-close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 100001;
}
#dk-lb-close:hover { opacity: 1; }

/* Prev / Next buttons */
#dk-lb-prev,
#dk-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    z-index: 100001;
}
#dk-lb-prev { left: 14px; }
#dk-lb-next { right: 14px; }
#dk-lb-prev:hover,
#dk-lb-next:hover { background: rgba(255,255,255,0.28); }

/* Hide nav arrows when only one image */
.dk-single #dk-lb-prev,
.dk-single #dk-lb-next { display: none; }

/* ── Error message ── */
.dk-gallery-error {
    color: #c00;
    font-style: italic;
}
