/* ================================================================
   Financial News Feed Pro v2.1 — Frontend CSS
   Vireon palette: primary #072D48 | accent #61CE70 | 1440px wide
   Made by Creative Click — creativeclick.ro
   ================================================================ */

.fnf-wrap * { box-sizing: border-box; }
.fnf-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* ── CSS variables (can be overridden per-card via inline style) ── */
.fnf-wrap {
    --fnf-primary: #072D48;
    --fnf-accent:  #61CE70;
}

/* ================================================================
   CARD
   ================================================================ */
.fnf-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5ecf2;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.fnf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(7, 45, 72, 0.11);
    border-color: #c5d5e0;
    text-decoration: none !important;
}

/* — Media block — */
.fnf-card-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;   /* 16:9 */
    overflow: hidden;
    background: #eef2f5;
    flex-shrink: 0;
}
.fnf-card-img,
.fnf-card-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.fnf-card-img {
    object-fit: cover;
    display: block;
    transition: transform 0.38s ease;
}
.fnf-card:hover .fnf-card-img { transform: scale(1.05); }
.fnf-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f5;
    color: #c5d5e0;
}
/* Newspaper SVG placeholder drawn with CSS */
.fnf-card-placeholder::before {
    content: '';
    display: block;
    width: 44px;
    height: 44px;
    border: 2px solid currentColor;
    border-radius: 4px;
    opacity: 0.5;
}

/* — Source badge — */
.fnf-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff !important;
    background: #072D48;
    padding: 3px 10px;
    border-radius: 3px;
    line-height: 1.7;
    pointer-events: none;
    white-space: nowrap;
}

/* — Card body — */
.fnf-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
}
.fnf-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    color: var(--fnf-primary, #072D48) !important;
    margin: 0 0 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    transition: color 0.18s;
}
.fnf-card:hover .fnf-card-title { color: var(--fnf-accent, #61CE70) !important; }

.fnf-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}
.fnf-card-date {
    font-size: 11px;
    color: #8fa0af;
}
.fnf-read-more {
    font-size: 11px;
    font-weight: 700;
    color: var(--fnf-accent, #61CE70);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ================================================================
   GRID
   ================================================================ */
.fnf-grid {
    display: grid;
    grid-template-columns: repeat(var(--fnf-cols, 4), 1fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 1100px) { .fnf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .fnf-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px)  { .fnf-grid { grid-template-columns: 1fr; } }

/* ================================================================
   FULL-FEED TOOLBAR
   ================================================================ */
.fnf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5ecf2;
}

/* Source tabs */
.fnf-source-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fnf-tab {
    padding: 7px 18px;
    border-radius: 100px;
    border: 1.5px solid #d0dae2;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #4a6478;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1;
}
.fnf-tab:hover               { border-color: var(--fnf-accent,#61CE70); color: var(--fnf-primary,#072D48); }
.fnf-tab.active              { background: var(--fnf-primary,#072D48); border-color: var(--fnf-primary,#072D48); color: #fff; }

/* Search — no icon, clean pill input */
.fnf-search-wrap { flex-shrink: 0; }
.fnf-search {
    width: 240px;
    height: 38px;
    padding: 0 18px;
    border: 1.5px solid #d0dae2;
    border-radius: 100px;
    font-size: 13px;
    color: #072D48;
    background: #fff;
    outline: none;
    display: block;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.fnf-search::placeholder { color: #a0b5c0; }
.fnf-search:focus {
    border-color: var(--fnf-accent,#61CE70);
    box-shadow: 0 0 0 3px rgba(97,206,112,0.15);
}

/* Empty state */
.fnf-empty { text-align: center; padding: 60px 0; color: #8fa0af; font-size: 14px; }

/* ================================================================
   PAGINATION
   ================================================================ */
.fnf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.fnf-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1.5px solid #d0dae2;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #4a6478;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}
.fnf-page-btn:hover:not(:disabled) { border-color: var(--fnf-primary,#072D48); color: var(--fnf-primary,#072D48); }
.fnf-page-btn.active               { background: var(--fnf-primary,#072D48); border-color: var(--fnf-primary,#072D48); color: #fff; }
.fnf-page-btn:disabled             { opacity: 0.35; cursor: not-allowed; }

/* ================================================================
   CAROUSEL
   ================================================================ */
.fnf-carousel-wrap { position: relative; }

.fnf-car-viewport { overflow: hidden; }
.fnf-car-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.fnf-car-slide { flex: 0 0 calc(25% - 18px); margin-right: 24px; }
@media (max-width: 1100px) { .fnf-car-slide { flex: 0 0 calc(33.333% - 16px); } }
@media (max-width: 768px)  { .fnf-car-slide { flex: 0 0 calc(50% - 12px); } }
@media (max-width: 480px)  { .fnf-car-slide { flex: 0 0 100%; margin-right: 0; } }

/* ── Carousel prev / next ─────────────────────────────────────
   The <button> is a transparent click target only.
   The <span class="fnf-car-circle"> holds the visual circle.
   Spans are not affected by theme button resets, so shape is
   always a perfect circle regardless of the active theme.
──────────────────────────────────────────────────────────── */
.fnf-car-btn {
    position: absolute !important;
    top: 37% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    /* Strip all button defaults */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 0 !important;
    font-size: 0 !important;
}
.fnf-car-prev { left: -22px; }
.fnf-car-next { right: -22px; }
@media (max-width: 600px) { .fnf-car-prev { left: 4px; } .fnf-car-next { right: 4px; } }

/* ── The span is the visual circle — not a button, no resets ── */
.fnf-car-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #d0dae2;
    box-shadow: 0 2px 12px rgba(7, 45, 72, 0.12);
    transition: background 0.18s, border-color 0.18s;
    box-sizing: border-box;
    pointer-events: none;   /* clicks pass through to <button> */
}
.fnf-car-btn:hover .fnf-car-circle,
.fnf-car-btn:focus .fnf-car-circle {
    background: var(--fnf-primary, #072D48);
    border-color: var(--fnf-primary, #072D48);
}

/* ── CSS-drawn chevron on inner span ── */
.fnf-car-chev {
    display: block;
    width: 9px;
    height: 9px;
    border-style: solid;
    border-color: var(--fnf-primary, #072D48);
    border-width: 0;
    flex-shrink: 0;
    pointer-events: none;
}
.fnf-car-btn:hover .fnf-car-chev,
.fnf-car-btn:focus .fnf-car-chev { border-color: #ffffff; }

.fnf-chev-prev {
    border-left-width: 2px;
    border-bottom-width: 2px;
    transform: rotate(45deg) translate(2px, -2px);
    margin-left: 4px;
}
.fnf-chev-next {
    border-right-width: 2px;
    border-top-width: 2px;
    transform: rotate(45deg) translate(-2px, 2px);
    margin-right: 4px;
}

/* Dots */
.fnf-car-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.fnf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #cdd8df;
    cursor: pointer;
    padding: 0;
    transition: all 0.22s;
}
.fnf-dot.active {
    background: var(--fnf-primary, #072D48);
    width: 24px;
    border-radius: 4px;
}
