/* Modern senseXplore AG Dark Theme */
:root {
  --primary-color: #a6ff00;
  --primary-dark: #7bc900;
  --primary-light: #c1ff33;
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #222222;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #888888;
  --border-color: #444444;
  --gradient-primary: linear-gradient(135deg, #a6ff00 0%, #7bc900 100%);
  --gradient-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  --shadow-primary: 0 10px 30px rgba(166, 255, 0, 0.2);
  --shadow-secondary: 0 5px 15px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Modern Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: var(--shadow-secondary);
}

.logo {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Modern Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

nav a:hover::before {
  width: 100%;
}

/* Language Switcher */
/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 10px;
  margin-left: 1rem;
}

/* CSS-based Flag Icons */
.flag-icon {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.flag-icon:hover {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 255, 0, 0.3);
}

/* German Flag */
.flag-de {
  background-image: url('../icons/de.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* UK Flag */
.flag-en {
  background-image: url('../icons/en.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Remove old complex UK flag CSS - now using SVG */

/* Red cross overlay for UK flag */
.flag-en::before {
  z-index: 1;
}

.flag-en .cross-vertical::after {
  content: '';
  position: absolute;
  top: 0;
  left: 1px;
  width: 2px;
  height: 100%;
  background: #c8102e;
  z-index: 3;
}

.flag-en::after {
  background: #c8102e;
  height: 2px;
  top: 9px;
  z-index: 3;
}

/* Language indicator */
.language-switcher .flag-icon.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 255, 0, 0.5);
  transform: scale(1.05);
}

/* CSS-based Flag Icons */
.flag-icon {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.flag-icon:hover {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 255, 0, 0.3);
}

/* Language indicator */
.language-switcher .flag-icon.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 255, 0, 0.5);
}

/* Hero Section with Animated Background */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(166, 255, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(166, 255, 0, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(166, 255, 0, 0.03) 0%, transparent 50%);
  animation: pulse 4s ease-in-out infinite alternate;
}

/* Additional floating elements for enhanced effect */
.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 10%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(166, 255, 0, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatElement 12s ease-in-out infinite;
  z-index: 1;
}

@keyframes floatElement {
  0%, 100% { 
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.3;
  }
  33% { 
    transform: translateY(-20px) translateX(10px) scale(1.1);
    opacity: 0.6;
  }
  66% { 
    transform: translateY(10px) translateX(-15px) scale(0.9);
    opacity: 0.4;
  }
}

/* Animated Background SVG */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

.hero-background svg {
  width: 100%;
  height: 100%;
}

/* Mountain/AI Network Lines */
.mountain-line {
  stroke: var(--primary-color);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.4;
  animation: drawLine 8s ease-in-out infinite;
}

.mountain-line.delay-1 { animation-delay: 1s; }
.mountain-line.delay-2 { animation-delay: 2s; }
.mountain-line.delay-3 { animation-delay: 3s; }

/* Network Nodes */
.network-node {
  fill: var(--primary-color);
  opacity: 0.6;
  animation: pulseNode 3s ease-in-out infinite;
}

.network-node.large {
  animation: pulseNodeLarge 4s ease-in-out infinite;
}

.network-node.delay-1 { animation-delay: 0.5s; }
.network-node.delay-2 { animation-delay: 1s; }
.network-node.delay-3 { animation-delay: 1.5s; }
.network-node.delay-4 { animation-delay: 2s; }

/* Connection Lines */
.connection-line {
  stroke: var(--primary-color);
  stroke-width: 1;
  opacity: 0.3;
  animation: fadeConnection 6s ease-in-out infinite;
}

.connection-line.delay-1 { animation-delay: 1s; }
.connection-line.delay-2 { animation-delay: 2s; }
.connection-line.delay-3 { animation-delay: 3s; }

/* Keyframe Animations */
@keyframes drawLine {
  0%, 100% { stroke-dasharray: 0, 1000; opacity: 0.2; }
  50% { stroke-dasharray: 1000, 0; opacity: 0.6; }
}

@keyframes pulseNode {
  0%, 100% { 
    transform: scale(1); 
    opacity: 0.4; 
  }
  50% { 
    transform: scale(1.2); 
    opacity: 0.8; 
  }
}

@keyframes pulseNodeLarge {
  0%, 100% { 
    transform: scale(1); 
    opacity: 0.5; 
    filter: drop-shadow(0 0 5px var(--primary-color));
  }
  50% { 
    transform: scale(1.3); 
    opacity: 0.9; 
    filter: drop-shadow(0 0 15px var(--primary-color));
  }
}

@keyframes fadeConnection {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.5; }
}

