/* ============================================
   SEÇÃO: DESTAQUE (CARROSSEL)
   ALTERAÇÕES: 
============================================ */

.carousel-wrapper-ce {
    position: relative;
    padding: 0 60px;
    /* Adicionado padding extra para acomodar o efeito hover */
    padding-top: 10px;
    padding-bottom: 10px;
}

.carousel-ce {
    overflow-x: hidden;
    /* ALTERAÇÃO 1: Mudado para visible para não cortar o card no hover */
    overflow-y: visible;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 50%;
    padding: 0 10px;
    box-sizing: border-box;
    /* Garantir espaço para o efeito hover */
    padding-top: 5px;
    padding-bottom: 5px;
}

.carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    /* ALTERAÇÃO 2: Sombra padrão aumentada */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    position: relative;
}

.carousel-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2),
                3px 3px 0 2px rgba(16, 97, 255, 0.7),
                3px 3px 4px rgba(16, 97, 255, 0.35);
}

/* ALTERAÇÃO 3: Efeito de clique - card afunda */
.carousel-link:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* ALTERAÇÃO 4: Animação de "entrada" no post após clique */
@keyframes fadeIntoPost {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

.carousel-link.clicking {
    animation: fadeIntoPost 0.4s ease-out forwards;
}

.carousel-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background-color: #f0f0f0;
}

.carousel-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    padding: 20px;
}

.carousel-title {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-link:hover .carousel-title {
    color: #2563eb;
}

.carousel-date {
    font-size: 0.8em;
    color: #777;
}

/* Botões do Carrossel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: #2563eb;
    box-shadow: 0 4px 16px rgba(16, 97, 255, 0.3);
}

.carousel-btn:hover svg {
    stroke: #fff;
}

.carousel-btn svg {
    stroke: #333;
    transition: stroke 0.3s ease;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-prev::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-left: 3px solid #1e1e1e;
    border-bottom: 3px solid #1e1e1e;
    transform: translate(-40%, -50%) rotate(45deg);
}

.carousel-next::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 3px solid #1e1e1e;
    border-top: 3px solid #1e1e1e;
    transform: translate(-60%, -50%) rotate(45deg);
}

/* Indicadores (Bolinhas) */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: #2563eb;
    width: 30px;
    border-radius: 5px;
}

/* ============================================
   RESPONSIVIDADE - SEÇÃO DESTAQUE (CARROSSEL)
   Aplica-se a: Controle Emocional + Plano de Carreira
   ============================================ */

