* {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; 
    box-sizing: border-box;
}

@font-face {
    font-family: 'Comfortaa';
    src: url('../font/Comfortaa-VariableFont_wght.ttf');
}

html {
    font-family: 'Comfortaa';
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-image: url("../img/stockGelleryBG.jpeg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

#intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 1.5s ease-out;
}

#introVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#intro.fade-out {
    opacity: 0;
}

.bubbles-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at top, #262d3a 0, #020617 60%);
}

.bubble {
    position: absolute;
    bottom: -80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    border: 1px transparent white;
    animation-name: rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.bubble::before {
    content: "";
    position: absolute;
    top: 8%;
    left: 12%;
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    filter: blur(1px);
    opacity: 0.9;
}

.bubble:nth-child(3n)::before {
    opacity: 0.5;
    transform: scale(0.7);
}

.bubble:nth-child(4n)::before {
    opacity: 0.2;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) scale(1.1);
        opacity: 0;
    }
}

header {
    background-color: rgb(18, 16, 48);
    width: 100%;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 10;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    & h1 {
        font-size: 2rem;
        margin-left: 40px;
        min-width: 178px;
        color: #fff;
    }
}

.menu-hamburguesa {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-hamburguesa .barra {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

nav {
    height: 100%;
    width: fit-content;

    position: relative;
    margin: 0 15px 0 15px;
}

ul {
    padding: 0;
    height: 100%;
    width: fit-content;
    margin: 0;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 15px;
}

ul a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    height: 100%;
    width: 240px;
    /*max-width: 240px;*/
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all .2s ease;
    
    & li {
        text-decoration: none;
    }

    &:hover {
        background-color: #464b8f;
    }
}

.parallax {
    width: 100%;
    height: 1210px;

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

    background-image: url("../img/parallaxBG.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.parallax video {
    transform: translateY(-140%);
    opacity: 0;
    position: relative;
    z-index: 0;
    border: 2px solid #fff;
    border-style: dashed;

    /* animation: videoAppear 800ms cubic-bezier(.2,.9,.3,1) forwards; */
}

.stockGallery {
    margin-top: 100px;
    padding: 20px;
    
    background-color: rgba(0, 0, 0, 0.226);
    border: 2px solid #cecece;
    backdrop-filter: blur(3px);
    border-radius: 20px;
    border-style: dashed;
    width: 80%;
    height: fit-content;
}

section {
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sectionTitle {
    font-size: 3rem;
    color: #fff;
}

.gallery {
    width: 100%;
    height: fit-content;

    display: grid;
    justify-items: center;
    align-items: baseline;
    gap: 50px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-rows: auto auto;
}

.stockItem {
    width: 200px;
    height: fit-content;
    border-radius: 10px;
    border: 0;
    background-color: rgba(75, 75, 75, 0.384);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: all .3s ease;
    border: 0;
    padding: 0 0 10px 0;
    
    &:hover {
        background-color: rgba(183, 0, 255, 0.473);
        /* border: 2px solid rgba(183, 0, 255); */
        transform: scale(1.1);
    }
    
    & span {
        font-size: 1.1rem;
        font-family: 'Comfortaa';
        color: #fff;
    }

    & .itemImgCon {
        width: 200px;
        height: 200px;
        margin-bottom: 10px;
    }
    
    & img {
        overflow: hidden;
        border-radius: 10px 10px 0 0;
        width: auto;
        height: 100%;
    }
}

.popup {
    width: 100%;
    height: 100%;
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background: rgba(115, 0, 160, 0.473);
    padding: 20px;
    width: 1000px;
    height: fit-content;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    text-align: center;
}

.popupFlexCon {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.popupImgCon {
    position: relative;
    width: 350px;
}

#popup-title {
    margin: 0;
    font-size: 2rem;
    color: #fff;
}

#popup-img {
    height: auto;
    width: 100%;
    border-radius: 8px;
}

#popup-desc {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
    padding: 5px 5px 5px 15px;
    width: 600px;
    height: 100%;
    text-align: justify;
}

#close {
    color: #fff;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 4rem;
    cursor: pointer;
    transition: all .1s ease;

    &:hover {
        color: #0078ff;
    }
}

