@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://static.infotech.szewczuk.io/szachy/tlo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #262626;
    color: white;
    padding: 20px 30px;
    width: 100%;
    position: relative;
}

#text {
    font-size: 20px;
    font-weight: 500;
}

#linki {
    display: flex;
    gap: 20px;
}

#menu-icon {
    display: none;
    cursor: pointer;
    font-size: 24px;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(50, 50, 50, 0.5);
    z-index: 100;
    position: relative;
    transition: all 0.3s ease-in-out;
}

#menu-icon span, #menu-icon:before, #menu-icon:after {
    transition: all 0.3s ease-in-out;
}

#menu-icon.active span {
    opacity: 0;
}

#menu-icon:before, #menu-icon:after {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 24px;
    height: 2px;
    background-color: white;
    transform: translateY(-50%);
}

#menu-icon:before {
    transform: translateY(-8px);
}

#menu-icon:after {
    transform: translateY(6px);
}

#menu-icon.active:before {
    transform: rotate(45deg);
}

#menu-icon.active:after {
    transform: rotate(-45deg);
}

#linki a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

#linki a:hover {
    color: #dddddd;
}

/* Sekcja Hero - strona główna */
#hero-section {
    display: flex;
    min-height: calc(100vh - 68px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 40px 20px;
}

#hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

#hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#hero-buttons button {
    padding: 12px 30px;
    background-color: rgba(30, 30, 30, 0.7);
    border: 0;
    border-radius: 10px;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, backdrop-filter 0.3s, transform 0.2s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-weight: 500;
}

#hero-buttons button:hover {
    background-color: rgba(23, 23, 23, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateY(-2px);
}

/* Sekcja O lidze */
#about-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    color: white;
}

.about-content {
    max-width: 900px;
    background-color: rgba(30, 30, 30, 0.85);
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.about-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 25px;
    text-align: justify;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Starsze style dla innych podstron */
#content {
    display: flex;
    min-height: 80vh;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 20px;
}

#content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

#content p {
    font-size: 1.2rem;
}

#content a {
    color: white;
}

#content a:hover {
    color: rgb(190, 190, 190);
}

#content button {
    margin: 10px auto;
    padding: 15px 30px;
    background-color: rgba(30, 30, 30, 0.7);
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, backdrop-filter 0.3s;
    width: auto;
    max-width: 80%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#content button:hover {
    background-color: rgba(23, 23, 23, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Media queries dla responsywności */
@media screen and (max-width: 768px) {
    #navbar {
        padding: 15px;
    }
    
    #text {
        font-size: 22px;
    }
    
    #menu-icon {
        display: block;
    }
    
    #linki {
        position: absolute;
        flex-direction: column;
        background-color: #262626;
        width: 100%;
        left: 0;
        top: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        z-index: 99;
        opacity: 0;
        transform: translateY(-20px);
        transition: max-height 0.5s cubic-bezier(0.19, 1, 0.22, 1),
                    opacity 0.4s ease,
                    transform 0.4s ease,
                    padding 0.4s ease,
                    box-shadow 0.4s ease;
        pointer-events: none;
    }
    
    #linki.active {
        max-height: 300px;
        padding: 15px 0;
        opacity: 1;
        transform: translateY(0);
        box-shadow: 0 8px 15px rgba(0,0,0,0.3);
        pointer-events: all;
    }
    
    #linki a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    #linki a:last-child {
        border-bottom: none;
    }
    
    /* Hero section - tablet */
    #hero-section h1 {
        font-size: 2.2rem;
    }
    
    #hero-buttons button {
        padding: 11px 25px;
        font-size: 15px;
    }
    
    /* About section - tablet */
    .about-content {
        padding: 40px 30px;
    }
    
    .about-content h2 {
        font-size: 2rem;
    }
    
    .about-content p {
        font-size: 1.05rem;
    }
    
    /* Starsze style */
    #content h1 {
        font-size: 2.2rem;
    }
    
}

