/* NDB Wealth – Newsletter Carousel | Dark Mode | Rubik | #B3252C */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700;800&display=swap');

.ndb-nl-section {
    --red:    #B3252C;
    --bg:     #0a0a0a;
    --surf:   #141414;
    --s2:     #1c1c1c;
    --bdr:    #2a2a2a;
    --text:   #ffffff;
    --muted:  #666666;
    --gap:    14px;
    --font:   'Rubik', sans-serif;
    background:    var(--bg);
    padding:       28px 0 36px;
    font-family:   var(--font);
    color:         var(--text);
    border-radius: 10px;
    width:         100%;
    box-sizing:    border-box;
}

/* ── Filter ─────────────────────────────────────────────────── */
.ndb-nl-filter {
    display: flex;
    justify-content: flex-end;
    padding: 0 52px 18px;
}

.ndb-nl-dd-wrap { position: relative; display: inline-block; }

.ndb-nl-dd-btn {
    display: flex; align-items: center; gap: 10px;
    background: var(--s2); color: var(--text);
    border: 1px solid var(--bdr); border-radius: 4px;
    padding: 7px 13px; font-family: var(--font);
    font-size: .73rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer; min-width: 130px; justify-content: space-between;
    transition: border-color .18s;
}
.ndb-nl-dd-btn:hover,
.ndb-nl-dd-btn.open { border-color: var(--red); }

.ndb-nl-dd-list {
    display: none; position: absolute;
    top: calc(100% + 3px); right: 0;
    min-width: 130px; background: var(--s2);
    border: 1px solid var(--bdr); border-radius: 4px;
    list-style: none; margin: 0; padding: 4px 0;
    z-index: 9999; max-height: 260px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.65);
    scrollbar-width: thin; scrollbar-color: var(--red) transparent;
}
.ndb-nl-dd-list.open { display: block; }

.ndb-nl-dd-item {
    padding: 8px 14px; font-size: .73rem; font-weight: 500;
    letter-spacing: .04em; color: var(--muted); cursor: pointer;
    transition: color .15s, background .15s; position: relative;
}
.ndb-nl-dd-item:hover  { color: var(--text); background: rgba(179,37,44,.08); }
.ndb-nl-dd-item.active { color: var(--text); font-weight: 700; padding-left: 12px; border-left: 2px solid var(--red); }

/* ── Carousel outer ──────────────────────────────────────────── */
.ndb-nl-outer {
    position:   relative;
    padding:    0 52px;
    box-sizing: border-box;
}

/* ── Arrows ──────────────────────────────────────────────────── */
.ndb-nl-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px;
    background: var(--s2); color: var(--muted);
    border: 1px solid var(--bdr); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    transition: border-color .18s, color .18s, background .18s;
}
.ndb-nl-prev { left: 9px; }
.ndb-nl-next { right: 9px; }
.ndb-nl-arrow:hover { border-color: var(--red); color: var(--text); background: rgba(179,37,44,.12); }
.ndb-nl-arrow:disabled { opacity: .2; cursor: default; pointer-events: none; }

/* ── Viewport ────────────────────────────────────────────────── */
.ndb-nl-vp {
    overflow: hidden;
    width:    100%;
}

/* ── Track ───────────────────────────────────────────────────── */
.ndb-nl-track {
    display:    flex;
    gap:        var(--gap);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    /* width forced by JS to always equal pr full columns */
}

/* ── Card ────────────────────────────────────────────────────── */
.ndb-nl-card {
    flex-shrink:    0;
    background:     var(--surf);
    border:         1px solid var(--bdr);
    border-radius:  8px;
    overflow:       hidden;
    display:        flex;
    flex-direction: column;
}

/* Phantom: same width, invisible spacer */
.ndb-nl-card.ndb-phantom {
    background:     transparent !important;
    border-color:   transparent !important;
    pointer-events: none;
    visibility:     hidden;
}

/* ── Cover ───────────────────────────────────────────────────── */
.ndb-nl-cover { aspect-ratio: 3/4; overflow: hidden; background: #111; }
.ndb-nl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ndb-nl-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg,#3a1848,#6b2f7a,#8f4d9e);
    display: flex; align-items: center; justify-content: center;
    padding: 14px; box-sizing: border-box;
}
.ndb-nl-placeholder span {
    font-size: clamp(.75rem,1.2vw,1rem); font-weight: 800;
    text-align: center; line-height: 1.3; text-transform: uppercase;
    color: #fff; letter-spacing: .04em;
}

/* ── Meta ────────────────────────────────────────────────────── */
.ndb-nl-meta {
    padding: 8px 10px 3px;
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 4px; flex-grow: 1;
}
.ndb-nl-yr    { font-size: .6rem; color: var(--muted); letter-spacing: .07em; }
.ndb-nl-mo    { font-size: .78rem; font-weight: 700; color: var(--text); }
.ndb-nl-brand { display: flex; flex-direction: column; align-items: flex-end; font-size: .56rem; gap: 1px; }
.ndb-nl-its   { color: var(--muted); font-style: italic; }
.ndb-nl-ndb   { color: var(--text); letter-spacing: .04em; }
.ndb-nl-ndb strong { color: var(--red); }

/* ── Download button ─────────────────────────────────────────── */
.ndb-nl-dl {
    display: block; margin: 6px 10px 10px; padding: 7px 0;
    background: transparent; color: var(--text) !important;
    border: 1px solid #333; border-radius: 4px;
    text-align: center; font-family: var(--font);
    font-size: .67rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; text-decoration: none !important;
    cursor: pointer; transition: background .18s, border-color .18s;
}
.ndb-nl-dl:hover { background: var(--red); border-color: var(--red); color: #fff !important; }

/* ── Dots ────────────────────────────────────────────────────── */
.ndb-nl-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.ndb-nl-dot {
    height: 6px; width: 6px; border-radius: 3px;
    background: var(--bdr); border: none; padding: 0; cursor: pointer;
    transition: width .25s, background .2s;
}
.ndb-nl-dot.active { width: 22px; background: var(--red); }

/* ── Empty ───────────────────────────────────────────────────── */
.ndb-nl-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: .9rem; width: 100%; }

/* ── MOBILE: 2-col static grid, no carousel ─────────────────── */
@media (max-width: 620px) {
    .ndb-nl-section { padding: 20px 0 28px; }
    .ndb-nl-filter  { padding: 0 14px 14px; justify-content: center; }
    .ndb-nl-outer   { padding: 0 14px; }
    .ndb-nl-arrow   { display: none !important; }
    .ndb-nl-vp      { overflow: visible; }

    /* Override JS entirely — CSS grid takes over */
    .ndb-nl-track {
        display:               grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap:                   12px !important;
        transform:             none !important;
        transition:            none !important;
        width:                 auto !important;
        min-width:             0 !important;
    }
    .ndb-nl-card            { width: auto !important; flex-shrink: 1 !important; }
    .ndb-nl-card.ndb-phantom { display: none !important; }
    .ndb-nl-dots            { display: none; }
}
