/* Import modern, rugged fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Exo+2:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables - Dark Motorsports Theme */
:root {
  /* Primary Color Palette */
  --primary-red: #FF0000;
  --primary-yellow: #FFD700;
  --primary-orange: #FF4500;
  --accent-red: #DC143C;
  --accent-yellow: #FFA500;
  
  /* Dark Theme Colors */
  --dark-primary: #0D0D0D;
  --dark-secondary: #1A1A1A;
  --dark-tertiary: #2D2D2D;
  --dark-accent: #333333;
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #E0E0E0;
  --text-accent: #CCCCCC;
  --text-muted: #999999;
  
  /* Technical Colors */
  --steel-blue: #4682B4;
  --carbon-black: #36454F;
  --metallic-silver: #C0C0C0;
  --chrome-yellow: #FFF700;
  
  /* Gradient Combinations */
  --gradient-primary: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
  --gradient-secondary: linear-gradient(135deg, var(--dark-secondary), var(--dark-tertiary));
  --gradient-accent: linear-gradient(135deg, var(--primary-yellow), var(--accent-yellow));
  --gradient-dark: linear-gradient(135deg, var(--dark-primary), var(--carbon-black));
  
  /* Spacing and Sizing */
  --border-radius: 12px;
  --border-radius-large: 20px;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 20px rgba(255, 215, 0, 0.3);
  
  /* Animation Timings */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--dark-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--primary-yellow);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

h3 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

h4 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--primary-yellow);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h5 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  text-transform: uppercase;
}

p {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Enhanced Navbar */

.navbar {
  background: var(--gradient-dark) !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-red);
  box-shadow: var(--shadow-heavy);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition-normal);
}

.navbar-brand {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

.navbar-brand:hover {
  color: var(--primary-yellow) !important;
  text-shadow: var(--shadow-neon);
  transform: scale(1.05);
  transition: var(--transition-normal);
}

.navbar-title {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-item {
  margin: 0 10px;
  position: relative;
}

.nav-item a {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary) !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.nav-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
  z-index: -1;
}

.nav-item a:hover::before,
.nav-item a.active-now::before{
  left: 0;
}

.nav-item a:hover,
.nav-item a.active-now {
  color: var(--text-primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.navbar-toggler {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler i.motor-icon {
  font-size: 1.5rem;
  color: var(--text-primary);
  transition: transform 0.5s ease; /* smooth animation */
}

.navbar-toggler:focus {
  box-shadow: var(--shadow-neon);
}

/* Rotate gear when menu expands */
.navbar-toggler[aria-expanded="true"] i.motor-icon {
  transform: rotate(180deg);
}


/* Social Icons */
.social-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}

.social-icon li {
  list-style: none;
}

.social-icon li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-secondary);
  color: var(--text-primary);
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.social-icon li a:hover {
  background: var(--gradient-primary);
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-neon);
  border-color: var(--primary-yellow);
}

/* Enhanced Carousel */
.carousel-item img {
  filter: brightness(0.7) contrast(1.2);
  transition: var(--transition-slow);
}

.carousel-item:hover img {
  filter: brightness(0.9) contrast(1.3);
  transform: scale(1.02);
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 2px solid var(--primary-red);
}

.carousel-caption h5 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 4rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
  margin-bottom: 1rem;
}

/* Enhanced Content Sections */
/* Center the section heading */
.driven-title {
  text-align: center;
  font-size: 3rem;
  color: var(--primary-yellow);
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 2rem;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}
.driven .container{
  display: flex;
  justify-content: center;
}


/* Refine container box inside driven */
.driven-container {
  margin: 0 auto;                        /* Centers horizontally */
  max-width: 900px;                     /* Controls width */
  text-align: justify;
  background: var(--dark-secondary);
  border: 2px solid var(--primary-yellow);
  border-radius: var(--border-radius-large);
  padding: 2.5rem;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.2), var(--shadow-heavy);
  position: relative;
  z-index: 2;
}


/* Remove gear icon for this section */
.driven-container::after {
  content: none !important;

}

