/* Carousel Box-Livro SIMPLES com Autoplay - PANETI */

/* Regras específicas para sobrescrever estilos do tema principal */
.publicacoes-carousel .box-livro a img,
.publicacoes-carousel .box-livro img {
    border-radius: 15px !important;
}

/* Reset de conflitos com outros estilos */
.publicacoes-carousel .box-livro a {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Container de publicações antes da transformação */
.publicacoes-carousel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
}

.publicacoes-carousel .box-livro {
    flex: 0 0 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
    height: 420px;
    cursor: pointer;
}

.publicacoes-carousel .box-livro:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Container da imagem */
.publicacoes-carousel .img-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.publicacoes-carousel .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px !important;
    transition: transform 0.3s ease;
}

.publicacoes-carousel .box-livro:hover .img-container img {
    transform: scale(1.05);
}

/* Overlay */
.publicacoes-carousel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 186, 0.9), rgba(0, 86, 130, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.publicacoes-carousel .box-livro:hover .overlay {
    opacity: 1;
    visibility: visible;
}

.publicacoes-carousel .overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.publicacoes-carousel .box-livro:hover .overlay-content {
    transform: translateY(0);
}

.publicacoes-carousel .pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: white;
}

.publicacoes-carousel .view-btn,
.publicacoes-carousel .ver-publicacao-btn {
    background: #ffffff;
    color: #007cba;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.publicacoes-carousel .view-btn:hover,
.publicacoes-carousel .ver-publicacao-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Container principal após transformação */
.box-livro-carousel-container {
    position: absolute;
    margin: 0;
    padding: 0;
}

/* Wrapper do carousel */
.box-livro-carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.box-livro-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.box-livro-carousel-wrapper .box-livro {
    flex: 0 0 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
    height: 36rem;
    cursor: pointer;
    scroll-snap-align: start;
}

.box-livro-carousel-wrapper .box-livro:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.box-livro-carousel-wrapper .img-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.box-livro-carousel-wrapper .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px !important;
    transition: transform 0.3s ease;
}

.box-livro-carousel-wrapper .box-livro:hover .img-container img {
    transform: scale(1.05);
}

.box-livro-carousel-wrapper .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 186, 0.9), rgba(0, 86, 130, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.box-livro-carousel-wrapper .box-livro:hover .overlay {
    opacity: 1;
    visibility: visible;
}

.box-livro-carousel-wrapper .overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.box-livro-carousel-wrapper .box-livro:hover .overlay-content {
    transform: translateY(0);
}

.box-livro-carousel-wrapper .pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: white;
}

.box-livro-carousel-wrapper .view-btn,
.box-livro-carousel-wrapper .ver-publicacao-btn {
    background: #ffffff;
    color: #007cba;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.box-livro-carousel-wrapper .view-btn:hover,
.box-livro-carousel-wrapper .ver-publicacao-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Botões de navegação */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #0F81C5;
    border: none;
    height: 45px;
    width: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .box-livro-carousel-container {
        padding: 0 15px;
    }
    
    .carousel-btn {
        height: 40px;
        width: 40px;
        font-size: 1rem;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
    
    .publicacoes-carousel {
        gap: 15px;
    }
    
    .publicacoes-carousel .box-livro,
    .box-livro-carousel-wrapper .box-livro {
        flex: 0 0 100%;
        max-width: 220px;
    }
    
    .box-livro-carousel-wrapper {
        gap: 15px;
    }
}
