/* ======================================================
   FNG.CO.IL — UNIFIED DESIGN v5.0
   Gold + Deep Blue + Textured Background
   Matches original fng.co.il design language
   ====================================================== */

:root {
    --bg-primary: #f0f3f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255,255,255,0.92);
    --bg-header: rgba(255,255,255,0.97);
    --border: #d0d8e4;
    --border-light: #e2e8f0;
    --text-primary: #1a2332;
    --text-secondary: #475569;
    --text-muted: #7c8ba0;
    --accent: #1a3a6e;
    --accent-hover: #1e4a8a;
    --accent-light: rgba(26, 58, 110, 0.07);
    --accent-gradient: linear-gradient(135deg, #1a3a6e, #2260b0);
    --gold: #c5a44e;
    --gold-light: #d4b86a;
    --gold-dark: #a8893a;
    --gold-gradient: linear-gradient(135deg, #d4b86a, #c5a44e, #a8893a);
    --gold-glow: rgba(197, 164, 78, 0.25);
    --gold-border: rgba(197, 164, 78, 0.45);
    --success: #16a34a;
    --ticker-bg: #e8ecf3;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-xl: 0 12px 48px rgba(0,0,0,0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ── BASE ────────────────────────────────────────── */
body {
    font-family: 'Rubik', sans-serif !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    margin: 0; padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ── TEXTURED BACKGROUND — Silk waves ────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('/assets/img/bg-waves.svg') no-repeat center center;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

/* ── SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #b8c2d0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── GLASS PANEL ─────────────────────────────────── */
.glass,
.glass-panel {
    background: var(--bg-secondary);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* ── HEADER & TICKER ─────────────────────────────── */
.top-fixed-wrapper {
    position: fixed; top: 0; left: 0; right: 0;
    width: 100%; z-index: 5000;
}
.ticker-bar {
    background: var(--ticker-bg);
    border-bottom: 1px solid var(--border);
    height: 40px;
    display: flex; align-items: center; overflow: hidden;
}
.ticker-track {
    display: flex;
    animation: ticker 210s linear infinite;
    white-space: nowrap;
}
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item {
    padding: 0 50px; font-size: 13px; font-weight: bold;
    color: var(--text-secondary);
    display: flex; align-items: center; gap: 12px;
}
.ticker-item .label { color: var(--text-muted); font-size: 11px; }
.ticker-item .val { font-size: 13px; font-weight: 900; display: flex; align-items: center; gap: 8px; }

header {
    height: 100px;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
main { padding-top: 160px; min-height: 100vh; position: relative; z-index: 10; }

/* ── LOGO — GOLD BORDER, DARK BG ────────────────── */
.logo-box {
    border: 2.5px solid var(--gold) !important;
    border-radius: 999px !important;
    padding: 10px 45px !important;
    background: var(--accent) !important;
    box-shadow: 0 2px 16px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    transition: box-shadow 0.3s ease;
    text-decoration: none !important;
}
.logo-box:hover {
    box-shadow: 0 4px 24px var(--gold-glow) !important;
}
.logo-text {
    font-size: 33.6px !important; font-weight: 900 !important; font-style: italic !important;
    color: #ffffff !important;
}
.logo-text span {
    color: #ffffff !important;
    font-weight: 300 !important;
}

/* ── MASK ─────────────────────────────────────────── */
.mask-linear {
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* ── GOLD ELEMENTS ───────────────────────────────── */
.gold-line { height: 3px; background: var(--gold-gradient); border-radius: 2px; }
.gold-border { border-color: var(--gold-border) !important; }
.gold-text { color: var(--gold); }
.gold-divider { height: 2px; background: linear-gradient(to right, transparent, var(--gold), transparent); margin: 2rem 0; }

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fade-in 0.4s ease-out; }
.fade-in { animation: fadeIn 0.8s ease forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.fade-scale { animation: fadeScale 0.4s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.animate-modal-in { animation: modal-in 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.animate-slideDown { animation: slideDown 0.4s ease-out; }
@keyframes flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.animate-flow { background-size: 200% 200%; animation: flow 5s ease infinite; }

/* ── BANK LOGOS ───────────────────────────────────── */
.bank-logos-track { overflow: hidden; position: relative; }
.bank-logos-scroll { display: flex; animation: scroll-banks 40s linear infinite; width: max-content; }
.bank-logo-item { display: flex; align-items: center; gap: 8px; padding: 12px 28px; margin: 0 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); white-space: nowrap; color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.bank-icon { font-size: 22px; }
@keyframes scroll-banks { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.bank-logos-track:hover .bank-logos-scroll { animation-play-state: paused; }

/* ── CALCULATOR INPUTS ───────────────────────────── */
.input-dark-fng { background: var(--bg-primary) !important; border: 1px solid var(--border) !important; color: var(--text-primary) !important; border-radius: var(--radius-sm); transition: .3s; font-size: 16px; }
.input-dark-fng:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px var(--gold-glow); }

/* ── ACCESSIBILITY WIDGET ────────────────────────── */
#acc-widget-container { position: fixed; bottom: 50%; left: 0; z-index: 999999; display: flex; align-items: flex-start; }
#acc-toggle-btn { background-color: var(--accent); color: white; width: 45px; height: 45px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; box-shadow: 2px 2px 10px rgba(0,0,0,0.15); border: none; outline: none; }
#acc-menu { background-color: var(--bg-secondary); width: 250px; padding: 15px; border-radius: 0 0 var(--radius-sm) 0; box-shadow: 5px 5px 20px rgba(0,0,0,0.12); display: none; flex-direction: column; gap: 10px; border: 1px solid var(--border); }
#acc-menu.open { display: flex; }
.acc-header { color: var(--text-primary); font-weight: 900; font-size: 18px; text-align: center; margin-bottom: 10px; border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.acc-item { background: transparent; border: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; color: var(--text-primary); font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; border-radius: 6px; text-align: right; width: 100%; }
.acc-item:hover { background-color: var(--accent-light); }
.acc-item i { color: var(--gold); font-size: 16px; width: 20px; text-align: center; }

/* ── ACCESSIBILITY CLASSES ───────────────────────── */
html.acc-zoom-1 { font-size: 110%; }
html.acc-zoom-2 { font-size: 120%; }
html.acc-zoom-3 { font-size: 130%; }
body.acc-grayscale { filter: grayscale(100%) !important; }
body.acc-high-contrast { background-color: #000 !important; color: #ffff00 !important; }
body.acc-high-contrast * { background-color: #000 !important; color: #ffff00 !important; border-color: #ffff00 !important; }
body.acc-invert { filter: invert(100%) !important; }
body.acc-light { background-color: #ffffff !important; color: #000000 !important; }
body.acc-links a { text-decoration: underline !important; background-color: yellow !important; color: black !important; }
body.acc-font * { font-family: Arial, sans-serif !important; }

/* ── AI CHATBOT — GOLD BORDER ────────────────────── */
#ai-window {
    background: var(--bg-secondary);
    border: 2px solid var(--gold-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px var(--gold-glow);
}
#chat-messages { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
#chat-messages::-webkit-scrollbar { width: 5px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── ARTICLE CONTENT ─────────────────────────────── */
.prose h2, .prose h3 { color: var(--text-primary); font-weight: 800; margin-top: 1.5em; margin-bottom: 0.5em; }
.prose p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1em; }
.prose ul, .prose ol { color: var(--text-secondary); padding-right: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.5em; line-height: 1.7; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--text-primary); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; }

.article-disclaimer {
    background: var(--ticker-bg);
    border: 1px solid var(--border);
    border-right: 4px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* ── FAQ inline in articles ──────────────────────── */
article details, .prose details {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    margin-bottom: 0.5rem;
}
article details summary, .prose details summary {
    color: var(--text-primary) !important;
}
article details p, .prose details p {
    color: var(--text-secondary) !important;
}

/* ── FAQ ACCORDION ───────────────────────────────── */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ── CARDS ───────────────────────────────────────── */
.card-hover { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold-border); }

/* ── FORMS ───────────────────────────────────────── */
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select {
    font-family: 'Rubik', sans-serif;
}

/* ── LINE CLAMP ──────────────────────────────────── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ticker-track, .bank-logos-scroll { animation: none !important; }
    .fade-in { animation: none !important; opacity: 1 !important; transform: none !important; }
    .animate-flow { animation: none !important; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    body::before { display: none; }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
    .logo-text { font-size: 24px; }
    .logo-box { padding: 8px 25px; }
    header { height: 80px; }
    main { padding-top: 140px; }
}
/* ══ FNG NAV ═══════════════════════════════════════════════════════ */
.fng-header {
    height: auto !important;
    padding: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}
.fng-toprow {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    gap: 12px;
}
.fng-topright { display: flex; align-items: center; gap: 8px; }

/* שפה */
.fng-lang-pill {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 700;
}
.fng-lang-pill a { color: var(--text-muted); text-decoration: none; padding: 2px 5px; border-radius: 999px; transition: .2s; }
.fng-lang-pill a.flon { background: var(--accent); color: #fff; }
.fng-lang-pill span { color: var(--border); }

/* המבורגר */
.fng-burger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 38px; height: 38px; border: 1.5px solid var(--border);
    border-radius: 10px; background: none; cursor: pointer; padding: 7px 8px;
}
.fng-burger span { display: block; height: 2px; background: var(--text-primary); border-radius: 2px; transition: .3s; }
.fng-burger.fng-bopen span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fng-burger.fng-bopen span:nth-child(2) { opacity: 0; }
.fng-burger.fng-bopen span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* תפריט ניווט — desktop */
.fng-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 16px 8px;
    border-top: 1px solid var(--border-light);
}
.fnl {
    padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 700;
    color: var(--text-secondary); text-decoration: none; background: none;
    border: none; cursor: pointer; transition: all .2s; white-space: nowrap;
    position: relative;
}
.fnl::after {
    content: ''; position: absolute; bottom: 3px; left: 50%; right: 50%;
    height: 2px; background: var(--gold); border-radius: 2px; transition: all .25s;
}
.fnl:hover { color: var(--accent); background: var(--accent-light); }
.fnl:hover::after, .fnl-on::after { left: 12px; right: 12px; }
.fnl-on { color: var(--accent); }
.fnl-cta {
    background: var(--accent) !important; color: #fff !important;
    border-radius: 999px !important; padding: 9px 20px !important;
    box-shadow: 0 2px 10px rgba(26,58,110,0.3); margin-right: 8px;
}
.fnl-cta::after { display: none !important; }
.fnl-cta:hover { opacity: .88 !important; transform: translateY(-1px); }

/* מודל */
.fng-mbox {
    background: var(--bg-secondary); border-radius: 24px; padding: 32px 28px;
    width: 100%; max-width: 380px; box-shadow: var(--shadow-xl);
    position: relative; border: 1px solid var(--border);
}
.fng-soc {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px; border-radius: 12px; font-size: 13px; font-weight: 700;
    text-decoration: none; border: 1.5px solid var(--border);
    color: var(--text-primary); background: var(--bg-secondary); transition: .2s;
}
.fng-soc:hover { border-color: var(--accent); background: var(--accent-light); }
.fng-or { text-align: center; position: relative; margin: 14px 0; }
.fng-or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.fng-or span { background: var(--bg-secondary); padding: 0 12px; color: var(--text-muted); font-size: 12px; position: relative; }
.fng-inp {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
    border-radius: 12px; font-size: 14px; background: var(--bg-primary);
    color: var(--text-primary); outline: none; transition: .2s; box-sizing: border-box;
}
.fng-inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.fng-lbtn {
    width: 100%; padding: 12px; border-radius: 999px; font-size: 15px; font-weight: 900;
    color: #fff; background: var(--accent); border: none; cursor: pointer; transition: .2s;
}
.fng-lbtn:hover { opacity: .88; }

/* mobile */
@media (max-width: 860px) {
    .fng-burger { display: flex !important; }
    .fng-nav { display: none !important; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 4px; }
    .fng-nav.fng-nav-open { display: flex !important; }
    .fnl { font-size: 15px; padding: 13px 16px; border-bottom: 1px solid var(--border-light); border-radius: 0; }
    .fnl::after { display: none; }
    .fnl-cta { border-radius: 14px !important; margin-top: 6px; text-align: center; border-bottom: none !important; }
    main { padding-top: 130px !important; }
    header { height: auto !important; }
}
@media (max-width: 768px) {
    .fng-toprow { padding: 8px 14px; }
    .logo-text { font-size: 22px !important; }
    .logo-box { padding: 7px 22px !important; }
}
@media (max-width: 420px) {
    .logo-text { font-size: 18px !important; }
    .logo-box { padding: 6px 14px !important; }
}
main { padding-top: 152px; }
/* ══ END FNG NAV ════════════════════════════════════════════════════ */
