/* ═══════════════════════════════════════════════
   Card de Download
   ═══════════════════════════════════════════════ */

.cdd-wrap {
    --cdd-bg:       #2563eb;
    --cdd-bg-hover: #112f70;
    --cdd-color:    #ffffff;

    margin-top: 64px;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    background: var(--cdd-wrap-bg, transparent);
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

/* ── Imagem única — com espaçamento ao redor ── */
.cdd-thumbnail {
    width: calc(40% - 20px) !important;
    flex-shrink: 0;
    height: auto !important;
    object-fit: cover;
    object-position: center;
    border-radius: 10px !important;
    border: none !important;
    display: block;
    align-self: center;
    margin: 20px 0 20px 20px;
}

/* ── Carrossel — imagem flush, setas e dots sobrepostos ── */
.cdd-carousel {
    width: 45%;
    flex-shrink: 0;
    position: relative;
    min-height: 260px;
    align-self: stretch;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0px !important;
    padding: 24px;
}

.cdd-carousel .slick-slider,
.cdd-carousel .slick-list {
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    line-height: 0;
}

.cdd-carousel .slick-track {
    display: flex !important;
    height: 100%;
    line-height: 0;
}

.cdd-carousel__slide {
    outline: none;
    line-height: 0;
    font-size: 0;
}

.cdd-thumbnail--carousel {
    width: 100% !important;
    height: 100% !important;
    min-height: 260px;
    object-fit: cover;
    object-position: center;
    display: block !important;
}

/* Dots — sobrepostos, fundo da imagem, padding 0 8px 16px 8px */
.cdd-carousel .slick-dots {
    position: absolute;
    bottom: 30px;
    left: 8px;
    right: 8px;
    width: auto;
    text-align: center;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 10;
}

.cdd-carousel .slick-dots li {
    display: inline-block;
    margin: 0 3px;
}

.cdd-carousel .slick-dots li button {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    border: none; cursor: pointer;
    font-size: 0; line-height: 0; padding: 0;
    transition: background 0.2s;
}

.cdd-carousel .slick-dots li button:before { display: none !important; }

.cdd-carousel .slick-dots li.slick-active button { background: var(--cdd-bg); }

/* Setas — sobrepostas, centralizadas verticalmente, 8px das laterais */
.cdd-carousel .slick-prev,
.cdd-carousel .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px; height: 32px;
    background: #ffffff !important;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.cdd-carousel .slick-prev:hover,
.cdd-carousel .slick-next:hover { background: #f1f5f9 !important; }

.cdd-carousel .slick-prev { left: 30px; }
.cdd-carousel .slick-next { right: 30px; bottom: 30px; }

.cdd-carousel .slick-prev:before { content: '‹'; }
.cdd-carousel .slick-next:before { content: '›'; }

.cdd-carousel .slick-prev:before,
.cdd-carousel .slick-next:before {
    font-size: 22px;
    line-height: 1;
    color: #374151;
    opacity: 1;
    font-family: inherit;
}

/* ── Conteúdo — layout exato conforme especificação ── */
.cdd-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 24px 24px 24px 0;
}

/* Categoria — sem background, texto uppercase */
.cdd-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    color: var(--cdd-category-text, #64748b);
    background: none !important;
    padding: 0;
    margin-bottom: 4px;
}

.cdd-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
    color: var(--cdd-text, inherit);
}

/* Benefícios — borda por padrão; fundo sólido quando admin define cor */
.cdd-beneficios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cdd-beneficio {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cdd-beneficio-text, #374151);
    background: var(--cdd-beneficio-bg, transparent);
    padding: 5px 14px;
    border-radius: 999px;
    border: none;
}

.cdd-description {
    font-size: 16px !important;
    margin: 0 0 20px;
    color: var(--cdd-text, #374151);
    line-height: 1.5 !important;
}

/* Footer — botão + aviso */
.cdd-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.cdd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--cdd-bg);
    color: var(--cdd-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    min-width: 220px;
    text-align: center;
}
.cdd-btn svg { flex-shrink: 0; }
.cdd-btn:hover,
.cdd-btn:focus-visible {
    background-color: var(--cdd-bg-hover);
    color: var(--cdd-color);
    text-decoration: none;
}

.cdd-notice {
    display: block;
    font-size: 0.75rem;
    color: var(--cdd-text, #64748b);
    text-align: left;
}

.cdd-wrap .entry-content img { border: none !important; }

/* ── Mobile ── */
@media (max-width: 767px) {
    .cdd-wrap { flex-direction: column; }
    .cdd-thumbnail { width: 100% !important; height: 220px !important; min-height: unset; }
    .cdd-carousel  { width: 100%; min-height: 220px; padding: 24px 24px 0 24px; }
    .cdd-thumbnail--carousel { min-height: 220px; }
    .cdd-content   { padding: 20px; align-items: center; text-align: center; }
    .cdd-beneficios { justify-content: center; }
    .cdd-notice     { text-align: center; width: 100%; }
    .cdd-btn        { width: 100%; }
    .cdd-footer     { align-items: center; }
}