@media screen and (max-width: 576px) {
    #navbar {
        padding: 12px 10px;
    }
    
    #linki {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }
    
    #linki a {
        font-size: 16px;
        padding: 5px 10px;
        background-color: rgba(50, 50, 50, 0.5);
        border-radius: 5px;
        transition: background-color 0.3s, color 0.3s;
    }
    
    #linki a:hover, #linki a:active {
        background-color: rgba(80, 80, 80, 0.7);
    }
    
    /* Hero section - mobile */
    #hero-section {
        padding: 30px 15px;
    }
    
    #hero-section h1 {
        font-size: 1.9rem;
        margin-bottom: 20px;
    }
    
    #hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    #hero-buttons button {
        padding: 11px 22px;
        font-size: 15px;
        width: 100%;
        max-width: 280px;
    }
    
    /* About section - mobile */
    #about-section {
        padding: 60px 15px;
        min-height: auto;
    }
    
    .about-content {
        padding: 30px 20px;
    }
    
    .about-content h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .about-content p {
        font-size: 1rem;
        text-align: left;
        margin-bottom: 20px;
    }
    
    /* Starsze style */
    #content h1 {
        font-size: 1.8rem;
    }
    
    #content button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media screen and (max-width: 380px) {
    #linki {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    #linki a {
        width: 80%;
        text-align: center;
        padding: 8px 0;
    }
    
    /* Hero section - bardzo małe ekrany */
    #hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    #hero-buttons button {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* About section - bardzo małe ekrany */
    .about-content {
        padding: 25px 15px;
    }
    
    .about-content h2 {
        font-size: 1.5rem;
    }
    
    .about-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

::selection {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}


#staff {
    display: flex;
    margin-top: 20px;
    gap: 20px;
}

#card {
    background-color: rgba(30, 30, 30, 0.8);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);

    img {
        width: 200px;
        border-radius: 20px;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
  #staff {
    flex-direction: column;
  }
}

#buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

#photos-buttons {
    display: flex;
    flex-direction: column;
}

table {
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    border: solid 2px rgba(70, 70, 70, 0.8);
    border-radius: 15px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
}

th {
    background-color: rgba(50, 50, 50, 0.9);
    color: #fff;
    font-weight: bold;
    padding: 12px 15px;
    text-align: center;
    border-bottom: 2px solid rgba(100, 100, 100, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(80, 80, 80, 0.5);
    text-align: center;
    transition: background-color 0.3s ease;
}

tr:last-child td {
    border-bottom: none;
}


tr:hover td {
    background-color: rgba(60, 60, 60, 0.7);
}

/* Galeria zdjęć - widok pełnoekranowy */
.fullscreen-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: calc(100% - 120px);
    max-height: calc(100% - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Usunięto transition - powodował lag przy zmianie orientacji */
}

/* Responsywne skalowanie obrazów */
@media (orientation: portrait) {
    .gallery-image {
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 140px);
    }
}

@media (orientation: landscape) {
    .gallery-image {
        max-width: calc(100vw - 120px);
        max-height: calc(100vh - 100px);
    }
}

.gallery-nav {
    position: absolute;
    background-color: rgba(50, 50, 50, 0.9);
    border: 1px solid rgba(100, 100, 100, 0.3);
    color: white;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    user-select: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    background-color: rgba(70, 70, 70, 0.95);
    border-color: rgba(150, 150, 150, 0.5);
    /* Usunięto transform: scale - powodował przesuwanie przycisków */
}

.gallery-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background-color: rgba(50, 50, 50, 0.9);
    border: 1px solid rgba(100, 100, 100, 0.3);
    color: white;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-close:hover {
    background-color: rgba(70, 70, 70, 0.95);
    border-color: rgba(150, 150, 150, 0.5);
    /* Usunięto transform: scale - powodował przesuwanie przycisku */
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 16px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Ukryj nagłówek z nazwą turnieju */
.gallery-title {
    display: none;
}

/* Miniaturki galerii (ukryte domyślnie) */
.photo-gallery {
    display: none;
}

.photo-item {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: scale(1.02);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 28px;
}

.lightbox-prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.photo-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Responsywność dla galerii pełnoekranowej */
@media screen and (max-width: 768px) {
    .fullscreen-gallery {
        padding: 10px;
    }
    
    .gallery-image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 120px);
    }
    
    .gallery-nav {
        font-size: 20px;
        padding: 12px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .gallery-counter {
        bottom: 10px;
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    .fullscreen-gallery {
        padding: 5px;
    }
    
    .gallery-image {
        max-width: calc(100vw - 10px);
        max-height: calc(100vh - 100px);
    }
    
    .gallery-nav {
        font-size: 18px;
        padding: 10px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-prev {
        left: 5px;
    }
    
    .gallery-next {
        right: 5px;
    }
    
    .gallery-close {
        font-size: 20px;
        top: 5px;
        right: 5px;
        padding: 8px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-counter {
        bottom: 5px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    /* Naprawienie tła na mobilnych */
    body {
        background-attachment: scroll;
    }
}

/* Specjalne ustawienia dla bardzo małych ekranów */
@media screen and (max-width: 320px) {
    .gallery-counter {
        font-size: 11px;
        padding: 4px 8px;
    }
}

