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

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

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

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

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

/* ================================
   OVERVIEW PAGE
   ================================ */

/* Teams Grid - Overview */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.team-card {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s;
}

.team-card:hover {
    background: #222;
    border-color: #444;
}

.team-card .team-color-bar {
    width: 4px;
    height: 100%;
    min-height: 80px;
    background-color: var(--team-color, #666);
    flex-shrink: 0;
}

.team-card .team-content {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 15px 20px;
    gap: 15px;
}

.team-card .team-info {
    flex: 1;
}

.team-card .team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 5px 0;
}

.team-card .team-drivers {
    font-size: 0.8rem;
    color: #666;
}

.team-card .team-arrow {
    font-size: 1.5rem;
    color: #555;
    padding-right: 20px;
    transition: color 0.2s;
}

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

/* Team Car Image - Overview */
.team-card .team-car-image {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: auto;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.team-card .team-car-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.team-card {
    position: relative;
}

.team-card .team-content {
    position: relative;
    z-index: 1;
}

/* ================================
   DETAIL PAGE
   ================================ */

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

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

/* Header */
.team-detail .teams-header {
    margin-bottom: 20px;
    position: relative;
}

.team-detail .teams-header h1 {
    color: var(--team-color, #e0e0e0);
    font-size: 1.8rem;
    margin: 0;
    padding-right: 420px;
}

.team-detail .teams-header .team-full-name {
    color: #888;
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Team Car Image Section - Detail Page */
.team-car-image-detail {
    position: absolute;
    right: 0;
    top: 0;
    width: 400px;
    height: auto;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.team-car-image-detail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 200px;
}

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

.team-section.team-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);
}

.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;
}

/* Drivers Showcase */
.team-drivers-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.driver-showcase-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.driver-showcase-card:hover {
    background: #222;
    border-color: #444;
}

.driver-showcase-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--team-color, #666);
}

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

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

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

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

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

/* Info Grid - Two columns */
.team-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Team Section */
.team-section {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 20px;
}

.team-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;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

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

.info-row .info-value {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: right;
}

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

.info-row.championship-row {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.1) 100%);
    margin: 0 -20px;
    padding: 12px 20px;
    border-radius: 6px;
}

.info-row.championship-row .info-value {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.2rem;
}

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

.team-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;
}

/* ================================
   HEAD TO HEAD SECTION
   ================================ */

.head-to-head-section {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 25px;
}

.head-to-head-section 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);
}

.h2h-container {
    display: flex;
    flex-direction: column;
}

.h2h-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.h2h-driver {
    display: flex;
    align-items: center;
}

.h2h-driver-left {
    justify-content: flex-start;
}

.h2h-driver-right {
    justify-content: flex-end;
}

.h2h-driver-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.h2h-vs {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.h2h-stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.h2h-stat-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.h2h-value {
    font-size: 1rem;
    font-weight: 500;
    color: #888;
}

.h2h-value.h2h-left {
    text-align: left;
}

.h2h-value.h2h-right {
    text-align: right;
}

.h2h-value.winner {
    color: var(--team-color, #e10600);
    font-weight: 700;
}

.h2h-label {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    min-width: 100px;
}

.h2h-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

/* H2H Responsive */
@media (max-width: 768px) {
    .h2h-header {
        gap: 10px;
    }
    
    .h2h-driver-name {
        font-size: 0.9rem;
    }
    
    .h2h-stat-row {
        gap: 10px;
    }
    
    .h2h-value {
        font-size: 0.9rem;
    }
    
    .h2h-label {
        font-size: 0.7rem;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .head-to-head-section {
        padding: 15px;
    }
    
    .h2h-driver-name {
        font-size: 0.85rem;
    }
    
    .h2h-label {
        min-width: 60px;
        font-size: 0.65rem;
    }
}

/* 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;
}

.no-results .btn {
    display: inline-block;
    background: #e10600;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.no-results .btn:hover {
    background: #c00500;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 992px) {
    .team-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }
    
    .teams-header h1 {
        font-size: 1.5rem;
    }
    
    .team-drivers-showcase {
        grid-template-columns: 1fr;
    }
    
    .driver-showcase-card {
        padding: 20px;
    }
    
    .driver-showcase-card .driver-number {
        font-size: 2.5rem;
        min-width: 60px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Car image adjustments for tablet */
    .team-card .team-car-image {
        width: 100px;
        right: 40px;
        opacity: 0.4;
    }
    
    .team-detail .teams-header h1 {
        padding-right: 0;
    }
    
    .team-car-image-detail {
        position: relative;
        top: auto;
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
        opacity: 1;
    }
    
    .team-car-image-detail img {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .teams-container {
        padding: 15px;
    }
    
    .team-card .team-content {
        padding: 12px 15px;
    }
    
    .team-section {
        padding: 15px;
    }
    
    .team-section.team-profile {
        padding: 20px 15px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .driver-showcase-card .driver-number {
        font-size: 2rem;
        min-width: 50px;
    }
    
    .driver-showcase-card .driver-name {
        font-size: 1rem;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
    }
    
    .team-section.related-news {
        padding: 15px;
    }
    
    /* Car image adjustments for mobile */
    .team-card .team-car-image {
        width: 80px;
        right: 30px;
        opacity: 0.35;
    }
    
    .team-car-image-detail {
        max-width: 100%;
    }
    
    .team-car-image-detail img {
        max-height: 140px;
    }
}