#popup-download {
    position: absolute;
    bottom: 10px;
    left: 10px;
    /* transform: translate(-50%, 0); */
}

.download-btn {
    /* margin-top: 15px; */
    padding: 10px 15px;
    border: none;
    background: #0078ff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;

    &:hover {
        background: #0057bb;
    }

    &:active {
        background: #0078ff;
    }
}

.contactGallery {
    width: 40% !important;
}

.contactCon {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.contactVar {
    width: 250px;
    height: 40px;
    background-color: rgb(18, 16, 48);
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    text-decoration: none;
    color: #fff;
    transition: all .1s ease;

    &:hover {
        background-color: rgb(38, 33, 100);
        transform: scale(1.1);
    }

    &:active {
        background-color: #0078ff;
    }
}

footer {
    width: 100%;
    height: 100px;
    background-color: rgb(18, 16, 48);
    margin-top: 100px;
}

@keyframes videoAppear {
    0% { transform: translateY(-140%) scaleY(0.98); opacity: 0 }
    60% { transform: translateY(10px) scaleY(1.005); opacity: 1 }
    100% { transform: translateY(0) scaleY(1); opacity: 1 }
}


/* For screens up to 480px wide (e.g., mobile phones in portrait) */
@media screen and (max-width: 480px) {

    #introVideo {
        object-fit: contain;        /* lo recorta para llenar pantalla */
    }

    .parallax {
        height: fit-content;
        background-image: url("");
    }
    
    .parallax video {
        width: 100%;
        transform: translateY(0);
        opacity: 1;
        border: 0px;
    }

    nav {
        position: unset;
    }
    
    nav ul {
        gap: 0;
        flex-direction: column;
        padding: 0;
        width: 100%;
        height: fit-content;
        background-color: rgb(18, 16, 48);
        position: absolute;
        top: 70px;
        left: 0;
        transform: translateX(-500px);
        transition: all .2s ease;
    }
    
    .menu-hamburguesa {
        display: flex;
    }
    
    nav ul.active {
        transform: translateX(0);
        border-bottom: 3px solid rgb(34, 22, 206);
    }
    
    nav ul a {
        height: fit-content;
        background-color: rgb(18, 16, 48);
        width: 100%;
        padding: 25px;

    }

    .stockGallery {
        width: 100%;
        padding: 8px;
    }
    
    .gallery {
        /*align-items: flex-start;*/
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 30px 6px;
    }

    .sectionTitle {
        font-size: 2rem;
    }

    .stockItem {
        width: 120px;

        &:hover {
            background-color: rgba(75, 75, 75, 0.384);
            transform: scale(1);
        }

        &:focus {
            background-color: rgba(183, 0, 255, 0.473);
            transform: scale(1.1);
        }

        & span {
            font-size: 1.1rem;
        }

        & .itemImgCon {
            width: 120px;
            height: 120px;
            margin-bottom: 10px;
        }
    }

    .popup-content {
        width: 100%;
        max-width: 100%;
        padding: 20px 10px 20px 10px;
        height: 600px;
    }

    .popupFlexCon {
        margin-top: 20px;
        height: 90%;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: scroll;
    }

    #popup-desc {
        font-size: 1rem;
        width: 90%;
        padding: 5px !important;
    }

    .popupImgCon {
        /* margin-top: 0; */
        position: relative;
        width: 350px;
        height: 350px;
    }

    #popup-title {
        margin: 0;
        font-size: 1.3rem;
        color: #fff;
    }

    .contactGallery {
        width: 100% !important;
    }

    .contactCon{
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;

        & a {
            width: 100%;
            
            &:hover {
                transform: scale(1);
            }
        }
    }

    .mailForm {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        /* background-color: #0078ff; */

        & span {
            font-size: 1.7rem;
            color: #fff;
        }

        & div {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            gap: 10px;
        }

        & input {
            padding: 4px;
            border: 0;
            height: 35px;
            width: 100%;
            font-size: 1rem;
            border-radius: 5px;
            font-family: 'Comfortaa';
            outline: 0;

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & textarea {
            width: 100%;
            height: 200px;
            /* max-height: 200px; */
            overflow-y: scroll;
            resize: none;
            border-radius: 6px;
            font-family: 'Comfortaa';
            font-size: 1.1rem;

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & form {
            width: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        & button {
            width: 160px;
            height: 40px;
            border: 0;
            background-color: #0078ff;
            color: #fff;
            font-size: 1rem;
            font-family: 'Comfortaa';
            border-radius: 6px;
        }
    }
}

/* For screens between 481px and 768px (e.g., tablets in portrait or larger phones) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .gallery {
        /*grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));*/
        gap: 10px;
    }
}

