/* teams.css — modernized & compact with IMPROVED MODAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #070707;
  --card: rgba(20, 20, 20, 0.92);
  --muted: #bdbdbd;
  --accent: #e10600;
  --accent-2: #ff4500;
  --glass: rgba(255, 255, 255, 0.04);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --container: 1200px;
  --pad: 24px;
  --radius: 16px;
  --transition: 0.32s cubic-bezier(.2, .9, .2, 1);
  font-family: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url("../images/background.png") no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  background-color: #000;
  color: #fff;
}

* {
  box-sizing: border-box
}

html {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: #f7f7f7;
  line-height: 1.5
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad)
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #fff;
  color: #000;
  border-radius: 6px;
  z-index: 9999
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 30%, rgba(225, 6, 0, 0.06), transparent 18%),
    radial-gradient(circle at 85% 10%, rgba(30, 58, 138, 0.04), transparent 18%);
}

/* HERO */
.teams-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px
}

.teams-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(35, 35, 35, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.04);
  gap: 20px
}

.hero-content h1 {
  font-size: 2.4rem;
  margin: 0 0 8px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent
}

.hero-subtitle {
  color: var(--muted);
  max-width: 520px;
  margin: 0
}

.teams-stats {
  display: flex;
  gap: 18px
}

.stat-item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  min-width: 88px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.03)
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent)
}

.stat-label {
  font-size: .8rem;
  color: var(--muted);
  text-transform: uppercase
}

/* FILTERS */
.filter-section {
  margin: 36px 0
}

.filter-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap
}

.filter-btn {
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .6px;
  transition: all .18s
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px)
}

/* TEAMS GRID */
.teams-section {
  margin: 48px 0
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: start
}

/* TEAM CARD */
.team-card {
  cursor: pointer;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition)
}

.team-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  position: relative;
  min-height: 78px
}

.team-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden
}

.team-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain
}

.team-info h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800
}

.team-base {
  margin: 2px 0 0;
  font-size: .9rem;
  color: black
}

.championship-position {
  margin-left: auto;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center
}

.team-card.hidden {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.team-card.filtered-out {
  display: none !important;
}

/* IMAGE */
.team-image {
  height: 200px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05)
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s
}

.team-card:hover .team-image img {
  transform: scale(1.08)
}

/* DETAILS */
.team-details {
  padding: 18px
}

.drivers-section h3 {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: .9rem
}

.drivers {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.driver {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  flex: 1
}

.driver img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.06)
}

.driver span {
  font-weight: 700
}

.driver small {
  margin-left: auto;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700
}

.team-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  align-items: start;
}

.stat {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
}

/* TEAM BACKGROUNDS */
.team-card.mercedes { background-image: url("../images/teams/merce.jpg"); }
.team-card.redbull { background-image: url("../images/teams/redbull.jpg"); }
.team-card.ferrari { background-image: url("../images/teams/ferrari.jpg"); }
.team-card.mclaren { background-image: url("../images/teams/mclaren.jpg"); }
.team-card.alpine { background-image: url("../images/teams/alpine.jpg"); }
.team-card.astonmartin { background-image: url("../images/teams/aston.jpg"); }
.team-card.williams { background-image: url("../images/teams/williams.jpeg"); }
.team-card.sauber { background-image: url("../images/teams/sauber.webp"); }
.team-card.haas { background-image: url("../images/teams/haas.webp"); }
.team-card.rb { background-image: url("../images/teams/racingbulls.webp"); }
.team-card.cadillac { background-image: url("../images/teams/cadillac.jpg"); } /* Fallback image just in case */

/* ==========================================================================
   CADILLAC LIVERY FIX: Forces dark headers and crisp white text
   ========================================================================== */
