:root {
  --bg-primary: #191A1C;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #222222;
  --border-color: #2a2a2a;
  --border-hover: #444444;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-primary: #d50f3b;
  --accent-primary-hover: #b10d31;

  /* Red scale (light → dark, 50-step increments; --red-500 is the base) */
  --red-100: #FFEBEF;
  --red-150: #FFDBE3;
  --red-200: #FFCCD7;
  --red-250: #FFB3C3;
  --red-300: #FF99AF;
  --red-350: #FF7A97;
  --red-400: #FF5C7F;
  --red-450: #FF335F; /* hover lift for primary button */
  --red-500: #FF1B4E;
  --red-550: #FF0A3F; /* pressed/active for buttons */
  --red-600: #EB0033;
  --red-650: #D4002E;
  --red-700: #BD0029;
  --red-750: #A60024;
  --red-800: #8F001F;
  --red-850: #750019;
  --red-900: #5C0014;

  /* Gray scale (light → dark, 50-step increments; --gray-500 is the base,
     --gray-900 is the home-v2 page background) */
  --gray-50:  #F8F8F9;
  --gray-100: #F2F2F3;
  --gray-150: #E8E9EB;
  --gray-200: #DFE0E2;
  --gray-250: #D4D6D9;
  --gray-300: #C9CBCF;
  --gray-350: #B9BCC1;
  --gray-400: #A9ACB2;
  --gray-450: #989DA4;
  --gray-500: #8A8D92;
  --gray-550: #7A8089;
  --gray-600: #6E747C;
  --gray-650: #636970;
  --gray-700: #595D64;
  --gray-750: #28292B;
  --gray-800: #1B1C1E;
  --gray-850: #17181A;
  --gray-900: #111213;
  --gray-950: #0F1011;

  /* Yellow scale (light → dark, 50-step increments; --yellow-500 is the base) */
  --yellow-100: #FFFAE6;
  --yellow-150: #FFF5CC;
  --yellow-200: #FFF0B3;
  --yellow-250: #FFEA94;
  --yellow-300: #FFE270;
  --yellow-350: #FFDA47;
  --yellow-400: #FFD324;
  --yellow-450: #FFD012;
  --yellow-500: #FFCC00;
  --yellow-550: #E8BA00;
  --yellow-600: #D6AB00;
  --yellow-650: #C49D00;
  --yellow-700: #B38F00;
  --yellow-750: #9E7E00;
  --yellow-800: #8A6E00;
  --yellow-850: #735C00;
  --yellow-900: #5C4900;

  /* Mint scale (light → dark, 50-step increments; --mint-500 is the base;
     hue shifted 8° towards blue from the original #1FD1A7 scale) */
  --mint-100: #E9FAF8;
  --mint-150: #D2F6F2;
  --mint-200: #BCF1EC;
  --mint-250: #A1ECE4;
  --mint-300: #82E5DB;
  --mint-350: #5EDED1;
  --mint-400: #3ED7C7;
  --mint-450: #2FD4C3;
  --mint-500: #1FD1BF;
  --mint-550: #1CBEAE;
  --mint-600: #1AB0A0;
  --mint-650: #18A193;
  --mint-700: #169286;
  --mint-750: #138277;
  --mint-800: #117167;
  --mint-850: #0E5E56;
  --mint-900: #0B4B45;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;

  /* Spacing scale */
  --space-0\.5: 2px; /* referenced as var(--space-0\.5) — the dot must be escaped */
  --space-1: 4px;
  --space-1\.5: 6px; /* referenced as var(--space-1\.5) — the dot must be escaped */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Type scale */
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 2rem;
  --font-2xl: 3rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Bai Jamjuree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* MAIN WRAPPER */
.layout {
  width: 970px;
  margin: 0 auto;
  display: flex;
  position: relative;
  z-index: 1;
}

/* SIDEBAR (fixed) */
.sidebar {
  width: 240px;
  position: fixed;
  height: 100vh;
  padding: 80px 20px 30px 20px;
  background: var(--bg-primary);
  border-right: none;
}

.logo {
  margin-bottom: 60px;
}

.logo img {
  width: 101px;
  height: 96px;
  display: block;
  margin-left: 5px;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 8px rgba(213, 15, 59, 0.3));
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 10px 12px;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-right: 20px;
}

.menu a:hover {
  color: #BBC693;
  background: transparent;
}

.menu a:hover::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: #BBC693;
  border-radius: 2px;
}

/* Back link special styling */
.menu a.back-link {
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px dashed #333333;
  padding-bottom: 20px;
}

