@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');

:root {
    --accent: #e74d4e;
    --accent-hover: #c8393a;
}

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

html {
    scroll-behavior: smooth;
    background: #262626;
}

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

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

#text {
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
}

#navbar-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

#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;
    flex: 1;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 40px 20px;
    min-height: calc(100vh - 68px);
}

#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, #hero-buttons a 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 / karty treści */
#about-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    color: white;
    min-height: 100vh;
}

.about-section-alt {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 80px;
    color: white;
}

.about-content {
    max-width: 900px;
    width: 100%;
    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;
}

.about-content form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.about-content label {
    font-weight: 500;
}

.about-content input[type="text"] {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 16px;
}

.about-content .errorlist {
    list-style: none;
    color: #ff8a8a;
    font-size: 0.9rem;
}

.messages {
    list-style: none;
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.messages li {
    background-color: rgba(30, 30, 30, 0.85);
    color: white;
    padding: 12px 44px 12px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.messages li.message-hide {
    opacity: 0;
    transform: translateY(-8px);
}

.message-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
}

.message-close:hover {
    opacity: 1;
    color: var(--accent);
}

.message-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Strony proste (login, formularz, komunikaty) */
#content {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 40px 20px 20px 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(20, 20, 20, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: auto;
    max-width: 80%;
}

#content button:hover {
    background-color: rgba(20, 20, 20, 0.75);
    transform: translateY(-2px);
}

#content button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Harmonogram */
.schedule-entries {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.schedule-entry {
    background-color: rgba(30, 30, 30, 0.8);
    border: solid 2px rgba(70, 70, 70, 0.8);
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.schedule-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.schedule-entry-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.schedule-entry-expiry {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.schedule-entry-content {
    line-height: 1.7;
}

.schedule-entry-content > *:first-child {
    margin-top: 0;
}

.schedule-entry-content > *:last-child {
    margin-bottom: 0;
}

.schedule-entry-content a {
    color: #9ecbff;
}

.schedule-entry-content code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
}

.schedule-entry-content pre code {
    display: block;
    padding: 10px;
    overflow-x: auto;
}

.schedule-entry-attachment {
    display: inline-block;
    margin-top: 12px;
    color: #9ecbff;
}

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

/* Stopka */
footer {
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

footer p {
    margin: 0;
    font-size: 12px;
    font-weight: 300;
}

/* Responsywność */
@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 h1 {
        font-size: 2.2rem;
    }

    #hero-buttons button {
        padding: 11px 25px;
        font-size: 15px;
    }

    .about-content {
        padding: 40px 30px;
    }

    .about-content h2 {
        font-size: 2rem;
    }

    .about-content p {
        font-size: 1.05rem;
    }

    #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 {
        padding: 30px 15px;
    }

    #hero-section h1 {
        font-size: 1.9rem;
        margin-bottom: 20px;
    }

    #hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    #hero-buttons button {
        padding: 12px 24px;
        font-size: 15px;
        width: 90%;
        max-width: 300px;
        min-width: 200px;
    }

    #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;
    }

    #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 h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    #hero-buttons button {
        padding: 12px 20px;
        font-size: 14px;
        width: 95%;
        min-width: unset;
    }

    .about-content {
        padding: 25px 15px;
    }

    .about-content h2 {
        font-size: 1.5rem;
    }

    .about-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media screen and (max-width: 480px) {
    body {
        background-attachment: scroll;
    }
}
