/* FixIL — Main Stylesheet — Hebrew RTL */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:    #e53935;
    --primary-dk: #b71c1c;
    --accent:     #1a73e8;
    --dark:       #1a1a2e;
    --mid:        #444;
    --light:      #f8f9fa;
    --border:     #e0e0e0;
    --radius:     10px;
    --shadow:     0 4px 18px rgba(0,0,0,0.08);
}

body {
    font-family: 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
    direction: rtl;
    background: #f4f6fb;
    color: var(--mid);
    font-size: 16px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── HEADER ── */
.site-header {
    background: var(--dark);
    color: #fff;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 58px;
    flex-wrap: wrap;
}
.site-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    flex-shrink: 0;
}
.site-logo span { color: #fff; }

/* Sticky search in header */
.header-search {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 0;
}
.header-search input {
    flex: 1;
    padding: 8px 14px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.92rem;
    outline: none;
    direction: rtl;
}
.header-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1rem;
}
.header-nav { display: flex; gap: 14px; font-size: 0.88rem; }
.header-nav a { color: rgba(255,255,255,0.75); transition: color 0.15s; }
.header-nav a:hover { color: #fff; }

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #7b1c1c 60%, var(--primary) 100%);
    color: #fff;
    padding: 52px 20px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 36px 36px;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin-bottom: 12px; }
.hero p { font-size: 1.05rem; opacity: 0.88; margin-bottom: 28px; line-height: 1.7; }

/* Hero search */
.hero-search {
    display: flex;
    max-width: 580px;
    margin: 0 auto;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.hero-search input {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    border: none;
    outline: none;
    direction: rtl;
}
.hero-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.hero-search button:hover { background: var(--primary-dk); }
.hero-hints { font-size: 0.8rem; opacity: 0.65; margin-top: 10px; }

/* ── CONTAINER ── */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }

/* ── BREADCRUMB ── */
.breadcrumb {
    background: #fff;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #888;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: 0.4; }

/* ── CATEGORY GRID ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.cat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.cat-icon { font-size: 2.6rem; }
.cat-name { font-size: 1rem; font-weight: 700; }
.cat-count { font-size: 0.75rem; color: #999; }

/* ── BRAND GRID ── */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.brand-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.97rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.12s, box-shadow 0.12s;
}
.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.brand-card small { font-weight: 400; color: #999; font-size: 0.78rem; }

/* ── ERROR/PROBLEM CARDS ── */
.problem-list { display: flex; flex-direction: column; gap: 12px; }
.problem-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: box-shadow 0.12s, border-color 0.12s;
}
.problem-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.problem-card-info { flex: 1; }
.problem-card-code {
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--dark);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
    direction: ltr;
}
.problem-card-title { font-weight: 700; font-size: 0.95rem; }
.problem-card-sub { font-size: 0.8rem; color: #888; margin-top: 2px; }
.problem-card-arrow { font-size: 1.4rem; color: #ccc; flex-shrink: 0; }

/* ── PAGE ARTICLE ── */
.article-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}
@media(max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } }

.article-main > * + * { margin-top: 24px; }

