/* StyleRef for Portfolio Pages */
header img {
    width: 100px;
    height: 100px;
}

main {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 80%;
    margin: 2% auto;
    padding: 0 10px; 
    background-image: url(images/Backdrop.png);
    background-size: 200%;
    border-radius: 20px;
    border: 3px solid #363F55
}

/* Headlines /all */
.headline {
    text-transform: uppercase;
    text-align: center;
    margin: 50px auto 10px;
    font-size: 3rem;
    width: 40%;
    font-weight: 600;
    background-color: #3a4663;
    border: 2px solid #1D2434;
    padding: 0px 20px;
    border-radius: 50px;
}

.subheadline {
    margin: 10px 1px 20px;
    text-align: center;
    font-size: 1.3em;
    width: fit-content;
    font-weight: 400;
}

/* Full Image Overlay */
#full-image-view {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: fixed;

    width: 100%;
    height: 100%;
    top: 0;
    left: 0;

    background-color: rgba(0, 0, 0, .9);
    text-align: center;
    object-fit: cover;
    z-index: 1000;

    
}

#fullimage {
    padding: 24px;
    max-width: 98%;
    max-height: 95%;
    object-fit: contain;
}

.image-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 98%;
    max-height: 98%;
}

/* Overlay content Style */
 #full-video-view {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    width: 100%;
    height: 100%;
    top: 0;
    left: 0;

    background-color: rgba(0, 0, 0, .9);
    text-align: center;
    object-fit: cover;
    z-index: 1000;
}

#fullvideo {
    position: relative;
    padding: 24px;
    max-width: 98%;
    max-height: 95%;
    object-fit: contain;
}

#fullimage {
    padding: 24px 24px 24px 24px;
    max-width: 98%;
    max-height: 95%;
    object-fit: contain;
}

/* Container1 = Illustration Tab */

.flex-gallery {
    width: 99%;
    max-width: 2000px;
    margin: 40px auto 100px;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 3px solid #1D2434;
    transition: 0.5s;
}
.image-wrapper:hover img {
    transform: scale(102%);
    transition: 0.5s;
}

.image-wrapper:hover .overlay {
    opacity: 1;
    cursor: pointer;
    transform: scale(102%);
    transition: 0.5s;
    border: 3px solid #ffffff;
}

.row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 10px;
}

.column {
    display: flex;
    gap: 10px;
    flex-direction: column;
    flex: 1 1 calc(25% - 10px); /* Flex basis with a gap between items */
    max-width: calc(30% - 10px); /* Adjust to account for gap */
    box-sizing: border-box;
}

/* Container2 = 3D Models Tab */

.wrapper {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: 0.5s;
    border-radius: 5%;
    border: 3px solid  #414c68;
}

.wrapper img, .wrapper video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    grid-template-rows: repeat(1, 1fr); 
    gap: 8px;

    width: 99%; 
    max-width: 100%; /* Ensure it doesn't exceed the parent width */
    margin: 40px 5% 100px; 
    border-radius: 20px;
    justify-content: center;
}

.grid-layout .transform {
    transition: 0.5s;
}
.grid-layout .transform:hover .overlay{
    opacity: 1;
    cursor: pointer;
    transform: scale(102%);
    transition: 0.5s;
    
}
.grid-layout .transform:hover {
    transform: scale(102%);
    transition: 0.5s;
}

.grid-layout .transform:hover .wrapper {
    border: 3px solid #ffffff;
}
/* Media Queries */

/* medium screens */
@media screen and (max-width: 1030px) {
    main {
        max-width: 90%;
        background-size: 700%;
    }
    .column {
        flex: 1 1 calc(100%); /* Two columns on medium screens */
        max-width: calc(100%);
        margin-top: 10px;
    }

    .grid-layout, .image-container3 {
        grid-template-columns: repeat(2, 1fr); /* Two columns on medium screens */
    }

    .headline {
        padding: 0px;
        width: 99%;      
    }

    #fullimage {
        padding: 0px 0px 7px 0px;
        max-width: 100%;
        max-height: 100%;
    }

    #fullvideo {
        padding: 0px;
        max-width: 100%;
        max-height: 100%;
    }

    .row {
        gap: 0px;
    }
}

/*small screens */
@media screen and (max-width: 600px) {
    .column {
        flex: 1 1 100%; /* Single column layout on small screens */
        max-width: 100%;
    }
    .grid-layout, .image-container3 {
        grid-template-columns: 1fr; 
    } 

    .wrapper {
        width: 100%;
        height: auto;
    }

    
    #fullimage {
        padding: 0px 0px 10px 0px;
        max-width: 100%;
        max-height: 100%;
    }

    .row {
        gap: 0px;
    }

    .headline {
        font-size: 2.3rem;
    }
}