.team-card.cadillac .team-header,
[data-team="cadillac"] .team-header,
.team-modal.cadillac .team-header,
.team-modal.cadillac .modal-header,
div[data-team="cadillac"] > div:first-child,
div[style*="background: #e0e0e0;"],
div[style*="background: rgb(224, 224, 224)"] {
  background: linear-gradient(278deg, #1111116e, #00000000) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.team-card.cadillac .team-header h2,
.team-card.cadillac .team-header p,
.team-card.cadillac .championship-position,
.team-card.cadillac .team-base,
[data-team="cadillac"] .team-header h2,
[data-team="cadillac"] .team-header p,
[data-team="cadillac"] .team-base,
[data-team="cadillac"] .championship-position,
div[data-team="cadillac"] > div:first-child h2,
div[data-team="cadillac"] > div:first-child p,
div[data-team="cadillac"] > div:first-child span,
div[style*="background: #e0e0e0;"] h2,
div[style*="background: #e0e0e0;"] p,
div[style*="background: #e0e0e0;"] span {
  color: #ffffff !important;
}

/* CHAMPIONSHIP TABLE */
.championship-section {
  margin: 72px 0
}

.section-title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.championship-table .table-header,
.championship-table .table-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  padding: 12px;
  align-items: center;
}

.table-header {
  font-weight: 800;
}

.table-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background .3s;
}

/* team color chips */
.team-color {
  width: 16px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 8px
}

