
html {
    overflow-x: hidden;
    scroll-behavior: auto; /* Disable native smooth scroll */
}

html {
    overflow-x: hidden;
    overscroll-behavior: contain;
    scroll-behavior: auto; /* Disable native smooth scroll */
}

section {
    scroll-margin-top: 150px;
}

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

html {
    overflow-x: hidden;
    overscroll-behavior: contain;
}

section {
    scroll-margin-top: 150px;
}

html {
    scroll-behavior: auto; /* Disable native smooth scroll */
    overflow-x: hidden;
}

section {
    scroll-margin-top: 150px;
}


.gallerybody {
    background: #000; /* Fallback */
    color: white;
    font-family: Helvetica, sans-serif;
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 64px;
    overflow-x: hidden;
    position: relative;
}

.gallerybody::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #3DA35D, #92DCE5, #380c38, #8E5572);
    opacity: 0.15;
    z-index: -1;
    animation: disco 60s linear infinite;
    will-change: transform;
}


/* Animation classes */
.fade-in {
    opacity: 1 !important; /* Force visibility */
    transform: translateY(20px); /* Reset initial position */
    will-change: transform, opacity;
    transition: none; /* Remove initial transition */
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.staggered {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.4s ease-in-out;
}

.nav-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .staggered {
        transition: none;
    }
}

h1 {
    font-size:96px;
    text-align: center;
    margin:100px;
}

/* Gallery header styles */
.galleryheader {
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    justify-content: center;
    opacity: 1 !important;
    position: relative;
    z-index: -4; /* Behind content */
    transform: translateZ(0); /* Force hardware acceleration */
}

.galleryheader img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform-origin: center bottom;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    will-change: transform, opacity;
    transition: none !important; /* Force no transitions */
}

.galleryheader img {
    transition: transform 0.2s linear;
    will-change: transform;
    contain: paint;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.galleryheader img:hover {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .galleryheader {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .galleryheader img {
        height: 250px;
    }
}

.gallery {
    background: linear-gradient(60deg,rgba(255,255,255,0.1),rgba(255,255,255,0.3));
    display:flex;
    flex-wrap:wrap;
    justify-content: space-evenly;
    list-style-type: none;
    border-radius: 100px;
}

.thumbnail {

    /* cursor:pointer; */
    margin:32px;
    max-height: 200px;
    max-width: 300px;
    transform:scale(1);
    transition: transform 0.5s;
    
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dodatkowe tło, jeśli jest potrzebne */
    z-index: 99999; /* Upewnij się, że preloader jest nad wszystkimi elementami */
    display: flex;
    justify-content: center;
    align-items: center;
}


.thumbnail:hover{
    transform: scale(1.1);
}

.thumbnail img {
    height: 100%;
    object-fit: cover;
    width: 100%;
    border-radius: 50px;
    border: solid 3px white;
    box-shadow: 0 0 20px 1px;
    transform: translateZ(0);
    backface-visibility: hidden;
    aspect-ratio: 1;
    contain: content;
    will-change: transform;
}

.popup {
    align-content: center;
    animation: fadeIn 0.8s;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    justify-content: center;
    height: 100vh;
    left:0;
    position: fixed;
    top: 0;
    width: 100vw;
    transform: translateZ(0);
    contain: strict;
    will-change: transform, opacity;
    isolation: isolate;
}

.popup.hidden {
    display: none;
}

.popup.fade-out {
    animation:fadeOut 0.8s both;
}

.popup__img {
    max-height: 80%;
    max-width: 80%;
    border-radius: 80px;
    top: 10%;
    position: relative;
}

.popup__close {
    background-color: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 64px;
    position: absolute;
    right: 28px;
    margin: 20px;
}

.popup__arrow {
    width: 20px;
    height: auto;
    background-color: transparent;
    cursor: pointer;
}

.popup__close {
    scale: 1;
    top: 22%;
}

.popup__arrow {
    opacity: 0.5;
    transition: opacity 0.3s;
    scale:2;
    border:none;
}

/* Title animation styles */
.split-title {
    position: relative;
    overflow: hidden;
    font-size: 0; /* Remove whitespace between inline elements */
}

#lulek, #orkiestra {
    display: inline-block;
    opacity: 0;
    transition: all 3s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 24px; /* Restore original font size */
}

#lulek {
    transform: translateX(-100%);
}

#orkiestra {
    transform: translateX(100%);
}

.title-visible #lulek,
.title-visible #orkiestra {
    opacity: 1;
    transform: translateX(0);
}

.popup__arrow:hover {
    opacity: 1;
}

.popup__arrow--left {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.popup__arrow--right {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

/* Dropdown menu styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 100;
    padding: 10px 0;
    border-radius: 4px;
}

.dropdown-content li {
    margin: 5px 0;
}

.dropdown-content a {
    padding: 10px 20px;
    white-space: nowrap;
}

/* Click-based dropdown behavior */
.dropdown.open .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Mobile-specific positioning */
@media (max-width: 768px) {
    .dropdown-content {
        left: 20px;
        transform: none;
        width: calc(100% - 40px);
    }
}

.dropdown.no-hover .dropdown-content {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
    }
    
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    .dropdown.open .dropdown-content {
        display: block;
    }
}

.hidden {
    display: none;
}



@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity:1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity:0;
    }
}
@media (max-width: 768px) {
    .gradient-background {
        animation: gradient 30s ease infinite;
    }
}

/* Preloader styles moved from index.html */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader img {
    width: 200px;
    height: 200px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-background {
    background: linear-gradient(270deg, #ff0000, #0000ff);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Preloader styles */
#animationWindow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    transition: opacity 1s ease;
}

.no-js #animationWindow {
    display: none;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
