/* ===== REALIZACJE (GALLERY) PAGE STYLES ===== */

/* ===== LISTING PAGE: FILTER BAR ===== */
.rlz-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.rlz-filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--navy-pale-border);
    background: var(--bg-white);
    font-family: "Montserrat", sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}
.rlz-filter-btn:hover {
    border-color: var(--navy-main);
    color: var(--navy-main);
}
.rlz-filter-btn.active {
    background: var(--navy-main);
    border-color: var(--navy-main);
    color: var(--bg-white);
}

/* ===== LISTING GRID ===== */
.rlz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rlz-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.rlz-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
    border-color: var(--navy-pale-border);
}

.rlz-card-img {
    height: 220px;
    background: var(--bg-light-gray);
    position: relative;
    overflow: hidden;
}
.rlz-card-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-light-gray);
}
.rlz-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}
/* SVG placeholder for cards without photos */
.rlz-card-img svg {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    color: var(--navy-pale-border);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.rlz-card-img .rlz-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.rlz-card:hover .rlz-card-overlay {
    opacity: 1;
}
.rlz-card-overlay span {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bg-white);
}
.rlz-card-overlay span svg {
    width: 16px;
    height: 16px;
    color: var(--bg-white);
    position: static;
    transform: none;
}

.rlz-card-body {
    padding: 24px;
}

.rlz-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rlz-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--navy-main);
    background: var(--navy-pale);
}
.rlz-tag--kolizja {
    color: var(--navy-main);
    background: var(--navy-pale);
}
.rlz-tag--siec {
    color: var(--navy-main);
    background: var(--navy-pale);
}
.rlz-tag--przylacze {
    color: var(--navy-main);
    background: var(--navy-pale);
}
.rlz-tag--skablowanie {
    color: var(--navy-main);
    background: var(--navy-pale);
}

.rlz-card-date {
    font-size: 0.8125rem;
    color: var(--text-light-gray);
    font-weight: 500;
}

.rlz-card-body h3 {
    font-size: 1.0625rem;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-dark);
}

.rlz-card-body p {
    font-size: 0.9375rem;
    color: var(--text-gray);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rlz-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px 24px;
}
.rlz-card-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    color: var(--text-light-gray);
}
.rlz-card-detail svg {
    width: 14px;
    height: 14px;
    color: var(--text-light-gray);
    flex-shrink: 0;
    position: static;
    transform: none;
}

/* ===== LISTING: STATS BAR ===== */
.rlz-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 0;
    margin-bottom: 48px;
    border: 1px solid #f1f5f9;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}
.rlz-stat {
    flex: 1;
    text-align: center;
    padding: 0 24px;
}
.rlz-stat strong {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-main);
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}
.rlz-stat span {
    font-size: 0.8125rem;
    color: var(--text-gray);
}
.rlz-stat-divider {
    width: 1px;
    height: 40px;
    background: #f1f5f9;
    flex-shrink: 0;
}

/* ===== SINGLE PAGE: HERO GALLERY ===== */
.rlz-single-hero {
    padding: 140px 0 100px;
    background: var(--bg-light-gray);
    position: relative;
    overflow: visible;
}
.rlz-single-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: none;
}
.rlz-single-hero .container {
    position: relative;
    z-index: 1;
}
.rlz-single-hero h1 {
    color: var(--text-dark);
    font-size: clamp(1.75rem, 4vw, 3rem);
    max-width: 800px;
    margin-bottom: 20px;
    line-height: 1.1;
}
.rlz-single-hero h1 span {
    color: var(--navy-main);
}

.rlz-hero-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.rlz-hero-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    color: var(--text-gray);
}
.rlz-hero-detail svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}
.rlz-hero-detail strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ===== SINGLE: MAIN IMAGE GALLERY ===== */
.rlz-showcase-grid {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1.45fr);
    gap: 36px;
    align-items: start;
}
.rlz-gallery {
    position: relative;
    min-width: 0;
}
.rlz-gallery-main {
    border-radius: calc(var(--border-radius) + 4px);
    overflow: hidden;
    aspect-ratio: 5 / 4;
    background: var(--bg-light-gray);
    position: relative;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}
.rlz-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.15s ease;
}
.rlz-gallery-main svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    color: var(--navy-pale-border);
}

