.driver-header-card {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    margin-bottom: 32px;
}
.driver-photo {
    position: relative;
    text-align: center;
}

.driver-photo img {
    width: 200px;
    height: 200px;
    border-radius: 14px;
    object-fit: cover;
}

.photo-meta {
    margin-top: 6px;
    font-size: 11px;
    color: #777;
}

.btn-upload {
    position: absolute;
    top: 8px;  
    right: 8px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563eb;
    color: #fff;

    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;

    box-shadow: 0 4px 10px rgba(0,0,0,.25);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-upload:hover {
    background: #1e40af;
    transform: scale(1.08);
    box-shadow: 0 6px 14px rgba(0,0,0,.3);
}


.btn-upload i {
    pointer-events: none;
}
.driver-main-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1; 
}
.driver-name {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 6px;
}

.driver-bio {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.bio-row {
  display: grid;
  grid-template-columns: 120px 1fr 64px;
  align-items: center;
  gap: 12px;
  padding: 1px 0;
}

.bio-label {
  font-weight: 600;
  color: #555;
}

.bio-value {
  color: #111;
  font-weight: 700;
}

.bio-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.bio-edit {
  color: #888;
  font-size: 14px;
  transition: color .15s ease, transform .15s ease;
}

.bio-edit:hover {
  color: #111;
  transform: scale(1.1);
}

.bio-edit .fa-star {
  color: #f5c518;
}
.driver-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
}

.btn-follow {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;

    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;

    background: #f4f6f8;
    color: #333;
    border: 1px solid transparent;

    transition:
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .15s ease;
}
.btn-follow:hover,
.btn-follow:focus,
.btn-follow:active {
    text-decoration: none;
}

.btn-follow i {
    font-size: 15px;
}

.btn-follow.follow:hover {
    background: #fdeaea;
    color: #c62828;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.18);
    transform: translateY(-1px);
}

.btn-follow.unfollow,
.btn-follow.following {
    background: #c62828;
    color: #ffffff;
    border-color: #c62828;
}

.btn-follow.unfollow:hover,
.btn-follow.following:hover {
    background: #ad1f1f;
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.35);
    transform: translateY(-1px);
}
.btn-follow:active {
    transform: scale(0.96);
}

.btn-follow.disabled,
.btn-follow.disabled:hover {
    background: #ececec;
    color: #999;
    border-color: #ddd;
    box-shadow: none;
    transform: none;
}

.btn-follow:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.25);
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;

    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;

    border: 1px solid transparent;
    background: #f4f6f8;
    color: #333;

    transition: 
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .15s ease;
}

.btn-like:hover,
.btn-like:focus,
.btn-like:active {
    text-decoration: none;
}

.btn-like i {
    font-size: 15px;
}

.btn-like.like:hover {
    background: #e9f7ef;
    color: #2e7d32;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
    transform: translateY(-1px);
}

.btn-like.unlike,
.btn-like.liked {
    background: #2e7d32;
    color: #ffffff;
    border-color: #2e7d32;
}

.btn-like.unlike:hover,
.btn-like.liked:hover {
    background: #256628;
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.35);
    transform: translateY(-1px);
}

.btn-like:active {
    transform: scale(0.96);
}

.btn-like.disabled,
.btn-like.disabled:hover {
    background: #ececec;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    pointer-events: none;
}

.btn-like:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}

.stars {
    color: #f5b301;
    font-size: 18px;
    margin-bottom: 14px;
}
.driver-rating {
    display: flex;
  justify-content: center;
  margin-top: 10px;
width: 100%;
}

.rate-ex1-cnt {
   display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap; 
    overflow-x: auto;   
    max-width: 100%;
}

.rate-button {
  font-size: 28px;
  color: #ccc;
  cursor: pointer;
  transition: color 0.2s ease;
}

.rate-button.hovered,
.rate-button.active {
  color: #FFD700; 
}

.rate-ex1-cnt.disabled .rate-button {
  cursor: default;
  opacity: 0.4;
}

.rating-section {
  width: 80%;
  margin-top: 5px;
}
.rating-grid {
    display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 10px;
}

