:root {
  --primary-yellow: #ffd200;
  /* Daytona Gold */
  --primary-red: #ee272d;
  /* Speed Red */
  --primary-blue: #0056b3;
  /* Victory Blue */

  --bg-primary: #080a0c;
  --bg-secondary: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --border-main: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.04);
  --glass-bg: rgba(8, 10, 12, 0.85);

  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --font-racing: 'Russo One', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Russo One', sans-serif;
  font-weight: 100;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* background: url('../assets/images/nascar_hero_shot_1772432453535.png') no-repeat center center; */
  background-size: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary) 5%, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.video-background iframe {
  width: 100vw;
  height: 56.25vw;
  /* 16:9 Aspect Ratio */
  min-height: 100vh;
  min-width: 177.77vh;
  /* 16:9 Aspect Ratio */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1000px;
  padding: 20px;
  color: #f8f9fa;
  /* Always light in hero */
}

.hero-title {
  font-family: var(--font-racing);
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 100;
  color: #f8f9fa;
  /* Always light in hero */
  letter-spacing: -2px;
  line-height: 0.85;
  margin-bottom: 20px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  font-style: italic;
  transform: skewX(-5deg);
}

.hero-subtitle {
  font-family: var(--font-racing);
  font-size: 1.5rem;
  font-weight: 100;
  color: var(--primary-yellow);
  letter-spacing: 4px;
  margin-bottom: 25px;
  display: block;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-style: italic;
}

.cta-button {
  font-family: var(--font-racing);
  background: var(--primary-yellow);
  color: #000;
  padding: 16px 32px;
  border-radius: 4px;
  font-weight: 100;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-yellow);
  letter-spacing: 1px;
  font-style: italic;
  min-width: 240px;
  /* Uniform width */
}

.cta-button:hover {
  background: transparent;
  color: var(--primary-yellow);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 210, 0, 0.2);
}

/* Calendar Section */
.calendar-section {
  padding: 120px 5% 50px;
  max-width: 1600px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 80px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-left: 6px solid;
  border-image: linear-gradient(to bottom, var(--primary-yellow), var(--primary-red), var(--primary-blue)) 1;
  padding-left: 40px;
}

.section-header h2 {
  color: var(--primary-yellow);
}

.section-title h2 {
  font-family: var(--font-racing);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 100;
  letter-spacing: -1px;
  font-style: italic;
  color: var(--text-primary);
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
}

/* Race Grid */
.race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 30px;
}

.race-card {
  position: relative;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-main);
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.race-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-yellow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.race-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: var(--transition);
}

.race-card:hover .race-image {
  opacity: 0.7;
  transform: scale(1.05);
}

.race-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 50px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
  z-index: 2;
}

.race-date {
  font-size: 1rem;
  font-weight: 100;
  color: var(--primary-yellow);
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 3px;
  margin-bottom: 12px;
  display: inline-block;
}

.track-info-badge {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #ddd;
  line-height: 1.4;
  max-width: 300px;
}

.dlc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 15px;
  color: var(--primary-yellow);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: var(--transition);
}

.dlc-link:hover {
  opacity: 0.8;
  transform: translateX(5px);
}

.race-name {
  font-family: var(--font-racing);
  font-size: 2.2rem;
  font-weight: 100;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  font-style: italic;
}

.race-details {
  display: flex;
  gap: 25px;
  font-size: 0.95rem;
  color: #ccc;
  /* Stay light on dark overlay */
  font-weight: 100;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-item span {
  color: #fff;
  font-weight: 100;
}

.card-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10rem;
  font-weight: 900;
  opacity: 0.3;
  color: transparent;
  -webkit-text-stroke: 2px var(--text-primary);
  transition: var(--transition);
  line-height: 1;
  font-style: italic;
  pointer-events: none;
}

.race-card:hover .card-number {
  opacity: 0.6;
  transform: scale(1.1);
  -webkit-text-stroke: 2px var(--text-primary);
}

/* Navigation - From index.html */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, var(--primary-yellow) 33%, var(--primary-red) 33%, var(--primary-red) 66%, var(--primary-blue) 66%) 1;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  font-family: var(--font-racing);
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 100;
  color: var(--primary-yellow);
  letter-spacing: 1px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-racing);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 100;
  font-size: 1.1rem;
  transition: color 0.2s ease;
  position: relative;
  font-style: italic;
  letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-yellow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-yellow);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  transition: var(--transition);
}

