/* ==========================================================
   Carrossel de Trabalhos Realizados
   ========================================================== */

.ctr-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 0;
    box-sizing: border-box;
}

.ctr-wrapper * {
    box-sizing: border-box;
}

.ctr-titulo {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
    padding: 0 16px;
    color: #1a1a1a;
}

.ctr-carrossel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trilho do carrossel */
.ctr-carrossel {
    flex: 1 1 auto;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 8px 16px 16px;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    user-select: none;
}

.ctr-carrossel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.ctr-carrossel.ctr-arrastando {
    cursor: grabbing;
    scroll-snap-type: none;
}

/* Card individual */
.ctr-card {
    flex: 0 0 auto;
    width: 300px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: block;
}

.ctr-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ctr-card-imagem {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    pointer-events: none;
}

.ctr-card-imagem img {
    display: none; /* imagem é aplicada via background para permitir arraste sem "fantasma" de drag nativo */
}

.ctr-card-corpo {
    padding: 16px 18px 20px;
}

.ctr-card-titulo {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ctr-card-selo {
    display: inline-block;
    background: #eef0f2;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
}

/* Setas de navegação — propriedades reforçadas para não serem
   sobrescritas por resets globais de botão do tema. */
button.ctr-seta {
    flex: 0 0 auto !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    border: 1px solid #e5e7eb !important;
    background-color: #ffffff !important;
    color: #374151 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    z-index: 2 !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

button.ctr-seta svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    pointer-events: none !important;
}

button.ctr-seta:hover {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

button.ctr-seta:active {
    transform: scale(0.95);
}

button.ctr-seta[disabled] {
    opacity: 0.35 !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* Responsivo */
@media (max-width: 768px) {
    .ctr-card {
        width: 240px;
    }

    .ctr-card-imagem {
        height: 150px;
    }

    button.ctr-seta {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
    }
}
