/**
 * F1 Drivers Styles
 * Matches the dark theme of the website
 */

/* Container */
.drivers-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.drivers-header {
    margin-bottom: 20px;
}

.drivers-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.drivers-header h1 .first-name {
    font-weight: 400;
    margin-right: 8px;
}

.drivers-header h1 .last-name {
    font-weight: 700;
}

.drivers-header .last-updated {
    color: #888;
    font-size: 12px;
}

.drivers-header .back-link {
    display: inline-block;
    color: #888;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.drivers-header .back-link:hover {
    color: var(--team-color, #e10600);
}

.drivers-header .driver-team-name {
    color: #888;
    font-size: 1rem;
    margin-top: 5px;
}

.drivers-header .driver-team-name a {
    color: var(--team-color, #888);
    text-decoration: none;
}

.drivers-header .driver-team-name a:hover {
    text-decoration: underline;
}

/* Drivers Grid - Overview */
.drivers-by-team {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.team-group {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 20px;
}

.team-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--team-color, #e10600);
}

.team-drivers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Driver showcase card - same style as team detail page */
.driver-showcase-card {
    background: #252525;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--team-color, #666);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.driver-showcase-card:hover {
    background: #2a2a2a;
}

.driver-showcase-card .driver-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--team-color, #666);
    opacity: 0.5;
    line-height: 1;
    min-width: 60px;
}

.driver-showcase-card .driver-details {
    flex: 1;
}

.driver-showcase-card .driver-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.driver-showcase-card .driver-arrow {
    font-size: 1.5rem;
    color: #555;
    transition: color 0.2s, transform 0.2s;
}

.driver-showcase-card:hover .driver-arrow {
    color: var(--team-color, #e10600);
    transform: translateX(3px);
}

/* Driver Detail Page */
.driver-detail .drivers-header {
    margin-bottom: 25px;
}

.driver-detail .back-link {
    display: inline-block;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.driver-detail .back-link:hover {
    color: var(--team-color, #e10600);
}

.driver-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.driver-identity h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #fff;
}

.driver-identity h1 .first-name {
    font-weight: 400;
    margin-right: 8px;
}

.driver-identity h1 .last-name {
    font-weight: 700;
    color: var(--team-color, #fff);
}

.driver-identity .driver-team-name {
    color: #888;
    font-size: 1rem;
    margin-top: 8px;
}

.driver-identity .driver-team-name a {
    color: var(--team-color, #888);
    text-decoration: none;
    transition: opacity 0.2s;
}

.driver-identity .driver-team-name a:hover {
    opacity: 0.8;
}

.driver-number-hero {
    font-size: 4rem;
    font-weight: 800;
    color: var(--team-color, #666);
    opacity: 0.3;
    line-height: 1;
}

/* Driver Profile Section */
.driver-section.driver-profile {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 25px;
    margin-bottom: 25px;
}

.driver-section.driver-profile h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--team-color, #e10600);
}

/* Driver Stats Grid - Two columns */
.driver-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.driver-stats-grid .driver-section {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 20px;
    margin: 0;
}

.driver-stats-grid .driver-section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--team-color, #e10600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

/* Season Highlights */
.season-highlights {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.season-highlights .highlight-item {
    background: linear-gradient(135deg, var(--team-color, #e10600) 0%, color-mix(in srgb, var(--team-color, #e10600) 70%, black) 100%);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    flex: 1;
}

.season-highlights .highlight-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.season-highlights .highlight-label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Championship Badge */
.championship-badge {
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.championship-badge .badge-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.championship-badge .badge-label {
    display: block;
    font-size: 0.7rem;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    opacity: 0.8;
}

/* Info List (same as teams) */
.driver-section .info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.driver-section .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a2a;
}

.driver-section .info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.driver-section .info-row .info-label {
    color: #888;
    font-size: 0.85rem;
}

.driver-section .info-row .info-value {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}

.driver-section .info-row .info-value.highlight {
    color: var(--team-color, #e10600);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-item .profile-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-item .profile-value {
    font-size: 0.95rem;
    color: #e0e0e0;
    font-weight: 500;
}

.profile-item .profile-value .team-link {
    color: var(--team-color, #e0e0e0);
    text-decoration: none;
    transition: opacity 0.2s;
}

.profile-item .profile-value .team-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Related News Section */
.driver-section.related-news {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 25px;
    margin-top: 25px;
}

.driver-section.related-news h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--team-color, #e10600);
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.related-news-card {
    background: #252525;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.related-news-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-news-image .no-image {
    font-size: 2rem;
    opacity: 0.5;
}

.related-news-content {
    padding: 12px;
}

.related-news-content h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-card:hover h3 {
    color: var(--team-color, #e10600);
}

.related-news-date {
    font-size: 0.7rem;
    color: #888;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.no-results p {
    color: #888;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .team-drivers-grid {
        grid-template-columns: 1fr;
    }
    
    .driver-showcase-card .driver-number {
        font-size: 2rem;
        min-width: 50px;
    }
    
    .drivers-header h1 {
        font-size: 1.5rem;
    }
    
    .driver-header-content {
        flex-direction: row;
    }
    
    .driver-number-hero {
        font-size: 3rem;
    }
    
    .driver-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .season-highlights {
        gap: 10px;
    }
    
    .season-highlights .highlight-item {
        padding: 10px 15px;
    }
    
    .season-highlights .highlight-value {
        font-size: 1.5rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .drivers-container {
        padding: 15px;
    }
    
    .team-group {
        padding: 15px;
    }
    
    .driver-showcase-card {
        padding: 15px;
    }
    
    .driver-showcase-card .driver-number {
        font-size: 1.8rem;
        min-width: 45px;
    }
    
    .driver-showcase-card .driver-name {
        font-size: 1rem;
    }
    
    .driver-identity h1 {
        font-size: 1.4rem;
    }
    
    .driver-number-hero {
        font-size: 2.5rem;
    }
    
    .driver-section.driver-profile,
    .driver-stats-grid .driver-section {
        padding: 15px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .championship-badge .badge-value {
        font-size: 1.5rem;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
    }
    
    .driver-section.related-news {
        padding: 15px;
    }
}
