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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
    direction: rtl;
    text-align: right;
}

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    color: #fff;
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0,0,0,0.25);
}

header::before {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(26,115,232,0.18) 0%, transparent 70%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: -30px; right: 60px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

header a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
}

header a:hover {
    color: #fff;
    background: rgba(26,115,232,0.5);
    border-color: rgba(26,115,232,0.6);
}

.breadcrumb {
    background: #fff;
    padding: 10px 30px;
    font-size: 0.88rem;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 6px;
    color: #aaa;
}

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

h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #1a1a2e;
    border-right: 4px solid #1a73e8;
    padding-right: 12px;
}

h3 {
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: #333;
}

/* Brand grid on home page */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.brand-card {
    background: #fff;
    border: 1px solid #e8f0fe;
    border-radius: 10px;
    padding: 20px 14px 16px;
    text-align: center;
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.22s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '🚗';
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.brand-card:hover::before {
    opacity: 1;
    transform: scale(1.15);
}

.brand-card:hover {
    background: linear-gradient(135deg, #1a73e8, #0f3460);
    color: #fff;
    border-color: #1a73e8;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26,115,232,0.3);
}

.brand-card .count {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: #888;
    margin-top: 4px;
}

.brand-card:hover .count {
    color: rgba(255,255,255,0.75);
}

/* Models list on brand page */
.models-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.model-card {
    background: #fff;
    border: 1px solid #e8f0fe;
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 0.97rem;
    font-weight: 500;
    transition: all 0.22s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 4px solid transparent;
}

.model-card:hover {
    background: #f0f5ff;
    border-color: #1a73e8;
    border-right-color: #1a73e8;
    color: #1a73e8;
    transform: translateX(-3px);
    box-shadow: 0 4px 14px rgba(26,115,232,0.15);
}

.model-card .arrow {
    color: #bbb;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.model-card:hover .arrow {
    color: #1a73e8;
    transform: translateX(-4px);
}

/* Tire spec table on model page */
.spec-table-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-top: 10px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.spec-table thead {
    background: #1a1a2e;
    color: #fff;
}

.spec-table thead th {
    padding: 13px 16px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.spec-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
    position: relative;
}

.spec-table tbody tr:last-child {
    border-bottom: none;
}

.spec-table tbody tr:hover {
    background: linear-gradient(90deg, #f0f7ff 0%, #f8fbff 100%);
}

.spec-table tbody tr:nth-child(even) {
    background: #fafbfd;
}

.spec-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #f0f7ff 0%, #f8fbff 100%);
}

.spec-table tbody td {
    padding: 12px 16px;
    color: #333;
    vertical-align: middle;
}

.spec-table tbody td:first-child {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 1rem;
}

.pressure-value {
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.88rem;
    display: inline-block;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(192,57,43,0.25);
}

.tire-size {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #174ea6;
    font-weight: 600;
    display: inline-block;
    border: 1px solid #c5d8ff;
}

.no-data {
    color: #aaa;
    font-style: italic;
    font-size: 0.88rem;
}

/* Stats bar */
.stats-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-radius: 12px;
    padding: 22px 28px;
    margin-bottom: 28px;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(26,52,96,0.25);
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(26,115,232,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
    padding: 8px 16px;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.stat-item:last-child {
    border-left: none;
}

.stat-item .num {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
}

.stat-item .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 5px;
    display: block;
    letter-spacing: 0.3px;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
    color: #1a73e8;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #c5d8ff;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(26,115,232,0.1);
}

.back-btn:hover {
    background: linear-gradient(135deg, #1a73e8, #0f3460);
    color: #fff;
    border-color: #1a73e8;
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
    transform: translateY(-1px);
}

.disclaimer {
    background: linear-gradient(135deg, #fffde7, #fff8e1);
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.84rem;
    color: #7a6000;
    line-height: 1.7;
    margin-top: 20px;
    border-right: 4px solid #ffc107;
}

.disclaimer strong {
    color: #5a4400;
}

/* Wave divider before footer */
.container + footer {
    position: relative;
}

footer {
    text-align: center;
    padding: 28px 24px;
    color: #aaa;
    font-size: 0.8rem;
    margin-top: 40px;
    border-top: 3px solid #1a1a2e;
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
    line-height: 1.7;
    position: relative;
}

footer::before {
    content: '🔧 לחץ אוויר בצמיגים';
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

footer .footer-disclaimer {
    color: #bbb;
    font-size: 0.76rem;
    margin-top: 6px;
}

/* SEO intro block */
.seo-intro {
    background: linear-gradient(135deg, #fff 60%, #f0f5ff 100%) !important;
    border-right: 4px solid #1a73e8 !important;
    position: relative;
    overflow: hidden;
}

.seo-intro::after {
    content: '🔧';
    position: absolute;
    left: 16px;
    top: 16px;
    font-size: 3rem;
    opacity: 0.07;
    pointer-events: none;
    line-height: 1;
}

/* Section heading accent line */
h2 {
    position: relative;
}

/* PSI badge used in stats cards */
.psi-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-right: 4px;
}

.bar-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a73e8, #0f3460);
    color: #fff;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Animated hover glow on stat info cards */
[style*="background:#f8faff"] {
    transition: box-shadow 0.2s, transform 0.2s;
}

[style*="background:#f8faff"]:hover {
    box-shadow: 0 6px 18px rgba(26,115,232,0.15) !important;
    transform: translateY(-2px);
}

/* Details/FAQ accordion styling */
details {
    transition: box-shadow 0.2s;
}

details[open] {
    box-shadow: 0 4px 16px rgba(26,115,232,0.1) !important;
    border-color: #1a73e8 !important;
}

details summary {
    list-style: none;
    position: relative;
    padding-left: 28px;
}

details summary::after {
    content: '▼';
    position: absolute;
    left: 0;
    color: #1a73e8;
    font-size: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ── Tablet ── */
@media (max-width: 768px) {
    .container {
        margin: 16px auto;
        padding: 0 14px;
    }
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .models-list {
        grid-template-columns: repeat(2, 1fr);
    }
    h2 {
        font-size: 1.35rem;
    }
    .stats-bar {
        justify-content: space-around;
    }
}

/* ── Mobile ── */
@media (max-width: 540px) {
    /* iOS safe area */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Hero banner responsive */
    [style*="padding:40px 30px"],
    [style*="padding:32px 30px"],
    [style*="padding:30px;position:relative"] {
        padding: 24px 16px !important;
    }

    /* Converter widget inputs */
    #psiInput, #barInput {
        font-size: 0.95rem !important;
    }

    header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    header a {
        font-size: 0.88rem;
    }

    .breadcrumb {
        padding: 8px 14px;
        font-size: 0.8rem;
        white-space: nowrap;
        overflow-x: auto;
    }

    .container {
        margin: 12px auto;
        padding: 0 12px;
    }

    h2 {
        font-size: 1.15rem;
        margin-bottom: 14px;
    }

    h3 {
        font-size: 1rem;
    }

    /* Home page — 2 columns */
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .brand-card {
        padding: 14px 10px;
        font-size: 0.9rem;
    }

    /* Brand page — single column */
    .models-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .model-card {
        padding: 14px;
        font-size: 0.95rem;
        min-height: 48px; /* touch target */
    }

    /* Stats bar — wrap evenly */
    .stats-bar {
        gap: 10px;
        justify-content: space-around;
        padding: 12px 10px;
    }

    .stat-item .num {
        font-size: 1.5rem;
    }

    /* Back button — full width on mobile */
    .back-btn {
        display: block;
        text-align: center;
        padding: 12px;
        font-size: 0.95rem;
    }

    /* ── Spec table → card layout on mobile ── */
    .spec-table-wrapper {
        overflow: visible;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
    }

    .spec-table thead {
        display: none; /* hide column headers */
    }

    .spec-table,
    .spec-table tbody,
    .spec-table tr,
    .spec-table td {
        display: block;
        width: 100%;
    }

    .spec-table tbody tr {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 12px 14px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    .spec-table tbody tr:hover {
        background: #f5f9ff;
    }

    .spec-table tbody td {
        padding: 5px 0;
        font-size: 0.9rem;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Label each cell using data-label attribute */
    .spec-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 0.8rem;
        min-width: 110px;
        flex-shrink: 0;
    }

    .spec-table tbody td:first-child {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1a1a2e;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
        margin-bottom: 4px;
    }

    .tire-size {
        font-size: 0.82rem;
        padding: 2px 6px;
    }

    .pressure-value {
        font-size: 0.9rem;
    }

    /* SEO text blocks */
    .seo-intro,
    .seo-mid,
    .seo-bottom {
        padding: 14px 14px !important;
        font-size: 0.88rem !important;
    }

    .disclaimer {
        font-size: 0.82rem;
        padding: 12px 14px;
    }

    footer {
        padding: 16px 14px;
        font-size: 0.76rem;
    }

    footer .footer-disclaimer {
        font-size: 0.72rem;
    }
}
