/* ==========================================================
   Premium Gold theme — loaded last, overrides base styles.
   Remove the <link> in head.php to revert to the old look.
   ========================================================== */
:root {
    --gold: #c9a227;
    --gold-light: #e8c766;
    --gold-dark: #9a7b12;
    --ink: #14171c;
    --ink-2: #1e232b;
    --ink-3: #2a313b;
    --paper: #f6f4ee;
    --card: #ffffff;
    --text: #1f2430;
    --muted: #6b7280;
    --line: #e6e2d6;
    --up: #138a4b;
    --down: #d23b3b;
    --radius: 14px;
    --shadow: 0 2px 8px rgba(20, 23, 28, .06), 0 8px 24px rgba(20, 23, 28, .06);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: var(--paper);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2, .h2 {
    font-size: 1.35rem;
    border-bottom: 0;
    padding-bottom: 0;
    position: relative;
    padding-inline-start: 14px;
}
h2::before, .h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .15em;
    bottom: .15em;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(var(--gold-light), var(--gold-dark));
}
a { color: var(--gold-dark); transition: color .15s ease; }
a:hover { color: var(--ink); }

/* ---------- Header / navigation ---------- */
.header, .footer {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: #e9e6da;
}
.header { padding-bottom: 24px; border-bottom: 3px solid var(--gold); }
.header nav { padding: .9rem 1rem; }
.logo a { display: inline-flex; align-items: center; gap: .6rem; }
.logo img { border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.site-name {
    font-family: inherit;
    font-size: 1.15rem;
    letter-spacing: .01em;
    color: var(--gold-light);
    text-shadow: none;
}
.nav-links { gap: .35rem; }
.nav-links a {
    color: #e9e6da;
    padding: .45rem .9rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: .95rem;
    transition: background .15s ease, color .15s ease;
}
.nav-links a:hover, .nav-links a.active {
    background: rgba(201, 162, 39, .18);
    color: var(--gold-light);
}
.menu-toggle { color: var(--gold-light); }
.nav-sidebar { background: var(--ink-2); box-shadow: 4px 0 24px rgba(0, 0, 0, .4); }
.nav-sidebar a { color: #e9e6da; border-bottom: 1px solid var(--ink-3); }
.nav-sidebar a:hover { color: var(--gold-light); }

/* live pill */
.live {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .25rem .8rem;
    background: var(--ink-3);
    color: var(--gold-light);
    border: 1px solid rgba(201, 162, 39, .45);
}

/* ---------- Layout / cards ---------- */
.container {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 20px;
    margin-bottom: 20px;
}
section { margin-bottom: 28px; }
.widget { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.widget-header { background: var(--ink-2); color: var(--gold-light); border-bottom: 0; }

/* ---------- Rate tiles ---------- */
.header-bar { gap: .75rem; padding: 4px; }
.header-bar-item {
    height: 140px;
    border: 1px solid rgba(201, 162, 39, .35);
    border-radius: var(--radius);
    background-color: var(--card);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease;
}
.header-bar-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
.content-bar .header-bar-item { border-color: var(--line); box-shadow: var(--shadow); }
.main { border: 1px solid var(--line); border-radius: var(--radius); }
.main .large, .large { color: var(--ink); letter-spacing: -.02em; }
.currency-unit { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.table-rate { background: #f3efe2; border-radius: 8px; }
.scroll-btn { background: rgba(20, 23, 28, .75); border-radius: 50%; }

.green, .up, .date, .open { color: var(--up) !important; }
.red, .closed { color: var(--down) !important; }
.up-arrow { border-bottom-color: var(--up); }
.down-arrow { border-top-color: var(--down); }
.rising { background: #dff3e7; }
.falling { background: #fbe2e2; }

/* ---------- Tables ---------- */
.table { color: var(--text); border-color: var(--line); border-collapse: separate; border-spacing: 0; }
.table > thead > tr > * {
    background: var(--ink-2);
    color: var(--gold-light);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 0;
}
.table > tbody > tr > * { border-bottom: 1px solid var(--line); padding: .65rem .75rem; }
.table-striped > tbody > tr:nth-of-type(odd) { --bs-table-accent-bg: #faf8f1; }
.table-hover > tbody > tr:hover { --bs-table-accent-bg: #f3ecd2; }
.table-container { border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Buttons / forms ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .5rem 1rem; }
.btn-primary, .btn-success {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border-color: var(--gold-dark);
    color: var(--ink);
}
.btn-primary:hover, .btn-success:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold-dark));
    border-color: var(--gold-dark);
    color: #fff;
}
.btn-outline-primary { color: var(--gold-dark); border-color: var(--gold); }
.btn-outline-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-secondary { background: var(--ink-3); border-color: var(--ink-3); }
.form-control { border-radius: 10px; border-color: var(--line); background: #fff; color: var(--text); }
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 162, 39, .25); }
.tab-link { background: #f3efe2; border-radius: 10px 10px 0 0; font-weight: 600; }
.tab-link:hover { background: #ebe3c8; }
.tab-link.active { background: var(--gold); color: var(--ink); }
.tab-buttons { border-bottom-color: var(--gold); }
.list li { border-radius: 8px; border: 1px solid var(--line); margin-bottom: 6px; }
.list li:hover { background: #f8f1d6; }
.news-row:nth-of-type(odd) { background: #faf8f1; }
.alert { border-radius: 10px; }

/* ---------- Breadcrumb / FAQ ---------- */
.breadcrumb li a { color: var(--gold-dark); }
.breadcrumb li a:hover { color: var(--ink); }
.faq details { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq summary { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { padding-top: 24px; border-top: 3px solid var(--gold); color: #b9b5a6; }
.footer a { color: var(--gold-light); }
.footer a:hover { color: #fff; }
.footer-menu ul { padding: 0; }
.copyright { color: #8d897b; }

#backToTop {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
#backToTop:hover { background: var(--gold-dark); color: #fff; }

/* ---------- RTL ---------- */
[dir="rtl"] .nav-sidebar, body[dir="rtl"] .nav-sidebar { box-shadow: -4px 0 24px rgba(0, 0, 0, .4); }

@media (max-width: 768px) {
    .header-bar-item { flex-basis: 160px; height: 120px; }
    .container { border-radius: 10px; }
}


/* ---------- Price summary (home) ---------- */
.price-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 12px 0 18px;
}
.ps-item {
    background: linear-gradient(180deg, var(--ink-2), var(--ink));
    border: 1px solid rgba(201, 162, 39, .4);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ps-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #b9b5a6; }
.ps-value { font-size: 1.5rem; font-weight: 700; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.ps-value small { font-size: .75rem; font-weight: 500; color: #b9b5a6; }
.ps-value.green { color: #4ade80 !important; }
.ps-value.red { color: #f87171 !important; }
.section-faq .answer { color: var(--text); }
