.sermons{
    min-height: 80vh;
    padding: 5rem 10vw; 
    margin-bottom: 40vh;
}

.sermons header{
    height: 80px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem; 
}

.sermons .tags{ 
    font-size: .85rem; 
    display: flex;
    align-items: center;
    height: 50px;
    gap: 1rem;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0; 

    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;         /* Firefox */
}

.sermons .tags::-webkit-scrollbar {
    display: none;                  /* Chrome / Safari */
}

.sermons .tags li{
    flex: 0 0 auto;
    padding: .5rem 1rem;
    background-color: #373535;
    border-radius: 10px; 
    transition: all .3s ease-in-out;
}

.sermons .tags li:hover,
.sermons .tags li.active{
    background-color: #663399;
    color: #fff;
}

.search-form {
    width: 100%;
    max-width: 520px;
}

.form-control {
    display: flex;
    align-items: stretch;
    height: 50px;
    background: #121212;
    border: 1px solid #303030;
    border-radius: 999px;
    overflow: hidden;
}

.form-control input {
    flex: 1;
    padding: .75rem 1rem;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: .95rem;
}

.form-control input::placeholder {
    color: #aaa;
}

.form-control button {
    background: #303030;
    border: none;
    padding: 0 1.2rem;
    height: 100%;
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.form-control button:hover {
    background: #3f3f3f;
}


.sermons .sermon-cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    height: auto;
    position: relative;
}

.sermon-card {
    max-width: 360px;
}

.video-thumb,
.sermon-card video {
    position: relative; 
    cursor: pointer;
    max-height: 320px; 
    overflow: hidden;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #333;
}

.video-thumb video {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.video-thumb img {
    width: 100%;
    display: block;
}

.play-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    inset: 0;
    display: flex;
    align-self: center;
    justify-self: center;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.493);
    border-radius: 50%;
}

.play-icon i {
    color: white;
    font-size: 2rem;  
}

.sermon-card h2 {
    margin: 12px 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
}

.sermon-card p { 
    font-size: 0.9rem;
}

.watch-btn {
    margin-top: 8px;
    background: none;
    border: none;
    color: #065fd4;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 600px) {
    .sermons header {
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: .1rem;
    }

    .sermons .tags{
        margin-bottom: 1rem;
    }

    .search-form {
        max-width: 100%;
    }

    .sermons {
        max-width: 100%;
        margin-bottom: auto;
    }
}