body {
    font-family: 'Lexend';
    margin: 0;
    background: #f5f5f5;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: white;
    border-bottom: 2px solid #cdcdcd;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.header_wrapper {
    width: 95%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.galeria {
    margin-top: 100px;
    padding: 50px 10% 160px;
}

.galeria_header {
    text-align: center;
    margin-bottom: 40px;
}

.galeria_header h1 {
    color: #5E3817;
    font-size: 36px;
    letter-spacing: 5px;
    padding-bottom: 10px;
}

.galeria_header p {
    color: #666;
}

.galeria_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    
    "a b b c"
    "d b b e"
    "f g g h"
    "l g g j"
    "a1 a2 a3 a4";
    gap: 25px;

    height: 250vh;
}

.a1{ grid-area: a1;}
.a2{ grid-area: a2;}
.a3{ grid-area: a3;}
.a4{ grid-area: a4;}

.a { grid-area: a; }
.b { grid-area: b; }
.c { grid-area: c; }
.d { grid-area: d; }
.e { grid-area: e; }
.f { grid-area: f; }
.g { grid-area: g; }
.h { grid-area: h; }
.i { grid-area: i; }
.j { grid-area: j; }

.galeria_item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.galeria_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transition: 0.4s;
}

.galeria_item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 14px;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.9);

    display: none;
    justify-content: center;
    align-items: center;

    z-index: 999;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.lightbox.show {
    display: flex;
}

.contador {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.5);
    padding: 5px 12px;
    border-radius: 20px;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;

    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade {
    opacity: 0;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    font-size: 50px;
    color: white;
    cursor: pointer;
    padding: 10px;

    user-select: none;
}

.prev { left: 30px; }
.next { right: 30px; }

.prev:hover, .next:hover {
    opacity: 0.7;
}










/* RESPONSIVIDADE */

/* (até 1024px) */
@media (max-width: 1024px) {

    .galeria {
        padding: 40px 5% 120px;
    }

    .galeria_grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "b b"
            "a c"
            "d e"
            "g g"
            "f h"
            "l j"
            "a1 a2"
            "a3 a4";

            height: auto;
            
    }

    .galeria_header h1 {
        font-size: 28px;
    }
}


/* (até 768px) */
@media (max-width: 768px) {

    .header {
        height: 70px;
    }

    .galeria {
        margin-top: 80px;
        padding: 30px 10% 100px;
    }

    .galeria_header h1 {
        font-size: 24px;
    }

    .galeria_header p {
        font-size: 14px;
    }

    .galeria_grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "b"
            "a"
            "c"
            "d"
            "e"
            "g"
            "f"
            "h"
            "l"
            "j"
            "a1"
            "a2"
            "a3"
            "a4";
    }

    

}


/* (até 480px) */
@media (max-width: 480px) {

    .galeria_header h1 {
        font-size: 20px;
    }

    .galeria_header p {
        font-size: 13px;
    }

    .prev, .next {
        font-size: 35px;
    }

    .close {
        font-size: 30px;
        top: 20px;
        right: 20px;
    }

    .contador {
        font-size: 13px;
        bottom: 20px;
    }
}




