:root {
    --header-bg: #F2F2F2;
    --sidebar-bg: #F2F2F5;
    --stickmenu-bg: white;
    --border-color: #E0E0E0;
    --stickmenu-txt-color: black;
    --article-bg: #fffdfe;
    --article-txt-color: #EDEDEF;
    --heading-color: black;
    --darker-border-color: #C6C6C6;
    --border-outline-color: white;
    --header-height: 45px;
    --sidebar-width: 300px;
    --font-head: "Flavors", cursive;
    --font-main: "Syne Mono", monospace;
    --font-article: "VT323", monospace;
    --font-foot: "Emilys Candy", serif;
    --font-card: "Emilys Candy", serif;
    --transition: all 0.25s ease;

    --head-bgi: url(../assets/tla/headbgi.JPG);
    --article-bgi: url(../assets/tla/article21.JPG);
    --aboutcard-bgi: url(../assets/tla/article21.JPG);
    --footer-bgi: url(../assets/tla/footer.png);

    --bg-manifesto: url(../assets/tla/backgroundmain3.jpg);
    --bg-onas: url(../assets/tla/onasbgi.png);
    --bg-aktualnosci: url(../assets/tla/aktualnoscibgi.jpg);
    --bg-archiwum: url(../assets/tla/aktualnoscibgi.jpg);

    --container-bg: var(--bg-manifesto);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

p {
    padding: 0;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

h1 {
    font-family: "Castoro Titling";
    font-size: 1.8rem;
    margin-top: 0;
    text-align: center;
    width: 100%;
}

.container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 920px) var(--sidebar-width);
    justify-content: center; 
    grid-template-rows: var(--header-height) 1fr auto;
    grid-template-areas:
    "header header header"
    "xx main yy"
    "footer footer footer";
    background-image: var(--container-bg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.main {
    grid-area: main;
    color: black;
    width: 100%;
    padding: 6em 3rem;
    font-family: var(--font-main);
}

article {
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid var(--darker-border-color);
    outline: 1px solid var(--border-outline-color);
    font-family: var(--font-article);
    text-align: justify;
    font-size: larger;
    background-image: var(--article-bgi);
    opacity: 0.8; 
    z-index: 1; 
    width: 100%;
}

#content-article h1 {
    text-align: center;
    font-family: "Rubik Glitch", system-ui;
    width: 100%;
}

.card-data {
    display: none;
}

.header, 
.edycje-pasek {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    background: var(--head-bgi);
    border: 2px solid var(--darker-border-color);
    border-left: none;
    border-right: none;
    font-family: var(--font-head);
    font-size: x-large;
    padding: 0 1rem;
    width: 100%;
}

.header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
}

.header a, 
.edycje-pasek a {
    display: inline-block;
    border-radius: 4px;
    color: black;
    background-color: transparent; 
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 15px;
}

.header a:hover, 
.edycje-pasek a:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(0.95);
    cursor: pointer;
}

.edycje-pasek {
    margin-bottom: 25px;
    border-left: 2px solid var(--darker-border-color);
    border-right: 2px solid var(--darker-border-color);
}

.edycje-pasek a:active {
    transform: scale(0.90) !important;
    background-color: rgba(0, 0, 0, 0.15);
}

.wybor-edycji-linki {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
    font-family: var(--font-main);
}

.wybor-edycji-linki a {
    display: inline-block;
    color: black;
    font-weight: bold;
    padding: 5px 15px;
    margin: 0 5px;
    transition: var(--transition);
    border-radius: 4px;
}

.wybor-edycji-linki a:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(0.95);
    cursor: pointer;
}

.edycja-tytul {
    font-family: "Castoro Titling", serif;
    font-size: 1.6rem;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 15px;
}

.edycja-opis {
    margin-bottom: 25px;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    background-image: var(--article-bgi);
}

.galeria-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid var(--darker-border-color);
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.galeria-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.about-card {
    background-image: var(--aboutcard-bgi);
    border: 2px solid var(--darker-border-color);
    outline: 1px solid var(--border-outline-color);
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.about-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.about-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border: 1px solid var(--darker-border-color);
    border-radius: 4px;
}

.about-card h3 {
    margin: 12px 0 0 0;
    font-family: var(--font-card);
    font-size: 1.5rem;
    text-align: center;
    color: black;
}

.hidden-desc a,
#explorer-description a {
    font-family: "Flavors", cursive;
}

.about-card h3 {
    font-family: "Emilys Candy", serif;
}

.member-article {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px; 
}

.member-info {
    flex: 1;
}

.member-info h2 {
    font-size: 1rem;
    font-family: "Playfair Display", serif;
    font-weight: bold;
    text-align: left;
    margin: 0 0 10px 0;
}

.member-image {
    flex: 0 0 220px;
}

.member-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--darker-border-color);
    border-radius: 4px;
}

.social-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-links a,
#explorer-description .social-links a {
    font-family: 'VT323', monospace !important;
    font-size: 1.5rem;
    text-decoration: underline;
    color: inherit;
}

.logo-wrapper {
    display: none;
}

body.page-manifesto { --container-bg: var(--bg-manifesto); }
body.page-onas { --container-bg: var(--bg-onas); }
body.page-aktualnosci { --container-bg: var(--bg-aktualnosci); }
body.page-archiwum { --container-bg: var(--bg-archiwum); }
body.page-archiwum article { opacity: 1; }