.ceg-row,
.baja-row {
  display: flex;
  align-items: center; /* vertically centers the children */
}


.driven, .cegbg, .bajabg, .legacybg, .eventsbg, .timerbg {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  
}

.driven::before,
.cegbg::before,
.bajabg::before,
.legacybg::before,
.eventsbg::before,
.timerbg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'); */
  pointer-events: none;
  z-index: 1;
}

.driven {
  background: var(--gradient-dark);
}
.driven .container {
  text-align: center;
}

.weteam {
  margin: 0 auto; /* Center horizontally */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Center the .driven-container properly */
.driven .weteam.driven-container  {
  margin-left: auto;
  margin-right: auto;
}

/*legacy*/
.gear-container {
  position: relative;
  width: 900px;  /* Increased from 800px for more text */
  height: 320px; /* Increased from 280px for multiple lines */
  margin: 2rem auto;
  cursor: pointer;
}
.gear {
  position: absolute;
  left: 620px;  /* Adjusted for bigger container */
  width: 300px; /* Made wider - increased from 240px */
  height: 240px; /* Keep same height */
  transition: left 1s ease;
  z-index: 2;
}
.gear.spin {
  animation: spin 2s linear infinite;
  left: -120px; /* Adjusted for bigger gear */
}
.note {
  position: absolute;
  top: 40px;    /* Adjusted for bigger container */
  left: 0;
  height: 240px; /* Increased from 160px for multiple award lines */
  width: 640px;  /* Increased from 540px for longer text */
  background-color: var(--dark-secondary);
  color: var(--primary-yellow);
  font-weight: bold;
  font-family: 'Rajdhani', sans-serif;
  border-radius: 60px; /* Increased from 50px */
  box-shadow: 0 10px 18px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 1.8rem; /* Slightly reduced from 2rem to fit more text */
  line-height: 1.2; /* Added line height for better spacing */
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  text-align: center;
  padding: 20px 30px; /* Increased padding for better text spacing */
  border: 2px solid var(--primary-red);
}
.note.show {
  opacity: 1;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (max-width: 768px) {
  .gear-container {
    width: 450px; /* Increased from 400px for more text */
    height: 220px; /* Increased from 180px */
  }
  .gear {
    width: 160px;  /* Made wider - increased from 130px */
    height: 130px; /* Keep same height */
    left: 300px;   /* Adjusted for bigger container */
  }
  .gear.spin {
    left: -80px;   /* Adjusted for bigger gear */
  }
  .note {
    width: 320px;  /* Increased from 290px */
    height: 160px; /* Increased from 110px */
    top: 30px;     /* Adjusted for centering */
    font-size: 1rem; /* Reduced to fit multiple lines */
    line-height: 1.1; /* Tighter line spacing for mobile */
    padding: 15px 20px; /* Adjusted padding */
  }
}
@media (max-width: 480px) {
  .gear-container {
    width: 380px; /* Increased from 340px */
    height: 200px; /* Increased from 160px */
  }
  .gear {
    width: 130px;  /* Made wider - increased from 100px */
    height: 100px; /* Keep same height */
    left: 260px;   /* Adjusted for bigger container */
  }
  .gear.spin {
    left: -70px;   /* Adjusted for bigger gear */
  }
  .note {
    width: 270px;  /* Increased from 250px */
    height: 140px;  /* Increased from 90px */
    font-size: 0.85rem; /* Reduced to fit multiple lines */
    line-height: 1.1; /* Tight line spacing */
    top: 30px;     /* Adjusted for centering */
    padding: 12px 15px; /* Adjusted padding */
  }
}

.cegbg {
  background: var(--gradient-secondary);
  border-top: 3px solid var(--primary-red);
  border-bottom: 3px solid var(--primary-yellow);
}

.bajabg {
  background: var(--gradient-dark);
}

.legacybg {
  background: var(--gradient-secondary);
  border-top: 3px solid var(--primary-yellow);
  border-bottom: 3px solid var(--primary-red);
}

.eventsbg {
  background: var(--gradient-dark);
}

.timerbg {
  background: var(--gradient-secondary);
}

/* Enhanced Cards */
.weteam, .ceg-content, .baja-content, .legacy-item, .crossfit-item, .sponsor-content {
  background: var(--dark-secondary);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  margin: 1rem 0;
  border: 2px solid var(--dark-accent);
  box-shadow: var(--shadow-heavy);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 2;
 
}

.weteam::before,
.ceg-content::before,
.baja-content::before,
.legacy-item::before,
.crossfit-item::before,
.sponsor-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition-slow);
  z-index: -1;
  opacity: 0.1;
}

