/*
 * Página de vídeos: grid em cards, toolbar com busca (1185px), estado vazio amigável.
 */

.videos-page {
    max-width: 1185px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 8px 16px 48px !important;
    box-sizing: border-box !important;
    clear: both !important;
    position: relative !important;
    float: none !important;
    display: block !important;
    text-align: left;
}

.videos-page .videos-toolbar,
.videos-page #midias,
.videos-page .videos-grid {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
}

.videos-page .page-title {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.videos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.videos-toolbar__results {
    flex: 1 1 240px;
    margin: 0;
}

.videos-toolbar__results .text-label {
    margin: 0;
    font-size: 14px;
    color: #636363;
    line-height: 1.4;
}

.videos-toolbar__search {
    flex: 0 1 360px;
    max-width: 100%;
}

.videos-toolbar__search .form-horizontal {
    margin: 0;
}

.videos-search-wrap {
    position: relative;
    display: block;
}

.videos-search-wrap .videos-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #eb8602;
    font-size: 15px;
    pointer-events: none;
    opacity: 0.85;
}

.videos-toolbar__search .form-control {
    height: 44px;
    padding: 8px 16px 8px 42px;
    font-size: 15px;
    font-weight: 400;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.videos-toolbar__search .form-control:focus {
    border-color: #eb8602;
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 68, 137, 0.15);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 991px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }

    .videos-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    /* Em column o flex-basis vira altura: reseta para o conteudo nao ficar gigante. */
    .videos-toolbar__results,
    .videos-toolbar__search {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

/* Card de vídeo */
.video-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.video-card:hover {
    box-shadow: 0 10px 28px rgba(35, 68, 137, 0.12);
    border-color: rgba(35, 68, 137, 0.35);
}

.video-card__embed {
    position: relative;
    width: 100%;
    background: #1a1a1a;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    text-align: center;
}

.video-card__embed * {
    float: none !important;
    max-width: 100%;
}

.video-card__embed > div,
.video-card__embed > p,
.video-card__embed .video-container,
.video-card__embed p {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    float: none !important;
}

.video-card__embed iframe,
.video-card__embed .video-iframe,
.video-card__embed embed,
.video-card__embed object,
.video-card__embed video {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    border: 0 !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    min-height: 180px;
    height: 56.25vw;
    max-height: 360px;
}

@supports (aspect-ratio: 16 / 9) {
    .video-card__embed iframe,
    .video-card__embed .video-iframe,
    .video-card__embed embed,
    .video-card__embed object,
    .video-card__embed video {
        aspect-ratio: 16 / 9;
        height: auto !important;
        max-height: none;
    }
}

.video-card__body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: #383838;
}

.video-card__desc {
    font-size: 14px;
    line-height: 1.5;
    color: #5a5a5a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card__desc:empty {
    display: none;
}

/* Paginação */
.videos-pagination {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.videos-pagination .pagination {
    margin: 0;
}

.videos-pagination .pagination > li > a {
    color: #eb8602;
    border-color: #ddd;
}

.videos-pagination .pagination > .active > a,
.videos-pagination .pagination > .active > a:focus,
.videos-pagination .pagination > .active > a:hover {
    background-color: #eb8602;
    border-color: #eb8602;
}

/* Estado vazio (lista sem vídeos) */
.videos-empty {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    float: none;
    text-align: center;
    padding: 56px 28px 52px;
    background: linear-gradient(165deg, #f6f8fb 0%, #ffffff 55%);
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    margin: 0;
    box-shadow: 0 2px 12px rgba(35, 68, 137, 0.06);
}

.videos-empty__icon {
    display: block;
    font-size: 52px;
    line-height: 1;
    color: #eb8602;
    opacity: 0.28;
    margin-bottom: 18px;
}

.videos-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #383838;
    margin: 0 0 12px;
    line-height: 1.35;
}

.videos-empty__hint {
    font-size: 15px;
    font-weight: 400;
    color: #777;
    margin: 0 auto;
    max-width: 440px;
    line-height: 1.55;
}

/* Mensagem compacta (busca AJAX sem resultado) */
.videos-empty--inline {
    padding: 36px 20px;
}

.videos-empty--inline .videos-empty__icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.videos-empty--inline .videos-empty__title {
    font-size: 17px;
}

.k-breadcrumbs .width-padrao {
    padding-left: 16px;
    padding-right: 16px;
}
