/* =============================================================
   borgstijn.nl — gallery stylesheet
   Used by the portfolio category pages (diptychs, landscape,
   street). These pages use a different, full-width layout with
   a lightbox viewer instead of the sidebar navigation.
   ============================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    font-weight: 300;
    background-color: #f5f5f5;
}

.header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 32px;
    color: #333;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
}

.back-button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #555;
}

.gallery-description {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 20px;
    color: #666;
    line-height: 1.6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
}

.lightbox.active {
    display: block;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 80vh;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #666 #333;
    padding: 0 10px;
}

.lightbox-content::-webkit-scrollbar {
    height: 8px;
}

.lightbox-content::-webkit-scrollbar-track {
    background: #333;
}

.lightbox-content::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.lightbox-image {
    display: inline-block;
    height: 100%;
    margin-right: 20px;
}

.lightbox-image:last-child {
    margin-right: 0;
}

.lightbox-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.close-lightbox {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

@media (max-width: 768px) {
    .header {
        padding: 20px 10px;
    }

    .title {
        font-size: 24px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .lightbox-content {
        height: auto;
        padding: 60px 10px;
    }

    .lightbox-image {
        height: auto;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .lightbox-image img {
        width: 100%;
        height: auto;
        max-height: 90vh;
        object-fit: contain;
    }
}