.nav-toggle:hover {
  background: var(--card-bg);
  transform: scale(1.1);
}

.nav-links .cta-button {
  display: none;
  /* Hidden on desktop menu */
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(8, 10, 12, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.8rem;
  }

  .nav-links .cta-button {
    display: inline-flex !important;
    margin-top: 20px;
    width: 80%;
    max-width: 300px;
    color: #000 !important;
  }

  .nav-links .cta-button:hover {
    color: var(--primary-yellow) !important;
  }

  .nav-links li {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-container>.nav-actions .cta-button {
    display: none !important;
  }

  .footer-logo {
    font-size: 1.8rem;
  }
}

/* Additional Sections Styles */
.content-section {
  padding: 100px 5%;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-main);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.card h2 {
  font-family: var(--font-racing);
  font-size: 2.5rem;
  color: var(--primary-yellow);
  margin-bottom: 24px;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card h3 {
  font-family: var(--font-racing);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  margin-top: 30px;
  font-style: italic;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.rules-list {
  list-style: none;
  color: var(--text-secondary);
}

.rules-list li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.rules-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-yellow);
}

/* Drivers Header & Registration */
.drivers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

.title-with-count {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pilot-count {
  background: white;
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-racing);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 800;
}

.registration-side {
  text-align: right;
}

.registration-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .drivers-header {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .title-with-count {
    flex-direction: column;
    gap: 8px;
  }

  .registration-side {
    text-align: center;
    width: 100%;
  }

  .btn-registration {
    width: 100%;
    max-width: 350px;
  }
}

/* Drivers Table */
.drivers-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-main);
}

.drivers-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
}

.drivers-table th {
  font-family: var(--font-racing);
  padding: 20px;
  text-align: left;
  font-weight: 100;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-main);
  background: var(--bg-secondary);
  font-style: italic;
}

.drivers-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-main);
  color: var(--text-primary);
}

.driver-name {
  font-weight: 100;
  color: var(--primary-yellow);
}

/* Registration Button styles */
.btn-registration {
  font-family: var(--font-racing);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  background: #1b2838;
  /* Steam Blue */
  color: white;
  text-decoration: none;
  font-weight: 100;
  font-style: italic;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  cursor: pointer;
  min-width: 240px;
  /* Uniform width */
}

.btn-registration:hover {
  background: #2a3d54;
  transform: translateY(-2px);
}

.steam-icon {
  width: 20px;
  height: 20px;
  background: var(--primary-yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.979 0C5.678 0 .576 4.476.064 10.481l7.183 2.884a3.243 3.243 0 0 1 2.872-1.732c.173 0 .342.014.509.043l2.384-3.36V7.49c0-1.792 1.497-3.29 3.29-3.29s3.29 1.498 3.29 3.29c0 1.793-1.497 3.29-3.29 3.29a3.32 3.32 0 0 1-1.732-.484l-2.373 3.361c.029.166.043.335.043.509a3.243 3.243 0 0 1-3.243 3.244c-1.792 0-3.29-1.497-3.29-3.29 0-.172.014-.341.043-.508L.066 13.519C.576 19.523 5.678 24 11.979 24c6.624 0 12-5.375 12-12 0-6.624-5.376-12-12-12zm0 21.677c-5.319 0-9.677-4.358-9.677-9.677S6.66 2.323 11.979 2.323c5.319 0 9.677 4.358 9.677 9.677s-4.358 9.677-9.677 9.677zm7.254-12.387a2.127 2.127 0 0 0-2.125-2.125 2.127 2.127 0 0 0-2.125 2.125 2.127 2.127 0 0 0 2.125 2.125 2.127 2.127 0 0 0 2.125-2.125z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.979 0C5.678 0 .576 4.476.064 10.481l7.183 2.884a3.243 3.243 0 0 1 2.872-1.732c.173 0 .342.014.509.043l2.384-3.36V7.49c0-1.792 1.497-3.29 3.29-3.29s3.29 1.498 3.29 3.29c0 1.793-1.497 3.29-3.29 3.29a3.32 3.32 0 0 1-1.732-.484l-2.373 3.361c.029.166.043.335.043.509a3.243 3.243 0 0 1-3.243 3.244c-1.792 0-3.29-1.497-3.29-3.29 0-.172.014-.341.043-.508L.066 13.519C.576 19.523 5.678 24 11.979 24c6.624 0 12-5.375 12-12 0-6.624-5.376-12-12-12zm0 21.677c-5.319 0-9.677-4.358-9.677-9.677S6.66 2.323 11.979 2.323c5.319 0 9.677 4.358 9.677 9.677s-4.358 9.677-9.677 9.677zm7.254-12.387a2.127 2.127 0 0 0-2.125-2.125 2.127 2.127 0 0 0-2.125 2.125 2.127 2.127 0 0 0 2.125 2.125 2.127 2.127 0 0 0 2.125-2.125z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Modal Styles from index.html */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px 0 80px;
  /* Al menos 80px abajo para asegurar el scroll */
}

.modal.active {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: transparent;
}

.modal-content {
  position: relative;
  width: 92%;
  max-width: 500px;
  background: var(--bg-primary);
  border: 1px solid var(--border-main);
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  z-index: 2001;
  margin: 40px auto;
}

.race-modal-content {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-main);
}

