/* === media-display.css === */

/* Glavni prikaz medija */
#main-media {
    position: absolute;
    top: 25%; /* 30% visine parenta */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8f9fd; /* Pozadina ista kao cijela stranica */
}


/* BACK BUTTON */
#media-back-button {
    position: absolute;
    top: 3%;
    left: 3%;

    width: clamp(40px, 4vw, 56px);
    aspect-ratio: 1 / 1;

    /* uklanjamo sav vizual parenta */
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 20;

    transition: transform 0.15s ease;
}

/* IKONA ZAUZIMA CIJELI BUTTON */
#media-back-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

/* samo lagani hover feedback */
#media-back-button:hover {
    transform: scale(1.05);
}


/* Wrapper za sadržaj unutar medija */
#media-content {
    width: 60%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* mora biti transparentno za blendanje */
}

/* Element slike ili videa */
.media-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: transparent;
    mix-blend-mode: multiply;
    border: none;
}

#media-bottom-wrapper {
    gap: 2rem;
    position: absolute;
    bottom: 10%;
    width: 100%;
    height: 20%; 
    background-color: #f8f9fd;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center; /* ✅ centrira sve unutar, uključujući #thumbnail-list */
    padding: 0;
}

/* Naslov ispod slike */
#media-title {
    font-size: 2.4rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 1px 0;
    color: #222;
    font-family: "Montserrat";
}

.webgl-hidden {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    pointer-events: none;
    opacity: 0;
}
/* === 4K EKRANI (2560px+) === */
@media (min-width: 2560px) {
    #main-media {
        top: 45%;
    }
    #media-title {
        font-size: 3.5rem;
    }
}

/* === 2K EKRANI (2000px – 2559px) === */
@media (min-width: 2000px) and (max-width: 2559px) {
     #main-media {
        top: 40%;
    }
    #media-title {
        font-size: 2.2rem;
    }
}

/* === FULL HD i MANJI (< 1999px) === */
@media (max-width: 1999px) {
     #main-media {
        top: 40%;
    }
    #media-title {
        font-size: 2.4rem;
    }
}

/* === MOBILE / TABLET (max 1200px) === */
@media (max-width: 1200px) {
    #media-back-button {
        display: none !important;
    }
     #main-media {
        top: 35%;
        height: 45%;
    }
    #media-title {
        font-size: 1.2rem;
        padding-bottom: 0.2rem;
    }
    #media-bottom-wrapper {
        bottom: 3%;
        width: 90%;
        height: 28%; /* možeš povećati za dodatni prostor */
        justify-content: flex-end;
        gap: 0.5rem; /* razmak između title i thumbnail */
    }
    #media-content {
    width: 80%;
    }

}