body {
  font-family: 'Noto Sans', sans-serif;
}

/* Logo styling for different contexts */
.title img[alt="IndustryEQA"] {
  height: 60px;
  vertical-align: middle;
  margin-right: 8px;
  max-width: none;
}

.subtitle img[alt="IndustryEQA"] {
  height: 24px;
  vertical-align: middle;
  margin-right: 4px;
  max-width: none;
}

.content img[alt="IndustryEQA"] {
  height: 18px;
  vertical-align: middle;
  margin: 0 2px;
  max-width: none;
}

/* Responsive logo sizing */
@media screen and (max-width: 768px) {
  .title img[alt="IndustryEQA"] {
    height: 45px;
  }

  .subtitle img[alt="IndustryEQA"] {
    height: 20px;
  }

  .content img[alt="IndustryEQA"] {
    height: 16px;
  }
}

@media screen and (max-width: 480px) {
  .title img[alt="IndustryEQA"] {
    height: 35px;
  }

  .subtitle img[alt="IndustryEQA"] {
    height: 18px;
  }
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.industry-logo {
  font-variant: small-caps;
  font-weight: bold;
  color: #2e5cb8;
}

.safety-highlight {
  background: linear-gradient(120deg, #ff6b6b 0%, #ffa500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

.category-card {
  background: #f8f9fa;
  border-left: 4px solid #2e5cb8;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 0 8px 8px 0;
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin: 0.5rem;
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.highlight-number {
  font-size: 2rem;
  font-weight: bold;
  display: block;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

.publication-title {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}

.publication-awards {
  color: #ff3860;
  width: fit-content;
  font-weight: bolder;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px !important;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}

/* Custom styles for the IndustryEQA website */

.section {
  padding: 3rem 1.5rem;
}

.title.is-3 {
  color: #2e5cb8;
  font-weight: 600;
}

/* Generic Table Styles */
.table th {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  font-weight: 600;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.table td {
  border: 1px solid #e8e8e8;
  vertical-align: middle;
}

.table tr:hover {
  background-color: #f8f9fa;
}

.leaderboard-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-button::before {
  content: "🏆";
  font-size: 1.2em;
  transition: transform 0.2s ease;
}

.leaderboard-button:hover::before {
  transform: scale(1.1);
}

.leaderboard-button.fa-icon::before {
  content: "";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 1em;
}

.leaderboard-button.fa-icon::after {
  content: "\f091";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 0.5rem;
}

/* Code blocks for BibTeX */
pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

code {
  background-color: #f8f9fa;
  color: #495057;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* Responsive design improvements */
@media screen and (max-width: 768px) {
  .stats-card {
    margin: 0.5rem 0;
  }

  .highlight-number {
    font-size: 1.5rem;
  }

  .category-card {
    margin: 1rem 0;
  }

  .publication-title {
    font-size: 1.8rem !important;
  }

  .table {
    font-size: 0.9rem;
  }
}

/* Animation for loading placeholders */
@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

.placeholder {
  animation: pulse 2s infinite;
}

/* Button hover effects */
.button.is-dark:hover {
  background-color: #2e5cb8 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Figure styling */
figure.image {
  margin: 1rem 0;
}

figure.image img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

figure.image img:hover {
  transform: scale(1.02);
}

figcaption {
  padding: 0.5rem 0;
  font-style: italic;
  color: #666;
}

/* Video styling */
video {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: auto;
}

/* Navbar improvements */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-item {
  position: relative;
  transition: all 0.3s ease;
}

.navbar-item:hover {
  background-color: #f8f9fa;
  color: #2e5cb8 !important;
}

.navbar-item.is-active {
  color: #2e5cb8 !important;
  font-weight: 600;
}

.navbar-item.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #2e5cb8 0%, #667eea 100%);
  border-radius: 2px 2px 0 0;
}

html {
  scroll-behavior: smooth;
}

.section[id] {
  scroll-margin-top: 70px;
}

.navbar-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2e5cb8 0%, #667eea 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.navbar-item:hover::before,
.navbar-item.is-active::before {
  transform: scaleX(1);
}

@media screen and (max-width: 1023px) {
  .navbar-item.is-active::after {
    display: none;
  }

  .navbar-item.is-active::before {
    height: 100%;
    background: rgba(46, 92, 184, 0.1);
    transform: scaleX(1);
  }

  .navbar-item:hover::before {
    background: rgba(46, 92, 184, 0.05);
  }
}

.footer {
  background-color: #f8f9fa;
  padding: 3rem 1.5rem 2rem;
}

.footer .icon-link:hover {
  color: #2e5cb8;
  transform: translateY(-2px);
}

.button:focus,
.navbar-item:focus {
  outline: 2px solid #2e5cb8;
  outline-offset: 2px;
}

@media print {

  .navbar,
  .footer,
  .button {
    display: none;
  }

  .section {
    padding: 1rem 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

.trajectory-gif {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .trajectory-gif {
    max-height: 420px;
    object-fit: contain;
  }
}

/* ================================================= */
/* UPDATED PERFORMANCE TABLE STYLES (MATCHING INDUSTRYEQA) */
/* ================================================= */

.performance-table {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  margin: 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

/* Note: 'background' is used here instead of 'background-color' 
   to override the gradient defined in .table th */
.performance-table .method-header {
  background: #bbbbbb;
  /* Darkest scale of #DDDDDD */
  color: #333333;
  font-weight: 600;
  border: 1px solid #aaaaaa;
  padding: 1rem;
  text-align: center;
  vertical-align: middle;
  min-width: 180px;
  text-shadow: none;
  /* Removed shadow from generic table */
}

.performance-table .main-header {
  background: #bbbbbb;
  /* Darkest scale of #DDDDDD */
  color: #333333;
  font-weight: 600;
  border: 1px solid #aaaaaa;
  padding: 0.8rem;
  text-align: center;
  font-size: 1rem;
  text-shadow: none;
}

.performance-table .sub-header {
  background: #cccccc;
  /* Medium scale of #DDDDDD */
  color: #333333;
  font-weight: 500;
  border: 1px solid #bbbbbb;
  padding: 0.7rem;
  text-align: center;
  font-size: 0.9rem;
  text-shadow: none;
}

.performance-table td {
  border: 1px solid #e8e8e8;
  vertical-align: middle;
  padding: 0.7rem 0.5rem;
  text-align: center;
  color: #495057;
}

/* Styling for the GIF containers */
.gif-container img {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  object-fit: cover; /* Ensures gifs fill the frame nicely */
  width: 100%;
  height: 100%;
}

/* Tab transition animation */
.model-content {
  animation: fadeEffect 0.6s;
}

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

/* Tab Active Color Override */
.tabs.is-toggle li.is-active a {
  background-color: #2e5cb8 !important; /* Your brand color */
  border-color: #2e5cb8 !important;
}

/* Responsive adjustment for mobile */
@media screen and (max-width: 768px) {
  .gif-container {
    margin-bottom: 1.5rem;
  }
}

/* =======================
   Agent Trajectory Styling
   ======================= */

/* Make the whole box look modern and colorful */
.trajectory-box {
  border-radius: 18px;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #f5f7ff, #f0f9ff);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(120, 144, 255, 0.25);
}

/* Tabs minor enhancement */
#trajectory-tabs li.is-active a {
  font-weight: 600;
}

/* Only one panel visible at a time (logic from before) */
.trajectory-panel {
  display: none;
}

.trajectory-panel.is-active {
  display: block;
}

/* Layout: make top-down view larger than egocentric */
.trajectory-columns {
  align-items: stretch;
}

/* Desktop proportions: ego ~40%, top-down ~60% */
.trajectory-column-ego {
  flex: 0 0 38%;
}

.trajectory-column-topdown {
  flex: 0 0 62%;
}

/* Mobile: stack vertically, full width */
@media screen and (max-width: 768px) {

  .trajectory-column-ego,
  .trajectory-column-topdown {
    flex: 1 0 100%;
    margin-bottom: 1.5rem;
  }
}

/* Card-style frames for GIFs */
.trajectory-figure {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 0.75rem;
  background: radial-gradient(circle at top left, #e3f2fd, #e8eaf6);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

/* Slightly different tint for top-down frame */
.trajectory-figure--topdown {
  background: radial-gradient(circle at top left, #e8f5e9, #e3f2fd);
}

/* Actual GIFs */
.trajectory-gif {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* Make the top-down GIF feel a bit larger / more prominent */
.trajectory-gif-topdown {
  transform: scale(1.03);
  transform-origin: center;
}

/* Small pill labels overlayed on the corner */
.view-chip {
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* Different accent edges for ego vs top-down */
.view-chip--ego {
  border: 1px solid rgba(33, 150, 243, 0.7);
}

.view-chip--topdown {
  border: 1px solid rgba(76, 175, 80, 0.7);
}