.rlz-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rlz-gallery-thumbs::-webkit-scrollbar {
    display: none;
}
.rlz-thumb {
    width: 92px;
    height: 68px;
    min-width: 92px;
    background: var(--bg-light-gray);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 12px;
}
.rlz-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.2);
    transition: background 0.3s ease;
}
.rlz-thumb:hover::after {
    background: transparent;
}
.rlz-thumb.active::after {
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--navy-main);
}
.rlz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rlz-thumb svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    color: var(--navy-pale-border);
    z-index: 1;
}

.rlz-gallery-count {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(17, 17, 17, 0.75);
    backdrop-filter: blur(4px);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bg-white);
}
.rlz-gallery-count svg {
    width: 16px;
    height: 16px;
    color: var(--bg-white);
    position: static;
    transform: none;
}

/* ===== SINGLE: OVERVIEW PANEL ===== */
.rlz-overview-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.rlz-intro-card,
.rlz-info-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: calc(var(--border-radius) + 2px);
    border: 1px solid #edf2f8;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
}
.rlz-intro-card h2 {
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text-dark);
}
.rlz-intro-card h3 {
    font-size: 1.125rem;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-dark);
}
.rlz-intro-card p {
    color: var(--text-gray);
    line-height: 1.75;
    margin-bottom: 16px;
    font-size: 1rem;
}
.rlz-intro-card p:last-child {
    margin-bottom: 0;
}

.rlz-scope-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}
.rlz-scope-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    background: var(--bg-light-gray);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--navy-main);
}
.rlz-scope-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}
.rlz-scope-item span {
    font-size: 0.9375rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Sidebar */
.rlz-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.rlz-info-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-gray);
    margin-bottom: 16px;
    font-weight: 600;
}

.rlz-info-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rlz-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.rlz-info-row svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}
.rlz-info-row-text strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1px;
}
.rlz-info-row-text span {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.rlz-cta-card {
    padding: 28px;
    background: var(--navy-main);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}
.rlz-cta-card h4 {
    font-size: 1.0625rem;
    color: var(--bg-white);
    margin-bottom: 8px;
}
.rlz-cta-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 20px;
}
.rlz-cta-card .btn {
    width: 100%;
    justify-content: center;
}

/* ===== SINGLE: RELATED PROJECTS ===== */
.rlz-related {
    padding: 100px 0;
    background: var(--bg-light-gray);
}
.rlz-related h2 {
    margin-bottom: 40px;
    color: var(--text-dark);
}
.rlz-related .rlz-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== LIGHTBOX ===== */
.rlz-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.rlz-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.rlz-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}
.rlz-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rlz-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
.rlz-lightbox-close svg {
    width: 24px;
    height: 24px;
}
.rlz-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rlz-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
.rlz-lightbox-nav svg {
    width: 24px;
    height: 24px;
}
.rlz-lightbox-prev {
    left: 24px;
}
.rlz-lightbox-next {
    right: 24px;
}
.rlz-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .rlz-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rlz-single-hero {
        padding: 128px 0 88px;
    }
    .rlz-showcase-grid {
        grid-template-columns: 1fr;
    }
    .rlz-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .rlz-related .rlz-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rlz-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .rlz-card-img {
        height: 180px;
    }

    .rlz-stats {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }
    .rlz-stat-divider {
        width: 40px;
        height: 1px;
    }

    .rlz-filters {
        gap: 8px;
    }
    .rlz-filter-btn {
        padding: 6px 16px;
        font-size: 0.8125rem;
    }

    .rlz-single-hero {
        padding: 100px 0 72px;
    }
    .rlz-single-hero h1 {
        font-size: 1.5rem;
    }
    .rlz-hero-meta {
        gap: 12px;
    }
    .rlz-hero-detail {
        font-size: 0.8125rem;
    }

    .rlz-showcase-grid {
        gap: 24px;
    }
    .rlz-thumb {
        width: 72px;
        height: 52px;
        min-width: 72px;
    }
    .rlz-gallery-thumbs {
        gap: 6px;
    }
    .rlz-gallery-main {
        aspect-ratio: 4/3;
    }

    .rlz-intro-card,
    .rlz-info-card,
    .rlz-cta-card {
        padding: 22px;
    }
    .rlz-sidebar {
        grid-template-columns: 1fr;
    }

    .rlz-related {
        padding: 64px 0;
    }
    .rlz-related .rlz-grid {
        grid-template-columns: 1fr;
    }

    .rlz-lightbox-nav {
        display: none;
    }
}
