body {
    font-family: "Courier New", Courier, monospace;
    max-width: 1200px;
    margin: auto;
    background-color: #111;
    color: #eee;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 21px;
}

h2 {
    font-size: 19px;
}

p,
body {
    font-size: 17px;
}

a {
    color: #acacac;
    text-decoration: none;
}
a:hover {
    color: #eee;
}

header, main, footer {
    padding: 10px 0;
}

main {
    margin-top: 20px;
}

main > p {
    text-align: justify;
    font-size: 16px;
}

.header-home, .header-onas, .header-galeria, .header-kontakt {
  position: relative;
  width: 100%;
  height: 250px;
  background-color: #000;
  margin-bottom: 10px;
}

#matrix-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------------------------------------------- */

/* --- info --- */
.site-info {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.site-info h1 {
    margin-bottom: 5px;
}
.site-info h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ccc;
}

/* ---------------------------------------------- */

/* --- ASCII --- */
.text-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.text-block {
    flex: 1;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    flex-basis: calc(100% / 3 - 10px);
    white-space: pre;
    line-height: 3px;
    font-weight: bold;
    font-size: 2.5px;
}

/* ---------------------------------------------- */

/* --- Media Queries --- */
@media only screen and (max-width: 1200px) {
    .text-block {
        min-width: calc(100% / 2 - 10px);
    }
}

@media only screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    h1 {
        font-size: 19px;
    }
    h2 {
        font-size: 17px;
    }
    body {
        font-size: 16px;
    }
    p {
        font-size: 15px;
    }
    main > p {
        font-size: 14px;
    }

    .text-block {
        min-width: 100%;
        font-size: 2px;
        line-height: 2.5px;
    }
    footer {
        flex-direction: column;
    }
    .footer-text {
        padding: 5px;
        font-size: 14px;
    }

    nav {
        flex-direction: column;
    }
    .nav-logo {
        margin-bottom: 10px;
    }
    nav ul {
        justify-content: center;
    }
    nav li {
        margin-left: 10px;
        margin-right: 10px;
    }
    nav li:first-child {
        margin-left: 10px;
    }
}
/* ---------------------------------------------- */

/* === Style dla menu nawigacyjnego === */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-logo pre {
    font-family: "Courier New", Courier, monospace;
    color: #eee;
    font-size: 1em;
    margin: 0;
    line-height: 1.2;
    font-weight: bold;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    margin-left: 20px;
}

nav li:first-child {
    margin-left: 0;
}

nav a {
    color: #eee;
    text-decoration: none;
    padding: 5px 0;
    font-size: 1em;
    text-transform: uppercase;
}

nav a:hover {
    color: #acacac;
}

nav li.active a {
    font-weight: bold;
}

nav + .dashed-line {
    margin: 15px auto 25px;
}

/* ---------------------------------------------- */

.text-page {
    text-align: left;
    max-width: 960px;
    margin: 0 auto 30px;
}

.text-page h2 {
    font-size: 19px;
    margin: 25px 0 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
    color: #eee;
}

.text-page p {
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 16px;
    text-align: justify;
}

.text-page pre {
    background-color: #222;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 5px;
    margin-bottom: 10px;
}

.text-page code {
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    color: #0f0;
}

.text-page ul {
    list-style: disc;
    margin-left: 10px;
    margin-bottom: 15px;
    text-align: justify;
}

.text-page li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.text-page strong {
    color: #eee;
}

/* ==================================== */

@media only screen and (max-width: 768px) {
    .text-page {
        padding: 0 10px;
    }

    .text-page h2 {
        font-size: 17px;
    }

    .text-page p {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .text-page ul {
        margin-left: 5px;
        margin-bottom: 10px;
    }

    .text-page li {
        margin-bottom: 8px;
    }

    .text-page pre {
        padding: 8px;
        margin-bottom: 8px;
    }
}

/* ------------------------------------------------------- */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 14px;
}

.dashed-line {
    width: 100%;
    height: 1px;
    background-image: linear-gradient(to right, #008000 50%, transparent 50%);
    background-size: 10px 1px;
    margin: 5px auto 5px;
}

.footer-text {
    color: #acacac;
    font-size: 15px;
}

/* ---------------------------------------------- */
/* === GALLERY STYLES === */

/* Gallery Container - Responsive Grid */
#gallery-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 30px 60px 30px;
    max-width: 1200px;
    padding: 0 10px;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    background-color: #1a1a1a;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 255, 0, 0.2);
}

/* Gallery Image */
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
    opacity: 0.8;
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 20, 0, 0.4) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Gallery Title */
.gallery-title {
    color: #eee;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    margin: 0;
    text-align: center;
    width: 100%;
}

/* Gallery Empty State */
.gallery-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 16px;
    background-color: #1a1a1a;
    border-radius: 8px;
}

/* ---------------------------------------------- */
/* === LIGHTBOX STYLES === */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

/* Lightbox Backdrop */
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

/* Lightbox Container */
.lightbox-container {
    position: relative;
    z-index: 1001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Lightbox Content */
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
    transition: opacity 0.2s ease;
}

.lightbox-title {
    color: #eee;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    max-width: 100%;
}

.lightbox-counter {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* Lightbox Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: transparent;
    border: none;
    color: #00ff00;
    font-size: 28px;
    padding: 0;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    z-index: 1002;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: transparent;
    box-shadow: none;
    transform: scale(1.5);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ---------------------------------------------- */
/* === ANIMATIONS === */

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

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

/* ---------------------------------------------- */
/* === RESPONSIVE DESIGN === */

/* Tablet - 3 kolumny */
@media only screen and (max-width: 1024px) {
    #gallery-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Mobile landscape - 2 kolumny */
@media only screen and (max-width: 768px) {
    #gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 20px 20px 40px 20px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 0;
    }
}

/* Mobile - 1 kolumna */
@media only screen and (max-width: 480px) {
    #gallery-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lightbox-container {
        gap: 10px;
    }

    .lightbox-image {
        max-height: calc(90vh - 80px);
    }

    .lightbox-prev,
    .lightbox-next {
        display: none;
    }

    .lightbox-title {
        font-size: 16px;
    }

    .lightbox-counter {
        font-size: 12px;
    }
}
