#strona-glowna {
    width: 100%;
    padding-top: calc(var(--header-height) + 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
    margin: 40px auto 80px auto;
}

#project-content {
    width: 100%;
    margin: 40px auto 80px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
}

.project-hero {
    text-align: center;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}


.project-hero h1 {
    width: 92%;
    max-width: 1080px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 2.2rem;
    color: var(--st-text-color, #222);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    margin-top: 28px;
}

.project-hero h1 div {
    flex: 1;
    height: 3px;
    background-color: var(--rufio-meble-color, #ba8c49);
}

/* Sekcja zdjęcia głównego w rzeczywistym rozmiarze */
.project-main-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius, 8px);
}

.project-main-image img {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: filter 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-main-image img:hover {
    filter: brightness(0.95);
}

.project-gallery {
    margin-top: 20px;
}

.project-gallery h2 {
    text-align: center;
    font-size: 1.6rem;
    color: var(--st-text-color, #222);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
    background: #f9f9f9;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.3s ease;
}

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

.back-btn-container {
    text-align: center;
    margin-top: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: var(--header, #222);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    background-color: var(--rufio-meble-color, #ba8c49);
    transform: translateY(-2px);
}

/* --- LIGHTBOX MODAL (PODGLĄD ZDJĘĆ) --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius, 8px);
    object-fit: contain;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    user-select: none;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 100000;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--rufio-meble-color, #ba8c49);
    transform: scale(1.15);
}

@media (max-width: 768px) {
    #welcome-container h1,
    #card-container > h1,
    #accesories-container h1,
    #gallery-container > h1,
    .project-hero h1 {
        font-size: 1.5rem;
        gap: 10px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
}