body{
    font-family: Montserrat, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #005fcc;

}

/* Prevent horizontal overflow and ensure consistent box-sizing */
html{ box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
body{ margin: 0; overflow-x: hidden; }
header{
    text-align: center;
    align-items: center;
    gap: 20px;
    display: flex;
    justify-content: center;
    background-color:#EAEAEA ;
    margin-top: 8px;
    margin-left: 8px;
    margin-right: 8px;
}

nav{
 text-align: right  ;
    display: flex;
    align-items: center;
    justify-content: space-between; /* UL po lewej, IMG po prawej */
    padding: 0 20px;
    flex-wrap: wrap;
    overflow: hidden;
}
nav ul{
    align-items: center;
    display: flex;
    gap: 18px;
    padding: 0;
    list-style:  none;
    }
       nav img {
    max-width: 220px;
    width: auto;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    margin-left: 20px;
}
    a:hover{
        color: #005fcc;
    }
    a{
        text-decoration: none;
        color: #FF8C00;
    }

.gallery-page{
    flex: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 12px auto 0;
    padding: 28px;
    background-color:#EAEAEA;
    border: 2px solid black;
    border-radius: 18px;
    box-shadow: #FF8C00 5px 5px 15px;
}

.gallery-hero{
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
    gap: 28px;
    align-items: center;
    min-height: 320px;
    padding: 26px;
    color: #111;
    background: #ffffff;
    border: 2px solid black;
    border-radius: 14px;
}

.gallery-hero__text span,
.gallery-feature span{
    display: inline-block;
    color: #005fcc;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0;
    margin-bottom: 10px;
}

.gallery-hero h1{
    margin: 0;
    color: #FF8C00;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.gallery-hero p{
    margin: 18px 0 0;
    max-width: 520px;
    color: #252525;
    font-size: 18px;
    line-height: 1.55;
}

.gallery-hero__photo{
    height: 320px;
    overflow: hidden;
    border: 2px solid black;
    border-radius: 12px;
    box-shadow: #FF8C00 3px 3px 10px;
}

.gallery-hero__photo img,
.gallery-feature img,
.gallery-card img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-feature{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 26px 0;
}

.gallery-feature article{
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 190px;
    padding: 14px;
    background: #fff;
    border: 2px solid black;
    border-radius: 12px;
    box-shadow: #FF8C00 2px 2px 10px;
}

.gallery-feature img{
    height: 160px;
    border-radius: 9px;
}

.gallery-feature h2{
    margin: 0;
    color: #005fcc;
    font-size: 24px;
    line-height: 1.15;
}

.gallery-feature p{
    margin: 10px 0 0;
    color: #2b2b2b;
    line-height: 1.45;
}

.gallery-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 220px;
    gap: 16px;
}

.gallery-card{
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 2px solid black;
    border-radius: 12px;
    box-shadow: #FF8C00 2px 2px 9px;
}

.gallery-card--large{
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-card--wide{
    grid-column: span 2;
}

.gallery-card img,
.gallery-feature img,
.gallery-hero__photo img{
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-card:hover img,
.gallery-feature article:hover img,
.gallery-hero__photo:hover img{
    transform: scale(1.05);
    filter: saturate(1.08);
}

.gallery-card figcaption{
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
    color: #111;
    background: rgba(234, 234, 234, 0.92);
    border: 1px solid black;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
}

#podglad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

#podglad img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

#podglad .nav {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 60px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
}

#podglad .left {
    left: 30px;
}

#podglad .right {
    right: 30px;
}

#podglad .nav:hover {
    color: #FF8C00;
}

footer{
    background-color:#EAEAEA;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
}
.social-buttons {
    position: fixed;      /* przyklejone do lewej strony */
    top: 50%;             /* wyśrodkowane pionowo */
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.social-buttons .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s;
    background-color: #FF8C00;
}



.social-buttons .btn:hover {
    transform: translateX(10px); /* przesunięcie w prawo po hover */
}
.btn img{
    max-width: 100%;   /* dopasowanie obrazka do przycisku */
    max-height: 100%;
}
.btn:hover {
    background-color: #005fcc;
}

/* Responsywność stosowana tylko dla ekranów węższych niż 1400px */
@media (max-width: 1024px) {
    header{ justify-content: space-between; flex-wrap: wrap; padding: 10px 20px; }
    nav{ width: 100%; padding: 10px; }
    nav ul{ flex-wrap: wrap; gap: 10px; justify-content: center; }
    nav img{ max-height: 140px; height: auto; margin-left: 0; margin: 10px 0; }
    .gallery-page{ width: calc(100% - 32px); padding: 20px; }
    .gallery-hero{ grid-template-columns: 1fr; }
    .gallery-hero__photo{ height: 280px; }
    .gallery-feature{ grid-template-columns: 1fr; }
    .gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 210px; }
    .social-buttons{ top: auto; bottom: 10px; left: 10px; transform: none; flex-direction: row; }
    .social-buttons .btn{ width: 44px; height: 44px; border-radius: 8px; }
}

@media (max-width: 768px){
    nav img{ max-height: 100px; height: auto; }
    .gallery-page{
        width: calc(100% - 20px);
        padding: 12px;
        border-radius: 12px;
    }
    .gallery-hero{
        padding: 18px;
        min-height: auto;
    }
    .gallery-hero p{
        font-size: 16px;
    }
    .gallery-feature article{
        grid-template-columns: 1fr;
    }
    .gallery-feature img{
        height: 220px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 230px;
        gap: 12px;
    }
    .gallery-card--large,
    .gallery-card--wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    #podglad img {
        max-width: 95%;
        max-height: 85vh;
    }

    #podglad .nav {
        font-size: 42px;
        padding: 12px;
    }

    #podglad .left {
        left: 10px;
    }

    #podglad .right {
        right: 10px;
    }
}

@media (max-width: 480px){
    header{ margin-top: 8; margin-left: 8; margin-right: 8; }
    nav img{ max-height: 80px; height: auto; }
    .gallery-hero__photo,
    .gallery-feature img,
    .gallery-grid{
        height: auto;
    }
    .gallery-hero__photo{
        aspect-ratio: 4 / 3;
    }
    .gallery-grid{
        grid-auto-rows: 220px;
    }
}