.weteam:hover::before,
.ceg-content:hover::before,
.baja-content:hover::before,
.legacy-item:hover::before,
.crossfit-item:hover::before,
.sponsor-content:hover::before {
  left: 0;
  opacity: 0.2;
}

.weteam:hover,
.ceg-content:hover,
.baja-content:hover,
.legacy-item:hover,
.crossfit-item:hover,
.sponsor-content:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary-yellow);
  box-shadow: var(--shadow-heavy), var(--shadow-neon);
}

Technical Icon Styling
/* Remove old gear icon styles */
.weteam::after,
.ceg-content::after,
.baja-content::after {
  content: none !important;
}

/* New larger gear icon positioned outside the container */
.gear-icon-outer {
  position: absolute;
  top: -30px; /* Adjust to place above the container */
  right: -30px;
  font-size: 3.5rem; /* Bigger size */
  opacity: 0.3;
  transition: var(--transition-normal);
  z-index: 1; /* Ensure it stays above background */
}

/* Hover effect for the gear */
.gear-icon-outer:hover {
  opacity: 0.7;
  transform: rotate(180deg) scale(1.1);
}
/* Legacy Items Enhancement */
.legacy-item {
  text-align: center;
  background: var(--dark-secondary);
  border: 2px solid var(--primary-red);
  position: relative;
}

.legacy-item::after {
  content: '🏆';
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  opacity: 0.4;
  transition: var(--transition-normal);
}

.legacy-item:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

/* Enhanced Buttons */
.btn {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  border: 2px solid var(--primary-red);
  background: var(--gradient-primary);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: var(--transition-normal);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy), var(--shadow-neon);
  border-color: var(--primary-yellow);
}

.btn a {
  color: var(--text-primary);
  text-decoration: none;
}

/* Events Section Enhancement */
.crossfit-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--dark-secondary);
  border: 2px solid var(--dark-accent);
  position: relative;
}

.crossfit-item::after {
  content: '🏁';
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  opacity: 0.4;
  transition: var(--transition-normal);
}

.crossfit-item:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

.crossfit-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: var(--transition-normal);
}

.crossfit-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Timer Section */
.timercontent {
  background: var(--dark-secondary);
  border: 2px solid var(--primary-yellow);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  margin: 1rem;
  text-align: center;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.timercontent::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: var(--transition-slow);
  z-index: -1;
  opacity: 0.1;
}

.timercontent:hover::before {
  left: 0;
  opacity: 0.2;
}

.timercontent:hover {
  transform: scale(1.05);
  border-color: var(--primary-red);
  box-shadow: var(--shadow-neon);
}

.timercontent h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  color: var(--primary-yellow);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}
/*Highlights*/
/* HIGHLIGHTS CAROUSEL - CLEAN VERSION */
.carousel-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.carousel-container * {
    box-sizing: border-box;
}

.highlightsSwiper {
    width: 100% !important;
    height: 500px !important;
    padding: 50px 0 !important;
    overflow: visible !important;
}

.highlightsSwiper .swiper-wrapper {
    height: 400px !important;
}

.highlightsSwiper .swiper-slide {
    width: 670px !important;  
    height: 470px !important;
}

.highlightsSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.highlightsSwiper .swiper-slide-active img {
    box-shadow: 0 25px 50px rgba(0,0,0,0.9);
}