body.page-aktualnosci .logo-wrapper {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    width: 100%;
    margin-bottom: 30px; 
}

body.page-aktualnosci .center-logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    top: -30px;
}

body.page-aktualnosci .second-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    top: -20px; 
    margin-top: 0px;
}

body.page-aktualnosci .main {
    padding-top: 1.5rem;
}

#index-article {
    text-align: justify;
    background-image: url(../assets/tla/tloak.jpg);
}

#index-article .text-center {
    text-align: center;
}

.dostep-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 50px;
}

.dostep-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.kup-bilet-link {
    position: absolute;
    top: calc(50% + 50px);
    left: calc(50% + 160px);
    transform: translate(-50%, -50%);
    display: inline-block;
}

.kup-bilet-img {
    max-width: 200px;
    height: auto;
}

.explorer-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px;
}

.explorer-content {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border: 2px solid #FFF;
}

.explorer-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #FFF;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.explorer-close:hover {
    color: #BBB;
    transform: scale(1.1);
}

.explorer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #FFF;
    font-size: 60px;
    font-weight: bold;
    padding: 0 20px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.prev { left: 20px; }
.next { right: 20px; }

.explorer-nav:hover {
    color: #BBB;
    transform: translateY(-50%) scale(1.1);
}

.explorer-layout {
    display: flex;
    flex-direction: row;
    max-width: 900px;
    width: 90%;
    height: 80vh;
    max-height: 600px;
    background: #fffdfe;
    background-image: var(--article-bgi);
    border: 2px solid var(--darker-border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.explorer-text-side {
    flex: 1;
    padding: 40px;
    color: black;
    font-family: "Playfair Display", serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid var(--darker-border-color);
    overflow: hidden;
}

.explorer-text-side h2 {
    font-family: "Castoro Titling", serif;
    margin-top: 0;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--darker-border-color);
    padding-bottom: 10px;
    flex-shrink: 0;
}

#explorer-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 15px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow-y: auto;
    padding-right: 15px;
    flex-grow: 1;
}

.explorer-image-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    overflow: hidden;
}

.explorer-image-side .explorer-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--darker-border-color);
}

.footer {
    grid-area: footer;
    display: flex;
    flex-wrap: wrap;
    border: 2px solid var(--darker-border-color);
    border-left: none;
    border-right: none;
    position: relative;
    align-items: stretch;
    padding: 1rem 0;
    overflow: hidden;
    z-index: 1;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--footer-bgi);
    background-size: cover;
    background-position: center;
    opacity: 0.8; 
    z-index: -1;
}

.footercolumn {
    flex: 1 1 250px;
    box-sizing: border-box;
    border-left: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-size: 15px;
    position: relative;
    z-index: 2;
}

.footercolumn a {
    color: black;
    border-bottom: 1px solid rgba(51, 51, 51, 0.35);
    padding-bottom: 1px;
}

.footercolumn p {
    font-family: var(--font-foot);
    font-size: larger;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

@media (max-width: 1512px) {
    .container {
        grid-template-columns: 150px minmax(0, 920px) 150px; 
    }
    
    .footer {
        width: 100vw; 
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
}



@media (max-width: 1400px) {
    .container {
        grid-template-columns: 150px minmax(0, 920px) 150px;
    }
}

@media (max-width: 1150px) {
    .container {
        grid-template-columns: 50px minmax(0, 920px) 50px;
    }
    .main {
        padding: 4em 1.5rem;
    }
}

@media (max-width: 1023px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: var(--header-height) 1fr auto; 
        grid-template-areas:
            "header"
            "main"
            "footer";   
    }

    .main {
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1.5rem);
    }

    .footercolumn {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .footercolumn:last-child {
        border-bottom: none;
    }
}

@media (max-width: 790px) {
    body.page-index .container {
        background-image: url(../assets/tla/TLA_MOBILNE.jpg) !important;
        background-attachment: scroll !important;
    }

    body.page-aktualnosci {
        --container-bg: url(../assets/tla/mobilebgi.jpg);
    }

    .member-article {
        flex-direction: column; 
    }
    
    .member-image {
        width: 100%;
        flex: none;
    }
    
    article {
        padding: 15px;
    }

    .header a {
        margin: 0 2px;
        padding: 4px 6px;
        font-size: 0.8rem; 
    }

    .kup-bilet-link {
        top: calc(50% + 30px);
        left: calc(50% + 80px);
    }

    .kup-bilet-img {
        max-width: 110px;
    }
}

@media (max-width: 768px) {
    .explorer-overlay {
        align-items: flex-start;
        overflow-y: auto;
    }

    .explorer-layout {
        flex-direction: column-reverse;
        height: auto;
        max-height: none;
        width: 100%;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .explorer-text-side {
        border-right: none;
        border-top: 1px solid var(--darker-border-color);
        padding: 20px;
        overflow: visible;
    }

    #explorer-description {
        overflow-y: visible;
        padding-right: 0;
    }

    .explorer-image-side {
        padding: 10px;
        overflow: visible;
    }

    .explorer-image-side .explorer-content {
        max-height: 35vh;
        object-fit: contain;
    }
}