:root {
    --black: #080808;
    --white: #ffffff;
    --turquoise: #00d9e6;
    --gray: #b5b5b5;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family: Arial, sans-serif;

    background: var(--black);

    color: var(--white);
}


a {
    text-decoration: none;

    color: inherit;
}



/* =====================================================
   HEADER
===================================================== */

header {
    background:
        rgba(8, 8, 8, 0.96);

    border-bottom:
        1px solid #222;

    position: sticky;

    top: 0;

    z-index: 100;

    backdrop-filter:
        blur(10px);
}


nav {
    max-width: 1100px;

    margin: auto;

    padding: 18px 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.brand-lockup {
    display: flex;

    align-items: center;

    gap: 10px;
}


.logo-mark {
    width: 48px;
    height: 42px;

    display: grid;

    place-items: center;

    background: #fff;

    border-radius: 9px;

    overflow: hidden;

    flex-shrink: 0;
}


.logo-mark img {
    width: 42px;
    height: 36px;

    object-fit: contain;

    display: block;
}


.logo-name {
    font-size: 22px;

    font-weight: 800;

    letter-spacing: 0.3px;
}


.logo-name span {
    color:
        var(--turquoise);
}


.back-button {
    color:
        var(--gray);

    font-size: 14px;

    transition:
        color 0.25s ease;
}


.back-button:hover {
    color:
        var(--turquoise);
}



/* =====================================================
   TITLE
===================================================== */

.gallery-header {
    max-width: 1100px;

    margin: auto;

    padding:
        80px 20px 45px;
}


.turquoise {
    color:
        var(--turquoise);
}


.gallery-header h1 {
    margin:
        8px 0 12px;

    font-size:
        clamp(42px, 7vw, 70px);

    line-height: 1;
}


.gallery-header h1 span {
    color:
        var(--turquoise);
}


.intro {
    max-width: 650px;

    margin: 0;

    color:
        var(--gray);

    font-size: 18px;

    line-height: 1.6;
}



/* =====================================================
   GALLERY
===================================================== */

.gallery {
    max-width: 1100px;

    margin: 0 auto;

    padding:
        0 20px 80px;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


.gallery-item {
    position: relative;

    display: block;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    border:
        1px solid #252525;

    border-radius: 6px;

    background: #111;

    cursor: pointer;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}


.gallery-item img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}


.gallery-item:hover {
    transform:
        translateY(-5px);

    border-color:
        var(--turquoise);

    box-shadow:
        0 12px 35px
        rgba(0, 217, 230, 0.12);
}


.gallery-item:hover img {
    transform:
        scale(1.06);
}



/* =====================================================
   FOOTER
===================================================== */

footer {
    padding: 30px;

    text-align: center;

    border-top:
        1px solid #222;

    color:
        var(--gray);
}



/* =========================
   LIGHTBOX - VIEWPORT FIJO
========================= */

.lightbox {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    max-width: none;
    max-height: none;

    margin: 0;
    padding: 0;

    border: 0;
    outline: 0;

    background: rgba(0, 0, 0, 0.94);

    overflow: hidden;

    box-sizing: border-box;

    opacity: 0;
    transform: scale(0.98);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.lightbox[open] {
    opacity: 1;
    transform: scale(1);
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.94);
}
/* =========================
   AREA DE LA IMAGEN
========================= */

.lightbox-content {
    position: absolute;

    top: 75px;
    right: 0;
    bottom: 0;
    left: 0;

    width: auto;
    height: auto;

    min-width: 0;
    min-height: 0;

    max-width: 100%;
    max-height: calc(100% - 75px);

    padding: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}
/* =========================
   IMAGEN RESPONSIVA
========================= */

.lightbox-content img {
    display: block;

    width: auto;
    height: auto;

    min-width: 0;
    min-height: 0;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    border: 0;

    border-radius: 8px;

    box-sizing: border-box;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}
/* =========================
   EVITAR DESBORDAMIENTO
========================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.lightbox,
.lightbox-content,
.lightbox-content img {
    max-width: 100vw;
    box-sizing: border-box;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .lightbox {
        width: 100%;
        height: 100%;
    }

    .lightbox-content {
        top: 70px;
        bottom: 0;
        left: 0;
        right: 0;

        width: 100%;
        height: calc(100% - 70px);

        padding: 5px;
    }

    .lightbox-content img {
        max-width: calc(100vw - 10px);
        max-height: calc(100dvh - 80px);

        width: auto;
        height: auto;
    }
}
/* =====================================================
   IMAGE CHANGE ANIMATION
===================================================== */

.lightbox-content img.image-changing {

    animation:
        imageChange 0.28s ease;
}


@keyframes imageChange {

    0% {

        opacity: 0;

        transform:
            scale(0.96);

    }

    100% {

        opacity: 1;

        transform:
            scale(1);

    }

}



/* =====================================================
   CLOSE BUTTON
===================================================== */

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;

    width: 45px;
    height: 45px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    z-index: 30;

    transition: background 0.2s ease,
                transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}



