/* ─── Tender Intelligence Index ─────────────────────────────── */
/* /mekrazim — public, RTL Hebrew                                */

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

:root {
    --navy:        #2B3A67;
    --orange:      #FD891B;
    --orange-dark: #e07010;
    --text:        #1a1a2e;
    --muted:       #6b7280;
    --border:      #e5e7eb;
    --bg:          #f9fafb;
    --white:       #ffffff;
    --green:       #16a34a;
    --green-bg:    #dcfce7;
    --amber:       #d97706;
    --amber-bg:    #fef3c7;
    --blue:        #1d4ed8;
    --blue-bg:     #dbeafe;
    --gray-bg:     #f3f4f6;
    --red:         #dc2626;
    --red-bg:      #fee2e2;
    --gold:        #b45309;
    --gold-bg:     #fef9c3;
    --radius:      0.75rem;
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:   0 4px 12px rgba(0,0,0,.1);
}

html { font-size: 16px; }

body {
    font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
    direction: rtl;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

/* ── Top Bar ──────────────────────────────────────────────────── */

.topbar {
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.logo {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.topbar-nav {
    display: flex;
    gap: 1.25rem;
    flex: 1;
    padding-right: 1.5rem;
}

.topbar-link {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color .15s;
}

.topbar-link:hover,
.topbar-link-active { color: var(--white); }

.topbar-cta {
    background: var(--orange);
    color: var(--white);
    text-decoration: none;
    padding: 0.45rem 1.1rem;
    border-radius: 0.4rem;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background .15s;
}

.topbar-cta:hover { background: var(--orange-dark); }

/* ── Breadcrumb ───────────────────────────────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.breadcrumb a { color: var(--navy); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }

/* ── Hero ─────────────────────────────────────────────────────── */

.idx-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2845 100%);
    color: var(--white);
    padding: 3rem 1.5rem 2.5rem;
}

.idx-hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.idx-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.idx-hero-sub {
    font-size: 1rem;
    opacity: .85;
    max-width: 620px;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.idx-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.idx-stat {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    min-width: 110px;
    text-align: center;
}

.idx-stat-green  { border-color: var(--green); background: rgba(22,163,74,.2); }
.idx-stat-gold   { border-color: var(--amber); background: rgba(180,83,9,.2); }

.idx-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.idx-stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: .8;
}

/* ── Page layout ──────────────────────────────────────────────── */

.idx-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.idx-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* ── Section ──────────────────────────────────────────────────── */

.idx-section {
    margin-bottom: 3rem;
}

.idx-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.idx-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    padding-right: 0.75rem;
    border-right: 3px solid var(--orange);
}

.idx-section-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.idx-badge-blue  { background: var(--blue-bg);  color: var(--blue); }
.idx-badge-gold  { background: var(--gold-bg);  color: var(--gold); }
.idx-badge-gray  { background: var(--gray-bg);  color: var(--muted); }
.idx-badge-green { background: var(--green-bg); color: var(--green); }

.idx-section-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

/* ── Cards grid ───────────────────────────────────────────────── */

.idx-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ── Individual card ──────────────────────────────────────────── */

.idx-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--shadow);
    transition: box-shadow .15s, transform .15s;
    position: relative;
    overflow: hidden;
}

.idx-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.idx-card-expired {
    opacity: .75;
    background: var(--gray-bg);
}

.idx-card-valuable {
    border-top: 3px solid var(--amber);
}

.idx-card-closed {
    border-right: 3px solid var(--muted);
}

/* Budget ribbon */
.idx-budget-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--amber);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem 0.2rem 1rem;
    border-radius: 0 0 var(--radius) 0;
}

.idx-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.idx-card-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* Badge styles */
.idx-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 0.3rem;
}

.idx-badge-active  { background: var(--green-bg);  color: var(--green); }
.idx-badge-expired { background: var(--gray-bg);   color: var(--muted); }
.idx-badge-closed  { background: var(--red-bg);    color: var(--red); }
.idx-badge-type    { background: var(--blue-bg);   color: var(--blue); }

