/* ================================================================
   style.css — CursBN stiluri globale
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', sans-serif;
    background: #eef2f7;
    color: #2c3e50;
    min-height: 100vh;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #dde3ec;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 68px;
    max-width: 1800px;
    margin: 0 auto;
    gap: 0;
}

/* ── Logo ── */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 28px;
}
.logo-img {
    height: 49px;
    width: auto;
    display: block;
}

/* ── Navbar ── */
.navbar {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 68px;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 17px;
    height: 68px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    user-select: none;
    cursor: pointer;
}
.nav-link:hover,
.nav-item.open > .nav-link {
    color: #1a6fa0;
    border-bottom-color: #2980b9;
    background: #f5f9fd;
}

/* Sageata dropdown */
.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    transition: transform .22s ease;
    flex-shrink: 0;
}
.nav-arrow svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .22s ease;
}
.nav-item.open > .nav-link .nav-arrow svg {
    transform: rotate(180deg);
}

/* ── Dropdown ── */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid #dde3ec;
    border-top: 3px solid #2980b9;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    z-index: 300;
    padding: 6px 0;
    animation: dropIn .18s ease;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-item.open .nav-dropdown {
    display: block;
}
.nav-dropdown a {
    display: block;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.nav-dropdown a:hover {
    background: #f0f6fb;
    color: #2980b9;
}

/* ── Hamburger button ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all .22s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   MAIN
   ================================================================ */
main {
    padding: 28px 22px 48px;
    max-width: 1800px;
    margin: 0 auto;
}

.section-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dde3ec;
}

/* ================================================================
   GRID CARDURI
   ================================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
@media (max-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ================================================================
   CARD VALUTA
   ================================================================ */
