/* ================================
   K2 Vídeos - CSS Final
   Versão: busca grande + select
================================ */

.k2-videos-section .k2-videos-heading,
.k2-videos-section .k2-videos-description,
.k2-videos-section .k2-videos-head {
    display: none !important;
}

.k2-videos-section {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 16px 70px;
}

/* ================================
   Toolbar: busca + categoria
================================ */

.k2-videos-toolbar {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: center;
}

.k2-videos-search-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.k2-videos-search {
    width: 100%;
    height: 58px;
    border: 1px solid rgba(230, 0, 18, 0.65) !important;
    border-radius: 999px !important;
    padding: 0 28px !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 16px !important;
    outline: none !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.045);
    transition: all 0.25s ease;
}

.k2-videos-search::placeholder {
    color: #777;
}

.k2-videos-search:focus {
    border-color: #e60012 !important;
    box-shadow: 0 16px 44px rgba(230, 0, 18, 0.12);
}

.k2-videos-category-wrap {
    width: 100%;
}

.k2-videos-category-select {
    width: 100%;
    height: 58px;
    border: 1px solid rgba(230, 0, 18, 0.65) !important;
    border-radius: 999px !important;
    padding: 0 48px 0 22px !important;
    background-color: #fff !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    outline: none !important;
    cursor: pointer;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.045);
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #e60012 50%),
        linear-gradient(135deg, #e60012 50%, transparent 50%);
    background-position:
        calc(100% - 24px) 25px,
        calc(100% - 17px) 25px;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    transition: all 0.25s ease;
}

.k2-videos-category-select:focus {
    border-color: #e60012 !important;
    box-shadow: 0 16px 44px rgba(230, 0, 18, 0.12);
}

/* Esconde filtros antigos, caso ainda existam por cache */
.k2-video-filters,
.k2-videos-filters {
    display: none !important;
}

/* ================================
   Home: busca + botão
================================ */

.k2-videos-home .k2-videos-home-actions {
    max-width: 940px;
    margin: 0 auto 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.k2-videos-home .k2-videos-search-wrap {
    margin: 0;
}

.k2-videos-more {
    margin: 0;
    text-align: center;
}

.k2-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-radius: 999px;
    border: 1px solid #111;
    background: #fff;
    color: #111 !important;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.22s ease;
}

.k2-more-btn:hover {
    background: #e60012;
    border-color: #e60012;
    color: #fff !important;
}

/* ================================
   Portfolio
================================ */

.k2-videos-section.k2-videos-portfolio {
    display: block;
}

.k2-videos-portfolio .k2-videos-grid,
.k2-videos-home .k2-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

/* ================================
   Card
================================ */

.k2-video-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

.k2-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.12);
}

.k2-video-thumb {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 0;
    padding: 0;
    background: #111;
    cursor: pointer;
}

.k2-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.k2-video-card:hover .k2-video-thumb img {
    transform: scale(1.04);
}

.k2-play,
.k2-video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding-left: 4px;
    transition: all 0.25s ease;
}

.k2-video-card:hover .k2-play,
.k2-video-card:hover .k2-video-play {
    background: #e60012;
}

.k2-video-info,
.k2-video-content {
    padding: 22px 24px 24px;
}

.k2-video-cat,
.k2-video-category {
    color: #e60012;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 5px;
}

.k2-video-sub,
.k2-video-category-description {
    color: #555;
    font-size: 15px;
    margin-bottom: 18px;
}

.k2-video-title {
    color: #111;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.26;
    margin: 0 0 20px;
}

.k2-video-btn,
.k2-video-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff !important;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.22s ease;
}

.k2-video-btn:hover,
.k2-video-button:hover {
    background: #e60012;
    color: #fff !important;
}

/* ================================
   Mensagens
================================ */

.k2-empty,
.k2-no-results,
.k2-videos-empty,
.k2-videos-no-results {
    text-align: center;
    color: #222;
    font-size: 17px;
    margin: 24px 0 30px;
}

/* ================================
   Modal
================================ */

.k2-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
}

.k2-video-modal.is-open {
    display: flex;
}

.k2-video-modal-inner {
    position: relative;
    width: min(100%, 960px);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.k2-video-modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.k2-video-modal-close {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #e60012;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* ================================
   Responsivo
================================ */

@media (max-width: 1024px) {
    .k2-videos-toolbar {
        grid-template-columns: minmax(0, 1fr) 260px;
        max-width: 100%;
    }

    .k2-videos-home .k2-videos-home-actions {
        grid-template-columns: minmax(0, 1fr) auto;
        max-width: 100%;
    }

    .k2-videos-portfolio .k2-videos-grid,
    .k2-videos-home .k2-videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .k2-videos-section {
        padding: 10px 14px 50px;
    }

    .k2-videos-toolbar,
    .k2-videos-home .k2-videos-home-actions {
        display: block;
        margin-bottom: 34px;
    }

    .k2-videos-search-wrap {
        margin-bottom: 14px !important;
    }

    .k2-videos-search,
    .k2-videos-category-select {
        height: 52px;
        font-size: 15px !important;
    }

    .k2-videos-more {
        margin-top: 14px;
    }

    .k2-more-btn {
        width: 100%;
        max-width: 290px;
    }

    .k2-videos-portfolio .k2-videos-grid,
    .k2-videos-home .k2-videos-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .k2-video-modal-close {
        right: 18px;
        top: 18px;
    }
}
