:root {
  --tum-blue: #0065BD;
  --tum-dark: #072140;
  --tum-light: #64A0C8;
  --tum-accent: #3070B3;
  --text-primary: #333;
  --text-secondary: #666;
  --background-light: #f8f9fa;
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #ffffff;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Modern Navigation Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed) ease;
}

.header.scrolled {
  padding: 0.5rem 2rem;
  background: rgba(255, 255, 255, 0.98);
}

.site-title {
  font-size: 1.8rem;
  color: var(--tum-dark);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001; /* Keep above mobile menu */
}

.site-title img {
  height: 40px;
  width: auto;
}

.site-title:hover {
  color: var(--tum-blue);
}

.nav-container {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-button {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all var(--transition-speed) ease;
  position: relative;
  font-size: 1rem;
}

.nav-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--tum-blue);
  transition: all var(--transition-speed) ease;
  transform: translateX(-50%);
}

.nav-button:hover::after,
.nav-button.active::after {
  width: calc(100% - 2rem);
}

.nav-button:hover,
.nav-button.active {
  color: var(--tum-blue);
}

.nav-button:hover {
  color: var(--tum-blue);
  background: rgba(0, 101, 189, 0.1);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001; /* Keep above mobile menu */
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--tum-blue);
  color: white;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--tum-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Loading Animation */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
}

.loading-spinner.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--background-light);
  border-top: 4px solid var(--tum-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modern Footer Styles */
footer {
  background: var(--tum-dark);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section.brand {
  grid-column: 1;
}

.footer-logo {
  max-width: 150px;
  height: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-section h3 {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tum-blue);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

.social-links a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-section.brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section h3 {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--tum-blue);
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.5rem;
  }

  .site-title img {
    height: 32px;
  }

  .footer-content {
    padding: 0 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-in {
  animation: slideIn 0.6s ease forwards;
}

/* Update the mobile navigation styles */
/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .site-title {
    position: relative;
    z-index: 1001;
  }

  .hamburger {
    display: block;
    background: transparent;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tum-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  .hamburger.active {
    position: fixed;
    right: 1rem;
  }

  .hamburger.active span {
    background: var(--tum-dark);
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: 100vw;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    padding-top: 4rem;
  }

  .nav-container.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-button {
    width: auto;
    min-width: 200px;
    text-align: center;
    font-size: 1.4rem;
    padding: 1rem 2rem;
    margin: 0;
    color: var(--tum-dark);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
  }

  .nav-button::after {
    display: none;
  }

  .nav-button:hover {
    background: rgba(0, 101, 189, 0.05);
    transform: scale(1.05);
    border-color: var(--tum-blue);
  }

  .nav-button.active {
    background: var(--tum-blue);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 101, 189, 0.2);
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.5rem;
  }

  .nav-button {
    font-size: 1.2rem;
    min-width: 180px;
    padding: 0.8rem 1.5rem;
  }

  .hamburger.active {
    right: 0.5rem;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    right: 15px;
    bottom: 15px;
  }
  
  .back-to-top i {
    font-size: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .site-title {
    font-size: 1.3rem;
  }
  
  .header {
    padding: 0.8rem;
  }
  
  .nav-button {
    font-size: 1.1rem;
    min-width: 160px;
    padding: 0.7rem 1.2rem;
  }
  
  .hamburger span {
    width: 20px;
  }
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--tum-blue);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Fix button styling for demo video wrapper */
.demo-video-wrapper {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
}

.demo-video-wrapper:focus {
  outline: 3px solid var(--tum-blue);
  outline-offset: 2px;
}

.demo-video-wrapper:focus .video-overlay {
  transform: scale(1.1);
}