.championship-card {
    background: #D1D1D1;
    color: #2E2D2D;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
    width: 100%;
    max-height: 440px;
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.05);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
}
.championship-list.scrollable {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    padding-right: 4px;
    flex: 1;
}
.championship-list.scrollable::-webkit-scrollbar {
    width: 6px;
}

.championship-list.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.championship-list.scrollable::-webkit-scrollbar-thumb {
    background: #BF2222;
    border-radius: 10px;
}

.championship-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    color: #BF2222;
    text-transform: uppercase;
    font-size: 12px;
}

.championship-title i {
    font-size: 14px;
}
.championship-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.championship-name {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F2F2F2;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    line-height: 1.3;
    transition: background 0.2s ease;
}

.championship-name:last-child {
    margin-bottom: 0;
}

.championship-name:hover {
    background: rgba(255,255,255,0.12);
}
.championship-year {
    font-weight: 700;
    color: #B80202;
    font-size: 14px;
    min-width: 42px;
    text-align: right;
    font-weight: 600;
}
.rating-card {
    flex: 1;
  padding: 15px;
  border-left: 6px solid #28a745; 
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rating-card .label {
    font-weight: bold;
     font-size: 14px;
     color: #000;
  display: block;
  margin-bottom: 8px;
}

.rating-card .value {
    font-size: 24px;
  display: block;
   font-weight: bold;
   color: #C73212;
}

.rating-card .votes {
    font-size: 14px;
  color: #666;
}

.rating-card.user {
    border-left-color: #22c55e;
}
.rating-card.low {   
    border-left-color: #dc2626;
}

.rating-card.medium {  
    border-left-color: #facc15; 
}

.rating-card.high {  
    border-left-color: #16a34a; 
}

.driver-stats-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 14px;
    margin-bottom: 36px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-left: 5px solid; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.stat-card .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.stat-card .value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.stat-card.color1 { border-left-color: #2563eb; } 
.stat-card.color2 { border-left-color: #e10600; } 
.stat-card.color3 { border-left-color: #16a34a; } 
.stat-card.color4 { border-left-color: #f59e0b; } 
.stat-card.color5 { border-left-color: #8b5cf6; } 
.stat-card.color6 { border-left-color: #0ea5e9; } 
.stat-card.color7 { border-left-color: #db2777; } 
.stat-card.color8 { border-left-color: #14b8a6; } 
.stat-card.color9 { border-left-color: #f43f5e; } 

.stat-card span {
    font-size: 12px;
    color: #666;
}

.stat-card b {
    display: block;
    font-size: 22px;
    margin-top: 6px;
}
.driver-tabs-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    padding: 24px;
    width: 100%;
}

.tabs-box {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}
.tabs-header {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #f5f7fa;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn i {
    font-size: 13px;
}

.tab-btn:hover {
    background: #e9edf3;
}

.tab-btn.active {
    background: #111;
    color: #fff;
}

.tabs-content {
    padding: 18px;
}

.tab-panel {
    display: none;
    animation: fade .25s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Tabla */
.standings-table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

/* Cabecera */
.standings-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
  border-bottom: none;
}

/* Filas tipo card */
.standings-table tbody tr {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}

.standings-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* Badge posición */
.pos-badge {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.pos-first  { background: #facc15; color:#000; } /* oro */
.pos-second { background: #94a3b8; }             /* plata */
.pos-third  { background: #f97316; }             /* bronce */
.pos-other  { background: #e5e7eb; color:#111; }

/* Campeonato */
.championship-name {
  font-weight: 600;
  color: #111827;
}

.champ-class {
  margin-left: 6px;
  font-size: 12px;
  color: #2563eb;
}

/* Año */
.year-link {
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.year-link:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .driver-header-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }
}
@media (max-width: 576px) {

.tabbable.header-tabs .nav-tabs {
  display: flex;
  flex-wrap: nowrap;      
  overflow-x: auto;   
  -webkit-overflow-scrolling: touch; 
  gap: 6px; 
}

.tabbable.header-tabs .nav-tabs::-webkit-scrollbar {
  height: 4px;
}
.tabbable.header-tabs .nav-tabs::-webkit-scrollbar-thumb {
  background: #9E0000;
  border-radius: 4px;
}

.tabbable.header-tabs .nav-tabs li {
  flex: 0 0 auto;  
}

.tabbable.header-tabs .nav-tabs li a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  white-space: nowrap;   
}

  .driver-photo {
    align-self: center;
  }

  .driver-photo img {
    width: 150px;
    height: 150px;
  }

  .btn-upload {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}
@media (max-width: 576px) {
  .driver-name {
    font-size: 26px;
    text-align: center;
  }

  .driver-main-info {
    gap: 14px;
  }
}
@media (max-width: 576px) {
  .bio-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label actions"
      "value actions";
    row-gap: 4px;
    column-gap: 8px;
    padding: 4px 0;
  }

  .bio-label {
    grid-area: label;
    font-size: 12px;
  }

  .bio-value {
    grid-area: value;
    font-size: 14px;
  }

  .bio-actions {
    grid-area: actions;
    align-self: center;
  }
}
@media (max-width: 576px) {
  .bio-edit {
    font-size: 16px;
    padding: 6px;
  }
}
@media (max-width: 576px) {
  .driver-actions {
    flex-direction: column; 
    align-items: stretch; 
    gap: 10px;
    width: 100%;
  }

  .driver-actions a,
  .driver-actions button {
    flex: 1 1 100%;
    text-align: center;
  }
}
@media (max-width: 576px) {
  .bio-actions {
    min-width: 56px;
  }
}
@media (max-width: 576px) {
.action-wrap {
  display: flex;
  width: 100%;
}

 .btn-follow,
  .btn-like {
    display: flex; 
    width: 100%; 
    max-width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    gap: 10px;
    height: 48px;  
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    line-height: 1
  }
[id^="follow"] {
    width: 100%;
  }
  [id^="like"] {
    width: 100%;
  }
[id^="like"] .btn-follow {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  [id^="follow"] .btn-like {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .btn-follow i,
  .btn-like i {
    font-size: 17px;
    
  }

}
@media (max-width: 400px) {
  .btn-follow span,
  .btn-like span {
    font-size: 14px;
  }
}
@media (hover: none) {
  .btn-follow:active,
  .btn-like:active {
    transform: scale(0.97);
    box-shadow: none;
  }
}
@media (max-width: 576px) {

  .driver-rating {
    margin-top: 16px;
  }

  .rate-ex1-cnt {
    gap: 8px;
  }

  .rate-button {
    font-size: 19px;
    padding: 1px;
  }

  .rating-section {
    width: 100%;
  }

  .rating-grid {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .championship-card {
    padding: 12px 14px;
    font-size: 13px;
    max-height: 260px;
    border-radius: 14px;
    margin-bottom: 15px;
  }

  .championship-title {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .championship-title i {
    font-size: 13px;
  }

  .championship-name {
    padding: 6px 8px;
    font-size: 13px;
  }

  .championship-year {
    font-size: 13px;
    min-width: 38px;
  }

  .championship-list.scrollable {
    padding-right: 2px;
  }

  .championship-list.scrollable::-webkit-scrollbar {
    width: 4px;
  }

}

@media (max-width: 576px) {

  .driver-stats-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
  }

  .stat-card {
    padding: 12px 14px;
    border-left-width: 4px;
  }

  .stat-card .label {
    font-size: 11px;
  }

  .stat-card .value {
    font-size: 18px;
  }

  .rating-card {
    padding: 12px;
    border-left-width: 4px;
  }

  .rating-card .label {
    font-size: 12px;
  }

  .rating-card .value {
    font-size: 20px;
  }

  .rating-card .votes {
    font-size: 12px;
  }

  .tabs-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 10px;
  }

  .tab-btn i {
    font-size: 12px;
  }

  .tabs-content {
    padding: 14px;
  }

  .driver-tabs-box {
    padding: 16px;
    border-radius: 14px;
  }

  .tabs-box {
    border-radius: 10px;
  }
  .standings-table thead {
    display: none;
  }

  .standings-table tbody tr {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    padding: 12px;
  }
}

@media (min-width: 577px) and (max-width: 991px) {

  .driver-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-card .value {
    font-size: 20px;
  }
}