.random-photo .text,
.random-photo .uppertext {
    box-sizing: border-box;
}

.random-photo a {
    -webkit-text-stroke: 0 !important;
}

.random-photo .mySlides {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, height 0.5s ease-in-out;
    top: 0;
    border-radius: 10px;
    overflow: hidden;
}

.random-photo .slideshow-container {
    max-width: 1000px;
    position: relative;
    margin-top: 10px;
    overflow: hidden;
    background-color: #f2f2f2;
    border-radius: 10px;
    height: 209px; /* Set height based on 4:3 aspect ratio with width 278px instead auto for visibility in moment*/;
    transition: height 0.5s ease-in-out; /* Add a smooth height transition */
}

.random-photo .text,
.random-photo .uppertext {
    color: #f2f2f2;
    font-size: 10px;
    font-family: Verdana, sans-serif;
    padding: 8px 8px;
    position: absolute;
    width: 100%;
    text-align: center;
    text-shadow: 
        2px 2px 4px black,                 /* Sharp black shadow */
        0 0 30px rgba(0, 0, 0, 0.7),       /* Larger soft black glow */
        0 0 10px black,                    /* Dark blue glow */
        -1px -1px 5px rgba(0, 0, 0, 0.5),  /* Additional shadow in the top-left */
        1px -1px 5px rgba(0, 0, 0, 0.5),   /* Additional shadow in the top-right */
        -1px 1px 5px rgba(0, 0, 0, 0.5),   /* Additional shadow in the bottom-left */
        1px 1px 5px rgba(0, 0, 0, 0.5);    /* Additional shadow in the bottom-right */
}

.random-photo .text {
    bottom: 0;
}

.random-photo .uppertext {
    top: 0;
}

.random-photo .active {
    background-color: #717171;
}

@media only screen and (max-width: 300px) {
    .random-photo .text {
        font-size: 11px;
    }
}