/* =====================================================
   FILE: styles.css (FINAL, unified hover)
   ===================================================== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* =============== THEME TOKENS =============== */
:root {
  --bg:#f7f7f8;
  --card:#ffffff;
  --panel:#ffffff;
  --line:#e6e6e9;
  --fg:#111114;
  --ink:#111114;
  --muted:#6b7280;

  --accent:#111111;
  --accent-2:#2b2b2b;
  --accent-contrast:#ffffff;

  --max:1080px;
  --radius:14px;
  --shadow:0 6px 18px rgba(0,0,0,.05);

  --buy:#16a34a; --sell:#dc2626; --neutral:#0f172a;
  --pos: var(--buy); --neg: var(--sell);

  --font: Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  --fs-base: 14px; --fs-title: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#4a4c4e;
    --card:#111418;
    --panel:#0f141b;
    --line:#eaecdd66;
    --fg:#e5e7eb;
    --ink:#e5e7eb;
    --muted:#9aa4b2;
  }
}
:root[data-theme="light"] {
  --bg:#f7f7f8;
  --card:#ffffff;
  --panel:#ffffff;
  --line:#e6e6e9;
  --fg:#111114;
  --ink:#111114;
  --muted:#6b7280;
}
:root[data-theme="dark"] {
  --bg:#0e1116;
  --card:#111418;
  --panel:#0f141b;
  --line:#d3d00d;
  --fg:#e5e7eb;
  --ink:#e5e7eb;
  --muted:#9aa4b2;
}
:root[data-accent="boss"]    { --accent:#111111; --accent-2:#2b2b2b; --accent-contrast:#ffffff; }
:root[data-accent="ferrari"] { --accent:#a60b0b; --accent-2:#e01b24; --accent-contrast:#ffffff; }
:root[data-accent="bull"]    { --accent:#0f6a2f; --accent-2:#d4a017; --accent-contrast:#ffffff; }
:root[data-accent="joker"]   { --accent:#5b21b6; --accent-2:#059669; --accent-contrast:#ffffff; }


/* =============== SIGNAL WORD COLORING =============== */
/* მხოლოდ BUY/SELL სიტყვა იყოს ფერადი */
.sig-word.pos { color: var(--buy); font-weight: 700; }
.sig-word.neg { color: var(--sell); font-weight: 700; }


/* =============== RESET =============== */
* { box-sizing: border-box; margin:0; padding:0; }

/* =============== LAYOUT =============== */
html, body {
  height:100%;
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font);
  font-size:var(--fs-base);
  line-height:1.6;
}
main { flex:1; width:100%; }
main, #content { flex: 1; width: 100%; display: block; }

.container { max-width:var(--max); margin:0 auto; padding:16px; }
.hidden { display:none; }

/* =============== LINKS =============== */
a { color:var(--accent); text-decoration:none; transition:color .2s, text-decoration-color .2s; }
a:hover { text-decoration:underline; }

/* =============== HOVERS (cards/panels/metrics) =============== */
.panel, .stat, .metric {
  background: var(--panel);
  transition: box-shadow .18s ease, transform .18s ease;
}
.panel:hover, .stat:hover, .metric:hover {
  box-shadow:0 8px 24px rgba(0,0,0,.22);
  transform:translateY(-2px);
}
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .metric {
  background: color-mix(in oklab, var(--panel) 88%, black);
  border: 1px solid color-mix(in oklab, var(--line) 100%, transparent);
}

/* =============== HEADER =============== */
.site-header {
  position: sticky; top: 0; background: var(--panel);
  border-bottom: 1px solid var(--line); z-index: 1000;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display:flex; align-items:center; gap:10px; color:var(--fg); text-decoration:none; }
.logo { width:32px; height:32px; border-radius:8px; background:var(--accent); }
.brand-title { font-weight:800; letter-spacing:.2px; font-size:1.1rem; }

.nav { display:flex; gap:14px; }
.nav a {
  padding:6px 10px; border-radius:6px; font-weight:600; color:var(--fg);
}
.nav a.active {
  color:var(--accent-contrast);
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
}
.menu-toggle, .menu-close {
  display:none; font-size:1.5rem; background:none; border:none; cursor:pointer; color:var(--fg);
}
.menu-close { margin:12px; align-self:flex-end; }
.menu-overlay {
  position:fixed; inset:0; opacity:0; visibility:hidden; pointer-events:none; z-index:1050;
  background:rgba(0,0,0,0.4); transition:opacity .3s ease, visibility .3s ease;
}
.menu-overlay.active { opacity:1; visibility:visible; pointer-events:auto; }
@media (max-width:768px) {
  .menu-toggle { display:block; }
  .nav {
    flex-direction:column; align-items:flex-start;
    position:fixed; top:0; right:-260px;
    width:240px; height:100%;
    background:var(--panel); padding:20px;
    box-shadow:var(--shadow);
    transition:right 0.3s ease; z-index:1100;
  }
  .nav.nav-open { right:0; }
  .menu-close { display:block; }
}

/* =============== NEWS GRID =============== */
#news-feed {
  display:grid; gap:20px;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  margin-top:20px;
}
.news-card {
  position:relative; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:16px; box-shadow:var(--shadow);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow:hidden;
}
.news-card::before {
  content:""; position:absolute; left:0; top:0; right:0; height:3px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2)); opacity:.85;
}
.news-card:hover {
  transform:translateY(-4px);
  box-shadow:0 8px 20px rgba(0,0,0,0.12);
  border-color:#dcdce0;
}
.news-card .kicker {
  display:inline-flex; align-items:center; gap:8px;
  font-size:.78rem; font-weight:700; text-transform:uppercase;
  color:var(--muted); margin-bottom:8px;
}
.news-card h2 { margin:0 0 8px; font-size:1.2rem; font-weight:800; line-height:1.3; }
.news-card h2 a { color:var(--accent); }
.news-card h2 a:hover { text-decoration:underline; }
.news-card h2 a::after {
  content:"↗"; margin-left:.35rem; font-weight:700; opacity:.6; transition:opacity .2s, transform .2s;
}
.news-card h2 a:hover::after { opacity:1; transform:translateY(-1px); }
.news-meta {
  font-size:.9rem; color:var(--muted);
  margin-bottom:8px; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.news-card p {
  font-size:1rem; line-height:1.5; margin:0 0 14px;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden;
}
.news-card p a { color:#374151; text-decoration:none; }
.news-card p a:hover { color:var(--accent); text-decoration:underline; }
.media { position:relative; overflow:hidden; border-radius:10px; margin-bottom:10px; }
.media img { width:100%; aspect-ratio:16/9; object-fit:cover; transition:transform .4s ease; display:block; }
.media:hover img { transform:scale(1.05); }

/* =============== FOOTER =============== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel); color: var(--fg);
  padding: 12px 0; font-size: 0.85rem;
}
.foot-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; max-width: var(--max); margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 700; color: var(--fg); }
.footer-logo { width: 22px; height: 22px; }
.foot-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.foot-links a { color: var(--fg); font-weight: 600; text-decoration: none; font-size: 0.85rem; }
.foot-links a:hover { color: var(--accent); }
.social-contact { display: flex; align-items: center; gap: 16px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  font-size: 1rem; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: transform 0.2s ease, opacity 0.2s ease;
}
.social-links a:hover { transform: translateY(-2px); opacity: 0.9; }
.social-links a.facebook { background: #1877f2; }
.social-links a.linkedin { background: #0a66c2; }
.social-links a.x { background: #000; }
.social-links a.youtube { background: #ff0000; }
.contact-info { display: flex; flex-direction: row; gap: 12px; font-size: 0.8rem; }
.contact-info a {
  display: flex; align-items: center; gap: 6px;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.contact-info a:hover { color: var(--accent); }
.copy { text-align: center; margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 768px) {
  .foot-row { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .social-contact { flex-direction: column; gap: 10px; }
  .contact-info { flex-direction: column; gap: 6px; }
}

/* =============== IFRAME (DASHBOARD EMBED) =============== */
iframe[title="Dashboard"],
iframe[title="SmartSignalHub Dashboard"] {
  width: 100% !important;
  height: calc(100vh - 140px) !important;
  min-height: 600px;
  border: none;
  display: block;
  margin: 0 auto;
}

/* Loader */
.iframe-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 80vh; min-height: 600px; color: var(--muted); font-weight: 600; gap: 12px;
}
.spinner {
  width: 36px; height: 36px; border: 4px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============== RESPONSIVE POLISH =============== */
@media (max-width: 1024px){
  .wrap{ padding:12px; }
}
@media (max-width: 768px){
  .ind-grid, .ind-tables{ grid-template-columns:1fr; }
  .chart{ height:360px; }
  .table-shell{ overflow:auto; -webkit-overflow-scrolling:touch; }
}
@media (max-width: 480px){
  h1{ font-size:18px; }
  .chart{ height:300px; }
}

/* ერთნაირი ჰოვერ ეფექტი ყველა ბლოკისთვის */
.panel:hover,
.mtf-card:hover,
.kpi:hover,
.metric:hover,
.snap:hover,
.ind-card:hover,
.ind-shell:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  transform: translateY(-3px) scale(1.01);
  border-color: #888 !important;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