/* For screens between 769px and 1024px (e.g., tablets in landscape or small laptops) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .gallery {
        /*grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));*/
        gap: 30px;
    }

    ul a {
        max-font-size: 1rem;
    }
}

/* For screens between 1025px and 1200px (e.g., desktops and large laptops) */
@media screen and (min-width: 1025px) and (max-width: 1200px) {
}

/* For screens 1201px and wider (e.g., extra-large screens and TVs) */
@media screen and (min-width: 1201px) and (max-width: 2559px) {

    ul a {
        max-font-size: 1.3rem;
        min-font-size: .8rem;
        font-size: 1.3rem;
        min-width: 100px;
        width: 200px;
        max-width: 200px;
    }
    
    .parallax {
        height: 850px;
    }

    .parallax video {
        animation: videoAppear 800ms cubic-bezier(.2,.9,.3,1) forwards;
    }

    .mailForm {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        /* background-color: #0078ff; */

        & span {
            font-size: 1.5rem;
            color: #fff;
        }

        & div {
            width: 100%;
            display: flex;
            justify-content: space-around;
            align-items: center;
            gap: 30px;
        }

        & input {
            padding: 4px;
            border: 0;
            height: 25px;
            width: 250px;
            font-size: 1rem;
            border-radius: 5px;
            font-family: 'Comfortaa';
            outline: 0;

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & textarea {
            width: 100%;
            height: 200px;
            /* max-height: 200px; */
            overflow-y: scroll;
            resize: none;
            border-radius: 6px;
            font-family: 'Comfortaa';

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & form {
            width: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        & button {
            width: 140px;
            height: 35px;
            border: 0;
            background-color: #0078ff;
            color: #fff;
            font-size: 1rem;
            font-family: 'Comfortaa';
            border-radius: 6px;
        }

    }
}

@media screen and (min-width: 2560px) {

    .parallax video {
        animation: videoAppear 800ms cubic-bezier(.2,.9,.3,1) forwards;
    }

    .mailForm {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        /* background-color: #0078ff; */

        & span {
            font-size: 1.7rem;
            color: #fff;
        }

        & div {
            width: 100%;
            display: flex;
            justify-content: space-around;
            align-items: center;
            gap: 30px;
        }

        & input {
            padding: 4px;
            border: 0;
            height: 35px;
            width: 300px;
            font-size: 1rem;
            border-radius: 5px;
            font-family: 'Comfortaa';
            outline: 0;

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & textarea {
            width: 100%;
            height: 200px;
            padding: 8px;
            overflow-y: scroll;
            resize: none;
            border-radius: 6px;
            font-family: 'Comfortaa';
            font-size: 1.1rem;

            &:focus {
                outline: 2.5px solid #0078ff;
            }
        }

        & form {
            width: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        & button {
            width: 160px;
            height: 40px;
            border: 0;
            background-color: #0078ff;
            color: #fff;
            font-size: 1rem;
            font-family: 'Comfortaa';
            border-radius: 6px;
        }

        & button:hover {
            background-color: #0037ff;
        }

        & button:active {
            background-color: #0078ff;
        }
    }
}