/* ============================================
   ESTRATÉGIAS - CARROSSÉIS (VERSÃO 4.0 - Netflix Style)
   ✅ Header com animação de entrada
   ✅ Scroll vertical mobile não bloqueado
   ✅ Momentum/fluidez no deslize mobile
   ✅ Visual Netflix Style
============================================ */

.bc-estrategias-archive {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================
   HEADER COM ANIMAÇÃO
   - Linha azul expande do centro para as bordas
   - Título e descrição fazem fade-in com delay
============================================ */

.bc-archive-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    position: relative;
    /* Ocultar inicialmente para a animação */
    overflow: visible;
}

/* Linha azul animada (substitui border-bottom) */
.bc-archive-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 0%;
    background: #2563eb;
    border-radius: 2px;
    /* Animação: linha expande do centro */
    animation: bc-line-expand 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

@keyframes bc-line-expand {
    from {
        width: 0%;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Título: fade-in + sobe levemente */
.bc-archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(12px);
    animation: bc-fade-up 0.6s ease 0.3s forwards;
}

/* Descrição: fade-in com delay maior */
.bc-archive-description {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(8px);
    animation: bc-fade-up 0.6s ease 0.55s forwards;
}

@keyframes bc-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BOTÃO VOLTAR
============================================ */

.bc-voltar-estrategias {
    margin-bottom: 25px;
}

.bc-btn-voltar {
    padding: 8px 16px;
    background: transparent;
    color: #2563eb;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #2563eb;
    transition: all 0.3s ease;
}

.bc-btn-voltar:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ============================================
   CARROSSEL POR CONCURSO - CONTAINER
============================================ */

.bc-carrossel-concurso {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.bc-carrossel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.bc-carrossel-titulo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bc-ver-todos {
    padding: 8px 16px;
    background: transparent;
    color: #2563eb;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #2563eb;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bc-ver-todos:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ============================================
   WRAPPER + CONTAINER DO CARROSSEL
============================================ */

.bc-carrossel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.bc-carrossel-container {
    width: 100%;
    border-radius: 12px;
    position: relative;
    padding: 12px 0;
    overflow: hidden;
}

.bc-carrossel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5px;
    /* Cursor padrão - JS controla durante drag */
    cursor: grab;
    /* Importante: não usar overflow aqui, o container já cuida disso */
    will-change: transform;
}

.bc-carrossel-track:active {
    cursor: grabbing;
}

.bc-carrossel-track * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ============================================
   CARDS - NETFLIX STYLE
   Thumbnail colorida + tag + título + meta
============================================ */

.bc-carrossel-card {
    min-width: calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
    width: calc((100% - 40px) / 3);
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

.bc-carrossel-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        4px 4px 0 #1a73e8,
        0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #1a73e8;
}

.bc-carrossel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Badge Hub/Satélite */
.bc-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.bc-badge-hub {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bc-badge-satelite {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Thumbnail */
.bc-carrossel-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bc-carrossel-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bc-carrossel-card:hover .bc-carrossel-thumbnail img {
    transform: scale(1.08);
}

/* Conteúdo do card */
.bc-carrossel-content {
    padding: 16px;
    box-sizing: border-box;
}

/* Tag de etapa (estilo Netflix: texto colorido em caps) */
.bc-carrossel-etapa {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 6px;
}

/* Título */
.bc-carrossel-card-titulo {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

/* Meta (vagas + data) — estilo Netflix: chips discretos */
.bc-carrossel-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bc-carrossel-meta-item {
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.72rem;
    color: #475569;
    font-weight: 500;
    padding: 3px 9px;
}

/* Footer: data + CTA */
.bc-carrossel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.bc-carrossel-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

.bc-carrossel-cta {
    font-size: 0.78rem;
    color: #2563eb;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.bc-carrossel-card:hover .bc-carrossel-cta {
    transform: translateX(4px);
}

/* ============================================
   BOTÕES DE NAVEGAÇÃO - DESKTOP
============================================ */

.bc-carrossel-prev,
.bc-carrossel-next {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    z-index: 10;
    pointer-events: auto;
}

.bc-carrossel-prev:hover:not(:disabled),
.bc-carrossel-next:hover:not(:disabled) {
    background: #1e40af;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.bc-carrossel-prev:active:not(:disabled),
.bc-carrossel-next:active:not(:disabled) {
    transform: scale(0.95);
}

.bc-carrossel-prev:disabled,
.bc-carrossel-next:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.bc-carrossel-prev svg,
.bc-carrossel-next svg {
    width: 24px !important;
    height: 24px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

button svg {
    pointer-events: none;
    display: block;
}

/* Indicadores */
.bc-carrossel-indicadores {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.bc-indicador-atual {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.05rem;
}

/* ============================================
   GRID FILTRADO
============================================ */

.bc-estrategias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.bc-estrategia-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.bc-card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.bc-estrategia-card:hover {
    transform: translateY(-4px);
    box-shadow: 3px 3px 0 #1a73e8, 0 5px 15px rgba(0, 0, 0, 0.46);
    border-color: #1a73e8;
}

.bc-card-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bc-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bc-card-content {
    padding: 20px;
}

.bc-card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bc-meta-tag {
    display: inline-flex;
    padding: 3px 8px;
    background: #f1f5f9;
    border-radius: 5px;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.bc-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.bc-card-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

.bc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.bc-btn-ler-mais-styled {
    display: inline-block;
    padding: 7px 14px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================
   DESKTOP: Botões brancos com hover azul
============================================ */

@media (min-width: 769px) {

    .bc-carrossel-prev,
    .bc-carrossel-next {
        width: 70px !important;
        height: 70px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    .bc-carrossel-prev svg,
    .bc-carrossel-next svg {
        width: 28px !important;
        height: 28px !important;
        color: #2563eb !important;
        stroke: #2563eb !important;
    }

    .bc-carrossel-prev:hover:not(:disabled),
    .bc-carrossel-next:hover:not(:disabled) {
        background: #2563eb !important;
        box-shadow: 0 7px 25px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    }

    .bc-carrossel-prev:hover:not(:disabled) svg,
    .bc-carrossel-next:hover:not(:disabled) svg {
        color: white !important;
        stroke: white !important;
    }

    .bc-carrossel-botoes-mobile {
        display: none !important;
    }
}

/* ============================================
   MOBILE: 1 card + Scroll vertical liberado
   + Momentum no swipe horizontal
============================================ */

@media (max-width: 768px) {

    .bc-estrategias-archive {
        padding: 25px 0;
    }

    /* Header: animação menor no mobile */
    .bc-archive-title {
        font-size: 1.8rem;
        padding: 0 15px;
    }

    .bc-archive-description {
        padding: 0 15px;
        font-size: 1rem;
    }

    .bc-carrossel-concurso {
        padding: 15px 0;
        margin-left: 1px;
        margin-right: 1px;
        margin-bottom: 30px;
    }

    .bc-carrossel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 15px 15px;
    }

    .bc-carrossel-titulo {
        font-size: 1.3rem;
    }

    .bc-ver-todos {
        width: 100%;
        text-align: center;
        padding: 7px 14px;
        font-size: 0.85rem;
    }

    /* Esconder botões de navegação desktop */
    .bc-btn-desktop {
        display: none !important;
    }

    .bc-carrossel-wrapper {
        padding: 0 !important;
        gap: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .bc-carrossel-container {
        overflow: hidden !important;
        padding: 12px 0 !important;
        width: 100% !important;
    }

    /*
     * MOBILE SCROLL FIX:
     * touch-action: pan-x permite ao JS capturar o swipe horizontal
     * sem bloquear o scroll vertical da página.
     * O JS complementa isso com detecção de direção.
     */
    .bc-carrossel-track {
        display: flex !important;
        gap: 14px !important;
        padding: 0 15px !important;
        width: fit-content !important;
        /* Não usar overflow-x aqui — o JS controla via transform */
        touch-action: pan-y; /* ✅ libera scroll vertical, JS cuida do horizontal */
    }

    /* 1 card por vez no mobile */
    .bc-carrossel-card {
        min-width: calc(100vw - 44px) !important;
        max-width: calc(100vw - 44px) !important;
        width: calc(100vw - 44px) !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        /* Hover desativado no touch */
        transform: none;
    }

    .bc-carrossel-content {
        padding: 14px !important;
        box-sizing: border-box !important;
    }

    .bc-carrossel-thumbnail {
        width: 100% !important;
    }

    .bc-carrossel-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Botões mobile (setas abaixo do carrossel) */
    .bc-carrossel-botoes-mobile {
        display: flex !important;
        gap: 18px;
        justify-content: center;
        margin-top: 20px;
        margin-bottom: 12px;
        padding: 0 15px;
    }

    .bc-carrossel-botoes-mobile .bc-carrossel-prev,
    .bc-carrossel-botoes-mobile .bc-carrossel-next {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background: #2563eb !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
        transition: background 0.3s ease !important;
        flex-shrink: 0 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    .bc-carrossel-botoes-mobile .bc-carrossel-prev svg,
    .bc-carrossel-botoes-mobile .bc-carrossel-next svg {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        color: white !important;
        stroke: white !important;
        stroke-width: 2.5 !important;
        fill: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }

    .bc-carrossel-botoes-mobile svg polyline {
        stroke: white !important;
        stroke-width: 2.5 !important;
        fill: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .bc-carrossel-botoes-mobile .bc-carrossel-prev:active:not(:disabled),
    .bc-carrossel-botoes-mobile .bc-carrossel-next:active:not(:disabled) {
        background: #1e40af !important;
    }

    .bc-carrossel-botoes-mobile button:disabled {
        background: #cbd5e1 !important;
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
    }

    .bc-carrossel-indicadores {
        padding: 0 15px;
        margin-top: 10px;
        font-size: 0.85rem;
    }

    .bc-estrategias-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 20px;
    }
}

/* ============================================
   TABLET: 2 cards visíveis
============================================ */

@media (min-width: 769px) and (max-width: 1200px) {
    .bc-carrossel-card {
        min-width: calc((100% - 16px) / 2) !important;
        max-width: calc((100% - 16px) / 2) !important;
        width: calc((100% - 16px) / 2) !important;
    }
}

/* ============================================
   GARANTIAS GLOBAIS
============================================ */

.bc-carrossel-wrapper {
    position: relative;
}

.bc-carrossel-track {
    cursor: grab;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bc-carrossel-track:active {
    cursor: grabbing;
}