/* ========================================
   QUADEX TECHNOLOGIES AFRICA - FUTURISTIC DESIGN
   ======================================== */

:root {
  --primary-color: #00d4ff;
  --secondary-color: #0066ff;
  --accent-color: #ff00ff;
  --dark-bg: #0a0e27;
  --darker-bg: #050810;
  --light-text: #ffffff;
  --gray-text: #a0aec0;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --font-primary: 'Exo 2', sans-serif;
  --font-heading: 'Orbitron', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--dark-bg);
  color: var(--light-text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.main-header.scrolled {
  background: rgba(5, 8, 16, 0.95);
  box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Animated GIF Logo Styling */
.animated-logo {
  display: block;
  height: auto;
  max-width: 100%;
  transition: transform 0.3s ease, filter 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.animated-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5));
}

/* Logo Size Classes */
.animated-logo.header-size {
  height: 60px;
  width: auto;
}

.animated-logo.preloader-size {
  height: 150px;
  width: auto;
}

.main-logo img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.main-logo img:hover {
  transform: scale(1.05) rotate(2deg);
}

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header-nav a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-secondary);
  transition: width 0.3s ease;
}

.header-nav a:hover::after {
  width: 100%;
}

.header-nav a:hover {
  color: var(--primary-color);
}

.cta-nav {
  background: var(--gradient-secondary);
  padding: 0.7rem 1.5rem !important;
  border-radius: 25px;
  font-weight: 600;
}

.cta-nav::after {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 2rem 60px;
}

/* Blueprint Background */
.blueprint-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: blueprintMove 20s linear infinite;
  z-index: 1;
}

@keyframes blueprintMove {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

/* Magnetic Train Animation */
.magnetic-train-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  overflow: hidden;
}

.magnetic-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--primary-color) 50%, 
    transparent 100%);
  top: 30%;
  box-shadow: 0 0 20px var(--primary-color);
  animation: trackGlow 2s ease-in-out infinite;
}

@keyframes trackGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.train {
  position: absolute;
  width: 120px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  top: 30%;
  transform: translateY(-50%);
  box-shadow: 0 0 30px var(--primary-color), 0 0 60px var(--secondary-color);
  animation: trainMove 15s linear infinite;
}

.train::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
  border-radius: 10px;
  top: 0;
  left: 0;
}

.train::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
  right: 100%;
  top: 50%;
  opacity: 0.7;
}

.train-1 {
  animation-delay: 0s;
  top: 25%;
}

.train-2 {
  animation-delay: 5s;
  top: 35%;
  width: 100px;
  height: 50px;
}

.train-3 {
  animation-delay: 10s;
  top: 40%;
  width: 140px;
  height: 55px;
}

@keyframes trainMove {
  0% {
    left: -200px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: calc(100% + 200px);
    opacity: 0;
  }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1200px;
  animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glitch Effect */
.glitch-wrapper {
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px var(--primary-color));
  }
  50% {
    filter: drop-shadow(0 0 25px var(--primary-color));
  }
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--accent-color);
  clip: rect(24px, 9999px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 var(--primary-color);
  clip: rect(85px, 9999px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(17px, 9999px, 89px, 0); }
  25% { clip: rect(140px, 9999px, 84px, 0); }
  50% { clip: rect(26px, 9999px, 88px, 0); }
  75% { clip: rect(119px, 9999px, 67px, 0); }
  100% { clip: rect(55px, 9999px, 28px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(65px, 9999px, 119px, 0); }
  25% { clip: rect(48px, 9999px, 105px, 0); }
  50% { clip: rect(137px, 9999px, 19px, 0); }
  75% { clip: rect(96px, 9999px, 73px, 0); }
  100% { clip: rect(21px, 9999px, 144px, 0); }
}

/* Typing Effect */
.typing-container {
  margin: 1.5rem 0;
}

.typing-text {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--primary-color);
  border-right: 2px solid var(--primary-color);
  padding-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--gray-text);
  max-width: 800px;
  margin: 2rem auto;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.hero-button {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.primary-btn {
  background: var(--gradient-secondary);
  color: var(--light-text);
  box-shadow: 0 5px 25px rgba(0, 212, 255, 0.4);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.6);
}

.secondary-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 10;
  animation: bounce 2s infinite;
}

.scroll-line {
  width: 2px;
  height: 50px;
  background: linear-gradient(180deg, var(--primary-color), transparent);
}