.highlightsSwiper .swiper-button-next,
.highlightsSwiper .swiper-button-prev {
    color: white !important;
    background: rgba(255,255,255,0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
/* Footer Enhancement */
.footer {
  background: var(--gradient-dark);
  border-top: 3px solid var(--primary-red);
  padding: 3rem 0 1rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23333" stroke-width="0.5" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23footerGrid)"/></svg>');
  pointer-events: none;
}

/* ==== CONTACT BOX ==== */
.contact-box {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-box h3 {
  color: var(--primary-yellow);
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.contact-box p, .contact-box a {
  color: var(--text-secondary);
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.6;
}

.contact-box a:hover {
  color: var(--primary-yellow);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* ================ ENHANCED LEGACY SECTION ================ */

/* Section Header Styles */
.section-header {
  margin-bottom: 3rem;
  position: relative;
  text-align: center;
}

.legacy-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  position: relative;
}

.legacy-subtitle {
  font-family: 'Exo 2', sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--text-accent);
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* Decorative Elements */
.title-decoration {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  width: 200px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 3px;
}

.title-decoration::before,
.title-decoration::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--gradient-accent);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.title-decoration::before {
  left: -30px;
}

.title-decoration::after {
  right: -30px;
}

/* Enhanced Achievement Cards Grid */
.achievements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.achievement-card {
  position: relative;
  height: 220px;
  background: var(--gradient-secondary);
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--gradient-accent);
  border-radius: 20px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 
    0 25px 50px rgba(255, 215, 0, 0.15),
    0 0 50px rgba(255, 69, 0, 0.1);
}

.achievement-card:hover::before {
  opacity: 1;
}

.card-front {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 2;
  transition: all 0.6s ease;
}

.event-info {
  flex: 1;
}

.event-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--primary-red);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  transition: all 0.6s ease;
}

.event-year {
  font-family: 'Exo 2', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-accent);
  opacity: 0.7;
}

.gear-container-new {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gear-icon-new {
  width: 100px;
  height: 100px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--dark-primary);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.gear-icon-new::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px dashed var(--primary-yellow);
  border-radius: 50%;
  opacity: 0;
  animation: rotate 10s linear infinite;
  transition: opacity 0.3s ease;
}

.achievement-card:hover .gear-icon-new::before {
  opacity: 0.3;
}

/* Achievement Details Overlay */
.achievement-details {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(26, 26, 26, 0.98), 
    rgba(45, 45, 45, 0.98));
  backdrop-filter: blur(15px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  transform: scale(0.9);
}

.achievement-details.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.achievement-list {
  text-align: center;
  padding: 1rem;
}

.achievement-list h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #00FFFF, #0080FF, #8000FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.achievement-item {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0.8rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--primary-yellow);
  background: rgba(255, 215, 0, 0.05);
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.achievement-item:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateX(5px);
}

.trophy-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Animated States */
.achievement-card.active .card-front {
  opacity: 0.1;
  transform: translateX(-20px);
}

.achievement-card.active .gear-icon-new {
  transform: rotate(360deg) scale(0.7);
  opacity: 0.3;
}

/* Enhanced Particle Effects */
.achievement-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  border-radius: 20px;
}

.achievement-card.active::after {
  opacity: 1;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  z-index: 4;
}

.achievement-details.show .close-btn {
  opacity: 1;
}

.close-btn:hover {
  background: rgba(255, 0, 0, 0.3);
  transform: scale(1.1);
}

/* Stats Counter Animation */
.stats-preview {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  opacity: 0;
  transition: all 0.4s ease;
}

.achievement-card:hover .stats-preview {
  opacity: 1;
}

.stat-item {
  background: rgba(255, 215, 0, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  font-size: 0.9rem;
  color: var(--primary-yellow);
  font-weight: 600;
}

/* Enhanced Animations */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); 
  }
  50% { 
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); 
  }
}

@keyframes rippleEffect {
  to {
    transform: translate(-50%, -50%) scale(20);
    opacity: 0;
  }
}

/* Additional Visual Enhancements */
.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.achievement-card:hover .glow-effect::before {
  opacity: 0.3;
}

/* Responsive Design for Enhanced Legacy */
@media (max-width: 1200px) {
  .achievements-container {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 4rem auto 0;
  }
}