@keyframes pulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  position: relative;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-primary);
  animation: fadeInUp 1s ease-out 0.9s both;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(166, 255, 0, 0.4);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Modern Cards */
.card {
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-secondary);
  border-color: var(--primary-color);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card ul {
  list-style: none;
  padding-left: 0;
}

.card li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.card li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 0.8rem;
}

/* Profile Images for About Section */
.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  display: block;
  border: 3px solid var(--primary-color);
  transition: filter 0.3s ease, box-shadow 0.3s ease;
  filter: grayscale(20%);
  object-fit: cover;
  object-position: center top;
  transform: scale(0.85);
}

.profile-image:hover {
  filter: grayscale(0%);
  box-shadow: 0 0 20px rgba(166, 255, 0, 0.4);
}

.card .position {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.card h3 {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Technology Section Specific */
.tech-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  margin-top: 1rem;
  transition: transform 0.3s ease;
}

.tech-image:hover {
  transform: scale(1.02);
}

/* Interactive Flip Cards for Technology Section */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 530px; /* Increased from 440px to 485px (additional 10% increase) */
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(166, 255, 0, 0.1) 100%);
}

.flip-card:hover .flip-card-front {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-secondary);
}

.flip-card-back h4 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.flip-card-back .spec-list {
  list-style: none;
  padding: 0;
  width: 100%;
}

.flip-card-back .spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(166, 255, 0, 0.2);
  color: var(--text-secondary);
}

.flip-card-back .spec-list li:last-child {
  border-bottom: none;
}

.flip-card-back .spec-list .spec-label {
  font-weight: 600;
  color: var(--primary-color);
}

.flip-card-back .spec-list .spec-value {
  font-weight: 500;
  color: var(--text-primary);
}

.sensor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.sensor-item {
  background: rgba(166, 255, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--primary-color);
  text-align: center;
}

.sensor-item h5 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.sensor-item p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
}

.software-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.software-feature {
  background: rgba(166, 255, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  text-align: left;
}

.software-feature h5 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.software-feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.flip-indicator {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: var(--primary-color);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Partners Section */
#partners .card {
  text-align: center;
}

#partners .card h3 {
  text-align: center;
}

#partners .card p {
  text-align: center;
}

#partners .card strong {
  color: var(--primary-color);
}

.partner-logo {
  height: 80px;
  width: auto;
  filter: grayscale(100%);
  transition: all 0.3s ease;
  margin: 0 auto;
  display: block;
}

.partner-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* Contact Form */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

form input,
form textarea {
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 255, 0, 0.2);
}

form textarea {
  grid-column: 1 / span 2;
  resize: vertical;
  min-height: 120px;
}

form button {
  grid-column: 1 / span 2;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-primary);
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(166, 255, 0, 0.4);
}

/* Footer */
footer {
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .subtitle {
    font-size: 1.2rem;
  }
  
  .section {
    padding: 4rem 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  form {
    grid-template-columns: 1fr;
  }
  
  form textarea {
    grid-column: 1;
  }
  
  form button {
    grid-column: 1;
  }
  
  .hero-background svg {
    transform: scale(1.2);
    transform-origin: center bottom;
  }
  
  .mountain-line,
  .connection-line {
    stroke-width: 1;
  }
  
  .network-node {
    transform: scale(0.8);
  }
  
  .network-node.large {
    transform: scale(1);
  }

  .flip-card {
    height: 350px;
  }
  
  .flip-card-front, .flip-card-back {
    padding: 1.5rem;
  }
  
  .sensor-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .software-features {
    gap: 0.8rem;
  }
  
  .software-feature,
  .sensor-item {
    padding: 0.8rem;
  }
  
  .spec-list li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section h2 {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .hero-background {
    opacity: 0.4;
  }
  
  .hero-background svg {
    transform: scale(1.5);
  }

  .flip-card {
    height: 320px;
  }
  
  .flip-card-front, .flip-card-back {
    padding: 1rem;
  }
  
  .flip-card-back h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .profile-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    object-position: center top;
    transform: scale(0.85);
  }
}
