/* Súbor: css/driver_profile.css (Finálna kompletná verzia) */

/* --- Základný kontajner pre dvojstĺpcový layout --- */
.profile-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Hlavný obsah 2/3, sidebar 1/3 */
    gap: 30px; /* Medzera medzi stĺpcami */
    margin-top: 30px;
}

/* --- VYLEPŠENÁ HERO SEKCA --- */
.driver-profile-header {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 20px;
}

/* Tmavý gradientový overlay pre lepšiu čitateľnosť textu */
.driver-profile-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    z-index: 1;
    border-radius: 12px; /* Zaoblenie aj pre overlay */
}

/* Nový flexbox kontajner pre informácie */
.driver-profile-info {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(225, 6, 0, 0.5);
    flex-shrink: 0;
    align-self: center;
}

/* Kontajner pre texty napravo od fotky */
.driver-name-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.driver-name-details h1 {
    margin: 0;
    font-size: 3em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
.nickname {
    font-size: 1.5em;
    font-style: italic;
    color: #ccc;
    margin-top: 5px;
    font-weight: 400;
}

/* --- Štýly pre "karty" v sidebare a hlavnom obsahu --- */
.profile-card {
    background-color: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #333;
}
.profile-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #e10600;
    border-bottom: 2px solid #3a3a3a;
    padding-bottom: 10px;
    font-size: 1.4em;
}

/* --- Sidebar (pravý stĺpec) --- */
.sidebar .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.sidebar .driver-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar .driver-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #3a3a3a;
}
.sidebar .driver-details-list li:last-child {
    border-bottom: none;
}
.sidebar .driver-details-list strong {
    color: #aaa;
    margin-right: 10px;
}
.sidebar .driver-details-list span {
    text-align: right;
}
.sidebar .driver-details-list a {
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s ease;
}
.sidebar .driver-details-list a:hover {
    opacity: 0.8;
}
.sidebar .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sidebar .social-link {
    flex-grow: 1;
    text-align: center;
    font-size: 1.2em;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

/* --- Hlavný obsah (ľavý stĺpec) --- */
.main-content .driver-bio p {
    line-height: 1.7;
    color: #ddd;
}

/* --- VYLEPŠENIE VZHĽADU ŠTATISTÍK --- */
.sidebar .stat-item {
    background-color: #252525;
    padding: 15px;
    border-radius: 6px;
    border-top: 3px solid #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}
.sidebar .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.sidebar .stat-item .value {
    font-size: 2.2em;
    font-weight: 700;
    font-family: 'Roboto Condensed', monospace;
    line-height: 1.2;
}
.sidebar .stat-item .label {
    font-size: 0.85em;
    color: #aaa;
    text-transform: uppercase;
}
.sidebar .stat-item .f1-red {
    color: #e10600;
}

/* --- ŠPECIÁLNE ŠTÝLY PRE PÓDIOVÉ UMIESTNENIA --- */
.stat-item .fa-trophy,
.stat-item .fa-medal {
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 5px;
}
.stat-item.rank-gold {
    border-top-color: #FFD700;
}
.stat-item.rank-gold .value {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.stat-item.rank-gold .fa-trophy {
    color: #FFD700;
}
.stat-item.rank-silver {
    border-top-color: #C0C0C0;
}
.stat-item.rank-silver .value {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}
.stat-item.rank-silver .fa-medal {
    color: #C0C0C0;
}
.stat-item.rank-bronze {
    border-top-color: #CD7F32;
}
.stat-item.rank-bronze .value {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}
.stat-item.rank-bronze .fa-medal {
    color: #CD7F32;
}

/* --- Responzivita --- */
@media (max-width: 992px) {
    .profile-grid-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .driver-profile-info {
        flex-direction: column;
        padding: 25px;
    }
    .driver-name-details {
        align-items: center;
        text-align: center;
    }
    .driver-name-details h1 {
        font-size: 2.2em;
    }
}

/* ==========================================================================
   Globálne štýly pre systém záložiek (Tabov)
   ========================================================================== */

.tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 -1px 0;
    border-bottom: 1px solid #333;
}

.tab-link {
    padding: 15px 25px;
    cursor: pointer;
    background-color: transparent;
    color: #aaa;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-right: 5px;
    white-space: nowrap;
}

.tab-link:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.tab-link.active {
    background-color: #1e1e1e; /* Farba pozadia karty */
    color: #e10600;
    border-color: #333;
    border-bottom: 1px solid #1e1e1e; /* "Vymaže" čiaru pod aktívnou záložkou */
}

/* Kľúčové pravidlá pre skrývanie a zobrazovanie obsahu */
.tabs-content > .tab-pane {
    display: none; /* VŠETKY panely sú predvolene skryté */
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 8px 8px 8px;
    padding: 30px;
}

.tabs-content > .tab-pane.active {
    display: block; /* Zobrazí sa IBA panel s triedou .active */
}