/* =======================================
   GALLERY CSS
   Portfolio & Galerie Design
======================================= */


/* ---------- Seitenkopf ---------- */

.page-header {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background:
        linear-gradient(
            rgba(0,0,0,.65),
            rgba(0,0,0,.65)
        ),
        url("../bilder/portfolio-header.jpg");
    background-size: cover;
    background-position: center;
    padding: 40px;
    margin-top: 0;
}
@media (min-width: 901px) {
    .page-header {
        margin-top: 105px;
    }
}

@media (max-width: 900px) {
    .page-header {
        margin-top: 145px;
    }
}

.page-header h2{

    font-size:70px;

    font-weight:300;

    letter-spacing:8px;

    color:white;

}


.page-header p{

    font-size:22px;

    color:#ddd;

}



/* ---------- Portfolio Raster ---------- */


.portfolio-grid{

    display:grid;

    grid-template-columns:

    repeat(auto-fit,minmax(350px,1fr));

    gap:35px;

    padding:80px 60px;

}



/* ---------- Portfolio Karten ---------- */


.portfolio-card {
    position: relative;
    height: auto;
    overflow: hidden;
    background: transparent;
}


.portfolio-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: .8s ease;
}



.portfolio-card:hover img{

    transform:scale(1.12);

}



/* ---------- Overlay dauerhaft sichtbar ---------- */

.overlay {

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.25);

    opacity: 1;

}

/* ---------- Texte ---------- */


.overlay h3 {

    font-size: 42px;

    font-weight: 300;

    letter-spacing: 3px;

    margin-bottom: 30px;

    color: rgba(255,255,255,0.70);

}

.overlay a {

    padding: 14px 35px;

    border: 2px solid rgba(201,162,39,0.7);

    color: rgba(255,255,255,0.8);

    text-decoration: none;

    font-size: 17px;

    background: rgba(0,0,0,0.15);

    transition: .3s;

}


.overlay a:hover{

    background:#c9a227;

    color:#000;

}



/* ---------- Fotogalerie ohne Bildbeschnitt ---------- */

.photo-gallery {

    display:grid;

    grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));

    gap:25px;

    padding:70px 50px;

    max-width:1600px;

    margin:auto;

}


.photo-gallery a {

    display:block;

    overflow:hidden;

    border-radius:8px;

    box-shadow:0 5px 20px rgba(0,0,0,.18);

}


.photo-gallery img {

    width:100%;

    height:auto;

    display:block;

    transition:transform .5s ease;

}


.photo-gallery img:hover {

    transform:scale(1.03);

}


/* ---------- Galerie Titel ---------- */


.gallery-title {
    text-align: center;
    padding: 180px 20px 40px;
}

.gallery-title h2 {
    font-size: 55px;
    font-weight: 300;
    color: #c9a227;
    letter-spacing: 5px;
}

.gallery-title p {
    margin-top: 20px;
    color: #ccc;
    font-size: 20px;
}


/* ---------- Lightbox ---------- */


.lightbox {

position:fixed;

top:0;

left:0;

width:100%;

height:100%;

background:rgba(0,0,0,.92);

display:flex;

justify-content:center;

align-items:center;

z-index:9999;

cursor:pointer;

}



.lightbox img {

max-width:90%;

max-height:90%;

object-fit:contain;

box-shadow:0 10px 40px rgba(0,0,0,.5);

}
/* ---------- Lightbox Pfeile ---------- */

.lightbox-prev,
.lightbox-next {

    position:fixed;

    top:50%;

    transform:translateY(-50%);

    width:70px;

    height:100px;

    padding:0;

    border:none;

    border-radius:6px;

    background:rgba(0,0,0,.45);

    color:white;

    font-size:55px;

    line-height:1;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    z-index:10001;

    transition:background .3s ease,
                color .3s ease;

}


.lightbox-prev {

    left:25px;

    right:auto;

}


.lightbox-next {

    right:25px;

    left:auto;

}


.lightbox-prev:hover,
.lightbox-next:hover {

    background:#c9a227;

    color:#000;

}
/* ---------- Lightbox Schließen ---------- */

.lightbox-close {

    position:fixed;

    top:20px;

    right:25px;

    width:65px;

    height:65px;

    padding:0;

    border:none;

    border-radius:6px;

    background:rgba(0,0,0,.45);

    color:white;

    font-size:50px;

    line-height:1;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    z-index:10002;

    transition:background .3s ease,
                color .3s ease;

}


.lightbox-close:hover {

    background:#c9a227;

    color:#000;

}

/* ---------- Mobile Optimierung ---------- */


@media(max-width:900px){
  
    .page-header{
        height:45vh;
        min-height:100px;
        padding:20px;
       
    }

    .page-header h2{
        font-size:clamp(24px, 6vw, 42px);
        letter-spacing:clamp(1px, 1vw, 5px);
        max-width:100%;
        overflow-wrap:anywhere;
    }

    .page-header p{
        font-size:clamp(14px, 3vw, 20px);
    }

    .portfolio-grid {
    padding: 40px 20px;
    grid-template-columns: 1fr;
    row-gap: 25px;
}

    .overlay h3{
        font-size:32px;
    }

    .photo-gallery{
        grid-template-columns:1fr;
        padding:40px 20px;
    }
    .gallery-title h2 {
        font-size: 38px;
    }

    .gallery-title p {
        font-size: 16px;
    }

}
@media(max-width:420px){

    .gallery-title {
        padding: 160px 12px 30px;
        width: 100%;
        box-sizing: border-box;
    }

    .gallery-title h2 {
        font-size: 32px;
        letter-spacing: 2px;
        overflow-wrap: anywhere;
    }

    .gallery-title p {
        font-size: 15px;
        overflow-wrap: anywhere;
    }

    .photo-gallery{
        padding:30px 12px;
        width:100%;
        box-sizing:border-box;
    }

}
/* ---------- Lightbox Smartphone ---------- */

@media(max-width:600px){

    .lightbox-prev,
    .lightbox-next{

        width:50px;

        height:75px;

        font-size:38px;

    }


    .lightbox-prev{

        left:8px;

        right:auto;

    }


    .lightbox-next{

        right:8px;

        left:auto;

    }


    .lightbox-close{

        top:10px;

        right:10px;

        width:50px;

        height:50px;

        font-size:38px;

    }


    .lightbox-image{

        max-width:88%;

        max-height:85%;

    }
    .portfolio-card {
    background: transparent;
}

.portfolio-card img {
    display: block;
}
}
