/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --accent-color: #888;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --font-primary: 'Roboto', sans-serif;
}

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

/* =========================================
   2. BASE STYLES
   ========================================= */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: #ccc;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
    transition: background 0.3s, padding 0.3s;
}

.nav-left a {
    margin-right: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-center {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-transform: uppercase;
}

.nav-right i {
    margin-left: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-right i:hover {
    transform: translateY(-2px);
}

/* =========================================
   4. HERO SECTION (INDEX)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 50px 20px;
    background-color: var(--bg-color);
    position: relative;
}

.hero-split {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    z-index: 2;
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-profile-img {
    width: 280px;
    height: 350px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.hero-profile-img:hover {
    filter: grayscale(0%);
}

.hero-bio-text {
    font-size: 1rem;
    color: #bbb;
    line-height: 1.6;
    max-width: 300px;
}

.hero-right {
    flex: 1;
    text-align: left;
}

.hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 799px;
    z-index: 2;
}

.hero h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -3px;
    opacity: 0;
    animation: slideInRight 1.2s ease forwards 0.2s;
}

.hero p.subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: slideInRight 1.2s ease forwards 0.5s;
}

.scroll-down {
    position: absolute;
    bottom: 50px;
    font-size: 24px;
    opacity: 0.7;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 2;
}

/* =========================================
   5. GALLERY (INDEX)
   ========================================= */
.gallery {
    display: grid;
    /* This line controls the number of columns and their size.
       - repeat(3, 1fr) creates 3 columns of equal width.
       - Change '3' to '4' for even smaller albums (4 columns). */
    grid-template-columns: repeat(3, 1fr);

    /* This controls the space between the albums.
       - Adjust '30px' to your liking (e.g., '20px' for less space). */
    gap: 30px;

    /* Ensures the gallery doesn't get too wide on very large screens */
    max-width: 1200px;
    /* Centers the gallery horizontally on the page */
    margin: 0 auto;
}

/* --- RESPONSIVENESS (Optional but Recommended) --- */
/* These rules ensure your gallery still looks good on smaller devices */

/* On tablets, switch to 2 columns */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* On phones, switch to 1 column */
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 20px; /* Smaller gap for smaller screens */
    }
}

.gallery-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 600px; 
    object-fit: cover; 
    object-position: center; 
    display: block;
    transition: transform 0.7s ease, opacity 0.5s ease;
    opacity: 0.9;
    content-visibility: auto;
    will-change: transform;
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.caption-box {
    background-color: #181818;
    padding: 50px 20px;
    text-align: center;
    color: white;
    flex-grow: 1; 
    border-top: 1px solid #222;
}

.caption-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.caption-year {
    font-size: 0.9rem;
    color: #666;
    font-family: monospace;
}

/* =========================================
   6. PROJECT PAGES (SUBPAGES)
   ========================================= */
.project-header {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
    margin-bottom: 40px;
}

.project-header h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    font-weight: 300;
}

.masonry-gallery {
    column-count: 3; 
    column-gap: 15px;
    padding: 0 40px 60px 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    border-radius: 2px;
    display: block;
    line-height: 0;
    overflow: hidden;
    min-height: 300px; /* Rezerwuje miejsce przed załadowaniem zdjęcia */
    background-color: #1a1a1a; /* Placeholder tła */
}

.masonry-item img {
    width: 100%;    
    height: auto;     
    display: block;   
    border-radius: 0;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
    transform: scale(1);
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s; 
    will-change: transform;
    content-visibility: auto;
    cursor: zoom-in;
}

.masonry-item img:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.watermark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px !important; /* Force width */
    height: auto !important;
    opacity: 0.7;
    pointer-events: none;
    z-index: 10;
    transform: none !important; /* Disable parallax/hover transform for watermark */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.see-more-container {
    text-align: center;
    padding: 60px 20px 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.see-more-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 40px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.related-albums {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.related-albums .gallery-container {
    flex: 0 1 calc(50% - 20px);
    min-width: 300px;
    max-width: 500px;
}

.see-more-btn {
    display: inline-block;
    padding: 15px 35px;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    background: transparent;
}

.see-more-btn:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

/* =========================================
   7. CONTACT PAGE
   ========================================= */
.contact-wrapper {
    padding-top: 150px; 
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.contact-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.contact-form {
    width: 100%;
    max-width: 600px; 
    padding: 0 20px;
}

.form-group { margin-bottom: 30px; }

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #888;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: #1a1a1a; 
    border: 1px solid #333; 
    padding: 15px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none; 
    transition: all 0.3s;
    border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #fff; 
    background-color: #222;
}

.submit-btn {
    background: white;
    color: black;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase; 
    padding: 15px 40px;
    transition: all 0.3s;
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 20px;
}

.submit-btn:hover {
    background: #ccc;
}

/* =========================================
   8. COMPONENTS (LIGHTBOX & FOOTER)
   ========================================= */
/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.close:hover { color: #bbb; }

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0,0,0,0.0);
}

.next { right: -60px; }
.prev { left: -60px; }

.prev:hover, .next:hover {
    color: rgba(255,255,255,0.7);
    transform: scale(1.1);
}

/* FOOTER */
footer {
    background-color: #0d0d0d;
    padding: 20px 40px;
    border-top: 1px solid #222;
    margin-top: auto;
    position: relative; 
}

.footer-content {
    display: flex;
    justify-content: center; 
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    height: 40px; 
}

.footer-content p {
    color: #555;
    font-size: 0.8rem;
    margin: 0;
    text-align: center;
    position: absolute; 
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
}

.footer-socials {
    display: flex;
    gap: 15px;
    position: absolute; 
    right: 0;
}

.footer-socials a {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
    transition: color 0.3s, transform 0.3s;
}

.footer-socials a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   9. ANIMATIONS
   ========================================= */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}



/* =========================================
   10. MEDIA QUERIES (RWD)
   ========================================= */
@media (max-width: 1024px) {
    .masonry-gallery { column-count: 2; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .gallery { grid-template-columns: 1fr; }
    
    .nav-center { 
        display: block; 
        font-size: 14px; 
        position: static; 
        transform: none; 
        margin: 0 10px;
    }
    
    nav {
        justify-content: space-between;
        padding: 15px 20px;
    }

    .nav-left a {
        font-size: 11px;
        margin-right: 10px;
    }

    /* POPRAWKA HERO NA MOBILE */
    .hero-split {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .hero-right {
        text-align: center;
    }

    /* POPRAWKA LIGHTBOX NA MOBILE */
    .prev { left: 10px; }
    .next { right: 10px; }
    
    .masonry-gallery { column-count: 1; padding: 0 20px 40px 20px; }
    .hero h1 { font-size: 2.5rem; }
    .lightbox-content img { max-width: 100%; height: auto; }

    /* FOOTER RWD */
    .footer-content {
        flex-direction: column-reverse;
        height: auto;
        gap: 15px;
    }
    
    .footer-content p {
        position: static;
        transform: none;
    }

    .footer-socials {
        position: static;
    }
}