/* polymarkets.co.il — Design System */
/* Polymarket-inspired dark mode, RTL Hebrew */

:root {
    --bg: #0D1117;
    --bg-card: #161B22;
    --bg-hover: #21262D;
    --bg-input: #0D1117;
    --border: #30363D;
    --text: #F0F6FC;
    --text-dim: #8B949E;
    --text-muted: #484F58;
    --accent: #0066FF;
    --accent-hover: #1A75FF;
    --accent-soft: rgba(0,102,255,0.15);
    --green: #3FB950;
    --green-soft: rgba(63,185,80,0.15);
    --red: #F85149;
    --red-soft: rgba(248,81,73,0.15);
    --orange: #D29922;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ──────────────────────────────────── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
}

.logo-icon {
    background: var(--accent);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    gap: 24px;
    flex: 1;
}

.main-nav a {
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text);
    border-color: var(--accent);
}

.header-cta {
    background: var(--accent);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.header-cta:hover { background: var(--accent-hover); }

/* ── CTA Button ─────────────────────────────── */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

.cta-btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent) !important;
}

.cta-btn-outline:hover {
    background: var(--accent-soft);
}

/* ── Hero Section ────────────────────────────── */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 20px;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Section ─────────────────────────────────── */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
}

.section-subtitle {
    color: var(--text-dim);
    font-size: 16px;
    margin-top: -24px;
    margin-bottom: 32px;
}

/* ── Market Cards Grid ───────────────────────── */
.markets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.market-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s;
    color: var(--text);
    cursor: pointer;
}

.market-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.market-card-header {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 48px;
}

.market-card-odds { margin-top: auto; }

.odds-bar {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    height: 32px;
    font-size: 13px;
    font-weight: 600;
}

.odds-yes {
    background: var(--green-soft);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    transition: width 0.5s ease;
}

.odds-no {
    background: var(--red-soft);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    transition: width 0.5s ease;
}

.market-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
}

.market-card-footer .vol {
    font-family: 'IBM Plex Mono', monospace;
}

/* ── Category Cards ──────────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    color: var(--text);
}

.category-card .cat-emoji {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

/* ── Content Cards (blog/guide list) ─────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--text);
    transition: all 0.2s;
}

.content-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--text);
}

.content-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.content-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
}

.content-card .meta {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.tag {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Article / Guide Content ─────────────────── */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-container h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-meta {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.article-body {
    font-size: 17px;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text);
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
    color: var(--text);
}

.article-body ul, .article-body ol {
    margin: 16px 0;
    padding-right: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-right: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-dim);
    font-style: italic;
}

.article-body code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
}

.article-body img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 24px 0;
}

/* ── CTA Banner ──────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, #0a1628, #0d2347);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}

.cta-banner h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.cta-banner p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

.affiliate-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ── FAQ Accordion ───────────────────────────── */
.faq-list { list-style: none; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-q {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    transition: background 0.2s;
}

.faq-q:hover { background: var(--bg-hover); }

.faq-q::after {
    content: '+';
    font-size: 20px;
    color: var(--text-dim);
    transition: transform 0.2s;
}

.faq-item.open .faq-q::after {
    content: '−';
}

.faq-a {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-dim);
    line-height: 1.6;
}

.faq-item.open .faq-a {
    padding: 0 20px 16px;
    max-height: 500px;
}

/* ── How It Works ────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
}

.step-num {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Breadcrumbs ─────────────────────────────── */
.breadcrumbs {
    margin-bottom: 24px;
}

.breadcrumbs ol {
    display: flex;
    gap: 8px;
    list-style: none;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumbs li::before {
    content: '/';
    margin-left: 8px;
    color: var(--text-muted);
}

.breadcrumbs li:first-child::before { display: none; }

.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs .active { color: var(--text); }

/* ── Footer ──────────────────────────────────── */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-col a {
    display: block;
    color: var(--text-dim);
    font-size: 14px;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

.disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 12px;
}

.copyright {
    font-size: 13px;
    color: var(--text-dim);
}

/* ── Loading / Empty States ──────────────────── */
.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-dim);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

/* ── 404 Page ────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-page h1 {
    font-size: 96px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
}

.error-page p {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 32px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
    .markets-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .content-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero .subtitle { font-size: 16px; }
    .markets-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .article-container h1 { font-size: 28px; }

    .main-nav { display: none; }
    .header-cta { display: none; }

    .section-title { font-size: 24px; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 40px 0 30px; }
    .section { padding: 40px 0; }
}
