/* 1. Ustawienia ogólne i płynne przewijanie */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    /* Tutaj wybierz jedną z opcji poniżej: */
    font-family: 'Lato', sans-serif; /* Opcja 1 */
    /* font-family: 'Montserrat', sans-serif; -- Opcja 2 */
    /* font-family: 'Playfair Display', serif; -- Opcja 3 */
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* 2. Nagłówek i Nawigacja */
header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 30px 50px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

header h1 {
    font-family: 'Montserrat', sans-serif; /* Nagłówek może mieć inną czcionkę niż reszta */
    font-size: 26px;
    letter-spacing: 5px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 30px;
    transition: 0.3s;
}

/* Styl dla nagłówka h2 nad galerią */
h2 {
    text-align: center;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 50px; /* Odstęp od nagłówka strony */
    margin-bottom: -40px; /* Ujemny margines przybliża go do galerii */
    position: relative;
    z-index: 10;
    clear: both;
}
.hero-container {
    display: flex;
    align-items: flex-start; /* Zmiana z center na flex-start, by tekst startował od góry */
    justify-content: space-between;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 50px;
}

.bio-content {
    flex: 1.2; /* Dajemy nieco więcej miejsca na tekst */
    text-align: left;
}

/* Stylizacja imienia i nazwiska */
.bio-content h2 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.bio-subtitle {
    font-style: italic;
    color: #555;
    display: block;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.bio-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.bio-image {
    flex: 1;
    text-align: right;
    position: sticky; /* Zdjęcie będzie podążać za tekstem przy przewijaniu */
    top: 20px;
}

.bio-image img {
    max-width: 100%;
    height: auto;
    box-shadow: 15px 15px 40px rgba(0,0,0,0.1);
    display: block;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn-enter {
    padding: 12px 30px;
    border: 1px solid #1a1a1a;
    background: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-enter:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Poprawka dla urządzeń mobilnych */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        margin-top: 20px;
    }
    .bio-image {
        order: -1; /* Zdjęcie nad tekstem na komórkach */
        text-align: center;
        margin-bottom: 30px;
    }
    .bio-content h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    .bio-subtitle { text-align: center; }
    .cta-buttons { justify-content: center; }
}

.creative-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 25px;
    color: #1a1a1a;
}
.creative-header {
    text-align: center;
    margin-bottom: 50px;
}

.creative-header h1 {
    font-size: 2.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.creative-section {
    margin-bottom: 60px;
    line-height: 1.8;
    text-align: justify;
}

.creative-section h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: #333;
}

.creative-section p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Akcenty dla ważnych fragmentów */
.highlight-text {
    font-style: italic;
    color: #555;
    border-left: 3px solid #1a1a1a;
    padding-left: 20px;
    margin: 30px 0;
}

/* Responsywność */
@media (max-width: 768px) {
    .creative-header h1 { font-size: 2rem; }
    .creative-section { text-align: left; }
}
.exhibitions-container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.exhibitions-header {
    text-align: center;
    margin-bottom: 60px;
}

.exhibitions-header h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.exhibitions-section {
    margin-bottom: 80px;
}

.exhibitions-section h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.exhibition-row {
    display: flex;
    margin-bottom: 15px;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.exhibition-year {
    flex: 0 0 100px;
    font-weight: bold;
    color: #1a1a1a;
}

.exhibition-details {
    flex: 1;
    padding-left: 20px;
}

.exhibition-details span {
    display: block;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .exhibition-row { flex-direction: column; }
    .exhibition-year { margin-bottom: 5px; }
    .exhibition-details { padding-left: 0; }
}
/* HAMBURGER DESIGN */
.hamburger {
    display: none; /* Ukryty na komputerze */
    width: 30px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2100; /* Wyżej niż menu overlay */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    background: #000;
    transition: 0.3s ease-in-out;
    transform-origin: center;
}

/* ANIMACJA W X */
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* MENU NA KOMPUTER */
nav ul { 
    display: flex; 
    list-style: none; 
    gap: 30px; 
    padding: 0;
    margin: 0;
}

nav a { 
    text-decoration: none; 
    color: #000; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1px;
}

/* 3. MOBILNE MENU (Gdy szerokość ekranu < 768px) */
@media (max-width: 768px) {
    header {
        flex-direction: row; /* Układ poziomy: Hamburger - Logo */
        justify-content: flex-start; 
        gap: 20px;
        padding: 20px;
    }

    header h1 {
        margin-bottom: 0;
        font-size: 18px;
        letter-spacing: 2px;
        flex-grow: 1; /* Pozwala logu zająć resztę miejsca, ale trzyma hamburgera po lewej */
    }

    .hamburger {
        display: flex;
        order: -1; /* Wymusza hamburgera na sam początek (lewa strona) */
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        display: none; /* Domyślnie schowane */
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    nav.active {
        display: flex; /* Pokazuje menu po kliknięciu */
    }

    nav ul {
        flex-direction: column; /* Linki jeden pod drugim */
        align-items: center;
        gap: 40px;
    }

    nav a {
        font-size: 2rem;
        letter-spacing: 3px;
    }
}

/* 4. Siatka Galerii */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    padding: 80px 50px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 5. Elementy galerii i animacja wejścia */
.gallery-item {
    overflow: hidden;
    opacity: 0;
    animation: revealIn 1s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item img:hover {
    transform: scale(1.03);
    opacity: 0.85;
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Opóźnienia animacji */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }

/* 6. Dodatkowa responsywność dla galerii */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr; /* Jedna kolumna na telefonie */
        padding: 40px 20px;
    }
}

/* 7. Styl Lightbox (Powiększenie) */
.lightbox {
    display: none; /* Domyślnie ukryte */
    position: fixed;
    z-index: 3000; /* Wyżej niż wszystko inne */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Jasne tło w stylu galerii */
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: zoomIn 0.3s ease;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #000;
    cursor: pointer;
}

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

/* Zmiana kursora nad obrazkami w galerii */
.gallery-item img {
    cursor: zoom-in;
}

/* Kontener grupujący obraz i przyciski */
.lightbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Zwiększamy nieco max-width, aby zrobić miejsce na strzałki po bokach */
    max-width: 80%; 
    max-height: 85vh;
}