.scroll-indicator span {
  font-size: 0.8rem;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* ========================================
   SERVICES SECTION
   ======================================== */

.services-section {
  padding: 100px 2rem;
  background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--light-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-underline {
  width: 100px;
  height: 4px;
  background: var(--gradient-secondary);
  margin: 0 auto;
  border-radius: 2px;
}

.services-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.service-card.featured {
  border: 2px solid var(--primary-color);
  background: rgba(0, 212, 255, 0.05);
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient-accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.card-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-secondary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--light-text);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-card p {
  color: var(--gray-text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  margin: 1.5rem 0;
}

.service-features li {
  padding: 0.7rem 0;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.service-features i {
  color: var(--primary-color);
}

.product-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.product-item {
  background: rgba(0, 212, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.product-item strong {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.product-item span {
  color: var(--gray-text);
  font-size: 0.9rem;
}

.service-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.service-link:hover {
  gap: 1rem;
  color: var(--light-text);
}

/* ========================================
   INNOVATION SECTION
   ======================================== */

.innovation-section {
  padding: 100px 2rem;
  background: var(--darker-bg);
}

.innovation-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 4rem;
  align-items: center;
}

.innovation-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.innovation-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.innovation-image:hover img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
}

.innovation-badge {
  background: var(--gradient-accent);
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 5px 20px rgba(255, 0, 255, 0.4);
}

.innovation-content h2 {
  margin-bottom: 1rem;
}

.innovation-subtitle {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
}

.innovation-content p {
  color: var(--gray-text);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.innovation-features {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(0, 212, 255, 0.05);
  border-color: var(--primary-color);
  transform: translateX(10px);
}

.feature-item i {
  font-size: 2rem;
  color: var(--primary-color);
  min-width: 40px;
}

.feature-item h4 {
  color: var(--light-text);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.feature-item p {
  color: var(--gray-text);
  margin: 0;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
  padding: 100px 2rem;
  background: var(--dark-bg);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  margin-top: 3rem;
}

.about-content p {
  color: var(--gray-text);
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.vision-mission {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.vision-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 3rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  text-align: center;
  transition: all 0.3s ease;
}

.vision-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.vision-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: block;
}

.vision-card h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.vision-card p {
  font-size: 1rem;
  color: var(--gray-text);
}

/* ========================================
   STATS SECTION
   ======================================== */

.stats-section {
  padding: 80px 2rem;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: statsGrid 15s linear infinite;
}

@keyframes statsGrid {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--gray-text);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--darker-bg);
  padding: 80px 2rem 30px;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.footer-logo {
  height: 60px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--gray-text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: var(--gray-text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.social-links a:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  color: var(--light-text);
  font-family: var(--font-primary);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.newsletter-form button {
  padding: 0.8rem 1.5rem;
  background: var(--gradient-secondary);
  border: none;
  border-radius: 25px;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--gray-text);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--gray-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 968px) {
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--darker-bg);
    flex-direction: column;
    padding: 100px 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .header-nav.active {
    right: 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .innovation-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .product-showcase {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  /* Hero Section */
  .hero {
    min-height: 80vh;
    padding: 120px 1rem 4rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .glitch {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-button {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* Header */
  .header-content {
    padding: 1rem;
  }
  
  .animated-logo.header-size {
    height: 50px;
  }
  
  .animated-logo.preloader-size {
    height: 120px;
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
  
  /* Vision & Mission */
  .vision-mission {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 1rem;
  }
  
  .footer-column h3 {
    font-size: 1.2rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-input {
    border-radius: 10px;
  }
  
  .newsletter-button {
    border-radius: 10px;
  }
  
  /* Sections */
  section {
    padding: 4rem 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  /* Service Cards */
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .service-icon {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
  }
  
  .service-title {
    font-size: 1.3rem;
  }
  
  /* Innovation Section */
  .innovation-image {
    height: 250px;
  }
  
  .innovation-content h3 {
    font-size: 1.5rem;
  }
  
  /* Train Animations - Reduce complexity on mobile */
  .magnetic-train {
    animation-duration: 20s;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .glitch {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem 1rem;
  }
  
  .service-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
  }
  
  .service-title {
    font-size: 1.1rem;
  }
  
  .animated-logo.header-size {
    height: 40px;
  }
  
  .animated-logo.preloader-size {
    height: 100px;
  }
  
  /* Preloader for small screens */
  .progress-bar {
    width: 200px;
  }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 968px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Ensure touch-friendly buttons */
  .hero-button,
  .cta-button,
  .newsletter-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .service-card:hover {
    transform: translateY(0);
  }
  
  .service-card:active {
    transform: scale(0.98);
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.animate-in {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
