#sermons-wrapper {
    max-width: 1140px; /* Match common container widths */
    margin: 0 auto;
    padding: 20px 15px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#sermon-main-player {
    position: relative;
    margin-bottom: 30px;
}

.sermon-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border: 1px solid #444;
    border-radius: 5px;
}

.sermon-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.live-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #29d9d5; /* Cyan accent color */
    color: #ffffff;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 5px;
    z-index: 10;
    text-transform: uppercase;
}

#sermon-gallery-container {
    position: relative;
    padding: 0 50px;
}

#sermon-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0;
}

.sermon-thumbnail {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    cursor: pointer;
    background-color: #444;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    scroll-snap-align: start;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #29d9d5;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.gallery-arrow-left {
    left: 0;
}

.gallery-arrow-right {
    right: 0;
}

.gallery-arrow:hover {
    background-color: #1fb8b5;
}

.gallery-arrow:disabled {
    background-color: #666;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .sermon-thumbnail {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .gallery-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

.sermon-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.sermon-thumbnail img {
    width: 100%;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.sermon-thumbnail:hover img {
    opacity: 1;
}

.sermon-thumbnail p {
    padding: 15px;
    margin: 0;
    background-color: transparent;
    color: #ffffff; /* White text color */
    font-size: 15px;
    text-align: center;
    min-height: 70px; /* Ensure consistent height */
    display: flex;
    align-items: center;
    justify-content: center;
}
