/* כותרות בלוקים כמו באתר (חדשות אחרונות, סרטונים מומלצים וכו') */
.f1il-section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.f1il-section-underline {
    display: block;
    height: 3px;
    background: #ff1e00;
    margin-top: 4px;
    margin-inline-start: auto;
}

/* טבלת עונה - בסיס */
.f1il-season-wrapper {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.f1il-constructors-wrapper {
    margin-top: 32px;
}

.f1il-season-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.f1il-title-underline {
    height: 3px;
    background: var(--f1-red, #ff1e00);
    border-radius: 2px;
    margin-top: 6px;
    display: block;
}

.f1il-season-table-wrapper {
    margin-top: 20px;
}

.f1il-season-table-scroll {
    overflow-x: auto;
    margin-bottom: 24px;
    max-height: none;
}

.f1il-season-table-scroll.f1il-open {
    display: block;
}

.f1il-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.f1il-table thead th {
    padding: 10px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    text-align: center;
}

.f1il-table tbody td {
    border-top: 1px solid #ececec;
    padding: 12px 14px;
    text-align: center;
    vertical-align: middle;
    background: #fff;
}

.f1il-table tbody tr:nth-child(odd) td {
    background: #fafafa;
}

.f1il-table tbody tr:hover td {
    background: #f1f1f1;
}

.f1il-table a {
    color: inherit;
    text-decoration: none;
}

.f1il-table a:hover {
    text-decoration: underline;
}

/* תא קבוצה עם לוגו */
.f1il-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.f1il-team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.f1il-team-name {
    white-space: nowrap;
}

/* טבלה מקוצרת במובייל */
.f1il-season-table-compact {
    display: none;
}

/* מובייל-only */
.f1il-mobile-only {
    display: none;
}

/* כפתור מובייל לפתיחת טבלה מלאה */
.f1il-table-toggle {
    margin-bottom: 12px;
}

.f1il-toggle-btn {
    background: #1c1c1c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
}

/* רספונסיביות */
@media (max-width: 768px) {
    .f1il-mobile-only {
        display: block;
    }

    .f1il-season-table-scroll {
        display: none;
        margin-top: 8px;
    }

    .f1il-season-table-scroll.f1il-open {
        display: block;
    }

    .f1il-season-table-compact {
        display: block;
    }

    .f1il-table th,
    .f1il-table td {
        font-size: 13px;
        padding: 8px 6px;
    }
}

/* ------------------ פרופיל נהג -------------------- */

.f1il-driver-page {
    max-width: 1600px;
    margin: 32px auto 48px;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

.f1il-driver-hero {
    margin-bottom: 32px;
}

.f1il-driver-card {
    display: flex;
    gap: 32px;
    border-radius: 24px;
    padding: 32px;
    background: #050716;
    color: #fff;
    align-items: center;
    overflow: hidden;
    justify-content: space-between;
}

/* צבעי רקע לפי קבוצה */
.f1il-team-bg-mclaren       { background: linear-gradient(90deg, #ff6f00, #111); }
.f1il-team-bg-mercedes      { background: linear-gradient(90deg, #00a19c, #050716); }
.f1il-team-bg-aston-martin  { background: linear-gradient(90deg, #00594f, #050716); }
.f1il-team-bg-alpine        { background: linear-gradient(90deg, #0086ff, #050716); }
.f1il-team-bg-kick-sauber   { background: linear-gradient(90deg, #00b16a, #050716); }
.f1il-team-bg-red-bull      { background: linear-gradient(90deg, #001f3f, #050716); }
.f1il-team-bg-rb            { background: linear-gradient(90deg, #4b0082, #050716); }
.f1il-team-bg-ferrari       { background: linear-gradient(90deg, #d90000, #050716); }
.f1il-team-bg-williams      { background: linear-gradient(90deg, #003a70, #050716); }
.f1il-team-bg-haas          { background: linear-gradient(90deg, #444, #050716); }

.f1il-driver-photo img {
    max-width: 260px;
    height: auto;
    display: block;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.f1il-driver-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.f1il-driver-number {
    font-size: 32px;
    font-weight: 700;
    opacity: 0.8;
}

.f1il-driver-name {
    font-size: 36px;
    margin: 0;
}

.f1il-driver-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.f1il-driver-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.f1il-driver-team-name {
    font-size: 18px;
}

.f1il-driver-sim,
.f1il-driver-age {
    margin-top: 6px;
    font-size: 15px;
}

/* סטטיסטיקות */
.f1il-driver-stats-section {
    margin-top: 24px;
}

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

.f1il-driver-stats-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.f1il-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.f1il-stat-card .label {
    display: block;
    font-size: 14px;
    color: #777;
    margin-bottom: 4px;
}

.f1il-stat-card .value {
    font-size: 20px;
    font-weight: 700;
}

/* מובייל לפרופיל נהג */
@media (max-width: 900px) {
    .f1il-driver-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .f1il-driver-photo img {
        max-width: 200px;
    }

    .f1il-driver-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .f1il-driver-stats-grid {
        grid-template-columns: 1fr;
    }

    .f1il-driver-page {
        padding: 0 12px;
    }
}