.menu a.back-link:hover {
  color: var(--accent-primary-hover);
}

.menu a.back-link::after {
  display: none;
}

/* Active menu state */
.menu a.active {
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  position: relative;
}

.menu a.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.menu a.active::before {
  display: none;
}

/* CONTENT AREA */
.content {
  margin-left: 280px;
  width: 690px;
  max-width: 690px;
  padding: 80px 0px 40px 0px;
  margin-top: -10px;
}

.section {
  scroll-margin-top: 40px;
  padding: 20px 0 0 0;
  border-bottom: none;
}

.section + .section {
  margin-top: 70px;
}

.section h1,
.section h2 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  border-left: 3px solid var(--accent-primary);
  padding-left: 16px;
}

/* FOOTER */
.footer {
  margin-top: 60px;
  padding: 40px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 1px dashed #333333;
  position: relative;
  left: -280px;
  width: calc(100% + 280px);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 970px;
  margin: 0 auto;
}

.footer-logo img {
  max-width: 202px;
  height: auto;
  opacity: 1;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-text-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-text-link:hover {
  color: var(--text-secondary);
}

.footer-social-icon {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 18px;
  transition: var(--transition);
}

.footer-social-icon:hover {
  color: var(--text-secondary);
}

/* CARDS */
.card {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(220, 38, 38, 0.05);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.card h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.card h3 a:hover {
  color: var(--text-secondary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.card small {
  display: block;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.news-image-container {
  position: relative;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.news-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 24px 40px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  text-align: center;
  overflow: visible;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.news-meta {
  font-size: 12px;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.news-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.news-title a {
  color: #ffffff !important;
  text-decoration: none;
}

/* CAROUSEL NAVIGATION - SHARED STYLES */
.carousel-nav,
.driver-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0px;
  margin-top: 24px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 16px;
  overflow: hidden;
}

.carousel-nav {
  bottom: -28px;
}

.driver-carousel-nav {
  bottom: -40px;
}

.carousel-btn,
.driver-carousel-btn {
  background: rgba(50, 50, 55, 0.85);
  border: none;
  color: white;
  font-size: 28px;
  font-weight: 300;
  width: 56px;
  height: 56px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 2px;
}

.carousel-btn:first-child,
.driver-carousel-btn:first-child {
  border-radius: 16px 0 0 16px;
}

.carousel-btn:last-child,
.driver-carousel-btn:last-child {
  border-radius: 0 16px 16px 0;
}

.carousel-btn:hover,
.driver-carousel-btn:hover {
  background: var(--accent-primary);
  transform: translateY(-2px);
}

/* SERIES EVENTS & DRIVER SECTIONS - SHARED STYLES */
.series-events-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  top: 30px;
}

.drivers-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  top: 60px;
  text-transform: uppercase;
}

.event-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
  max-width: none;
  height: auto;
  pointer-events: auto;
  z-index: 1;
}

.event-splitter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -90px;
  pointer-events: none;
  z-index: 1;
}

.news-section {
  position: relative;
  text-transform: uppercase;
}

.news-splitter {
  display: none; /* Hidden - now using news-splitter-overlay inside carousel */
}

.news-splitter-overlay {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  width: calc(100% + 40px);
  height: 530px;
  pointer-events: none;
  z-index: 2;
  object-fit: fill;
}

.news-section > *:not(.news-splitter) {
  position: relative;
  z-index: 5;
}

.series-tabs,
.driver-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.series-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 16px 32px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-family: inherit;
}

.driver-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-family: inherit;
}

.series-tab:hover,
.driver-tab:hover {
  color: #d4e4a8;
}

.series-tab.active,
.driver-tab.active {
  color: #BBC693;
  border-bottom-color: #BBC693;
}

.event-cards-container,
.driver-cards-container {
  position: relative;
  min-height: auto;
  max-height: 540px;
}

.news-carousel {
  opacity: 0;
  transition: opacity 0.1s ease-in;
  min-height: 400px;
  position: relative;
}

.news-carousel.loaded {
  opacity: 1;
}

.news-slide {
  transition: opacity 0.15s ease-in-out;
}

.driver-cards-container {
  margin-bottom: 90px;
  opacity: 0;
  transition: opacity 0.1s ease-in;
}

.driver-cards-container.loaded {
  opacity: 1;
}