.section-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
}
.section-box h2 {
    font-size: 1.05rem;
    color: var(--dark);
    margin-bottom: 14px;
    padding-right: 12px;
    border-right: 4px solid var(--primary);
}
.section-box ul, .section-box ol {
    padding-right: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.section-box li { font-size: 0.93rem; line-height: 1.7; }

.steps-list { counter-reset: steps; list-style: none; padding: 0; }
.steps-list li {
    counter-increment: steps;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.93rem;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
    content: counter(steps);
    background: var(--primary);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── URGENCY / COST BOXES ── */
.meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.meta-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pill-red    { background: #fce4ec; color: #c62828; }
.pill-orange { background: #fff3e0; color: #e65100; }
.pill-green  { background: #e8f5e9; color: #2e7d32; }
.pill-blue   { background: #e3f2fd; color: #0d47a1; }
.pill-dark   { background: var(--dark); color: #fff; }

/* ── WARNING BOX ── */
.warning-box {
    background: #fff8e1;
    border: 2px solid #ffb300;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.9rem;
    color: #5d4037;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.warning-box .w-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── TECHNICIAN CTA ── */
.tech-cta {
    background: linear-gradient(135deg, var(--dark), #7b1c1c);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.tech-cta h3 { font-size: 1.1rem; margin-bottom: 10px; }
.tech-cta p { font-size: 0.88rem; opacity: 0.85; margin-bottom: 18px; line-height: 1.6; }
.tech-cta-form { display: flex; flex-direction: column; gap: 10px; }
.tech-cta-form input, .tech-cta-form select {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.92rem;
    width: 100%;
    direction: rtl;
}
.tech-cta-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}
.tech-cta-form button:hover { background: var(--primary-dk); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
details.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
}
details.faq-item[open] { border-color: var(--accent); }
details.faq-item summary {
    font-weight: 700;
    cursor: pointer;
    font-size: 0.93rem;
    color: var(--dark);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
details.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--accent); }
details.faq-item[open] summary::after { content: '−'; }
details.faq-item p { margin-top: 12px; font-size: 0.9rem; color: #555; line-height: 1.7; }

/* ── SIDEBAR ── */
.sidebar > * + * { margin-top: 18px; }
.sidebar-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.sidebar-box h3 {
    font-size: 0.92rem;
    color: var(--dark);
    margin-bottom: 12px;
    border-right: 3px solid var(--accent);
    padding-right: 8px;
}
.related-list a {
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.87rem;
    color: var(--accent);
}
.related-list a:last-child { border-bottom: none; }
.related-list a:hover { text-decoration: underline; }

/* ── ADSENSE PLACEHOLDERS ── */
.ad-slot {
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 6px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.8rem;
    text-align: center;
}

/* ── SEARCH PAGE ── */
.search-result {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.search-result-title { font-weight: 700; font-size: 1rem; color: var(--accent); margin-bottom: 4px; }
.search-result-title a:hover { text-decoration: underline; }
.search-result-breadcrumb { font-size: 0.75rem; color: #aaa; margin-bottom: 6px; }
.search-result-desc { font-size: 0.88rem; color: #666; line-height: 1.6; }

/* ── FOOTER ── */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 28px 20px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 48px;
}
footer a { color: rgba(255,255,255,0.75); }
footer strong { color: #fff; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 12px; }

/* ── UTILITIES ── */
.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    padding-right: 12px;
    border-right: 4px solid var(--primary);
}
.tag {
    display: inline-block;
    background: #f0f5ff;
    border: 1px solid #c5d8ff;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.78rem;
    color: #1a1a2e;
    margin: 2px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.btn-red { background: var(--primary); color: #fff; }
.btn-red:hover { background: var(--primary-dk); }
.btn-blue { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }

/* ── HAMBURGER MENU BUTTON ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ── */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #111827;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}
.mobile-nav.open {
    max-height: 400px;
}
.mobile-nav a {
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 1rem;
    font-weight: 600;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ── RESPONSIVE — TABLET (≤900px) ── */
@media (max-width: 900px) {
    .article-wrap { grid-template-columns: 1fr; }
    .article-sidebar { order: -1; }
}

/* ── RESPONSIVE — MOBILE (≤768px) ── */
@media (max-width: 768px) {
    /* Header */
    .site-header { padding: 0 14px; }
    .header-inner {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 10px;
    }
    .header-search {
        order: 3;
        max-width: none;
        width: 100%;
        flex: none;
    }
    .header-nav { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav { display: flex; }

    /* Hero */
    .hero { padding: 32px 16px 26px; }
    .hero h1 { font-size: 1.45rem; }
    .hero p { font-size: 0.92rem; }
    .hero-search { flex-direction: column; border-radius: 10px; gap: 0; }
    .hero-search input {
        border-radius: 10px 10px 0 0;
        padding: 13px 16px;
        font-size: 1rem;
    }
    .hero-search button {
        border-radius: 0 0 10px 10px;
        padding: 13px 16px;
        width: 100%;
    }

    /* Container */
    .container { padding: 18px 14px; }

    /* Grids */
    .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .cat-card { padding: 16px 10px; }
    .cat-icon { font-size: 2rem; }
    .cat-name { font-size: 0.88rem; }
    .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Problem cards */
    .problem-card { padding: 13px 14px; gap: 10px; }
    .problem-card-title { font-size: 0.9rem; }

    /* Section boxes */
    .section-box { padding: 16px; }
    .section-box h2 { font-size: 0.97rem; }

    /* Meta strip pills — wrap cleanly */
    .meta-strip { gap: 8px; }
    .meta-pill { font-size: 0.78rem; padding: 5px 11px; }

    /* Steps */
    .steps-list li { font-size: 0.88rem; }

    /* Stats bar */
    .stats-bar-inner { gap: 16px !important; }

    /* CTA block */
    .cta-flex { flex-direction: column !important; }

    /* Footer */
    .footer-links { gap: 12px; font-size: 0.82rem; }
    footer { padding: 22px 14px; }

    /* Sidebar full width */
    .sidebar { margin-top: 0; }
    .sidebar-box { padding: 14px; }

    /* Breadcrumb */
    .breadcrumb { font-size: 0.8rem; padding: 8px 14px; }

    /* Tech CTA */
    .tech-cta { padding: 18px 14px; }

    /* Article wrap sidebar stacks above */
    .article-wrap { gap: 16px; }
}

/* ── RESPONSIVE — SMALL PHONE (≤480px) ── */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.25rem; }
    .hero p { font-size: 0.87rem; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-card { padding: 14px 8px; }
    .cat-icon { font-size: 1.8rem; }
    .cat-name { font-size: 0.82rem; }
    .cat-count { font-size: 0.7rem; }
    .brand-grid { grid-template-columns: repeat(2, 1fr); }
    .problem-card { flex-wrap: wrap; }
    .problem-card-arrow { display: none; }
    .section-title { font-size: 1rem; }
    .site-logo { font-size: 1.1rem; }
    .header-search input { font-size: 0.92rem; }
    /* Tables on mobile */
    table { font-size: 0.8rem; }
    th, td { padding: 7px 8px !important; }
}

/* ── TOUCH / HOVER IMPROVEMENTS ── */
@media (hover: none) {
    .cat-card:hover { transform: none; box-shadow: none; }
    .brand-card:hover { transform: none; box-shadow: none; }
    .problem-card:hover { box-shadow: none; }
    /* Bigger tap targets */
    .header-nav a { padding: 8px 4px; }
    .mobile-nav a { min-height: 48px; display: flex; align-items: center; }
}

/* ── SAFE AREA (iOS notch) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
    .site-header { padding-top: env(safe-area-inset-top); }
}