.race-modal-banner {
  height: 250px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.race-modal-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}

.race-modal-body {
  padding: 40px;
}

.race-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid var(--border-main);
}

.race-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .race-modal-content {
    width: 100%;
  }

  .race-modal-banner {
    height: 180px;
  }

  .race-modal-body {
    padding: 25px;
  }

  .race-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .race-modal-actions {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .race-modal-actions div {
    width: 100%;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
}

.info-block h4 {
  color: var(--primary-yellow);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 800;
}

.info-block p,
.info-block a {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.info-block a {
  color: var(--primary-yellow);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.info-block a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Modal Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal.active .modal-content {
  animation: modalFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.modal-close:hover {
  background: var(--primary-red);
  transform: rotate(90deg);
}

.loading {
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 204, 0, 0.1);
  border-top: 4px solid var(--primary-yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Vehicle Info Card */
.vehicle-section {
  padding: 60px 5%;
  max-width: 1600px;
  margin: 0 auto;
}

.vehicle-card {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-main);
  border-radius: 20px;
  overflow: hidden;
  align-items: stretch;
  gap: 30px;
}

.vehicle-image {
  flex: 1;
  min-width: 400px;
  background: url('https://clan.fastly.steamstatic.com/images//35138208/1a71d02f46111bffef24e6be41ad8adeacd52fea.jpg') center/cover;
}

.vehicle-info {
  flex: 1.2;
  padding: 50px;
}

.vehicle-info h3 {
  color: var(--text-primary);
}

.vehicle-info p {
  color: var(--text-secondary);
}

@media (max-width: 992px) {
  .vehicle-card {
    flex-direction: column;
  }

  .vehicle-image {
    height: 300px;
    min-width: 100%;
  }

  .cta-button,
  .btn-registration {
    width: 100%;
    min-width: unset;
  }
}

/* Footer */
footer {
  padding: 80px 5% 60px;
  border-top: 1px solid var(--border-main);
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-secondary);
}

.footer-text {
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 1px;
}

.footer-logo {
  font-family: var(--font-racing);
  font-size: 2.2rem;
  margin-bottom: 25px;
  display: block;
  letter-spacing: 0;
  color: var(--primary-yellow);
}

.footer-text {
  color: var(--text-grey);
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title,
.hero-subtitle,
.cta-button {
  animation: fadeInUp 1s ease-out forwards;
}

.hero-subtitle {
  animation-delay: 0.2s;
}

.hero-title {
  animation-delay: 0.4s;
}

.cta-button {
  animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 1024px) {
  .race-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .race-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: -1px;
  }

  .race-card {
    height: 450px;
  }

  .section-header {
    padding-left: 20px;
  }

  .race-name {
    font-size: 1.8rem;
  }


  .nav-container {
    padding: 0 15px;
  }

  .hero-content {
    padding: 10px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }
}