/* ========== TABLET (768px - 1024px) ========== */
@media (max-width: 1024px) {
    .carousel-wrapper-ce {
        padding: 0 40px; /* Reduz padding lateral */
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

/* ========== MOBILE GRANDE (481px - 768px) ========== */
@media (max-width: 768px) {
    /* Wrapper - Reduz drasticamente o padding lateral */
    .carousel-wrapper-ce {
        padding: 0 15px !important; /* De 60px para 15px */
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        margin: 0 auto !important;
    }
    
    /* Cards - 1 card por vez em tela */
    .carousel-item {
        min-width: 100% !important; /* De 50% para 100% */
        padding: 0 8px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    
    /* Link do Card - Aumenta área clicável */
    .carousel-link {
        border-radius: 12px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
    }
    
    .carousel-link:hover {
        transform: translateY(-6px) !important;
    }
    
    .carousel-link:active {
        transform: translateY(-3px) scale(0.98) !important;
    }
    
    /* Thumbnail - Aumenta altura */
    .carousel-thumbnail {
        padding-top: 65% !important; /* De 60% para 65% */
    }
    
    /* Conteúdo do Card - Aumenta padding */
    .carousel-content {
        padding: 25px 20px !important; /* De 20px para 25px */
    }
    
    /* Título - Aumenta tamanho */
    .carousel-title {
        font-size: 1.4em !important; /* De 1.2em para 1.4em */
        line-height: 1.5 !important;
        margin-bottom: 12px !important;
        -webkit-line-clamp: 3 !important; /* Permite 3 linhas */
        font-weight: 700 !important;
    }
    
    /* Data - Aumenta tamanho */
    .carousel-date {
        font-size: 0.95em !important; /* De 0.8em para 0.95em */
        color: #666 !important;
        font-weight: 500 !important;
    }
    
    /* Botões de Navegação - Reduz tamanho */
    .carousel-btn {
        width: 35px !important;
        height: 35px !important;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2) !important;
    }
    
    .carousel-prev {
        left: 5px !important; /* Mais próximo da borda */
    }
    
    .carousel-next {
        right: 5px !important; /* Mais próximo da borda */
    }
    
    /* Setas dos botões - Reduz tamanho */
    .carousel-prev::before,
    .carousel-next::before {
        width: 8px !important;
        height: 8px !important;
        border-width: 2.5px !important;
    }
    
    /* Indicadores - Aumenta tamanho */
    .carousel-indicators {
        margin-top: 20px !important;
        gap: 8px !important;
    }
    
    .carousel-indicator {
        width: 12px !important;
        height: 12px !important;
    }
    
    .carousel-indicator.active {
        width: 35px !important;
        border-radius: 6px !important;
    }
}

/* ========== MOBILE MÉDIO (376px - 480px) ========== */
@media (max-width: 480px) {
    /* Wrapper - Otimiza ainda mais o espaço */
    .carousel-wrapper-ce {
        padding: 0 10px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    
    /* Cards */
    .carousel-item {
        padding: 0 6px !important;
    }
    
    /* Link do Card */
    .carousel-link {
        border-radius: 10px !important;
    }
    
    /* Thumbnail - Ajusta proporção */
    .carousel-thumbnail {
        padding-top: 60% !important;
    }
    
    /* Conteúdo do Card */
    .carousel-content {
        padding: 20px 16px !important;
    }
    
    /* Título - Mantém legibilidade */
    .carousel-title {
        font-size: 1.3em !important;
        line-height: 1.45 !important;
        margin-bottom: 10px !important;
    }
    
    /* Data */
    .carousel-date {
        font-size: 0.9em !important;
    }
    
    /* Botões - Menores ainda */
    .carousel-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .carousel-prev {
        left: 3px !important;
    }
    
    .carousel-next {
        right: 3px !important;
    }
    
    /* Setas dos botões */
    .carousel-prev::before,
    .carousel-next::before {
        width: 7px !important;
        height: 7px !important;
        border-width: 2px !important;
    }
    
    /* Indicadores */
    .carousel-indicators {
        margin-top: 18px !important;
        gap: 6px !important;
    }
    
    .carousel-indicator {
        width: 10px !important;
        height: 10px !important;
    }
    
    .carousel-indicator.active {
        width: 30px !important;
    }
}

/* ========== MOBILE PEQUENO (até 375px) ========== */
@media (max-width: 375px) {
    /* Wrapper - Máxima otimização */
    .carousel-wrapper-ce {
        padding: 0 8px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* Cards */
    .carousel-item {
        padding: 0 5px !important;
    }
    
    /* Thumbnail */
    .carousel-thumbnail {
        padding-top: 58% !important;
    }
    
    /* Conteúdo do Card */
    .carousel-content {
        padding: 18px 14px !important;
    }
    
    /* Título */
    .carousel-title {
        font-size: 1.2em !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    
    /* Data */
    .carousel-date {
        font-size: 0.85em !important;
    }
    
    /* Botões - Mínimo recomendado */
    .carousel-btn {
        width: 30px !important;
        height: 30px !important;
    }
    
    .carousel-prev {
        left: 2px !important;
    }
    
    .carousel-next {
        right: 2px !important;
    }
    
    /* Setas dos botões */
    .carousel-prev::before,
    .carousel-next::before {
        width: 6px !important;
        height: 6px !important;
        border-width: 2px !important;
    }
}

/* ========== MELHORIAS DE UX (Todos os dispositivos) ========== */

/* Área de toque maior para botões mobile */
@media (max-width: 768px) {
    .carousel-btn::after {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        /* Área invisível aumenta zona de clique */
    }
    
    /* Feedback tátil ao tocar */
    .carousel-btn:active {
        transform: translateY(-50%) scale(0.9);
        transition: transform 0.1s ease;
    }
    
    .carousel-link:active {
        opacity: 0.9;
    }
}

/* Transição suave ao mudar orientação */
@media (max-width: 768px) {
    .carousel-wrapper-ce,
    .carousel-item,
    .carousel-link,
    .carousel-title,
    .carousel-date {
        transition: all 0.3s ease;
    }
}

/* Previne seleção acidental de texto ao deslizar */
@media (max-width: 768px) {
    .carousel-wrapper-ce {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========== ACESSIBILIDADE ========== */

/* Aumenta área de foco para navegação por teclado */
.carousel-btn:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.carousel-indicator:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

/* ========== PERFORMANCE ========== */

/* Otimiza renderização em mobile */
@media (max-width: 768px) {
    .carousel-track {
        will-change: transform;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .carousel-link {
        will-change: transform, box-shadow;
    }
}