.idx-card-num {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

.idx-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    flex: 1;
}

.idx-card-link {
    color: var(--navy);
    text-decoration: none;
}

.idx-card-link:hover {
    color: var(--orange);
    text-decoration: underline;
}

.idx-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.idx-meta-item { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.idx-meta-label { font-weight: 600; color: var(--text); }
.idx-meta-deadline { color: var(--green); font-weight: 600; }
.idx-meta-expired  { color: var(--muted); text-decoration: line-through; }
.idx-meta-budget   { color: var(--amber); font-weight: 600; }

/* Blurred meta — active tender details hidden from index to drive subscription */
.idx-meta-blurred {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
    opacity: 0.7;
}

.idx-card-cta {
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 1rem;
    background: var(--navy);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    transition: background .15s;
}

.idx-card-cta:hover { background: var(--orange); }

.idx-card-cta-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.idx-card-cta-ghost:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.idx-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    text-align: center;
}

/* ── Sidebar ──────────────────────────────────────────────────── */

.idx-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 4.5rem;
}

.idx-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.idx-widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* CTA Widget */
.idx-widget-cta {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2845 100%);
    border-color: transparent;
    color: var(--white);
}

.idx-widget-cta .cta-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.idx-widget-cta .cta-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.idx-widget-cta .cta-body {
    font-size: 0.8rem;
    opacity: .85;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.idx-widget-cta .cta-bullets {
    font-size: 0.78rem;
    opacity: .9;
    list-style: none;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.idx-widget-cta .cta-bullets li::before {
    content: "✓ ";
    color: #4ade80;
    font-weight: 700;
}

.cta-btn {
    display: block;
    background: var(--orange);
    color: var(--white);
    text-decoration: none;
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background .15s;
    margin-bottom: 0.5rem;
}

.cta-btn:hover { background: var(--orange-dark); }

.cta-note {
    font-size: 0.72rem;
    opacity: .7;
    text-align: center;
}

/* Nav list */
.idx-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.idx-nav-link {
    display: block;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.35rem;
    transition: background .12s;
}

.idx-nav-link:hover { background: var(--bg); color: var(--orange); }

/* Category list */
.idx-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 360px;
    overflow-y: auto;
}

.idx-cat-link {
    display: block;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.3rem;
    transition: background .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.idx-cat-link:hover { background: var(--bg); color: var(--orange); }

/* ── Bottom CTA ───────────────────────────────────────────────── */

.idx-bottom-cta {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    color: var(--white);
    margin-top: 1rem;
}

.idx-bottom-cta-inner { max-width: 600px; margin: 0 auto; }

.idx-cta-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.idx-cta-body {
    font-size: 0.95rem;
    opacity: .9;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.idx-cta-btn {
    display: inline-block;
    background: var(--white);
    color: var(--orange);
    font-weight: 800;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    font-family: inherit;
}

.idx-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
    background: var(--navy);
    color: rgba(255,255,255,.8);
    padding: 1.75rem 1.5rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

.footer-brand {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color .15s;
}

.footer-links a:hover { color: var(--white); }

.footer-legal {
    font-size: 0.72rem;
    opacity: .55;
    max-width: 600px;
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 860px) {
    .idx-layout {
        grid-template-columns: 1fr;
    }

    .idx-sidebar {
        position: static;
        order: -1;
    }

    .idx-widget-cta { display: none; } /* shown in bottom CTA instead */

    .idx-cards {
        grid-template-columns: 1fr;
    }

    .idx-hero { padding: 2rem 1rem 1.75rem; }
    .idx-page { padding: 1.5rem 1rem 3rem; }
}

@media (max-width: 480px) {
    .idx-stats { gap: 0.6rem; }
    .idx-stat  { min-width: 90px; padding: 0.6rem 0.9rem; }
    .idx-stat-value { font-size: 1.3rem; }
    .topbar-nav { display: none; }
    .idx-bottom-cta { padding: 1.75rem 1rem; }
}