.lightbox-content {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Ustawienie strzałek PRZY obrazie (na zewnątrz) */
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none; /* Usuwamy tło, bo są teraz na białym tle strony */
    border: none;
    color: #000;
    font-size: 40px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 3100;
}

/* Wypchnięcie strzałek poza krawędź obrazu */
.lightbox-prev {
    left: -60px; /* Przesunięcie w lewo poza obraz */
}

.lightbox-next {
    right: -60px; /* Przesunięcie w prawo poza obraz */
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: #999;
    transform: translateY(-50%) scale(1.2);
}

/* Styl dla galerii zdjęć - 2 kolumny na telefonach */
@media (max-width: 600px) {
    .gallery {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Dwie kolumny */
        gap: 10px !important;
        padding: 10px !important;
    }

    .gallery-item img {
        width: 100% !important;
        height: 150px !important; /* Stała wysokość, żeby kafelki były równe */
        object-fit: cover !important; /* Przycina zdjęcie do ramki zamiast je zgniatać */
    }
    
    /* Ukrywamy przyciski "Zobacz więcej" wewnątrz siatki, jeśli psują układ */
    .gallery .btn-enter {
        grid-column: span 2; /* Przycisk zajmie całą szerokość pod dwoma zdjęciami */
    }
    header {
        position: relative !important; /* Zamiana z sticky na relative */
        top: auto !important;         /* Resetowanie pozycji top */
        padding: 20px 15px;           /* Opcjonalnie: mniejszy padding na telefonach */
    }
    h2 {
        font-size: 1.5rem;
        margin-top: 40px;
        margin-bottom: 20px;
    }
    .creative-header {
        display: flex;
        flex-direction: column; /* Wymusza ustawienie elementów jeden pod drugim */
        align-items: center;    /* Centruje tekst */
        text-align: center;
        margin-bottom: 40px;
    }

    .creative-header h1 {
        margin-bottom: 10px;    /* Odstęp między H1 a opisem pod spodem */
    }

    .creative-header p {
        margin: 0;             /* Resetuje ewentualne boczne marginesy */
    }
    .btn-enter {
        padding: 10px 20px;    /* Mniejszy margines wewnętrzny - przycisk będzie węższy i niższy */
        font-size: 14px;       /* Nieco mniejszy tekst */
        width: auto;           /* Przycisk dopasuje się do szerokości tekstu */
        margin-top: 20px;      /* Mniejszy odstęp od zdjęć */
        letter-spacing: 1px;   /* Mniejszy rozstaw liter dla lepszej czytelności */
    }
    /* Ustawiamy kontener w pionie */
    .hero-container {
        flex-direction: column;
        display: block; /* Zmiana z flex na block pomaga przy przewijaniu */
    }

    .bio-image {
        position: relative !important; /* Wyłączamy sticky/fixed */
        top: 0 !important;
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
        order: -1; /* Zdjęcie ląduje nad tekstem */
    }

    .bio-image img {
        max-width: 100%;
        height: auto;
        position: static !important; /* Gwarantuje, że zdjęcie nie "pływa" */
    }

    .bio-content {
        position: relative;
        z-index: 1; /* Tekst będzie pod zdjęciem, nie pod spodem obrazka */
    }
}