/* General Styles */
#gallery {
    padding: 20px;
}

.tm-gallery-header {
    margin-bottom: 20px;
}

.tm-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.tm-gallery-item-video {
    flex: 1 1 calc(50% - 30px); /* Two columns with 30px gap */
    box-sizing: border-box;
}

.tm-gallery-item-video iframe {
    width: 100%;
    height: 450px; /* Set height to around 350px */
    border: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Tablets and larger mobile devices */
@media (max-width: 768px) {
    .tm-gallery {
        flex-direction: column;
    }

    .tm-gallery-item-video {
        flex: 1 1 100%;
        height: 350px;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    .tm-gallery {
        flex-direction: column;
    }

    .tm-gallery-item-video {
        flex: 1 1 100%;
        height: 350px;
    }
        .tm-gallery-item-video iframe{
            width: 120%;
            height: 250px;
        }
    
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .nav-items {
        order: 1;
        margin-bottom: 10px;
    }

    .social-icons {
        order: 2;
        display: flex;
        justify-content: center;
        width: 100%;
        margin-left: 127px;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
    }

    .nav-items {
        order: 1;
        margin-bottom: 10px;
    }

    .social-icons {
        order: 2;
        display: flex;
        justify-content: center;
        width: 100%;
    }
}