/*

CSS Syntax

selector {  attribute:value(s);}

1) TAG selector -> body, p, a, ...
2) CLASS selector -> .class-x, .class-y, ...
3) PSEUDOCLASS selector -> :hover, :focus, :first-of-type, ...

*/
html {
    font-family: Roboto;
    color:#dcd9df;
}



body {
    width: fit-content;
    padding: 0;
    margin: 0 auto;
    text-align: center;
    background-color: #221929;
}

header {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    text-align: center;
}

h1 a {
    font-size: 2em;
    text-decoration: none;
}
nav{
    width: 80%;
    margin: 0 auto;
    display:flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5em;
    align-items: flex-start;
    justify-content: space-evenly;
}
nav a {
    font-size: 1.2em;
    text-decoration: none;
    flex-basis: 0;
    flex-shrink: 1;
    flex-grow: 1;
    background-color: #5d5266;
    color: #dcd9df;
    padding: 1em;
    border-radius: 0.5em;
    border-width: 0.5em;

}


article {
    padding: 0;
    margin: 0 auto;
    width: 100%;
    background-color: #2a2330;
}

/*.gallery {
    width: clamp(900px, 80%, 1440px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;
    align-items:center ;
    gap: 1em;
}

.g-item {
    flex-basis: 0;
    flex-shrink: 1;
    width: fit-content;

}

img {
    max-height: 300px;
    border-radius: 0.5em;
}*/
.gallery {
    width: clamp(500px, 90%, 1440px);

    margin: 0 auto;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 1rem;
}

.g-item {
    overflow: hidden;
    border-radius: .5rem;
    filter:drop-shadow(1px 1px 3px rgb(16, 13, 19));
}

.g-item img {

    height: 15rem;
    width: auto;

    display: block;

    border-radius: .5rem;

    cursor: pointer;

    transition: .3s ease;
}

.g-item img:hover {

    transform: scale(1.03);

    filter: brightness(1.08);

}


/* ---------- LIGHTBOX ---------- */

.lightbox {

    position: fixed;
    inset: 0;

    background: rgba(27, 27, 27, 0.85);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: .25s;

    z-index: 9999;
}

.lightbox.open {

    opacity: 1;
    visibility: visible;
}

.lightbox img {

    max-width: 90%;
    max-height: 90%;

    object-fit: contain;

    border-radius: .2rem;
}

.lightbox button {

    position: absolute;

    background: rgba(255,255,255,.15);

    border: none;

    color: white;

    font-size: 2rem;

    cursor: pointer;

    padding: .5rem .9rem;

    transition: .2s;
}

.lightbox button:hover {

    background: rgba(255,255,255,.3);
}

.close {

    top: 20px;
    right: 25px;

    font-size: 3rem;
}

.prev {

    left: 20px;
    top: 50%;

    transform: translateY(-50%);
}

.next {

    right: 20px;
    top: 50%;

    transform: translateY(-50%);
}