/* =====================================================
   ARROWS
===================================================== */

.lightbox-arrow {

    position: absolute;

    top: 50%;

    z-index: 20;

    width: 55px;

    height: 55px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);

    color: white;

    font-size: 25px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transform:
        translateY(-50%);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.lightbox-arrow:hover {

    background:
        var(--turquoise);

    color:
        #080808;
}



/* =====================================================
   PREVIOUS
===================================================== */

.lightbox-prev {

    left: 25px;
}


.lightbox-prev:hover {

    transform:
        translateY(-50%)
        translateX(-3px);
}



/* =====================================================
   NEXT
===================================================== */

.lightbox-next {

    right: 25px;
}


.lightbox-next:hover {

    transform:
        translateY(-50%)
        translateX(3px);
}



/* =====================================================
   PREVENT PAGE SCROLL
===================================================== */

body.lightbox-open {

    overflow: hidden;
}



/* =====================================================
   TABLET
===================================================== */

@media (max-width: 850px) {

    .gallery {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

}



/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {


    nav {

        padding:
            14px 15px;

    }


    .logo-mark {

        width:
            40px;

        height:
            36px;

    }


    .logo-mark img {

        width:
            35px;

        height:
            31px;

    }


    .logo-name {

        font-size:
            17px;

    }


    .back-button {

        font-size:
            13px;

    }



    /* =========================
       HEADER
    ========================= */

    .gallery-header {

        padding:
            55px 15px 30px;

    }


    .gallery-header h1 {

        font-size:
            45px;

    }



    /* =========================
       GALLERY
    ========================= */

    .gallery {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            12px;

        padding:
            0 15px 55px;

    }



    /* =========================
       LIGHTBOX
    ========================= */

    .lightbox {

        width:
            100vw;

        height:
            100vh;

        padding:
            60px 15px 30px;

    }


    .lightbox-content img {

        max-width:
            94vw;

        max-height:
            78vh;

        border-radius:
            4px;

    }



    /* =========================
       CLOSE
    ========================= */

    .lightbox-close {

        top:
            12px;

        right:
            12px;

        width:
            42px;

        height:
            42px;

        font-size:
            30px;

    }



    /* =========================
       ARROWS
    ========================= */

    .lightbox-arrow {

        width:
            42px;

        height:
            42px;

        font-size:
            19px;

    }


    .lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 25px;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    font-size: 24px;
    cursor: pointer;

    z-index: 20;

    transition: background 0.2s ease,
                transform 0.2s ease;
}

.lightbox-prev {
    left: 50%;
    transform: translateX(-55px);
}

.lightbox-next {
    left: 50%;
    transform: translateX(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateX(-55px) scale(0.95);
}

.lightbox-next:active {
    transform: translateX(10px) scale(0.95);
}



/* =====================================================
   VERY SMALL SCREENS
===================================================== */

@media (max-width: 380px) {

    .gallery {

        grid-template-columns:
            1fr;

    }


    .lightbox {

        padding-left:
            8px;

        padding-right:
            8px;

    }


    .lightbox-arrow {

        width:
            38px;

        height:
            38px;

    }


    .lightbox-prev {

        left:
            5px;

    }


    .lightbox-next {

        right:
            5px;

    }

}