/*
======================================================================
=-----------------------------VIDEO----------------------------------=
======================================================================
*/

.video-container {
    max-width: 100%;
    padding: 20px;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
}

.video-wrapper {
  position: relative;
  max-width: 800px;
  width: 100%;
}

video {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 25px;
    box-shadow: 0px 4px 12px #afafaffa;
}

.video-container .video-overlay {
    position: absolute;
    top: 25px;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
}

.video-overlay a{
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.video-overlay a:hover {
    color: #398C7C;
}

/*
======================================================================
=-----------------------------GALLERY--------------------------------=
======================================================================
*/

section#gallery {
    display: flex;
    flex-direction: column;
    justify-items: center;
    justify-content: center;
    align-items: center;
    left: 0;
    margin: 0 auto;
}

section#gallery div.gallery-header {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-items: center;
    align-items: center;
}

section#gallery div.gallery-header div{
    display: block;
    background-color: black;
    height: 1.5px;
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: 0;
}

section#gallery div.gallery-header h1{
    background-color: white;
    z-index: 1;
    position: relative;
    padding: 0 5px;
    text-align: center;
    max-width: 85%;
}

section#gallery div.gallery-image-container {
    border-radius: 25px;
    box-shadow: 0px 4px 12px #afafaffa;
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
    max-width: 100%;
}

section#gallery div.gallery-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
    border-radius: 8px;
}


section#gallery div.gallery-image-container img:hover{
    transform: scale(1.05);
} 

/*
======================================================================
=----------------------GALLERY PREVIEW DIALOG------------------------=
======================================================================
*/

div#gallery-dialog-background {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #000000EE;
    z-index: 1000;
    width: 100%;
    height: 100%;
}

span#gallery-dialog-close {
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    position: absolute;
    display: block;
    background-size: 100% 100%;
    cursor: pointer;
    background-image: url("../images/icons/close.svg");
    aspect-ratio: 1 / 1;
    right: 25px;
    top: 25px;
    transition: 0.2s;
}

div#gallery-dialog-background.active {
    display: block;
}

span#gallery-dialog-close:hover {
    background-image: url("../images/icons/close-white.svg");
}

div#gallery-dialog-preview-container {
    aspect-ratio: 16 / 9;
    /*background-color: #000000B0;*/
    top: 5%;
    width: 60%;
    left: 20%;
    position: relative;
    overflow: hidden;
}

img#gallery-dialog-image-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

div#gallery-dialog-image-list {
    display: flex;
    gap: 15px;
    height: 20%;
    width: 98.8%;
    left: 0.6%;
    bottom: 0;
    position: absolute;
    overflow-x: auto;
    padding: 10px 0px;
    z-index: 1;
    scrollbar-width: thin;          /* thin, auto, none */
    scrollbar-color: #888 #0f0f0f; 

    -webkit-mask-image: linear-gradient(to right, transparent, black 0.5%, black 99.5%, transparent);
    mask-image: linear-gradient(to right, transparent, black 0.5%, black 99.5%, transparent);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-overflow-scrolling: touch;
}

div#gallery-dialog-image-list::-webkit-scrollbar {
    height: 4px;
}

div#gallery-dialog-image-list::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

div#gallery-dialog-image-list::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

div#gallery-dialog-image-list::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-radius: 4px;
}


div#gallery-dialog-image-list img {
    filter: grayscale(0.75);
    transition: 0.25s;
    cursor: pointer;
    z-index: 0;
}

div#gallery-dialog-image-list img:hover {
    filter: grayscale(0);
}

div#gallery-dialog-image-list img.active {
    filter: grayscale(0);
}

/*------------------------NAVIGATION BUTTONS------------------------*/

div#gallery-dialog-preview-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
}

div#gallery-dialog-preview-buttons > button {
    position: absolute;
    width: 45px;
    height: 60px;
    cursor: pointer;
    background-color: #00000060;
    border: none;
}

div#gallery-dialog-preview-buttons > button#gallery-button-prev {
    left: 0;
    border-radius: 0px 5px 5px 0px;
}

div#gallery-dialog-preview-buttons > button#gallery-button-next {
    right: 0;
    border-radius: 5px 0px 0px 5px;
}

div#gallery-dialog-preview-buttons span {
    background-size: 100% 100%;
    display: block;
    height: auto;
    aspect-ratio: 1/1;
    width: 28px;
    transition: 0.2s;
}

div#gallery-dialog-preview-buttons > button#gallery-button-prev > span {
    background-image: url("../images/icons/left-gray.svg");
}


div#gallery-dialog-preview-buttons > button#gallery-button-next > span {
    background-image: url("../images/icons/right-gray.svg");
}

div#gallery-dialog-preview-buttons > button#gallery-button-prev:hover > span {
    background-image: url("../images/icons/left-white.svg");
}

div#gallery-dialog-preview-buttons > button#gallery-button-next:hover > span {
    background-image: url("../images/icons/right-white.svg");
}

@media screen and (min-width: 961px) and (max-width: 1280px){
    div#gallery-dialog-preview-container {
        aspect-ratio: 4/3;
        width: 80%;
        left: 10%;
        top: 5%;
    }
}

@media screen and (max-width: 960px) {
    div#gallery-dialog-preview-container {
        aspect-ratio: 4/3;
        width: 90%;
        left: 5%;
        top: 6%;
    }

    div#gallery-dialog-preview-buttons > button {
        background-color: #0000009c;
        width: 45px;
        height: 60px;
    }

    div#gallery-dialog-preview-buttons span {
        background-size: 100% 100%;
        display: block;
        height: auto;
        aspect-ratio: 1/1;
        width: 28px;
        transition: 0.2s;
    }

    div#gallery-dialog-image-list {
        bottom: 5%;
    }
}