.event-card {
  display: none;
  background: #202124;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.driver-card {
  display: none;
  background: #202124;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.event-card.active,
.driver-card.active {
  display: block;
}

.event-card.active {
  animation: fadeInEvent 0.3s ease-in-out;
}

.driver-card.active {
  animation: fadeInDriver 0.3s ease-in-out;
}

@keyframes fadeInEvent {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

.event-card {
  position: relative;
  overflow: visible;
  height: 160px;
  padding-bottom: 0;
}

.event-card-content {
  display: block;
  padding: 32px 200px 32px 40px;
  min-height: auto;
  position: relative;
  z-index: 5;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 0;
}

.event-date {
  color: #BBC693;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.event-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 6px 0 0 0;
}

.watch-live-btn {
  display: inline-block;
  padding: 7px 18px;
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  align-self: flex-start;
  margin-top: 8px;
  position: relative;
  z-index: 20;
}

.watch-live-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.event-visual {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.series-car-image {
  width: 650px;
  max-width: none;
  height: auto;
  object-fit: contain;
  display: block;
}

.series-logo-overlay {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 130px;
  height: auto;
  object-fit: contain;
  z-index: 10;
  opacity: 0.9;
}

@media (max-width: 968px) {
  .event-card-content {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .event-name {
    font-size: 28px;
  }

  .series-tab,
  .driver-tab {
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 968px) {
  .event-card-content {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .event-name {
    font-size: 28px;
  }

  .series-tab,
  .driver-tab {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* DRIVER CARD SPECIFIC STYLES */
.driver-card {
  padding: 0;
  position: relative;
  height: 540px;
  max-height: 540px;
}

.driver-splitter {
  position: absolute;
  left: -100px;
  width: 900px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  object-fit: fill;
}

.driver-card > *:not(.driver-splitter):not(.driver-nickname-backdrop) {
  position: relative;
  z-index: 10;
}

.driver-content {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0;
  height: 100%;
  position: relative;
}

.driver-image-container {
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 350px;
  height: 508px;
  overflow: hidden;
  z-index: 1;
}

.driver-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.driver-name-section {
  position: absolute;
  z-index: 2;
  top: 50px;
  right: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
}

.driver-firstname {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.driver-lastname {
  font-size: 42px;
  font-weight: 900;
  color: #BBC693;
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.driver-nickname-backdrop {
  position: absolute;
  top: 40%;
  left: 25%;
  transform: translate(-50%, -50%) scaleY(2);
  font-size: 150px  ;
  font-weight: 900; 
  color: var(--accent-primary);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  text-transform: uppercase;
  letter-spacing: 4px;
  opacity: 0.6;
  font-family: 'Bai Jamjuree', sans-serif;
}

.driver-info {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin-top: 8px;
  line-height: 1.2;
}

.driver-socials {
  position: absolute;
  bottom: 50px;
  right: 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 3;
}

.driver-social-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.driver-social-link:hover {
  color: #BBC693;
  opacity: 1;
}

/* DRIVER ACHIEVEMENTS IN-CARD VIEW */
.driver-card.showing-achievements .driver-name-section,
.driver-card.showing-achievements .driver-nickname-backdrop {
  filter: grayscale(100%);
  opacity: 0.4;
}

.driver-card.showing-achievements .driver-info,
.driver-card.showing-achievements .driver-socials {
  display: none;
}

.driver-achievements-section {
  position: absolute;
  top: 135px;
  right: 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 3;
  max-width: 350px;
}

.driver-achievements-title {
  font-size: 14px;
  font-weight: 700;
  color: #BBC693;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.driver-achievement-item {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  text-align: right;
  line-height: 1.4;
  margin-bottom: 6px;
}

.driver-nickname {
  display: none;
}

.show-achievements-btn {
  position: absolute;
  top: 50%;
  right: -34px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(213, 15, 59, 0.4);
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 4px 12px rgba(213, 15, 59, 0.4);
  }
  50% {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 16px rgba(213, 15, 59, 0.6);
  }
}

.show-achievements-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(213, 15, 59, 0.6);
}

.show-achievements-btn svg {
  width: 20px;
  height: 20px;
}

/* ACHIEVEMENTS SECTION */
.achievements-section {
  width: 100%;
}

/* ABOUT SECTION WITH GLASS SPLITTER */
.about-section {
  position: relative;
}

.about-glass-splitter {
  position: absolute;
  right: -80px;
  top: -50px;
  width: 93px;
  height: 97px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.9;
}

/* CONTACT SECTION WITH SPLITTER */
.contact-section {
  position: relative;
}

.contact-splitter {
  position: absolute;
  left: -10px;
  top: -30px;
  width: 93px;
  height: 97px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.9;
}

.achievements-header-images {
  position: relative;
  height: 320px;
  margin-bottom: 20px;
  text-align: center;
  top: 50px;
}

.header-splitter {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 819px;
  max-width: 100vw;
  height: auto;
}

.header-trophies {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  max-width: 100%;
  height: auto;
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.achievement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  background: transparent;
  border-bottom: 1px dashed #333333;
  transition: var(--transition);
}

.achievement-row:hover {
  opacity: 0.8;
}

.achievement-series {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.series-logo-small {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.series-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.achievement-medals {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.medal-count {
  display: flex;
  align-items: center;
  gap: 12px;
}

.medal-icon {
  width: 20px;
  height: 20px;
  line-height: 1;
}

.medal-number {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
}

.medal-separator {
  width: 1px;
  height: 40px;
  background: #444444;
  opacity: 0.5;
}

/* Global link reset */
a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  color: var(--text-secondary);
}

/* Scrollbars: no global custom styling. Any ::-webkit-scrollbar rule makes
   Chrome/Safari draw a classic, space-taking bar; without one, macOS shows
   its native overlay scrollbar (no room taken, hidden until you scroll).
   Inner scroll areas that want a styled bar set their own rules. */

/* Selection */
::selection {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Mobile Header (hidden on desktop) */
.mobile-header {
  display: none;
}

/* RESPONSIVE - Desktop layout adjustments */
@media (max-width: 1200px) {
  .layout {
    width: 100%;
    justify-content: center;
  }

  .sidebar {
    position: absolute;
    left: calc(50% - 485px);
  }

  .content {
    margin-left: 280px;
    width: 690px;
    max-width: 690px;
    padding: 80px 0px 40px 0px;
  }
}

/* CONTACT FORM */
.contact-form {
  width: 100%;
  margin: 0 auto;
}

.form-label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: #202124;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  background: var(--bg-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

.submit-btn {
  width: auto;
  padding: 16px 40px;
  background: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  margin-top: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.submit-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* CONFETTI ANIMATION */
.confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 10;
  animation: confetti-burst var(--duration) var(--delay) forwards;
  --burstX: 0px;
  --burstY: 0px;
  --finalX: 0px;
  --fallY: 0px;
  --duration: 3s;
  --delay: 0s;
  will-change: transform, opacity;
}

/* Outer layer: burst outward (decelerating into the apex), then fall under gravity (accelerating).
   Per-keyframe timing functions give the arc its natural ease-out / ease-in feel. */
@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.12, 0.68, 0.28, 1);
  }
  10% {
    opacity: 1;
  }
  24% {
    /* apex of the burst */
    transform: translate(var(--burstX), var(--burstY)) scale(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.38, 0, 0.72, 0.9);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--finalX), var(--fallY)) scale(0.92);
    opacity: 0;
  }
}

/* Inner piece: carries the visual and flutters/tumbles independently of the fall,
   so the descent reads as fluttering paper rather than a rigid block dropping. */
.confetti__piece {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  --sway: 0px;
  --flutter: 0.6s;
  --flutterDelay: 0s;
  animation: confetti-flutter var(--flutter) var(--flutterDelay) ease-in-out infinite;
  will-change: transform;
}

@keyframes confetti-flutter {
  0% {
    transform: translateX(0) rotate(0deg) rotateY(0deg);
  }
  25% {
    transform: translateX(var(--sway)) rotate(90deg) rotateY(180deg);
  }
  50% {
    transform: translateX(0) rotate(180deg) rotateY(360deg);
  }
  75% {
    transform: translateX(calc(var(--sway) * -1)) rotate(270deg) rotateY(180deg);
  }
  100% {
    transform: translateX(0) rotate(360deg) rotateY(360deg);
  }
}

/* Metallic glare highlight pseudo-element for shiny look */
.confetti__piece::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 40%;
  height: 30%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* STATS SECTION */
.stats-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 50px 60px;
  overflow: hidden;
  text-align: center;
}

.stats-pieces-left,
.stats-pieces-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 100%;
  width: auto;
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
}

.stats-pieces-left {
  left: 0;
}

.stats-pieces-right {
  right: 0;
}

.stats-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.stats-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.stats-link:hover {
  opacity: 0.9;
}

.stats-logo-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px auto;
  max-width: 400px;
}

.stats-logo {
  max-width: 240px;
  width: 100%;
  height: auto;
}

.stats-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #ffffff;
  opacity: 0.85;
  margin-top: -2px;
  font-family: 'Bai Jamjuree', sans-serif;
}

.stats-sub {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.stats-label {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.7px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #d50f3b 50%, #f87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(220, 38, 38, 0.2);
}

