/**
 * Project Realizations - Frontend Styles
 */

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.project-realizations {
    padding: 20px 0;
}

.realizations-grid {
    display: grid;
    gap: 24px;
}

/* Responsywne kolumny */
.realizations-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.realizations-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.realizations-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {

    .realizations-grid.columns-3,
    .realizations-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {

    .realizations-grid.columns-2,
    .realizations-grid.columns-3,
    .realizations-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Realization Card
   ========================================================================== */

.realization-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.realization-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Cover Image */
.realization-cover {
    position: relative;
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f5;
}

.realization-cover.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.realization-cover.no-image i {
    font-size: 48px;
}

.realization-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.realization-card:hover .realization-image {
    transform: scale(1.05);
}

/* Overlay */
.realization-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.realization-cover:hover .realization-overlay {
    opacity: 1;
}

.view-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

.view-gallery i {
    font-size: 36px;
}

.image-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* Content - Removed for simple gallery */
.realization-content {
    display: none;
}

/* Empty state */
.project-realizations.empty {
    text-align: center;
    padding: 60px 20px;
}

.no-realizations {
    color: #999;
    font-size: 16px;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */

.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

@media (max-width: 768px) {
    .lightbox-container {
        padding: 60px 20px;
    }
}

/* Navigation buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close i,
.lightbox-prev i,
.lightbox-next i {
    font-size: 28px;
}

/* Content */
.lightbox-content {
    max-width: 100%;
    max-height: calc(100% - 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    color: #fff;
    font-size: 16px;
    margin-top: 16px;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 8px;
}

/* Thumbnails */
.lightbox-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.lightbox-thumbnails img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lightbox-thumbnails img:hover,
.lightbox-thumbnails img.active {
    opacity: 1;
}

/* Loading state */
.lightbox-image.loading {
    opacity: 0.3;
}

/* Animations */
@keyframes lightbox-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-modal.active .lightbox-content {
    animation: lightbox-fade-in 0.3s ease;
}