/* =====================================================================
   AVD Banner — Frontend CSS
   Carregado pelo plugin PHP via wp_enqueue_style.
   Substitui o CSS injetado via JS no banner.js anterior.
   ===================================================================== */

/* Banner wrapper */
.nx_banner {
    position: relative;
    width: 100%;
    max-width: 94%;
    margin: 25px auto 0;
    border-radius: 24px;
    overflow: hidden;
    background: #0a0a0a;

    /* Mantém proporção pela largura */
    aspect-ratio: 16 / 9;
    height: auto;

    /* Limites */
    max-height: 620px;
}

.nx_banner_layer {
    position: absolute;
    inset: 0;
    transition: opacity .6s ease;
    opacity: 0;
}

.nx_banner_layer.is-visible {
    opacity: 1;
}

.nx_banner_layer.is-hidden {
    opacity: 0;
}

.nx_banner_media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay gradient — forte à esquerda, transparente à direita */
.nx_banner_overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .55) 26%, rgba(0, 0, 0, .1) 50%),
        linear-gradient(to right, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .55) 19%, rgba(0, 0, 0, .1) 36%);
}

/* Content — coluna: topo (logo) + base (info + CTA) */
.nx_banner_content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 48px;
    z-index: 2;
}

/* ── Topo: logo ── */
.nx_banner_top {
    display: flex;
    align-items: flex-start;
}

.nx_banner_logo {
    max-width: clamp(100px, 14vw, 180px);
    aspect-ratio: 179 / 140;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5));
}

/* ── Base: info esq + CTA dir ── */
.nx_banner_bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.nx_banner_left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 560px;
}

/* Título (CPTs sem logo) */
.nx_banner_title {
    margin: 0;
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    font-weight: 900;
    line-height: 1.12;
    color: #fff;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
    text-transform: uppercase;
    max-width: 480px;
}

/* Tags */
.nx_banner_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.nx_banner_tag {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    letter-spacing: .02em;
}

.nx_banner_tag+.nx_banner_tag::before {
    content: "·";
    margin-right: 6px;
    opacity: .6;
}

/* Stats row */
.nx_banner_stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.nx_banner_stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .88);
    white-space: nowrap;
}

.nx_banner_stat svg {
    flex-shrink: 0;
}

/* Description */
.nx_banner_desc {
    margin: 0;
    font-size: .82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 480px;
}

/* ── CTA ── */
.nx_banner_right {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

.nx_cta_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #e05a28;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s, transform .15s;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.nx_cta_btn:hover {
    background: #c24d1f;
    transform: translateY(-2px);
}

.nx_cta_btn svg {
    flex-shrink: 0;
}

/* ── Loading ── */
.nx_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.nx_spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #e05a28;
    border-radius: 50%;
    animation: nx_spin .7s linear infinite;
}

@keyframes nx_spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Mobile banner — base (always hidden on desktop) ── */
.nx_banner--mobile {
    display: none;
    position: relative;
    width: 100%;
    max-width: 94%;
    margin: 25px auto 0;
    border-radius: 24px;
    overflow: hidden;
    background: #0a0a0a;
    aspect-ratio: auto;
    min-height: 123vmin;
}

.nx_banner_overlay--mobile {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.10) 40%, rgba(0, 0, 0, 0.75) 100%);
}

.nx_banner_content--mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 60% 18px 24px;
    text-align: center;
    gap: 14px;
    z-index: 2;
}

.nx_banner_mob_logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nx_banner_mob_logo .nx_banner_logo {
    max-width: 234px;
}

.nx_banner_stats--mobile {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nx_banner_mob_cta {
    width: 100%;
}

.nx_banner_mob_cta .nx_cta_btn {
    width: 100%;
    justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 720px) {
    .nx_banner_content {
        padding: 10px 24px 28px;
    }

    .nx_banner_bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nx_banner_right {
        width: 100%;
    }

    .nx_cta_btn {
        width: 100%;
        justify-content: center;
    }

    .nx_banner_title {
        font-size: 1.5rem;
    }

    /* Mobile banner: show when exists, hide desktop */
    .nx_banner--mobile {
        display: block !important;
    }

    .nx_banner--desktop {
        display: block;
        /* fallback if no mobile */
    }

    /* When mobile banner follows desktop in DOM, hide desktop */
    .nx_banner--desktop:has(~ .nx_banner--mobile) {
        display: none !important;
    }
}