/* ================================================
   Destaques NuvPost — Slider CSS v1.1.0
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variáveis ───────────────────────────────── */
.dnp-slider {
    --dnp-accent:     #6366f1;
    --dnp-h-desk:     520px;
    --dnp-h-tab:      400px;
    --dnp-h-mob:      280px;
    --dnp-radius:     16px;
    --dnp-ease:       cubic-bezier(0.77, 0, 0.175, 1);
    --dnp-ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --dnp-font-title: 'Playfair Display', Georgia, serif;
    --dnp-font-body:  'DM Sans', -apple-system, sans-serif;
}

/* ── Container ───────────────────────────────── */
.dnp-slider {
    position: relative;
    width: 100%;
    height: var(--dnp-h-desk);
    border-radius: var(--dnp-radius);
    overflow: hidden;
    background: #111;
    user-select: none;
    -webkit-user-select: none;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.12),
        0 24px 60px -12px rgba(0,0,0,0.35);
}

/* ── Track ───────────────────────────────────── */
.dnp-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Slides: padrão = invisível ──────────────── */
.dnp-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    z-index: 1;
}

/* slide ativo */
.dnp-slide.is-active {
    opacity: 1;
    pointer-events: all;
    z-index: 2;
}

/* slide saindo */
.dnp-slide.is-leaving {
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

/* ── Background ──────────────────────────────── */
.dnp-slide-bg {
    position: absolute;
    inset: -6%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
    transition: transform 0.12s linear;
}

/* ── OVERLAY — só na área de texto ──────────── */
/* Sem overlay geral: a foto fica limpa no topo  */
.dnp-overlay { display: none; } /* desativado globalmente */

/* ── Slide inner: conteúdo na base ──────────── */
.dnp-slide-inner {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
}

/* ── Bloco de conteúdo com gradiente local ───── */
.dnp-slide-content {
    width: 100%;
    padding: 0 48px 40px;

    /* Gradiente apenas na área do texto — de transparente (topo) para preto (base) */
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.75) 35%,
        rgba(0,0,0,0.30) 70%,
        transparent 100%
    );
    padding-top: 80px; /* espaço para o fade funcionar */

    /* Entrada animada */
    transform: translateY(18px);
    opacity: 0;
    transition:
        transform 0.65s var(--dnp-ease-out) 0.1s,
        opacity   0.65s var(--dnp-ease-out) 0.1s;
}

.dnp-slide.is-active .dnp-slide-content {
    transform: translateY(0);
    opacity: 1;
}

/* ── Linha: categoria + data lado a lado ─────── */
.dnp-meta-top {
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* ── Badge de categoria ──────────────────────── */
.dnp-cat-badge {
    display: inline-flex;
    align-items: center;
    background: var(--dnp-accent);
    color: #fff;
    font-family: var(--dnp-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 4px;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1;
    white-space: nowrap;
}
.dnp-cat-badge:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: #fff;
}

/* ── Data ao lado da categoria ───────────────── */
.dnp-date {
    font-family: var(--dnp-font-body);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background-color: #f5f5f5;
    padding: 2px;
    border-radius: 5px;
}
.dnp-date svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Separador visual entre categoria e data */
.dnp-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* ── Título ──────────────────────────────────── */
.dnp-title {
    font-weight: 800;
    font-style: normal;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 14px;
    letter-spacing: -0.025em;
    text-shadow:
        0 1px 0 rgba(0,0,0,0.3),
        0 2px 20px rgba(0,0,0,0.5);
}
.dnp-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
    display: block;
}
.dnp-title a:hover { opacity: 0.88; }

/* ── Excerpt ─────────────────────────────────── */
.dnp-excerpt {
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Botão ler mais ──────────────────────────── */
.dnp-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dnp-font-body);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 9px 22px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.08);
    transition: all 0.25s var(--dnp-ease-out);
    letter-spacing: 0.3px;
}
.dnp-readmore svg { width: 14px; height: 14px; transition: transform 0.25s; }
.dnp-readmore:hover {
    background: var(--dnp-accent);
    border-color: var(--dnp-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.25);
}
.dnp-readmore:hover svg { transform: translateX(4px); }

/* ── Contador de slide (topo direito) ────────── */
.dnp-slide-num {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 10;
    font-family: var(--dnp-font-body);
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: baseline;
    gap: 3px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}
.dnp-num-current {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.dnp-num-sep { font-size: 11px; opacity: 0.5; }
.dnp-num-total { font-size: 13px; }

/* ── Setas ───────────────────────────────────── */
.dnp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s var(--dnp-ease-out);
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.dnp-arrow svg { width: 20px; height: 20px; display: block; }
.dnp-arrow:hover {
    background: var(--dnp-accent);
    border-color: var(--dnp-accent);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 0 5px rgba(99,102,241,0.22);
}
.dnp-arrow:active { transform: translateY(-50%) scale(0.95); }
.dnp-arrow--prev { left: 18px; }
.dnp-arrow--next { right: 18px; }

/* ── Dots ────────────────────────────────────── */
.dnp-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 7px;
    align-items: center;
}
.dnp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--dnp-ease-out);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.dnp-dot.is-active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
}
.dnp-dot:hover:not(.is-active) { background: rgba(255,255,255,0.65); }

/* ── Barra de progresso ──────────────────────── */
.dnp-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.1);
    z-index: 10;
}
.dnp-progress-fill {
    height: 100%;
    background: var(--dnp-accent);
    transform-origin: left;
    transform: scaleX(0);
    border-radius: 0 2px 2px 0;
}
.dnp-progress-fill.is-running {
    animation: dnp-progress-anim linear forwards;
}
@keyframes dnp-progress-anim {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ── RESPONSIVO ──────────────────────────────── */
@media (max-width: 1023px) {
    .dnp-slider        { height: var(--dnp-h-tab); }
    .dnp-slide-content { padding: 60px 32px 32px; }
    .dnp-arrow         { width: 40px; height: 40px; }
    .dnp-arrow svg     { width: 17px; height: 17px; }
}

@media (max-width: 767px) {
    .dnp-slider        { height: var(--dnp-h-mob); border-radius: 10px; }
    .dnp-slide-content { padding: 48px 18px 22px; }
    .dnp-excerpt       { display: none; }
    .dnp-title         { margin-bottom: 10px; }
    .dnp-meta-top      { margin-bottom: 8px; gap: 8px; }
    .dnp-arrow         { width: 34px; height: 34px; }
    .dnp-arrow svg     { width: 15px; height: 15px; }
    .dnp-arrow--prev   { left: 10px; }
    .dnp-arrow--next   { right: 10px; }
    .dnp-slide-num     { top: 12px; right: 14px; }
    .dnp-readmore      { padding: 8px 16px; font-size: 12px; }
    .dnp-cat-badge     { font-size: 9px; padding: 4px 9px; }
    .dnp-date          { font-size: 11px; }
}

@media (max-width: 480px) {
    .dnp-readmore { display: none; }
    .dnp-meta-sep { display: none; }
}

/* ── No posts ─────────────────────────────────── */
.dnp-no-posts {
    padding: 24px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}