@media (max-width: 768px) {
  .achievement-card {
    height: 180px;
  }

  .card-front {
    padding: 0 1.5rem;
  }

  .event-title {
    font-size: 1.6rem;
  }

  .gear-icon-new {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .achievement-list h3 {
    font-size: 1.3rem;
  }

  .achievement-item {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }

  .achievements-container {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .achievements-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .achievement-card {
    height: 160px;
    margin: 1rem 0;
  }

  .card-front {
    padding: 0 1rem;
  }

  .event-title {
    font-size: 1.4rem;
  }

  .gear-icon-new {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .legacy-title {
    font-size: 2rem;
  }

  .legacy-subtitle {
    font-size: 1rem;
  }

  .title-decoration {
    width: 150px;
  }
}

/* ==== SOCIAL ICONS ==== */
.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 1.5rem;
  flex-wrap: nowrap;
}

.social-icon li {
  list-style: none;
}

.social-icon li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  background: var(--dark-secondary);
  color: var(--text-primary);
  border: 2px solid transparent;
  transition: var(--transition-normal);
}

.social-icon li a:hover {
  background: var(--gradient-primary);
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-neon);
  border-color: var(--primary-yellow);
}

/* ==== COPYRIGHT ==== */
.footer .abc {
  text-align: center;
  margin-top: 2rem;
}

.footer .abc p {
  color: #ebebeb;
  margin: 0;
  font-size: 0.9rem;
}
/* Image Enhancements */
img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  transition: var(--transition-normal);
}

img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .nav-item a {
    font-size: 0.9rem;
    padding: 8px 15px;
  }
  
   .contact-box {
    padding: 1.5rem;
  }

  .social-icon {
    flex-wrap: wrap;
    gap: 12px;
  }

  .social-icon li a {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .carousel-caption {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .carousel-caption h5 {
    font-size: 1.5rem;
  }

  .driven-title {
    font-size: 2rem;
  }

  .driven-container {
    padding: 1.5rem;
  }

  .timercontent {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .timercontent h1 {
    font-size: 2rem;
  }
  
  .legacy-item {
    margin: 1rem 0;
  }
  
  .crossfit-item {
    margin-bottom: 2rem;
  }
  
  .weteam, .ceg-content, .baja-content {
    padding: 1.5rem;
    margin: 0.5rem 0;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1rem;
  }
  
  .carousel-caption h5 {
    font-size: 1.2rem;
  }
  
  .carousel-caption p {
    font-size: 0.9rem;
  }
  
  .timercontent h1 {
    font-size: 1.5rem;
  }
  

  .social-icon li a {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

/* Preloader Enhancement */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--dark-primary);
}

.spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--dark-accent);
  border-top: 3px solid var(--primary-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--primary-yellow); }
.bg-dark { background: var(--dark-secondary); }
.bg-darker { background: var(--dark-primary); }
.border-accent { border-color: var(--primary-red); }
.shadow-hover { transition: var(--transition-normal); }
.shadow-hover:hover { box-shadow: var(--shadow-heavy); }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-accent);
}

/* CRITICAL: Override global img styles for carousel - MUST BE LAST */
/* ===== TEAM CARD FLIP EFFECT - SIMPLIFIED ===== */

/* Flip container */
.flip-container {
    perspective: 1000px;
    cursor: pointer;
    display: inline-block;
}

/* Team member with flip capability */
.flip-container .team_member {
    transform-style: preserve-3d;
    transition: transform 0.6s;
    position: relative;
    /* All your existing styles remain */
}

/* Flip state */
.flip-container.flipped .team_member {
    transform: rotateY(180deg);
}

/* Front content */
.front-content {
    backface-visibility: hidden;
}

/* Back content - CORRECTED */
.back-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg) scaleX(-1); /* Fix the mirroring */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    background: var(--dark-secondary);
    border: 2px solid var(--dark-accent);
    border-radius: var(--border-radius);
}

/* Back content text - FIXED */
.back-content * {
    transform: scaleX(-1); /* Un-mirror the text */
}

.back-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-yellow);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.back-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
}

/* Hover adjustments */
.flip-container.flipped .team_member:hover {
    transform: rotateY(180deg) translateY(-10px) scale(1.02);
}