.team-color.mclaren { background: linear-gradient(135deg, #ff8c00, #ff6600) }
.team-color.ferrari { background: linear-gradient(135deg, #dc2626, #991b1b) }
.team-color.mercedes { background: linear-gradient(135deg, #00d2be, #00a19c) }
.team-color.redbull { background: linear-gradient(135deg, #1e3a8a, #3730a3) }
.team-color.williams { background: linear-gradient(135deg, #00a0de, #0073a3) }
.team-color.sauber { background: linear-gradient(135deg, #52b700, #3d8a00) }
.team-color.haas { background: linear-gradient(135deg, #ffffff, #b91c1c) }
.team-color.alpine { background: linear-gradient(135deg, #0084c7, #005a8f) }
.team-color.racingbulls { background: linear-gradient(135deg, #9b2c2c, #3730a3) }
.team-color.astonmartin { background: linear-gradient(135deg, #006f62, #004d45) }
.team-color.cadillac { background: linear-gradient(135deg, #ffffff, #888888) } /* Cadillac chip */

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease
}

.reveal.visible {
  opacity: 1;
  transform: none
}

/* no results */
.no-results {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: center;
  font-weight: 700
}

/* focus styles */
.filter-btn:focus,
.team-card:focus,
.team-modal-close:focus {
  outline: 3px solid rgba(225, 6, 0, 0.18);
  outline-offset: 3px;
  border-radius: 8px
}

/* ==================== IMPROVED MODAL STYLES ==================== */

.team-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.team-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.team-modal {
  background: linear-gradient(145deg, rgba(25, 25, 35, 0.98), rgba(15, 15, 20, 0.95));
  border-radius: 24px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), 
              0 0 0 1px rgba(225, 6, 0, 0.1);
  position: relative;
  transform: scale(0.85) translateY(40px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-modal-overlay.visible .team-modal {
  transform: scale(1) translateY(0);
}

/* Close Button */
.team-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  font-weight: 300;
  line-height: 1;
}

.team-modal-close:hover {
  background: rgba(225, 6, 0, 0.2);
  border-color: var(--accent);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(225, 6, 0, 0.4);
}

/* Modal Grid Layout */
.team-modal-grid {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 0;
  min-height: 500px;
  max-height: 90vh;
  overflow: hidden;
}

/* Left Side - Image with Overlay Effect */
.team-modal-image {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 24px 0 0 24px;
}

.team-modal-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(225, 6, 0, 0.15) 0%, 
    transparent 50%, 
    rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.team-modal-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  z-index: 1;
  pointer-events: none;
}

.team-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) contrast(1.1);
  transition: transform 0.6s ease;
}

.team-modal:hover .team-modal-image img {
  transform: scale(1.05);
}

/* Right Side - Content */
.team-modal-content {
  padding: 50px 45px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* FIX: Stops the browser from chopping off the top and bottom */
  overflow-y: auto;
  max-height: 90vh;
  background: linear-gradient(to bottom, 
    rgba(20, 20, 30, 0.6), 
    rgba(15, 15, 20, 0.9));
}

/* Custom Scrollbar */
.team-modal-content::-webkit-scrollbar {
  width: 6px;
}

.team-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.team-modal-content::-webkit-scrollbar-thumb {
  background: rgba(225, 6, 0, 0.5);
  border-radius: 10px;
}

.team-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Team Name */
.team-modal-content h2 {
  font-size: 2.8rem;
  font-weight: 900;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  text-transform: uppercase;
  position: relative;
  animation: fadeInDown 0.6s ease 0.2s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base Location */
.modal-base {
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInDown 0.6s ease 0.3s both;
}

.modal-base::before {
  content: '📍';
  font-size: 1.2rem;
}

/* Stats Grid */
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
  animation: fadeInUp 0.6s ease 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-stat {
  text-align: center;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modal-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(225, 6, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.modal-stat:hover::before {
  left: 100%;
}

.modal-stat:hover {
  background: rgba(225, 6, 0, 0.08);
  border-color: rgba(225, 6, 0, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(225, 6, 0, 0.2);
}

.modal-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(225, 6, 0, 0.3);
}

.modal-desc {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

/* Description Text */
.modal-desc-text {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-top: 24px;
  font-size: 1rem;
  animation: fadeIn 0.6s ease 0.5s both;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

footer {
  margin-top: 80px;
  padding: 40px 24px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(15, 15, 15, 0.8));
  border-top: 3px solid var(--accent);
  color: var(--muted);
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.socials a:hover {
  color: var(--accent);
}

/* Know The Car Button */
.modal-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 20px; /* FIX: Gives the button breathing room at the bottom of the scroll */
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(225, 6, 0, 0.4);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.6s both;
  flex-shrink: 0; /* FIX: Prevents the button from being squished */
}

.modal-learn-more::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.modal-learn-more:hover::before {
  width: 300px;
  height: 300px;
}

.modal-learn-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(225, 6, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.modal-learn-more:active {
  transform: translateY(-1px);
}

.modal-learn-more::after {
  content: '→';
  font-size: 1.3rem;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.modal-learn-more:hover::after {
  transform: translateX(5px);
}

/* RESPONSIVE MODAL */
@media (max-width: 900px) {
  .team-modal {
    max-width: 95%;
    max-height: 85vh;
  }

  .team-modal-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .team-modal-image {
    border-radius: 24px 24px 0 0;
    height: 280px;
    min-height: 280px;
  }

  .team-modal-content {
    padding: 35px 28px;
    max-height: 50vh;
  }

  .team-modal-content h2 {
    font-size: 2.2rem;
  }

  .modal-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .modal-stat {
    padding: 16px 12px;
  }

  .modal-value {
    font-size: 1.8rem;
  }

  .modal-desc {
    font-size: 0.65rem;
  }

  .team-modal-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .team-modal-overlay {
    padding: 10px;
  }

  .team-modal {
    border-radius: 20px;
  }

  .team-modal-image {
    border-radius: 20px 20px 0 0;
    height: 220px;
    min-height: 220px;
  }

  .team-modal-content {
    padding: 28px 20px;
  }

  .team-modal-content h2 {
    font-size: 1.8rem;
  }

  .modal-base {
    font-size: 0.95rem;
  }

  .modal-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .modal-desc-text {
    font-size: 0.95rem;
    padding: 12px 16px;
  }

  .modal-learn-more {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}

/* ==================== END MODAL STYLES ==================== */

/* RESPONSIVE */
@media (max-width:1000px) {
  .team-image {
    height: 180px
  }

  .hero-content h1 {
    font-size: 1.8rem
  }

  .table-header,
  .table-row {
    grid-template-columns: 60px 1fr 90px 60px
  }
}

@media (max-width:680px) {
  .teams-hero {
    flex-direction: column;
    align-items: flex-start
  }

  .teams-grid {
    grid-template-columns: 1fr
  }

  .team-stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .championship-table {
    font-size: .95rem
  }
}

/* Quick link buttons */
.btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn.primary {
  background: linear-gradient(90deg, rgba(225,6,0,0.12), rgba(255,69,0,0.08));
  border: 1px solid rgba(225,6,0,0.16);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255,255,255,0.04);
}

.team-header > div:last-child a.team-results-link,
.team-header-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

@media (max-width:900px) {
  .team-header > div:last-child a.team-results-link {
    padding: 6px 8px;
    font-size: 0.85rem;
  }
}


/* =========================================================
   EDGE-TO-EDGE OVERRIDE FOR TEAMS & DRIVERS
   ========================================================= */

/* Override the old 1200px container variable */
:root {
  --container: 100% !important;
}

.teams-main, 
.drivers-main, 
.container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Ensure grids expand to fill the newly available space */
.teams-grid,
.drivers-grid {
  width: 100%;
}

/* Shrink side padding on mobile screens */
@media (max-width: 768px) {
  .teams-main, 
  .drivers-main, 
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}