.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    padding: 18px 16px 14px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow .18s, transform .15s;
    position: relative;
    overflow: hidden;
    border: 1px solid #e8edf4;
}
.card:hover {
    box-shadow: 0 6px 24px rgba(41,128,185,.14);
    transform: translateY(-3px);
    border-color: #aac8e8;
}
.card-flag {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.card-flag-ph {
    position: absolute;
    top: 14px; right: 14px;
    width: 48px; height: 32px;
    background: #eef2f7;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.card-code {
    font-family: 'Roboto Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
    padding-right: 64px;
}
.card-name {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 14px;
    padding-right: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-val {
    font-family: 'Roboto Mono', monospace;
    font-size: 26px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 2px;
}
.card-val .u {
    font-size: 14px;
    color: #95a5a6;
    font-weight: 400;
}
.card-mult {
    font-size: 11px;
    color: #95a5a6;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 4px;
}
.card-diff {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    margin-bottom: 10px;
}
.card-diff.up  { color: #27ae60; }
.card-diff.dn  { color: #e74c3c; }
.card-diff.fl  { color: #95a5a6; }
.card-divider {
    border: none;
    border-top: 1px solid #eef2f7;
    margin: 8px 0 8px;
}
.spark-wrap { height: 52px; }
.spark-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spark-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}
.spark-meta span {
    font-size: 10px;
    color: #b2bec3;
    font-family: 'Roboto Mono', monospace;
}

/* ================================================================
   PAGINA VALUTA
   ================================================================ */
.page-main {
    padding: 24px 22px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero */
.hero { display: flex; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.hero-main {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #e8edf4;
    padding: 22px 26px;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}
.h-lbl  { font-size: 11px; font-weight: 600; color: #95a5a6; text-transform: uppercase; letter-spacing: .08em; }
.h-val  { font-family: 'Roboto Mono', monospace; font-size: 36px; font-weight: 500; color: #2c3e50; line-height: 1.1; }
.h-val .u { font-size: 16px; color: #95a5a6; font-weight: 400; }
.h-date { font-size: 12px; color: #95a5a6; font-family: 'Roboto Mono', monospace; }
.h-diff { font-family: 'Roboto Mono', monospace; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.h-desc { font-size: 12px; color: #95a5a6; margin-top: 8px; line-height: 1.5; }

.up { color: #27ae60; }
.dn { color: #e74c3c; }
.fl { color: #95a5a6; }

.stats { display: flex; gap: 12px; flex: 1; flex-wrap: wrap; }
.stat {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #e8edf4;
    padding: 16px 20px;
    flex: 1; min-width: 120px;
}
.s-lbl { font-size: 11px; font-weight: 600; color: #95a5a6; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.s-val { font-family: 'Roboto Mono', monospace; font-size: 20px; font-weight: 500; color: #2c3e50; }
.s-u   { font-size: 12px; color: #95a5a6; }
.s-sub { font-family: 'Roboto Mono', monospace; font-size: 15px; font-weight: 500; margin-top: 4px; }

/* Filter */
.filter {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #e8edf4;
    padding: 14px 20px;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter label { font-size: 13px; font-weight: 600; color: #7f8c8d; white-space: nowrap; }
.filter input[type=date] {
    background: #eef2f7; border: 1px solid #dde3ec;
    color: #2c3e50; font-family: 'Roboto Mono', monospace; font-size: 13px;
    padding: 8px 12px; border-radius: 8px; outline: none;
    transition: border-color .14s; cursor: pointer;
}
.filter input[type=date]:focus { border-color: #2980b9; }
.filter input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; }
.qbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.q {
    background: #eef2f7; border: 1px solid #dde3ec;
    color: #7f8c8d; font-size: 12px; font-weight: 600;
    padding: 7px 14px; border-radius: 8px; cursor: pointer;
    text-decoration: none; display: inline-block;
    transition: all .13s; white-space: nowrap;
}
.q:hover, .q.act { background: #2980b9; border-color: #2980b9; color: #fff; }
.go {
    background: #2980b9; border: none; color: #fff;
    font-size: 13px; font-weight: 700;
    padding: 8px 22px; border-radius: 8px; cursor: pointer;
    transition: background .13s; white-space: nowrap;
}
.go:hover { background: #1a6fa0; }

/* Chart box */
.chart-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #e8edf4;
    padding: 20px 18px;
    margin-bottom: 18px;
}
.box-lbl { font-size: 12px; font-weight: 600; color: #7f8c8d; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
#chartDiv { width: 100%; height: 380px; }

/* Table */
.tbl-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #e8edf4;
    overflow: hidden;
}
.tbl-hdr {
    padding: 14px 20px; border-bottom: 1px solid #eef2f7;
    display: flex; justify-content: space-between; align-items: center;
}
.tbl-title { font-size: 12px; font-weight: 700; color: #7f8c8d; text-transform: uppercase; letter-spacing: .08em; }
.tbl-cnt   { font-size: 13px; color: #95a5a6; font-family: 'Roboto Mono', monospace; }
.scroll    { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    padding: 11px 8px; text-align: left;
    font-size: 12px; font-weight: 700; color: #7f8c8d;
    text-transform: uppercase; letter-spacing: .07em;
    background: #f8fafc; border-bottom: 2px solid #eef2f7;
    white-space: nowrap;
}
th:not(:first-child) { text-align: right; }
td {
    padding: 11px 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    border-bottom: 1px solid #f0f4f8;
    white-space: nowrap;
}
td:not(:first-child) { text-align: right; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.td-date { color: #7f8c8d; font-size: 13px; }
.td-val  { color: #2c3e50; font-weight: 500; }
.td-val a { color: #2c3e50; font-weight: 500; text-decoration: none;}
.td-up   { color: #27ae60; font-weight: 500; }
.td-dn   { color: #e74c3c; font-weight: 500; }
.td-fl   { color: #95a5a6; }
.no-data { text-align: center; padding: 48px; color: #95a5a6; font-size: 14px; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: #1e2a38;
    color: #a0aab8;
    padding: 48px 24px 24px;
    margin-top: 48px;
}
.footer-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #2e3e52;
}
.footer-col-logo .logo-img-f {
    height: 50px;
    width: auto;
    margin-bottom: 16px;
    display: block;
    /* Sigla are fundal inchis, se vede bine pe footer */
}
.footer-col-logo p {
    font-size: 12px;
    color: #6b7a8d;
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #dde3ec;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2980b9;
    display: inline-block;
}
.footer-col ul {
    list-style: none;
    padding: 0; margin: 0;
}
.footer-col ul li {
    margin-bottom: 8px;
}
.footer-col ul li a {
    font-size: 13px;
    color: #7f8c8d;
    text-decoration: none;
    transition: color .13s;
    line-height: 1.4;
    display: block;
}
.footer-col ul li a:hover { color: #2980b9; }

.footer-bottom {
    max-width: 1800px;
    margin: 20px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #4a5568;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom a { color: #4a5568; text-decoration: none; }
.footer-bottom a:hover { color: #2980b9; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .navbar { display: none; }
    .navbar.mobile-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 2px solid #dde3ec;
        box-shadow: 0 8px 24px rgba(0,0,0,.10);
        z-index: 199;
        padding: 8px 0 14px;
    }
    .navbar.mobile-open .nav-list {
        flex-direction: column;
        height: auto;
        align-items: stretch;
    }
    .navbar.mobile-open .nav-link {
        height: auto;
        padding: 12px 24px;
        border-bottom: 1px solid #eef2f7;
        border-left: 3px solid transparent;
    }
    .navbar.mobile-open .nav-item.open > .nav-link {
        border-left-color: #2980b9;
        border-bottom-color: #eef2f7;
        background: #f5f9fd;
    }
    .navbar.mobile-open .nav-dropdown {
        position: static;
        border: none;
        border-top: none;
        box-shadow: none;
        border-radius: 0;
        background: #f8fafc;
        padding: 4px 0 4px 24px;
        animation: none;
    }
    .navbar.mobile-open .nav-dropdown a {
        padding: 9px 18px;
        border-bottom: 1px solid #eef2f7;
        font-size: 13px;
    }
    .hamburger { display: flex; }
    .header-inner { position: relative; }
}

@media (max-width: 1100px) {
    .footer-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
    .hero { flex-direction: column; }
    .filter { flex-direction: column; align-items: flex-start; }
    #chartDiv { height: 260px; }
    .h-val { font-size: 28px; }
    .page-main { padding: 14px 14px 32px; }
}
@media (max-width: 420px) {
    .footer-inner { grid-template-columns: 1fr; }
}


/* ── Card valuta: decimale stilizate ── */
/* Varianta A: decimale mai mici ca dimensiune */
.decimal-size {
    font-size: 0.82em;
    vertical-align: baseline;
    color: inherit;
}

/* Varianta B: decimale aceeasi dimensiune dar culoare mai stearsa */
.decimal-color {
    font-size: 0.62em;
    color: #95a5a6;
}

h1 {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 22px;
    line-height: 1.2;
    font-family: 'Roboto Mono', monospace;
}
